/* ===========================================================
   Technically Speaking — landing page
   Design tokens pulled from Figma (file aX3UBMZnbG2PEh0zq56B72)
   =========================================================== */

:root {
  --bg-cream:    #f1e5ca;
  --bg-card:     #feeecc;
  --pill-mint:   #cbe2d1;
  --ink:         #102215;
  --ink-2:       #0f2315;
  --orange:      #ff5322;
  --white:       #ffffff;
  --hero-grad-1: #2c4a2e;
  --hero-grad-2: #102215;
  --hero-grad-3: #4a3a1f;
  --hero-glow-1: #c44a1a;   /* warm top-left bloom */
  --hero-glow-2: #b8a020;   /* yellow right bloom */

  --radius-pill: 48px;
  --radius-card: 4px;
  --radius-cover: 16px;
  --radius-host: 24px;
  --max-w: 1287px;

  --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* If you license GT America, drop the woff2 files in /assets/fonts/
     and swap the var below to "'GT America', Inter, ..." */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 836px;
  color: var(--white);
  isolation: isolate;
  padding: 32px 24px 128px;
  background: url('../assets/bg/hero.jpg') center/cover no-repeat var(--hero-grad-2);
}

.hero__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Hero intro animation ---------- */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__brand,
.hero__cover,
.hero__title,
.hero__sub,
.hero .signup,
.hero__trust {
  opacity: 0;
  animation: hero-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero__brand  { animation-delay: 0.05s; }
.hero__cover  { animation-delay: 0.15s; }
.hero__title  { animation-delay: 0.30s; }
.hero__sub    { animation-delay: 0.45s; }
.hero .signup { animation-delay: 0.60s; }
.hero__trust  { animation-delay: 0.75s; }

@media (prefers-reduced-motion: reduce) {
  .hero__brand,
  .hero__cover,
  .hero__title,
  .hero__sub,
  .hero .signup,
  .hero__trust {
    opacity: 1;
    animation: none;
  }
}

.hero__brand {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  margin-bottom: 80px;
}

.hero__cover {
  margin: 0 0 32px;
  width: 227px;
  height: 227px;
  padding: 4px;
  border: 1px solid #efefef;
  border-radius: var(--radius-cover);
  background: #ffffff;
}
.hero__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.125;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}

.hero__sub {
  max-width: 580px;
  margin: 0 auto 32px;
  color: rgba(255,255,255,0.78);
  font-size: 20px;
  line-height: 1.5;
}

.hero__trust {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 24px auto 0;
  color: rgba(255,255,255,0.85);
  font-size: 12px;
}
.hero__branch {
  width: 14px;
  height: 32px;
  flex: 0 0 auto;
  opacity: 0.75;
}
.hero__branch--right { transform: scaleX(-1); }

/* ============================================================
   SIGNUP FORM (shared)
   ============================================================ */
.signup {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 320px;
  background: var(--white);
  border-radius: 9999px;
  padding: 5px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.08);
}
.signup--hero { border: 3px solid var(--pill-mint); }

.signup input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: rgba(0,0,0,0.85);
  padding: 8px 14px;
}
.signup input::placeholder { color: rgba(0,0,0,0.5); }

/* Kill the browser autofill yellow/blue background — paint the pill white instead */
.signup input[type="email"]:-webkit-autofill,
.signup input[type="email"]:-webkit-autofill:hover,
.signup input[type="email"]:-webkit-autofill:focus,
.signup input[type="email"]:-webkit-autofill:active {
  -webkit-text-fill-color: rgba(0,0,0,0.85);
  -webkit-box-shadow: 0 0 0 1000px var(--white) inset;
          box-shadow: 0 0 0 1000px var(--white) inset;
  caret-color: rgba(0,0,0,0.85);
  transition: background-color 99999s ease-in-out 0s;
}

.signup__btn {
  flex: 0 0 auto;
  border: 0;
  background: var(--orange);
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 9999px;
  transition: transform 0.05s ease, filter 0.15s ease;
}
.signup__btn:hover { filter: brightness(1.08); }
.signup__btn:active { transform: translateY(1px); }
.signup__btn--dark { background: #000; }

/* Status renders as a floating toast pill (shared style for all signup forms) */
.signup__status {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(12px);
  z-index: 1000;
  margin: 0;
  padding: 12px 22px;
  background: #000;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  border-radius: 9999px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}
.signup__status:not(:empty) {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.signup[data-loading] .signup__btn { pointer-events: none; opacity: 0.7; }

/* ============================================================
   POST-SIGNUP TOPIC SURVEY — BOTTOM SHEET
   ============================================================ */
.sheet[hidden] { display: none; }
.sheet {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 34, 21, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sheet__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--white);
  color: var(--ink);
  border-radius: 20px 20px 0 0;
  padding: 26px 24px calc(28px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(16, 34, 21, 0.28);
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet.is-open .sheet__panel { transform: translateY(0); }

.sheet__grip {
  display: block;
  width: 40px; height: 4px;
  border-radius: 9999px;
  background: rgba(16, 34, 21, 0.2);
  margin: 0 auto 16px;
}
.sheet__close {
  position: absolute;
  top: 12px; right: 16px;
  border: 0; background: transparent;
  font-size: 26px; line-height: 1;
  color: var(--ink);
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.15s ease;
}
.sheet__close:hover { opacity: 1; }
.sheet__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
}
.sheet__desc {
  font-size: 15px;
  line-height: 1.5;
  margin: 0 auto 22px;
  max-width: 380px;
  opacity: 0.82;
}
.sheet__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sheet__cta {
  display: inline-block;
  width: 100%;
  max-width: 320px;
  background: var(--orange);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  transition: filter 0.15s ease, transform 0.1s ease;
}
.sheet__cta:hover { filter: brightness(1.08); }
.sheet__cta:active { transform: translateY(1px); }
.sheet__dismiss {
  border: 0; background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}
.sheet__dismiss:hover { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .sheet__panel, .sheet__backdrop { transition: none; }
}

/* ============================================================
   LOGO STRIP
   ============================================================ */
.logos {
  background: #F5EEDA;
  padding: 64px 0 72px;
  text-align: center;
  overflow: hidden;
}
.logos__title {
  margin: 0 0 40px;
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.logos__marquee { position: relative; overflow: hidden; }
.logos__marquee::before,
.logos__marquee::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 96px; z-index: 1;
  pointer-events: none;
}
.logos__marquee::before { left: 0;  background: linear-gradient(90deg,  #F5EEDA, rgba(245,238,218,0)); }
.logos__marquee::after  { right: 0; background: linear-gradient(270deg, #F5EEDA, rgba(245,238,218,0)); }

.logos__track {
  display: flex;
  gap: 56px;
  align-items: center;
  width: max-content;
  will-change: transform;
  animation: logos-drift 60s linear infinite;
}
@keyframes logos-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.logos__marquee:hover .logos__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .logos__track { animation: none; }
}
.logos__track img {
  width: 160px;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  object-position: center;
  opacity: 0.85;
  filter: grayscale(0.1);
  flex: 0 0 auto;
}

/* ============================================================
   SECTION TITLE (shared)
   ============================================================ */
.section-title {
  margin: 0 0 32px;
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.section-sub {
  margin: -16px auto 32px;
  max-width: 600px;
  text-align: center;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.75;
}

/* ============================================================
   TOPICS — dual marquee, opposite directions
   ============================================================ */
.topics {
  padding: 96px 0 32px;
  max-width: 100%;
  margin: 0 auto;
}
.topics .section-title { padding: 0 24px; }

.topics__marquee {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  /* fade edges so pills don't pop in/out abruptly */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.topics__track {
  display: flex;
  gap: 16px;
  width: max-content;
  padding-left: 16px;
  will-change: transform;
}

/* Scroll-driven: JS sets transform based on page scroll position.
   Initial offsets ensure each row has room to move in its direction. */
.topics__track--left  { transform: translate3d(0, 0, 0); }
.topics__track--right { transform: translate3d(-30%, 0, 0); }

@media (prefers-reduced-motion: reduce) {
  .topics__track--left,
  .topics__track--right { transform: none !important; }
}

.pill {
  background: var(--pill-mint);
  border: 1px solid var(--ink-2);
  border-radius: var(--radius-pill);
  padding: 18px 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  flex: 0 0 auto;
}

/* ============================================================
   REVIEWS
   ============================================================ */
.reviews {
  padding: 96px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.reviews__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.review {
  background: var(--bg-card);
  border: 1px solid var(--ink-2);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.review__stars { display: flex; gap: 2px; }
.star { width: 16px; height: 16px; fill: #1f5b2a; }
.review__quote {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}
.review__name {
  margin: auto 0 0;
  font-size: 14px;
  color: var(--ink);
  opacity: 0.7;
}

/* ============================================================
   TOP EPISODES — stacked horizontal rows
   ============================================================ */
.episodes {
  padding: 0 24px 96px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.episodes__list {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--ink-2);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.episodes__list > li { display: flex; }
.episodes__list > li + li { border-top: 1px solid var(--ink-2); }

.episode {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 16px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease;
}
.episode:hover { background: #fafafa; }
.episode:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.episode__thumb {
  flex: 0 0 auto;
  width: 100px;
  aspect-ratio: 1 / 1;
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.35), rgba(255,255,255,0) 60%),
    linear-gradient(135deg, var(--pill-mint) 0%, #f1e5ca 100%);
}
.episode__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.episode__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.episode__tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--pill-mint);
  border: 1px solid var(--ink-2);
  padding: 4px 10px;
  border-radius: 9999px;
}
.episode__title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink);
}
.episode__guest {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
  opacity: 0.7;
}
.episode__cta {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--orange);
  white-space: nowrap;
  padding-right: 8px;
}

@media (max-width: 600px) {
  /* 16px prevents iOS Safari from auto-zooming when the field is focused */
  .signup input[type="email"] { font-size: 16px; }

  .episode {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 12px;
  }
  .episode__thumb { width: 64px; }
  .episode__body  { gap: 4px; }
  .episode__title {
    font-size: 15px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .episode__guest { font-size: 13px; }
  .episode__cta   { display: none; } /* whole row is clickable */
}

/* ============================================================
   HOST
   ============================================================ */
.host {
  padding: 64px 24px 96px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.host__photo {
  width: 202px; height: 202px;
  margin: 0 auto 32px;
  border: 1px solid var(--ink-2);
  border-radius: var(--radius-host);
  overflow: hidden;
  background: #ffb16a;
}
.host__photo img { width: 100%; height: 100%; object-fit: cover; }
.host__bio {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
}

/* ============================================================
   FINAL CTA + FOOTER (shared orange background)
   ============================================================ */
.cta {
  background: url('../assets/bg/footer.jpg') center/cover no-repeat var(--orange);
  color: var(--ink);
  padding: 80px 24px 48px;
}
.cta__inner {
  max-width: 540px;
  margin: 0 auto 56px;
  text-align: center;
}
.cta__title {
  margin: 0 0 20px;
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.cta__sub {
  margin: 0 auto 32px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.85;
  max-width: 520px;
}
.cta .signup { margin: 0 auto; }

.footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px 40px;
  text-align: center;
  color: var(--ink);
  font-size: 16px;
}
.footer p { margin: 16px 0 0; opacity: 0.7; }
.footer__nav { display: inline-flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer__nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(15,35,21,0.4);
}
.footer__nav a:hover { border-bottom-color: var(--ink); }
.footer__mark {
  display: block;
  margin: 32px auto 0;
  width: 40px;
  height: 40px;
  opacity: 0.9;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Arrow overlays hidden by default — only shown on mobile */
.reviews__viewport { position: relative; }
.reviews__btn { display: none; }

@media (max-width: 960px) {
  .reviews__grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: horizontal swipe carousel with scroll-snap */
@media (max-width: 720px) {
  .reviews { padding-left: 0; padding-right: 0; }
  .reviews .section-title { padding: 0 16px; }
  .reviews__grid {
    display: flex;
    grid-template-columns: none;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    padding: 8px 16px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;            /* Firefox */
  }
  .reviews__grid::-webkit-scrollbar { display: none; } /* Safari/Chrome */
  .review {
    flex: 0 0 82%;                    /* next card peeks in */
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .reviews__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.94);
    border: 1px solid var(--ink-2);
    color: var(--ink-2);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15,35,21,0.18);
    transition: background 0.15s ease, opacity 0.2s ease;
  }
  .reviews__btn--prev { left: 8px; }
  .reviews__btn--next { right: 8px; }
  .reviews__btn:hover { background: #fff; }
  .reviews__btn:disabled { opacity: 0; pointer-events: none; }
  .reviews__btn:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
  }
}
@media (max-width: 720px) {
  /* ---------- Type scale (mobile) ----------
     L1  H1 hero          40 / 1.1
     L2  H2 section       28 / 1.2     all section headers same size
     L3  Supporting       16 / 1.5     subheads + body copy
     L4  Meta / small     13 / 1.5     names, guests, trust line
  ------------------------------------------ */
  .hero__title    { font-size: 40px; line-height: 1.1;  letter-spacing: -0.02em; }
  .section-title,
  .logos__title,
  .cta__title     { font-size: 28px; line-height: 1.2;  letter-spacing: -0.01em; }
  .hero__sub,
  .cta__sub,
  .section-sub,
  .host__bio,
  .review__quote  { font-size: 16px; line-height: 1.5; }
  .review__name,
  .episode__guest,
  .hero__trust    { font-size: 13px; line-height: 1.5; }
  .episode__title { font-size: 16px; line-height: 1.3; }

  /* ---------- Layout (mobile) ----------
     Consistent 24px horizontal padding so copy isn't flush to edges */
  .hero      { padding: 24px 24px 96px; min-height: 0; }
  .hero__brand { margin-bottom: 56px; }
  .hero__cover { width: 192px; height: 192px; }

  .logos     { padding: 56px 24px; }
  .topics    { padding: 64px 0 16px; }       /* tracks bleed; title gets pad below */
  .topics .section-title { padding: 0 24px; }
  .reviews   { padding: 64px 0; }            /* carousel bleeds; title gets pad */
  .reviews .section-title { padding: 0 24px; }
  .episodes  { padding: 0 24px 80px; }
  .host      { padding: 48px 24px 72px; }
  .cta       { padding: 64px 24px 40px; }
  .footer    { padding: 48px 24px 32px; }

  .pill      { padding: 14px 20px; font-size: 14px; }
}
