/* ==========================================================================
   Gletch — marketing site
   Light, warm, direct. No dark mode, no serif italic accents, no pill chips.
   Reference points: Headspace (warm ground + big friendly type), Calm
   (generous whitespace), Cal AI (product shot does the talking),
   Perplexity (structured footer, use-case grid).
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  /* Warm off-white ground rather than pure white — Headspace/Calm both sit
     on a tinted paper, it reads friendlier than #fff. */
  --bg: #fdfaf5;
  --bg-alt: #f5efe6;
  --surface: #ffffff;
  --ink: #1c1a17;
  --ink-2: #55504a;
  --ink-3: #857d73;
  --line: #e6ddd0;

  --brand: #f0562d;
  --brand-press: #d8461f;
  --brand-tint: #ffe9e1;

  --accent-blue: #2f5fd0;
  --accent-green: #2f7d4f;
  --accent-violet: #6b4bd0;
  --accent-amber: #b8791a;

  /* Section tints — one confident hue per section instead of a single
     alt-background, so scrolling has a rhythm of its own (see .tint-*).
     Kept inside the same warm/desaturated family as --bg so the palette
     still reads as one brand, not a rainbow of demo colors. */
  --tint-peach: #ffe4d3;
  --tint-peach-ink: #7a3316;
  --tint-sand: #f5efe6;
  --tint-lime: #e6ecc9;
  --tint-lime-ink: #414f1c;
  --tint-sky: #dbe6f2;
  --tint-sky-ink: #1f3a5c;
  --tint-lilac: #e9e1f5;
  --tint-lilac-ink: #3d2d5c;
  --tint-sage: #dce7d8;
  --tint-sage-ink: #2f4a2a;
  --tint-terracotta: #f3ded2;
  --tint-terracotta-ink: #7a3b1c;
  --tint-butter: #f6ecc9;
  --tint-butter-ink: #6b551a;
  --tint-rose: #f6dde3;
  --tint-rose-ink: #7a2e42;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(28, 26, 23, 0.06), 0 2px 8px rgba(28, 26, 23, 0.04);
  --shadow-md: 0 4px 12px rgba(28, 26, 23, 0.06), 0 12px 32px rgba(28, 26, 23, 0.07);
  --shadow-lg: 0 12px 28px rgba(28, 26, 23, 0.09), 0 32px 64px rgba(28, 26, 23, 0.1);

  --wrap: 1200px;
  --gut: clamp(20px, 5vw, 48px);
  --sec: clamp(72px, 10vw, 132px);

  /* Three-font system:
     --serif  (Newsreader)     display headlines, pull quotes, "Harvard"/
                                "Stanford"-style wordmarks — the editorial voice
     --display (Space Grotesk) logo, nav, buttons, labels, footer headings —
                                the UI/brand voice
     --sans   (Inter)          body copy, paragraphs, footer links — the
                                reading voice */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
svg,
picture,
video {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.08;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}
:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- type scale ---------- */
.t-display {
  font-size: clamp(2.75rem, 6.6vw, 5rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.t-h2 {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  letter-spacing: -0.03em;
}
.t-h3 {
  font-size: clamp(1.3rem, 2.1vw, 1.6rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.t-lede {
  font-size: clamp(1.1rem, 1.85vw, 1.32rem);
  line-height: 1.5;
  color: var(--ink-2);
}
.t-eyebrow {
  font-family: var(--display);
  font-size: 0.79rem;
  font-weight: 620;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.section {
  padding-block: var(--sec);
}
.section--alt {
  background: var(--bg-alt);
}

/* ---------- section tints ----------
   Full-bleed color blocks so scrolling has a visible rhythm from section to
   section, rather than one page-long off-white field. Each tint also flips
   heading/eyebrow/check-icon color via currentColor-friendly overrides so
   text stays legible on the darker backgrounds without a second stylesheet. */
.tint-peach {
  background: var(--tint-peach);
}
.tint-lime {
  background: var(--tint-lime);
}
.tint-sky {
  background: var(--tint-sky);
}
.tint-lilac {
  background: var(--tint-lilac);
}
.tint-peach .t-eyebrow,
.tint-peach .feat__check,
.tint-peach .step::before {
  color: var(--tint-peach-ink);
}
.tint-lime .t-eyebrow,
.tint-lime .feat__check,
.tint-lime .step::before {
  color: var(--tint-lime-ink);
}
.tint-sky .t-eyebrow,
.tint-sky .feat__check,
.tint-sky .step::before {
  color: var(--tint-sky-ink);
}
.tint-lilac .t-eyebrow,
.tint-lilac .feat__check,
.tint-lilac .step::before {
  color: var(--tint-lilac-ink);
}
.tint-peach .step::before {
  background: rgba(122, 51, 22, 0.12);
}
.tint-lime .step::before {
  background: rgba(65, 79, 28, 0.12);
}
.tint-sky .step::before {
  background: rgba(31, 58, 92, 0.12);
}
.tint-lilac .step::before {
  background: rgba(61, 45, 92, 0.12);
}
/* Cards/panels sitting on a tint read better as flat surfaces than white
   boxes with their own shadow competing against the color block. */
.tint-peach .sci__card,
.tint-lime .sci__card,
.tint-sky .sci__card,
.tint-lilac .sci__card,
.tint-peach .intent__card,
.tint-lime .intent__card,
.tint-sky .intent__card,
.tint-lilac .intent__card {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(28, 26, 23, 0.1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  z-index: 200;
  transition: top 0.16s;
}
.skip:focus {
  top: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.16s, border-color 0.16s, transform 0.12s,
    box-shadow 0.16s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--brand-press);
}
.btn--secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn--secondary:hover {
  border-color: var(--ink-3);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  padding-inline: 4px;
}
.btn--ghost:hover {
  color: var(--brand);
}
.btn:active {
  transform: translateY(1px);
}
.btn--sm {
  padding: 10px 20px;
  font-size: 0.94rem;
}
.btn--lg {
  padding: 17px 34px;
  font-size: 1.06rem;
}

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 250, 245, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background-color 0.2s;
}
.nav.is-stuck {
  border-bottom-color: var(--line);
}
.nav__in {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 14px var(--gut);
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}
.nav__mark span {
  color: var(--brand);
}
.nav__links {
  display: flex;
  gap: 4px;
  margin-right: auto;
}
.nav__links a {
  font-family: var(--display);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 0.96rem;
  font-weight: 520;
  color: var(--ink-2);
  transition: color 0.14s, background-color 0.14s;
}
.nav__links a:hover {
  color: var(--ink);
  background: rgba(28, 26, 23, 0.045);
}
/* ---------- "Web toys" nav dropdown ----------
   Desktop: hover OR click reveals a floating menu (hover for mouse users,
   click/Enter for keyboard — both set data-open, so neither path is
   required). Mobile: no floating menu (nowhere for it to float in a
   full-width stacked list) — becomes an inline disclosure instead. */
.nav__drop {
  position: relative;
}
.nav__droptrigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--display);
  background: none;
  border: 0;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 0.96rem;
  font-weight: 520;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.14s, background-color 0.14s;
}
.nav__droptrigger:hover {
  color: var(--ink);
  background: rgba(28, 26, 23, 0.045);
}
.nav__dropcaret {
  width: 10px;
  height: 7px;
  transition: transform 0.16s;
}
.nav__drop[data-open="true"] .nav__dropcaret {
  transform: rotate(180deg);
}
.nav__dropmenu {
  position: absolute;
  /* top: 100% with no gap, plus a transparent padding-top standing in for
     the old 6px gap — padding is still part of .nav__dropmenu's own hover
     box, unlike a real gap between two separate elements, so the cursor
     never leaves .nav__drop's hover area while crossing from the trigger
     down into the menu. The visible card is pushed back down by the same
     amount via a positioned inner wrapper, so nothing looks different. */
  top: 100%;
  left: 0;
  padding-top: 6px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 110;
}
.nav__dropmenu__card {
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav__drop:hover .nav__dropmenu,
.nav__drop[data-open="true"] .nav__dropmenu {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.nav__dropmenu a,
.nav__dropsoon {
  font-family: var(--display);
  font-size: 0.92rem;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
}
.nav__dropmenu a:hover {
  color: var(--ink);
  background: rgba(28, 26, 23, 0.045);
}
.nav__dropsoon {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-3);
  cursor: default;
}
.nav__dropsoon em {
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav__toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav__toggle span + span {
  margin-top: 5px;
}
.nav[data-open="true"] .nav__toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav[data-open="true"] .nav__toggle span:nth-child(2) {
  opacity: 0;
}
.nav[data-open="true"] .nav__toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 880px) {
  .nav__toggle {
    display: block;
    order: 3;
  }
  .nav__in {
    gap: 12px;
  }
  .nav__mark {
    margin-right: auto;
  }
  .nav__links {
    position: fixed;
    inset: 61px 0 auto;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 20px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s, transform 0.18s;
  }
  .nav[data-open="true"] .nav__links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav__links a {
    padding: 13px 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav__actions .btn--secondary {
    display: none;
  }

  /* No floating menu on mobile — the trigger row expands an inline list
     instead, matching the full-width stacked links around it. */
  .nav__drop {
    border-bottom: 1px solid var(--line);
  }
  .nav__droptrigger {
    width: 100%;
    justify-content: space-between;
    padding: 13px 0;
    font-size: 1.05rem;
    border-radius: 0;
  }
  .nav__dropmenu {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: none;
    padding: 0 0 6px;
    display: none;
  }
  .nav__drop[data-open="true"] .nav__dropmenu {
    display: block;
    pointer-events: auto;
  }
  .nav__dropmenu__card {
    border: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }
  .nav__dropmenu a,
  .nav__dropsoon {
    padding: 10px 0 10px 12px;
    font-size: 0.98rem;
  }
}

/* ==========================================================================
   HERO — the product is named and shown immediately.
   ========================================================================== */
.hero {
  padding-block: clamp(48px, 7vw, 88px) clamp(56px, 8vw, 100px);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__proof {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.92rem;
  color: var(--ink-2);
  font-weight: 520;
  margin-bottom: 22px;
}

/* ---------- hero entrance ----------
   A single staggered rise-in on load, CSS-only (no scroll listener needed
   for above-the-fold content). Gated behind .js so a script failure never
   leaves the hero stuck invisible — see the .js[data-reveal] pattern below. */
.js .hero__proof,
.js .hero h1,
.js .hero__lede,
.js .hero__cta,
.js .hero__note,
.js .hero__shot {
  opacity: 0;
  animation: heroIn 0.7s cubic-bezier(0.16, 0.8, 0.24, 1) forwards;
}
.js .hero__proof {
  animation-delay: 0.02s;
}
.js .hero h1 {
  animation-delay: 0.09s;
}
.js .hero__lede {
  animation-delay: 0.17s;
}
.js .hero__cta {
  animation-delay: 0.25s;
}
.js .hero__note {
  animation-delay: 0.32s;
}
.js .hero__shot {
  animation-delay: 0.12s;
}
@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hero__stars {
  color: var(--brand);
  letter-spacing: 1px;
}
.hero h1 {
  margin-bottom: 22px;
}
.hero__lede {
  max-width: 33ch;
  margin-bottom: 32px;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero__note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--ink-3);
}

/* phone */
.hero__shot {
  justify-self: center;
  position: relative;
}
.phone {
  width: min(310px, 78vw);
  aspect-ratio: 9 / 19.5;
  background: #111;
  border-radius: 44px;
  padding: 9px;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: rotate(-1.6deg);
}
.phone__screen {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}
.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* A small tactile tilt on hover — transform-only, so it's basically free
   and doesn't fight the ambient float (the float is paused on :hover). */
.phone {
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.phone:hover {
  animation-play-state: paused;
  transform: rotate(0deg) scale(1.015);
}
.phone::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 22px;
  background: #111;
  border-radius: 999px;
  z-index: 2;
}
.hero__blob {
  position: absolute;
  inset: -14% -18%;
  z-index: -1;
  background: radial-gradient(
    58% 52% at 50% 45%,
    var(--brand-tint) 0%,
    rgba(255, 233, 225, 0) 72%
  );
}

/* ---------- ambient float ----------
   A slow, transform-only loop on the phone and its glow so the hero feels
   alive at rest, not just on load/hover. Cheap: two elements, opacity +
   translate/rotate, GPU-composited, no layout thrash. */
.js .phone {
  animation: phoneFloat 7s ease-in-out infinite;
  animation-delay: 0.7s;
}
.js .hero__blob {
  animation: blobPulse 9s ease-in-out infinite;
  animation-delay: 0.7s;
}
@keyframes phoneFloat {
  0%,
  100% {
    transform: rotate(-1.6deg) translateY(0);
  }
  50% {
    transform: rotate(-0.4deg) translateY(-10px);
  }
}
@keyframes blobPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.82;
    transform: scale(1.05);
  }
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__lede {
    margin-inline: auto;
  }
  .hero__cta {
    justify-content: center;
  }
  .hero__proof {
    justify-content: center;
  }
  .hero__shot {
    order: -1;
  }
  .phone {
    width: min(262px, 66vw);
  }
}

/* ==========================================================================
   INTENT ROW — Headspace's "what kind of headspace are you looking for?"
   ========================================================================== */
.intent {
  padding-block: clamp(40px, 5vw, 60px);
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
}
.intent__head {
  text-align: center;
  margin-bottom: 26px;
}
.intent__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 12px;
}
.intent__card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.intent__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.intent__card[aria-selected="true"] {
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
}

/* ---------- inline expand panel ----------
   Selecting a card reveals its detail here, on the same page, instead of
   navigating away — the card grid works as a tab list over one shared panel. */
.intent__panel {
  position: relative;
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 36px);
  animation: fadeUp 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.intent__panel-body p {
  color: var(--ink-2);
  margin: 12px 0 20px;
  max-width: 62ch;
}
.intent__icon {
  width: 30px;
  height: 30px;
  color: var(--brand);
}
.intent__card b {
  font-family: var(--display);
  font-weight: 610;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
}
.intent__card span {
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.45;
}

/* ==========================================================================
   WORLD NEEDS MORE — one rotating word, CSS-driven for a near-zero-JS cost
   ========================================================================== */
.worldneeds {
  padding-block: clamp(56px, 9vw, 100px);
  text-align: center;
}
.worldneeds__line {
  margin: 0;
}
.worldneeds__word {
  display: inline-block;
  color: var(--brand);
  font-style: italic;
  /* JS swaps textContent on an interval (see js/home.js) and this transition
     softens each swap into a quick cross-fade + lift rather than a hard cut. */
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.worldneeds__word.is-swapping {
  opacity: 0;
  transform: translateY(6px);
}
@media (prefers-reduced-motion: reduce) {
  .worldneeds__word {
    transition: none;
  }
}

/* ==========================================================================
   FEATURES — tabbed explainer, one background color per tab
   ========================================================================== */
.feat {
  transition: background-color 0.5s ease;
}
/* Each tab claims one tint. Set on the section itself (via JS toggling
   data-tab) so the whole block recolors, not just a card inside it. */
.feat[data-tab="today"] {
  background: var(--tint-peach);
}
.feat[data-tab="create"] {
  background: var(--tint-lime);
}
.feat[data-tab="ideate"] {
  background: var(--tint-sky);
}
.feat[data-tab="play"] {
  background: var(--tint-lilac);
}
.feat[data-tab="explore"] {
  background: var(--tint-sage);
}
.feat[data-tab="experience"] {
  background: var(--tint-terracotta);
}
.feat[data-tab="learn"] {
  background: var(--tint-butter);
}
.feat[data-tab="grow"] {
  background: var(--tint-rose);
}
.feat__head {
  max-width: 26ch;
  margin-bottom: 40px;
}
.feat__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}
.feat__tab {
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--display);
  font-size: 0.96rem;
  font-weight: 560;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.feat__tab:hover {
  color: var(--ink);
  border-color: rgba(28, 26, 23, 0.14);
}
.feat__tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--surface);
  border-color: rgba(28, 26, 23, 0.14);
  box-shadow: var(--shadow-sm);
}
.feat__panel[hidden] {
  display: none;
}
.feat__panel {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  animation: fadeUp 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.feat__copy h3 {
  margin-bottom: 14px;
}
.feat__copy p {
  color: var(--ink-2);
  margin-bottom: 22px;
  max-width: 40ch;
}
.feat__list {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: grid;
  gap: 11px;
}
.feat__list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 0.99rem;
  color: var(--ink-2);
}
.feat__check {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  margin-top: 3px;
  color: var(--ink);
}

/* Single-phone layout, still used on pages that show one screen per feature
   (individual /product/* pages, the /for/* audience template). */
.feat__shot {
  justify-self: center;
}
@media (max-width: 860px) {
  .feat__shot .phone {
    width: min(248px, 62vw);
  }
}

/* ---------- multi-shot card grid ----------
   Each tab shows several small product cards (not one phone), scattered
   with a slight rotation so it reads as a spread of real screens rather
   than a wireframe grid. Used on the homepage's What's Inside section.
   Images are height-capped with object-fit: cover — a card shows a crop of
   a screen, not the whole thing, so the grid stays compact regardless of
   the source image's aspect ratio (works for full phone screenshots too). */
.feat__shots {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 18px;
  max-width: 460px;
}
.feat__shotcard {
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid rgba(28, 26, 23, 0.08);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.feat__shotcard img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.feat__shotcard:hover {
  transform: translateY(-4px) rotate(0deg) !important;
  z-index: 1;
}
.feat__shotcard:nth-child(1) {
  transform: rotate(-2deg);
}
.feat__shotcard:nth-child(2) {
  transform: rotate(1.5deg) translateY(22px);
}
.feat__shotcard:nth-child(3) {
  grid-column: 1 / -1;
  transform: rotate(-0.6deg);
}
.feat__shotcard:nth-child(3) img {
  height: 220px;
  object-position: center;
}
@media (max-width: 860px) {
  .feat__panel {
    grid-template-columns: 1fr;
  }
  .feat__shots {
    order: -1;
    max-width: 420px;
    margin-inline: auto;
  }
}

/* ==========================================================================
   HOW IT WORKS
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(24px, 3.5vw, 44px);
  margin-top: 48px;
  counter-reset: step;
}
.step {
  counter-increment: step;
}
.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-press);
  font-weight: 680;
  font-size: 1rem;
  margin-bottom: 16px;
}
.step h3 {
  font-size: 1.16rem;
  margin-bottom: 8px;
}
.step p {
  color: var(--ink-2);
  font-size: 0.99rem;
}

/* ==========================================================================
   TESTIMONIAL — pull quote + attribution + overlapping photo pair
   ========================================================================== */
.testimonial {
  padding-block: clamp(64px, 9vw, 108px);
}
.testimonial__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.testimonial__quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 28px;
}
.testimonial__quote::before {
  content: "\201C";
}
.testimonial__quote::after {
  content: "\201D";
}
.testimonial__name {
  font-family: var(--display);
  font-weight: 620;
  font-size: 0.94rem;
  color: var(--ink);
}
.testimonial__role {
  font-family: var(--display);
  font-size: 0.88rem;
  color: var(--ink-3);
}
.testimonial__photos {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 5 / 4;
}
.testimonial__photo {
  position: absolute;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: var(--surface);
}
.testimonial__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.testimonial__photo--main {
  width: 72%;
  aspect-ratio: 4 / 3;
  top: 0;
  left: 0;
  z-index: 1;
}
.testimonial__photo--accent {
  width: 46%;
  aspect-ratio: 4 / 3;
  bottom: 0;
  right: 0;
  z-index: 2;
  border: 4px solid var(--bg);
}
@media (max-width: 860px) {
  .testimonial__grid {
    grid-template-columns: 1fr;
  }
  .testimonial__photos {
    order: -1;
    max-width: 340px;
  }
}

/* ==========================================================================
   RESEARCH LOGO STRIP — small, plain, no stat cards
   ========================================================================== */
.research {
  padding-block: clamp(48px, 6vw, 72px);
  text-align: center;
}
.research__head {
  max-width: 32ch;
  margin-inline: auto;
  margin-bottom: 36px;
}
.research__label {
  margin-bottom: 30px;
}
.logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(28px, 5vw, 56px);
}
.logos__mark {
  height: clamp(26px, 3.4vw, 36px);
  width: auto;
  max-width: 150px;
  object-fit: contain;
  /* Renders any logo (color or not) as a flat dark mark, per Ray's request
     to show these in monotone rather than their original branding colors. */
  filter: grayscale(1) brightness(0) opacity(0.5);
  transition: opacity 0.2s;
}
.logos__mark:hover {
  filter: grayscale(1) brightness(0) opacity(0.8);
}

/* ==========================================================================
   SCIENCE / PROOF
   ========================================================================== */
.sci__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 44px;
}
.sci__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 26px 22px;
}
.sci__stat {
  font-size: 2.15rem;
  font-weight: 680;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 10px;
}
.sci__card p {
  font-size: 0.96rem;
  color: var(--ink-2);
}
.sci__card cite {
  display: block;
  margin-top: 12px;
  font-size: 0.83rem;
  font-style: normal;
  color: var(--ink-3);
}

/* ==========================================================================
   CTA BAND
   ========================================================================== */
.cta {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-xl);
  padding: clamp(44px, 7vw, 84px) var(--gut);
  text-align: center;
  margin-block: var(--sec);
}
.cta h2 {
  margin-bottom: 16px;
}
.cta p {
  color: rgba(253, 250, 245, 0.72);
  max-width: 46ch;
  margin: 0 auto 30px;
}

/* ---------- signup form ---------- */
.signup {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin-inline: auto;
  flex-wrap: wrap;
}
.signup input {
  flex: 1 1 240px;
  padding: 15px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  min-width: 0;
}
.signup input::placeholder {
  color: var(--ink-3);
}
.signup input:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.signup__msg {
  margin-top: 14px;
  font-size: 0.92rem;
  min-height: 1.3em;
}
.signup__msg[data-state="ok"] {
  color: #7ee0a8;
}
.signup__msg[data-state="err"] {
  color: #ffb3a0;
}
.section .signup__msg[data-state="ok"] {
  color: var(--accent-green);
}
.section .signup__msg[data-state="err"] {
  color: var(--brand-press);
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq {
  max-width: 780px;
  margin-inline: auto;
}
.faq__item {
  border-bottom: 1px solid var(--line);
}
.faq__q {
  width: 100%;
  background: none;
  border: 0;
  padding: 24px 40px 24px 0;
  text-align: left;
  font-size: 1.08rem;
  font-weight: 570;
  letter-spacing: -0.015em;
  cursor: pointer;
  position: relative;
}
.faq__q::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.22s;
}
.faq__item[data-open="true"] .faq__q::after {
  transform: translateY(-20%) rotate(-135deg);
}
.faq__a {
  overflow: hidden;
  height: 0;
  transition: height 0.26s cubic-bezier(0.3, 0.8, 0.3, 1);
}
.faq__a p {
  padding-bottom: 24px;
  color: var(--ink-2);
  max-width: 62ch;
}

/* ==========================================================================
   WALLPAPER GALLERY (Fun) — masonry-ish grid of save-able images
   ========================================================================== */
.wall__placeholdernote {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--brand-tint);
  border-radius: var(--r-sm);
  font-size: 0.86rem;
  color: var(--brand-press);
  display: inline-block;
}
.wallgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  /* align-items: start stops each <figure> stretching to match the
     tallest item in its row — without it, a landscape card with a
     shorter image still grows to the row's height, leaving empty space
     below the image inside its own box. */
  align-items: start;
  gap: 20px;
}
.wallgrid__item {
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.wallgrid__item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: var(--bg-alt);
}
.wallgrid__item--landscape img {
  aspect-ratio: 4 / 3;
}
.wallgrid__item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.16s;
}
.wallgrid__item:hover figcaption,
.wallgrid__item:focus-within figcaption {
  opacity: 1;
}
.wallgrid__item figcaption span {
  color: #fff;
  font-family: var(--display);
  font-size: 0.88rem;
  font-weight: 560;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.wallgrid__item figcaption .btn {
  padding: 7px 14px;
  font-size: 0.82rem;
}
@media (hover: none) {
  /* Touch devices have no hover — show the save affordance always, since
     there's no way to reveal it on tap-and-hold like a cursor hover. */
  .wallgrid__item figcaption {
    opacity: 1;
  }
}

/* ==========================================================================
   THE IDEA MACHINE (web toy) — mad-libs slot generator
   Sentence is stacked one phrase per line; the three changing words are
   real vertical reels (windowed strip that scrolls upward through a
   sequence of words, like a slot machine) rather than flat text-swaps.
   ========================================================================== */
.machine {
  max-width: 620px;
  margin-inline: auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(40px, 6vw, 64px) clamp(24px, 5vw, 48px);
}
.machine__sentence {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 40px;
}
.machine__line {
  color: var(--ink);
}

/* ---------- reel ---------- */
.machine__reel {
  display: block;
  /* Fixed height = exactly one line of reel text, so the window always
     shows one word and the strip's translateY math stays simple. */
  height: 1.3em;
  overflow: hidden;
}
.machine__reelwindow {
  display: block;
  height: 100%;
}
.machine__reelstrip {
  display: block;
  color: var(--brand);
  font-style: italic;
  font-weight: 600;
  /* JS sets transform: translateY() to scroll this strip; each word in it
     is one .machine__reelword line, height-matched to .machine__reel. */
  will-change: transform;
}
.machine__reelword {
  display: block;
  height: 1.3em;
  line-height: 1.3em;
}
/* The settle bounce is baked into the spin animation's own keyframes
   (idea-machine.js), not a separate CSS class/transition. */

.machine__spin {
  min-width: 160px;
}
.machine__spin:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- write-your-idea gate ---------- */
.machine__writelabel {
  display: block;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 620;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: left;
  margin-bottom: 8px;
}
.machine__write {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 84px;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 18px;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.machine__write::placeholder {
  color: var(--ink-3);
}
.machine__write:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.machine__note {
  margin-top: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 46ch;
  margin-inline: auto;
}
.machine__note[data-state="cooldown"] {
  color: var(--brand-press);
  font-weight: 560;
}
.machine__note[data-state="ready"] {
  color: var(--accent-green);
  font-weight: 560;
}

/* ==========================================================================
   FOOTER — Perplexity / Claude structure
   ========================================================================== */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding-block: clamp(52px, 7vw, 80px) 32px;
}
.fnav {
  display: grid;
  grid-template-columns: 1.25fr repeat(5, 1fr);
  gap: clamp(24px, 3vw, 40px);
  padding-bottom: 48px;
}
.fnav__brand .nav__mark {
  font-size: 1.4rem;
}
.fnav__tag {
  margin-top: 12px;
  font-size: 0.93rem;
  color: var(--ink-2);
  max-width: 24ch;
}
.fnav__head {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 640;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 14px;
}
.fnav__sub {
  font-family: var(--display);
  font-size: 0.73rem;
  font-weight: 620;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 18px 0 9px;
}
.fnav__sub:first-of-type {
  margin-top: 0;
}
.fnav__link {
  display: block;
  font-size: 0.93rem;
  color: var(--ink-2);
  padding: 4px 0;
  transition: color 0.14s;
}
.fnav__link:hover {
  color: var(--brand);
}
.fnav__soon {
  font-size: 0.66rem;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.fmeta {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 26px;
  align-items: center;
  font-size: 0.88rem;
  color: var(--ink-3);
}
.fmeta__legal {
  margin-left: auto;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.fmeta a:hover {
  color: var(--ink);
}

@media (max-width: 1040px) {
  .fnav {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
  .fnav__brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 600px) {
  .fnav {
    grid-template-columns: repeat(2, 1fr);
  }
  .fmeta__legal {
    margin-left: 0;
  }
}

/* ==========================================================================
   INNER PAGE HEADER (product / audience / vs / legal)
   ========================================================================== */
.phead {
  padding-block: clamp(56px, 8vw, 96px) clamp(32px, 4vw, 52px);
}
.phead__in {
  max-width: 760px;
}
.phead h1 {
  margin-block: 14px 20px;
}
.prose {
  max-width: 68ch;
}
.prose h2 {
  font-size: 1.6rem;
  margin-block: 44px 14px;
}
.prose h3 {
  font-size: 1.18rem;
  margin-block: 30px 10px;
}
.prose p,
.prose li {
  color: var(--ink-2);
  margin-bottom: 15px;
}
.prose ul,
.prose ol {
  padding-left: 22px;
  margin: 0 0 18px;
}
.prose a {
  color: var(--brand-press);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* blog post header + ranking list */
.post__meta {
  font-size: 0.9rem;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.ranking {
  list-style: none;
  counter-reset: none;
  margin: 0 0 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}
.ranking__row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 4px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.ranking__row:last-child {
  border-bottom: 0;
}
.ranking__num {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--brand);
}
.ranking__name {
  font-weight: 610;
  grid-column: 2;
}
.ranking__note {
  grid-column: 2;
  font-size: 0.92rem;
  color: var(--ink-2);
}

/* comparison table */
.cmp {
  width: 100%;
  border-collapse: collapse;
  margin-block: 28px 40px;
  font-size: 0.97rem;
}
.cmp th,
.cmp td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.cmp thead th {
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cmp tbody th {
  font-weight: 560;
  color: var(--ink);
}
.cmp td {
  color: var(--ink-2);
}
.cmp__wrap {
  overflow-x: auto;
}

/* card grid used by /toys/, /blog/, audience index */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(266px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: transform 0.16s, box-shadow 0.16s;
}
a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card h3 {
  font-size: 1.1rem;
}
.card p {
  font-size: 0.94rem;
  color: var(--ink-2);
}
.card__meta {
  font-family: var(--display);
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.84rem;
  color: var(--ink-3);
}

/* ---------- scroll reveal ----------
   Opt-in via .js on <html>, set by main.js. If JS fails or is blocked the
   rule never applies and all content stays visible — content must never
   depend on script to be readable. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.3, 1),
    transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal],
  .js .hero__proof,
  .js .hero h1,
  .js .hero__lede,
  .js .hero__cta,
  .js .hero__note,
  .js .hero__shot {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .js .phone,
  .js .hero__blob {
    animation: none;
  }
}

/* pricing cards */
.card--featured {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
.price {
  font-size: 1.9rem;
  font-weight: 680;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-3);
}

/* Long-form prose pages read better centred in the wide container than
   ragged against the left edge with a large empty right margin. */
.wrap.prose {
  margin-inline: auto;
}
.phead__in {
  margin-inline: auto;
}
