/* ═══════════════════════════════════════════════════════
   Studio Talk calendar card (parts/studio-talk-calendar.php),
   in the home page's "Come to the next Studio Talk" section.
   Same family as the newsletter banner (subscribe.css).
   ═══════════════════════════════════════════════════════ */

.nl-cal {
  position: relative;
  width: 100%;
  max-width: 470px;
  margin-left: auto;
  padding: 26px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.09);
  background: linear-gradient(165deg, #141414 0%, #090909 60%, #0d0d0d 100%);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,0.9);
  overflow: hidden;
  isolation: isolate;
  font-family: 'Geist', sans-serif;
}
.nl-cal::before {   /* dot grid, fading from the top right */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(90% 70% at 100% 0%, #000 15%, transparent 70%);
          mask-image: radial-gradient(90% 70% at 100% 0%, #000 15%, transparent 70%);
}
.nl-cal__glow {
  position: absolute; z-index: -1; width: 420px; height: 420px; left: -160px; top: -170px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,0.1), transparent);
  animation: nl-cal-drift 14s ease-in-out infinite alternate;
}
@keyframes nl-cal-drift { to { transform: translate(60px, 50px) scale(1.15); } }

/* ── Head ─────────────────────────────────────────────── */
.nl-cal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.nl-cal__eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin: 0;
  font-size: 12.5px; font-weight: 500; letter-spacing: -0.01em; color: rgba(255,255,255,0.72);
}
.nl-cal__pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }
.nl-cal__pulse::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(74,222,128,0.7);
  animation: nl-cal-ping 2.4s cubic-bezier(0,0,0.2,1) infinite;
}
@keyframes nl-cal-ping { 0% { transform: scale(0.6); opacity: 1; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
.nl-cal__add {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 7px 13px 7px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.03);
  font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.8); text-decoration: none;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.nl-cal__add svg { width: 15px; height: 15px; }
.nl-cal__add:hover { background: #fff; border-color: #fff; color: #000; }
.nl-cal__add:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ── Next session: tear-off calendar page ─────────────── */
.nl-cal__next { display: flex; align-items: center; gap: 38px; }
.nl-cal__tile { position: relative; flex: none; width: 122px; height: 138px; }
.nl-cal__page { position: absolute; inset: 0; border-radius: 18px; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.nl-cal__page--3 { background: #1c1c1c; border: 1px solid rgba(255,255,255,0.1); transform: rotate(9deg) translate(10px, 4px); }
.nl-cal__page--2 { background: #2a2a2a; border: 1px solid rgba(255,255,255,0.14); transform: rotate(4.5deg) translate(5px, 2px); }
.nl-cal__page--1 {
  display: flex; flex-direction: column; align-items: center;
  background: #fff; color: #111; overflow: visible;
  box-shadow: 0 24px 50px -18px rgba(0,0,0,0.9);
  transform: rotate(-3deg);
}
.nl-cal:hover .nl-cal__page--3 { transform: rotate(14deg) translate(18px, 6px); }
.nl-cal:hover .nl-cal__page--2 { transform: rotate(7deg) translate(9px, 3px); }
.nl-cal__mon {
  align-self: stretch;
  padding: 13px 0 7px; border-radius: 18px 18px 0 0;
  background: #111; color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; text-align: center;
}
.nl-cal__rings { position: absolute; top: -7px; left: 0; right: 0; display: flex; justify-content: center; gap: 46px; z-index: 2; }
.nl-cal__rings i { width: 8px; height: 16px; border-radius: 6px; background: linear-gradient(#e5e5e5, #8a8a8a); box-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.nl-cal__day { margin-top: 6px; font-size: 54px; font-weight: 600; line-height: 1; letter-spacing: -0.06em; }
.nl-cal__wd { margin-top: 4px; font-size: 11.5px; font-weight: 500; color: #6b6b6b; }

.nl-cal__info { min-width: 0; }
.nl-cal__label { margin: 0 0 4px; font-size: 12px; color: rgba(255,255,255,0.45); }
/* The topic is the headline; the countdown sits small above it */
.nl-cal__count { margin: 0 0 6px; font-size: 14px; line-height: 1.4; color: rgba(255,255,255,0.75); }
.nl-cal__topic { margin: 0 0 8px; font-size: clamp(1.5rem, 2.4vw, 1.875rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.04em; color: #fff; text-wrap: balance; }
.nl-cal__meta { margin: 0; font-size: 12.5px; color: rgba(255,255,255,0.45); }

/* ── Timeline of the following sessions ───────────────── */
.nl-cal__list { position: relative; list-style: none; margin: 26px 0 0; padding: 6px 0 0; }
.nl-cal__list::before {   /* the rail, dashed like the fortnight between talks */
  content: ''; position: absolute; left: 7px; top: -12px; bottom: 22px; width: 1px;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.25) 0 4px, transparent 4px 9px);
}
.nl-cal__row {
  position: relative;
  display: grid; grid-template-columns: 15px 64px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 12px 12px 0;
  border-radius: 14px;
  transition: background .2s ease;
}
.nl-cal__row + .nl-cal__row { border-top: 1px solid rgba(255,255,255,0.06); }
.nl-cal__row:hover { background: rgba(255,255,255,0.03); }
.nl-cal__node { justify-self: center; width: 9px; height: 9px; border-radius: 50%; background: #0b0b0b; border: 1.5px solid rgba(255,255,255,0.55); }
.nl-cal__date { font-size: 13px; color: rgba(255,255,255,0.55); white-space: nowrap; }
.nl-cal__date b { margin-right: 2px; font-size: 20px; font-weight: 600; letter-spacing: -0.04em; color: #fff; }
.nl-cal__rtopic { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: rgba(255,255,255,0.6); }
.nl-cal__in {
  padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,0.06);
  font-size: 11.5px; font-weight: 500; color: rgba(255,255,255,0.65); white-space: nowrap;
}

.nl-cal__foot {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 18px 0 0; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 12px; color: rgba(255,255,255,0.45);
}
.nl-cal__foot span + span::before { content: '·'; margin-right: 14px; color: rgba(255,255,255,0.25); }

@media (max-width: 1023px) { .nl-cal { margin: 8px 0 0; } }
@media (max-width: 420px) {
  .nl-cal { padding: 20px; border-radius: 24px; }
  .nl-cal__next { gap: 30px; }
  .nl-cal__tile { width: 104px; height: 120px; }
  .nl-cal__day { font-size: 46px; }
  .nl-cal__row { grid-template-columns: 15px 58px minmax(0, 1fr) auto; gap: 10px; padding-right: 4px; }
  .nl-cal__add { padding: 7px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .nl-cal__glow, .nl-cal__pulse::after { animation: none; }
  .nl-cal__page { transition: none; }
}

/* ═══ Light mode ═════════════════════════════════════════ */
[data-theme="light"] .nl-cal {
  background: linear-gradient(165deg, #ffffff 0%, #fafafa 60%, #f3f3f3 100%);
  border-color: rgba(23,23,23,0.1);
  box-shadow: 0 1px 4px rgba(23,23,23,0.06), 0 30px 60px -40px rgba(23,23,23,0.3);
}
[data-theme="light"] .nl-cal::before { background-image: radial-gradient(rgba(23,23,23,0.09) 1px, transparent 1px); }
[data-theme="light"] .nl-cal__glow { background: radial-gradient(closest-side, rgba(23,23,23,0.05), transparent); }
[data-theme="light"] .nl-cal__eyebrow { color: #404040; }
[data-theme="light"] .nl-cal__pulse { background: #16a34a; }
[data-theme="light"] .nl-cal__pulse::after { border-color: rgba(22,163,74,0.6); }
[data-theme="light"] .nl-cal__add { color: #262626; border-color: rgba(23,23,23,0.16); background: #fff; }
[data-theme="light"] .nl-cal__add:hover { background: #171717; border-color: #171717; color: #fafafa; }
[data-theme="light"] .nl-cal__add:focus-visible { outline-color: #171717; }
[data-theme="light"] .nl-cal__page--3 { background: #e6e6e6; border-color: rgba(23,23,23,0.06); }
[data-theme="light"] .nl-cal__page--2 { background: #f1f1f1; border-color: rgba(23,23,23,0.08); }
[data-theme="light"] .nl-cal__page--1 { box-shadow: 0 20px 40px -18px rgba(23,23,23,0.4), 0 0 0 1px rgba(23,23,23,0.08); }
[data-theme="light"] .nl-cal__label,
[data-theme="light"] .nl-cal__meta,
[data-theme="light"] .nl-cal__foot { color: #6b6b6b; }
[data-theme="light"] .nl-cal__topic,
[data-theme="light"] .nl-cal__date b { color: #171717; }
[data-theme="light"] .nl-cal__count { color: #404040; }
[data-theme="light"] .nl-cal__date,
[data-theme="light"] .nl-cal__rtopic { color: #525252; }
[data-theme="light"] .nl-cal__list::before { background: repeating-linear-gradient(to bottom, rgba(23,23,23,0.25) 0 4px, transparent 4px 9px); }
[data-theme="light"] .nl-cal__row + .nl-cal__row,
[data-theme="light"] .nl-cal__foot { border-color: rgba(23,23,23,0.08); }
[data-theme="light"] .nl-cal__row:hover { background: rgba(23,23,23,0.03); }
[data-theme="light"] .nl-cal__node { background: #fff; border-color: rgba(23,23,23,0.5); }
[data-theme="light"] .nl-cal__in { background: rgba(23,23,23,0.06); color: #404040; }
[data-theme="light"] .nl-cal__foot span + span::before { color: rgba(23,23,23,0.3); }
