/*
 * Landing styles for heyiro.com.
 *
 * Palette, radii and spacing come from tokens.css, which build.mjs generates
 * from @introspection/shared — the same module the app renders from. Only
 * things the app has no opinion about (page wash, section rhythm, browser and
 * phone chrome) are defined here.
 *
 * House rules, inherited from the app and worth keeping: cards are #fffdf9 and
 * never pure white, hairlines are inset rings rather than borders so they add
 * no layout size, radii are 22px / 999px and nothing between, Lora carries
 * anything that speaks and Onest anything that labels, and every loop respects
 * prefers-reduced-motion.
 */

:root {
  --font-ui: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;

  --on-accent: #fffdf9;
  --line-strong: rgba(43, 39, 35, 0.14);
  /* ink3 darkened until small type clears WCAG AA on the page ground.
     Worth pushing back into tokens.ts — the app has the same gap. */
  --ink-label: #8a8073;

  /* The prototype's ambient wash — keeps the page from reading as flat beige. */
  --page-wash: radial-gradient(1100px 620px at 50% -8%, #f8f3ea, transparent),
    radial-gradient(900px 520px at 88% 12%, rgba(240, 221, 208, 0.5), transparent),
    linear-gradient(168deg, #f1ece3, #e8e0d3);

  /* Elevation, converted 1:1 from the RN shadow tokens. Ink-based, never black. */
  --sh-rest: 0 1px 2px rgba(43, 39, 35, 0.04), 0 4px 14px rgba(43, 39, 35, 0.04);
  --sh-hover: 0 8px 24px rgba(43, 39, 35, 0.1);
  --sh-lift: 0 18px 44px rgba(43, 39, 35, 0.12);
  --sh-btn: 0 2px 8px rgba(194, 112, 76, 0.2);
  --sh-btn-hover: 0 8px 20px rgba(194, 112, 76, 0.34);
  --ring: inset 0 0 0 1px var(--line);

  --r-frame: 34px;
  --container: 1140px;
  --measure: 60ch;
  --gutter: clamp(20px, 4.5vw, 40px);
  --section: clamp(72px, 9vw, 128px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--app-edge);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  /* Narrower than a phone the layout has nothing left to give: let the page
     scroll sideways as one piece rather than let blocks collapse. */
  min-width: 320px;
  margin: 0;
  background: var(--page-wash);
  background-color: var(--app-bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

::selection {
  background: var(--primary-soft);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-hover);
}

/* ── Type ──────────────────────────────────────────────────────────────── */

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.35rem);
  line-height: 1.07;
  letter-spacing: -0.028em;
}

h2 {
  font-size: clamp(1.75rem, 3.3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.022em;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.014em;
}

p {
  margin: 0;
  color: var(--ink2);
  max-width: var(--measure);
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-label);
  margin: 0 0 12px;
}

.lead {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  font-weight: 400;
  line-height: 1.58;
  letter-spacing: -0.01em;
}

.fine {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink2);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  border-radius: var(--r-pill);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.2;
  padding: 14px 22px;
  text-decoration: none;
  white-space: normal;
  text-align: center;
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

@media (min-width: 560px) {
  .btn {
    white-space: nowrap;
  }
}

.btn--primary {
  background: var(--primary);
  color: var(--on-accent);
  box-shadow: var(--sh-btn);
}
.btn--primary:hover {
  background: #b9633f;
  box-shadow: var(--sh-btn-hover);
}
.btn--primary:active {
  transform: translateY(1px);
  box-shadow: var(--sh-btn);
}

.btn--soft {
  background: var(--surface2);
  color: var(--ink);
  box-shadow: var(--ring);
}
.btn--soft:hover {
  background: #efe8dc;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn--soft:active {
  transform: translateY(1px);
}

.btn--lg {
  padding: 18px 32px;
  font-size: 17px;
}

/* The hero's second action. Two filled pills side by side compete for the
   same attention; this one steps back without becoming invisible. */
.btn--quiet {
  background: transparent;
  color: var(--ink2);
  padding-inline: 14px;
}
.btn--quiet::after {
  content: '→';
  font-size: 1.05em;
  transition: transform 0.18s ease;
}
.btn--quiet:hover {
  color: var(--ink);
}
.btn--quiet:hover::after {
  transform: translateX(3px);
}

/* ── Header ────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 236, 227, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.nav__links {
  display: flex;
  gap: 26px;
}

.nav__links a {
  white-space: nowrap;
  color: var(--ink2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.18s ease;
}
.nav__links a:hover {
  color: var(--ink);
}

/* Russian is the longest label set; below this the four links stop fitting
   beside the language control and the CTA, so the burger takes over. */
@media (max-width: 1080px) {
  .nav__links {
    display: none;
  }
}

.nav__links {
  margin-right: auto;
}

/* Language menu. Without JS it opens on hover and on keyboard focus, so the
   links are always reachable; the script only adds click-to-open for touch. */
.lang {
  position: relative;
  flex: none;
}

.lang__globe {
  width: 17px;
  height: 17px;
  color: var(--ink3);
  flex: none;
}

.lang__btn:hover .lang__globe {
  color: var(--primary);
}

.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink2);
  transition: background 0.18s ease, color 0.18s ease;
}

.lang__btn:hover {
  background: var(--surface2);
  color: var(--ink);
}

.lang__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 156px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--sh-hover), var(--ring);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.lang:hover .lang__menu,
.lang:focus-within .lang__menu,
.lang.is-open .lang__menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.lang__menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
}

.lang__menu a:hover {
  background: var(--surface2);
}

.lang__menu a[aria-current='true'] {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 560px) {
  .lang__current {
    display: none;
  }
}

/* Visually hidden but read aloud — used for the pricing table caption. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* The header CTA carries a shorter label once the bar gets tight. */
.btn__short {
  display: none;
}

/* Only the hero CTA is allowed to wrap on narrow screens; in the bar a
   two-line button breaks the header's height. */
.nav .btn {
  white-space: nowrap;
}

@media (max-width: 620px) {
  .nav__inner {
    gap: 12px;
  }
  .btn__long {
    display: none;
  }
  .btn__short {
    display: inline;
  }
  .nav .btn {
    padding: 11px 16px;
    font-size: 14px;
  }
}

/* ── Orb ───────────────────────────────────────────────────────────────── */

/* The SVG reserves a 48-unit box for a 24-unit sphere so the glow and the
   floating "zZ" have room; a 96px sphere therefore needs a 192px element. */
.orb {
  width: calc(var(--orb-size, 96px) * 2);
  height: calc(var(--orb-size, 96px) * 2);
  margin: calc(var(--orb-size, 96px) * -0.5);
  flex: none;
  overflow: visible;
}

.orb__body {
  transform-origin: 24px 24px;
  animation: float 3800ms ease-in-out infinite;
}

.orb__z {
  transform-origin: 24px 24px;
  animation: zFloat 2800ms ease-in-out infinite;
}
.orb__z--far {
  animation-delay: 700ms;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1.4px);
  }
}

@keyframes zFloat {
  0% {
    transform: translateY(0) scale(0.7);
    opacity: 0;
  }
  30% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(-4px) scale(1);
    opacity: 0;
  }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  padding-top: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(40px, 6vw, 76px);
  /* The phone fan deliberately runs past the column; clip rather than scroll.
     `clip` keeps the shadows and never creates a scroll container. */
  /* clip, not hidden: no scroll container, so the fan can bleed past the
     column without adding to the page's scrollable width. No clip-margin —
     it would let the bleed count toward the document width again. */
  overflow: hidden;
  overflow: clip;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}

/* Two-column hero only: the fan has a narrower track to live in, so it scales
   down — still all three frames, still inside the column. */
@media (min-width: 981px) {
  .hero .showcase .phone {
    width: clamp(150px, 13.5vw, 200px);
  }
  .hero .showcase .phone:nth-child(2) {
    width: clamp(162px, 14.6vw, 216px);
  }
  .hero .showcase .phone:nth-child(1) {
    margin-right: -14px;
  }
  .hero .showcase .phone:nth-child(3) {
    margin-left: -14px;
  }
}

.hero__orb {
  --orb-size: 72px;
  margin-bottom: 2px;
}

.hero h1 {
  max-width: 16ch;
}

.hero__sub {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
  font-weight: 400;
  line-height: 1.54;
  letter-spacing: -0.012em;
  color: var(--ink2);
  max-width: 46ch;
  margin-top: 20px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding: 0;
  list-style: none;
}

/* Below the split the hero re-centres and the fan moves under the text. */
@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }
  /* These are blocks with a max-width: without an auto inline margin the box
     stays left-aligned and the centred text inside it looks off-centre. */
  .hero h1,
  .hero__sub {
    max-width: 24ch;
    margin-inline: auto;
  }
  .hero__sub {
    max-width: 46ch;
  }
  .cta-row,
  .chips {
    justify-content: center;
  }
}

.chip {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--ring);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink2);
  margin: 0;
}

.chip::before {
  content: '';
  margin-top: 0.52em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--secondary);
  flex: none;
}

/* ── Phone and browser chrome ──────────────────────────────────────────── */

.phone {
  position: relative;
  border-radius: var(--r-frame);
  padding: 8px;
  background: linear-gradient(160deg, #cdc5b6, #a89e8d);
  box-shadow: var(--sh-lift);
  width: 100%;
  max-width: 300px;
}

.phone img {
  border-radius: calc(var(--r-frame) - 8px);
  background: var(--app-bg);
}

/* Three frames fanned out, the middle one raised.

   Each screen carries its own `aspect-ratio`, so height follows width and the
   shot is never squashed at any viewport — the earlier fixed heights only held
   at the width they were tuned for. Widths scale with the viewport, and the
   overlap stays small: enough to bind the three into one object, not so much
   that the outer screens become slivers. */
.showcase {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.showcase .phone {
  flex: none;
  width: clamp(150px, 26vw, 240px);
  max-width: none;
}

.showcase .phone img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
}

/* Natural ratios of the three shots. */
.showcase .phone:nth-child(1) img {
  aspect-ratio: 380 / 822;
}
.showcase .phone:nth-child(2) img {
  aspect-ratio: 380 / 928;
}
.showcase .phone:nth-child(3) img {
  aspect-ratio: 380 / 792;
}

.showcase .phone:nth-child(1) {
  transform: rotate(-3deg) translateY(34px);
  margin-right: clamp(-26px, -1.6vw, -12px);
  z-index: 1;
}
.showcase .phone:nth-child(2) {
  z-index: 3;
  width: clamp(162px, 28vw, 260px);
}
.showcase .phone:nth-child(3) {
  transform: rotate(3deg) translateY(34px);
  margin-left: clamp(-26px, -1.6vw, -12px);
  z-index: 2;
}

@media (max-width: 980px) {
  .showcase {
    margin-top: clamp(36px, 6vw, 60px);
  }
}

.browser {
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface2);
  box-shadow: var(--sh-lift);
}

.browser__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line);
}

.browser__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}

.browser__url {
  margin-left: 10px;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  background: var(--surface2);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink3);
}

/* A cropped screen shown as a floating card rather than inside a device. */
.shot {
  margin: 0;
  max-width: 410px;
  border-radius: var(--r-card);
  box-shadow: var(--sh-lift);
  background: var(--app-bg);
  overflow: hidden;
}

/* Two screens, the second tucked under and across the first. The overlap is
   what makes the pair read as one object instead of two stacked pictures. */
.shot-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
}

.shot-stack img {
  border-radius: var(--r-card);
  box-shadow: var(--sh-lift);
  max-width: 78%;
}

.shot-stack img:last-child {
  align-self: flex-start;
  /* Negative margin = vertical overlap; the transform slides it across. */
  margin-top: -18%;
  position: relative;
  z-index: 1;
}

/* On phones the pair bleeds off both edges by the same amount, so the gutter
   left of the lower shot matches the gutter right of the upper one. */
@media (max-width: 720px) {
  .shot-stack {
    margin-inline: calc(var(--gutter) * -1);
    width: calc(100% + var(--gutter) * 2);
  }
  .shot-stack img {
    max-width: 82%;
  }
  .shot-stack img:first-child {
    margin-right: calc(var(--gutter) / 2);
  }
  .shot-stack img:last-child {
    margin-left: calc(var(--gutter) / 2);
    margin-top: -22%;
  }
}

/* ── Sections ──────────────────────────────────────────────────────────── */

.section {
  padding-block: var(--section);
}

.section--tint {
  background: linear-gradient(180deg, transparent, rgba(255, 253, 249, 0.55) 18%, transparent);
}

.section__head {
  margin-bottom: clamp(32px, 4vw, 52px);
}

.section__head p {
  margin-top: 16px;
}

.section__head--center {
  text-align: center;
}
.section__head--center p {
  margin-inline: auto;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
}

.split--rev .split__text {
  order: 2;
}

.split__media {
  display: flex;
  justify-content: center;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .split--rev .split__text {
    order: 0;
  }
}

.split__text p + p {
  margin-top: 16px;
}

/* ── Lists ─────────────────────────────────────────────────────────────── */

.ticks {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}

.ticks li {
  position: relative;
  padding-left: 30px;
  font-size: 16px;
  color: var(--ink2);
  max-width: var(--measure);
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: var(--r-check);
  background: var(--secondary-soft);
  box-shadow: inset 0 0 0 1.5px rgba(125, 141, 106, 0.4);
}

.ticks li::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 12px;
  width: 6px;
  height: 3px;
  border-left: 2px solid var(--secondary);
  border-bottom: 2px solid var(--secondary);
  transform: rotate(-45deg);
}

.ticks--muted li::before {
  background: var(--surface2);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.ticks--muted li::after {
  border-color: var(--ink3);
}

/* ── Cards ─────────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: 22px;
}
.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1000px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 26px;
  box-shadow: var(--sh-rest);
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  font-size: 15.5px;
  line-height: 1.58;
}

.card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-icon-square);
  background: var(--primary-soft);
  color: #8f4826;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ── The problem block ─────────────────────────────────────────────────── */

.stated {
  max-width: 740px;
  margin-inline: auto;
  text-align: center;
}
.stated p {
  margin: 20px auto 0;
  max-width: 58ch;
}

.aches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 44px;
  list-style: none;
  padding: 0;
}

.aches li {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink2);
  padding: 22px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--ring);
}

@media (max-width: 760px) {
  .aches {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Wellbeing dimensions ──────────────────────────────────────────────── */

.dims {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.dims li {
  padding: 7px 15px;
  border-radius: var(--r-pill);
  background: var(--secondary-soft);
  color: #4f5c40;
  font-size: 14px;
  font-weight: 600;
}

/* ── Pricing table ─────────────────────────────────────────────────────── */

.ptable {
  overflow-x: auto;
  scrollbar-width: thin;
}

.ptable table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
}

.ptable caption {
  text-align: left;
}

.ptable thead th {
  vertical-align: bottom;
  text-align: left;
  padding: 26px 22px 22px;
  background: var(--surface);
  border-radius: var(--r-card) var(--r-card) 0 0;
}

.ptable thead th.ptable__best {
  background: linear-gradient(170deg, var(--primary-soft), var(--surface) 70%);
}

.ptable__plan {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink2);
}

.ptable__price {
  display: block;
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.024em;
  color: var(--ink);
}

.ptable__note {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink2);
  max-width: 26ch;
}

.ptable tbody th {
  text-align: left;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  padding: 16px 22px 16px 0;
  vertical-align: top;
}

.ptable tbody td {
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink2);
  padding: 16px 22px;
  vertical-align: top;
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--line);
}

.ptable tbody td:last-child {
  background: linear-gradient(170deg, rgba(240, 221, 208, 0.34), var(--surface) 60%);
}

.ptable tbody tr:last-child td {
  border-radius: 0 0 var(--r-card) var(--r-card);
}

.ptable td.is-off {
  color: var(--ink3);
}

/* Row labels are repeated inside each cell for the stacked phone layout. */
.ptable__label {
  display: none;
}

.ptable__cta {
  margin-top: clamp(26px, 3vw, 36px);
  text-align: center;
}

.ptable__cta .fine {
  margin-top: 14px;
}

/* Below the table's minimum width, turn every row into two labelled lines
   instead of forcing a horizontal scroll through the whole comparison. */
@media (max-width: 720px) {
  .ptable table,
  .ptable thead,
  .ptable tbody,
  .ptable tr,
  .ptable th,
  .ptable td {
    display: block;
    min-width: 0;
  }
  .ptable thead tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .ptable thead td {
    display: none;
  }
  .ptable thead th {
    border-radius: var(--r-card);
    padding: 18px 16px;
  }
  .ptable__note {
    font-size: 12px;
  }
  .ptable tbody tr {
    margin-top: 14px;
    background: var(--surface);
    border-radius: var(--r-card);
    overflow: hidden;
    box-shadow: var(--sh-rest);
  }
  .ptable tbody th {
    padding: 16px 18px 10px;
  }
  .ptable tbody td {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 12px;
    padding: 10px 18px;
    box-shadow: inset 0 1px 0 var(--line);
  }
  .ptable tbody td:last-child {
    padding-bottom: 16px;
  }
  .ptable__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink3);
  }
}

/* ── FAQ ───────────────────────────────────────────────────────────────── */

.faq {
  max-width: 800px;
  margin-inline: auto;
  display: grid;
  gap: 10px;
}

.faq details {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--sh-rest);
  overflow: hidden;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 56px 20px 24px;
  position: relative;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  position: absolute;
  right: 26px;
  top: 28px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ink3);
  border-bottom: 2px solid var(--ink3);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
  top: 32px;
}

.faq__body {
  padding: 0 24px 22px;
}

.faq p {
  margin: 0;
  font-size: 15.5px;
  max-width: none;
}

/* Animate the disclosure where the browser supports interpolating to
   `auto` (Chrome 131+, Safari 18.4+). Everywhere else it simply snaps open,
   which is the plain <details> behaviour and perfectly usable. */
@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }

  .faq details::details-content {
    block-size: 0;
    overflow: hidden;
    opacity: 0;
    transition:
      block-size 260ms cubic-bezier(0.22, 1, 0.36, 1),
      content-visibility 260ms allow-discrete,
      opacity 200ms ease;
  }

  .faq details[open]::details-content {
    block-size: auto;
    opacity: 1;
  }
}

/* ── Closing block ─────────────────────────────────────────────────────── */

.final {
  text-align: center;
  background: var(--surface);
  border-radius: var(--r-card);
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px);
  box-shadow: var(--sh-rest);
}

.final__orb {
  --orb-size: 72px;
  margin-inline: auto;
  margin-bottom: 4px;
}

.final p {
  margin: 20px auto 0;
  max-width: 56ch;
}

/* ── Disclaimer and footer ─────────────────────────────────────────────── */

.disclaimer {
  max-width: 760px;
  margin: clamp(48px, 6vw, 80px) auto 0;
  padding: 22px 26px;
  border-radius: var(--r-card);
  background: var(--surface2);
  box-shadow: var(--ring);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink2);
  text-align: center;
}

.footer {
  padding-block: 44px clamp(44px, 5vw, 72px);
  margin-top: clamp(48px, 6vw, 80px);
  box-shadow: 0 -1px 0 var(--line);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  align-items: center;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
}

.footer a {
  color: var(--ink2);
  font-size: 14.5px;
  text-decoration: none;
}
.footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ── Scroll reveal. The end state is the base state, so a reduced-motion or
      print render shows a finished page. ─────────────────────────────────── */

.reveal {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
  }
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
    transition:
      opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
      transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  }
}

@media (hover: none) {
  body {
    background-attachment: scroll;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ── Legal pages ───────────────────────────────────────────────────────── */

.legal {
  max-width: 760px;
  margin-inline: auto;
  padding-block: clamp(48px, 6vw, 88px);
}

.legal h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 8px;
}

.legal h2 {
  font-size: 1.5rem;
  margin-top: 44px;
  margin-bottom: 12px;
}

.legal h3 {
  font-size: 1.15rem;
  margin-top: 28px;
  margin-bottom: 8px;
}

.legal p,
.legal li {
  color: var(--ink2);
  font-size: 16px;
  line-height: 1.68;
  max-width: none;
}

.legal p {
  margin: 14px 0;
}

.legal ul,
.legal ol {
  padding-left: 22px;
}

.legal li {
  margin: 8px 0;
}

.legal hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 40px 0;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 15px;
}

.legal th,
.legal td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink2);
}

.legal code {
  font-size: 14px;
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 6px;
}

/* ── Waving hand on the hero orb ───────────────────────────────────────── */

/* Sits in front of the orb, slightly overlapping it, and pivots at the wrist
   so the fingers travel while the palm barely moves. */
.hand {
  position: absolute;
  /* Percentages are of the orb's SVG box, which is twice the visible sphere,
     so these put the hand just off the right edge of Iro's cheek. */
  /* On Iro's left, away from the speech bubble: bubble and hand are both
     white, and side by side they read as one shape. Mirrored so the thumb
     still points away from the face. */
  left: -6%;
  top: 34%;
  width: 40%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 2px 4px rgba(43, 39, 35, 0.12));
}

.hand__pivot {
  transform-origin: 12px 25px;
  animation: wave 2600ms ease-in-out infinite;
}

@keyframes wave {
  0%,
  62%,
  100% {
    transform: rotate(-6deg);
  }
  70% {
    transform: rotate(14deg);
  }
  78% {
    transform: rotate(-10deg);
  }
  86% {
    transform: rotate(12deg);
  }
  94% {
    transform: rotate(-6deg);
  }
}

.hero__text {
  /* Without this a long chip can widen the grid track past its share. */
  min-width: 0;
}

/* ── Greeting: orb + speech bubble, the app's own welcome moment ───────── */

.greet {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(14px, 2vw, 26px);
}

.greet__orb {
  position: relative;
  z-index: 1; /* the hand waves in front of the speech bubble */
  display: inline-flex;
  flex: none;
}

.greet__bubble {
  position: relative;
  /* Lifted so the tail points at Iro's face rather than at the waving hand. */
  margin: 0 0 30px;
  padding: 10px 16px;
  border-radius: var(--r-card);
  border-bottom-left-radius: 8px;
  background: var(--surface);
  box-shadow: var(--sh-rest);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  max-width: none;
}

/* Little tail pointing back at Iro. */
.greet__bubble::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  margin-top: -7px;
  width: 14px;
  height: 14px;
  background: var(--surface);
  border-radius: 3px;
  transform: rotate(45deg);
}

@media (max-width: 980px) {
  .greet {
    justify-content: center;
  }
}

/* ── Four steps: a grid on desktop, a swipeable row on phones ──────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 1000px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .steps {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    /* Bleed to the screen edges so the next card peeks and reads as swipeable. */
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    padding-block: 4px 18px;
    scrollbar-width: none;
  }
  .steps::-webkit-scrollbar {
    display: none;
  }
  .steps > .card {
    flex: 0 0 78%;
    scroll-snap-align: center;
  }
}

/* ── Compact feature cards ─────────────────────────────────────────────── */

.card--feature {
  padding: 0 0 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card--feature img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  object-position: top;
  background: var(--app-bg);
  margin-bottom: 22px;
}

.card--feature h3,
.card--feature p {
  padding-inline: 26px;
}

/* No screenshot: pad the top back so the text is not glued to the corner. */
.card--plain {
  padding-top: 26px;
}

/* ── Rhythm variants ───────────────────────────────────────────────────── */

.section--tight {
  padding-block: clamp(52px, 6vw, 84px);
}

.split--tight {
  margin-top: clamp(36px, 5vw, 60px);
}

/* ── Dark band ─────────────────────────────────────────────────────────── */

/* The compact feature cards hold screenshots whose own background is the same
   warm paper as the page, so on a light section the shots dissolve into it.
   The dark ground is the app's own recording-screen gradient, not a new colour.
   Only the section heading inverts — the cards inside stay light. */
.section--dark {
  background: linear-gradient(180deg, #2a2622, #1d1a17);
}

.section--dark .section__head h2 {
  color: #f6f1e8;
}

.section--dark .section__head .eyebrow {
  color: #9b9186;
}

.section--dark .section__head p {
  color: #cfc6b8;
}

/* Cards lift a little harder here — an ink shadow is invisible on ink. */
.section--dark .card {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

/* ── Discount badge ────────────────────────────────────────────────────── */

.plan__badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--secondary);
  color: var(--on-accent);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  vertical-align: 2px;
}

/* ── Mobile plan cards ─────────────────────────────────────────────────── */

/* The same rows as the table, laid out per plan. Only one of the two is in the
   accessibility tree at any width, because the other is display:none. */
.pcards {
  display: none;
  gap: 16px;
}

.pcards .plan {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 26px;
  box-shadow: var(--sh-rest);
}

.pcards .plan--primary {
  background: linear-gradient(160deg, var(--primary-soft), var(--surface) 62%);
  box-shadow: var(--sh-hover);
}

.pcards .plan h3 {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink2);
}

.pcards .plan__badge {
  position: absolute;
  top: 24px;
  right: 24px;
  margin: 0;
}

.pcards .plan__price {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  line-height: 1.12;
  letter-spacing: -0.026em;
  color: var(--ink);
  margin: 12px 0 0;
  max-width: none;
}

.pcards .plan__price small {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink2);
  margin-top: 10px;
}

.pcards .ticks {
  margin-top: 22px;
}

/* Not included: a dash instead of a tick, and the line steps back. */
.ticks li.is-off {
  color: var(--ink3);
}

.ticks li.is-off::before {
  background: var(--surface2);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.ticks li.is-off::after {
  left: 4px;
  top: 15px;
  width: 8px;
  height: 0;
  border-left: 0;
  border-bottom: 2px solid var(--ink3);
  transform: none;
}

@media (max-width: 720px) {
  .ptable {
    display: none;
  }
  .pcards {
    display: grid;
  }
}

/* ── Mobile nav ────────────────────────────────────────────────────────── */

/* A <details>, so the menu opens with no JavaScript at all. The links are
   duplicated rather than re-parented, because forcing a <details> open from
   CSS is not reliable across browsers. */
.navmenu {
  display: none;
  position: relative;
}

.navmenu summary {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  cursor: pointer;
  color: var(--ink2);
  list-style: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.navmenu summary::-webkit-details-marker {
  display: none;
}

.navmenu summary:hover,
.navmenu[open] summary {
  background: var(--surface2);
  color: var(--ink);
}

.burger {
  width: 20px;
  height: 20px;
}

.navmenu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 210px;
  padding: 6px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--sh-hover), var(--ring);
}

.navmenu__panel a {
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.navmenu__panel a:hover {
  background: var(--surface2);
}

@media (max-width: 1080px) {
  .navmenu {
    display: block;
  }
}

/* Once the bar is narrower than the panel, anchoring to the button pushes it
   off the left edge. Below this the panel spans the gutters instead. */
@media (max-width: 560px) {
  .navmenu__panel {
    position: fixed;
    top: 70px;
    left: var(--gutter);
    right: var(--gutter);
    min-width: 0;
  }
}

/* Last bit of headroom at the 320px floor. The fallback font is a hair wider
   than Onest, so without this the bar overflows by a pixel until the webfont
   swaps in. */
@media (max-width: 360px) {
  .brand {
    font-size: 18px;
  }
  .nav__inner {
    gap: 8px;
  }
  .lang__btn {
    padding-inline: 8px;
  }
}
