/* ==========================================================================
   inote — site.css
   Landing page (/) and legal pages (/privacy, /terms) only.
   Requires tokens.css and base.css. No new colours: tokens only.

   Contents
     1 Shell (skip link, top bar, footer)   6 Pricing
     2 Sections                             7 FAQ
     3 Hero + product demo                  8 Closing band
     4 Steps                                9 Legal pages
     5 Trust cards                         10 Motion (entrance, loops, reduced)
   ========================================================================== */

:root {
  --section-pad: clamp(56px, 8vw, 112px);
}

/* Lets <details> animate to its natural height where supported. */
@media (prefers-reduced-motion: no-preference) {
  :root {
    interpolate-size: allow-keywords;
  }
}

/* 1 ---- Shell ------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: calc(var(--safe-top) + var(--space-2));
  left: var(--space-2);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--accent-strong);
  font-weight: var(--weight-semibold);
  box-shadow: var(--shadow-3);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.site-bar .topbar-inner {
  max-width: var(--w-site);
}

.site-nav {
  display: flex;
  align-items: center;
}

.site-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding-inline: var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  transition: color var(--dur-1) var(--ease-soft);
}

/* Underline that draws from the left on hover. */
.site-nav-link::after {
  content: "";
  position: absolute;
  right: var(--space-3);
  bottom: 12px;
  left: var(--space-3);
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease-out);
}

.site-nav-link:active {
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .site-nav-link:hover {
    color: var(--ink);
  }

  .site-nav-link:hover::after {
    transform: scaleX(1);
  }
}

/* Narrow phones: tighter links so logo, both anchors and the button fit 360px. */
@media (max-width: 419px) {
  .site-bar .topbar-actions {
    gap: var(--space-1);
  }

  .site-nav-link {
    padding-inline: var(--space-2);
  }

  .site-nav-link::after {
    right: var(--space-2);
    left: var(--space-2);
  }
}

/* Below 360px the two anchors give way to the logo and the sign-in button. */
@media (max-width: 359px) {
  .site-nav {
    display: none;
  }
}

.site-footer {
  padding-block: var(--space-8) calc(var(--space-8) + var(--safe-bottom));
  border-top: 1px solid var(--line);
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
}

.site-footer-brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
}

.foot-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: color var(--dur-1) var(--ease-soft), text-decoration-color var(--dur-1) var(--ease-soft);
}

.foot-link:active,
.foot-link[aria-current="page"] {
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .foot-link:hover {
    color: var(--ink);
    text-decoration-color: currentColor;
  }
}

.site-footer-copy {
  margin-left: auto;
  color: var(--ink-3);
  font-size: var(--text-sm);
}

@media (max-width: 599px) {
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer-copy {
    margin-left: 0;
  }
}

/* 2 ---- Sections ---------------------------------------------------------- */

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

.section-tint {
  background: var(--surface);
}

/* Follows a section on the same ground: one gap between them, not two. */
.section-flush {
  padding-top: 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(24px, 4vw, 48px);
}

.section-title {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
}

.section-head-center {
  margin-inline: auto;
  text-align: center;
}

/* Icon tile shared by steps and trust cards. */
.tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
}

.tile-warm {
  background: var(--warm-soft);
  color: var(--warm-strong);
}

.tile .icon {
  width: 28px;
  height: 28px;
}

/* 3 ---- Hero + product demo ---------------------------------------------- */

.hero {
  padding-block: clamp(24px, 5vw, 56px) clamp(48px, 7vw, 88px);
  overflow: clip;
}

.hero-inner {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  max-width: 560px;
}

.hero-title {
  font-size: clamp(2.375rem, 1.4rem + 4.2vw, 3.75rem);
  /* Long Mongolian words must not be cut mid-word in the headline. */
  overflow-wrap: break-word;
}

.hero-lead {
  max-width: 30ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-2);
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.hero-note .icon {
  width: 18px;
  height: 18px;
  color: var(--success);
}

/* The visual: phone (listening screen) next to the notes it produces. */
.hero-visual {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: var(--space-5);
  margin: 0;
}

/* Soft sky glow behind the phone. */
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -6% -10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-soft-2), rgb(var(--bg-rgb) / 0));
  pointer-events: none;
}

@media (min-width: 640px) {
  .hero-copy {
    align-items: center;
    max-width: 640px;
    margin-inline: auto;
    text-align: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    grid-template-columns: auto minmax(0, 312px);
    justify-content: center;
    align-items: center;
    gap: var(--space-6);
  }
}

@media (min-width: 1080px) {
  .hero {
    display: grid;
    align-items: center;
    min-height: min(calc(100svh - var(--topbar-h)), 860px);
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hero-copy {
    align-items: flex-start;
    max-width: 440px;
    margin-inline: 0;
    text-align: left;
  }

  .hero-cta {
    justify-content: flex-start;
  }
}

@media (max-width: 479px) {
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-note {
    justify-content: center;
  }
}

/* -- Phone frame -- */

.phone {
  --phone-frame: var(--ink);
  position: relative;
  flex: none;
  width: 264px;
  padding: 8px;
  border-radius: 44px;
  background: var(--phone-frame);
  box-shadow: var(--shadow-3);
}

/* Dark theme: --ink turns light, so the frame would read as a white phone.
   Keep it a dark device, lifted off the page by a hairline. */
:root[data-theme="dark"] .phone {
  --phone-frame: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-3);
}

.phone-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 540px;
  padding: 46px var(--space-4) var(--space-4);
  border-radius: 36px;
  background: var(--bg);
  overflow: hidden;
}

/* Camera island */
.phone-screen::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 72px;
  height: 20px;
  margin-left: -36px;
  border-radius: var(--radius-full);
  background: var(--phone-frame);
}

.demo-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.demo-name {
  max-width: 100%;
  overflow: hidden;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-status-paused {
  display: none;
}

/* -- Decibel circle -- */

.orb-wrap {
  flex: 1 1 0;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
}

.orb {
  --lvl: 0.45;   /* 0..1 loudness, set by site.js */
  --peak: 0;     /* 0..1 how far into "loud" the level is */
  position: relative;
  width: 168px;
  height: 168px;
}

.orb-halo,
.orb-ring,
.orb-core,
.orb-mark {
  position: absolute;
  border-radius: 50%;
}

.orb-halo {
  inset: 0;
  background: var(--listen-halo);
  transform: scale(calc(0.74 + var(--lvl) * 0.26));
}

.orb-ring {
  inset: 17%;
  background: var(--listen-quiet);
  opacity: 0.55;
  transform: scale(calc(0.8 + var(--lvl) * 0.3));
}

.orb-core {
  inset: 32%;
  background: var(--listen-voice);
  background: color-mix(in srgb, var(--listen-voice), var(--listen-loud) calc(var(--peak) * 100%));
  box-shadow: 0 6px 18px rgb(var(--accent-rgb) / 0.32);
  transform: scale(calc(0.84 + var(--lvl) * 0.34));
}

/* Gold ring that leaves the circle when «Чухал» is pressed. */
.orb-mark {
  inset: 14%;
  border: 3px solid var(--warm);
  opacity: 0;
}

/* With site.js: levels arrive ~12 times a second; transitions do the easing.
   Each layer follows a little later than the one inside it. */
.demo.is-live .orb-core {
  transition: transform 110ms linear, background-color var(--dur-3) var(--ease-soft);
}

.demo.is-live .orb-ring {
  transition: transform 220ms var(--ease-out);
}

.demo.is-live .orb-halo {
  transition: transform 420ms var(--ease-out);
}

/* -- Timer and usage -- */

.demo-timer {
  font-size: 2.75rem;
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.demo-usage {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}

.demo-left {
  color: var(--ink-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
}

/* -- Controls -- */

.demo-mark {
  margin-top: var(--space-4);
  overflow: hidden;
}

.demo-mark .icon {
  fill: currentColor;
}

.demo-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding-inline: 6px;
  border-radius: var(--radius-full);
  background: rgb(58 36 0 / 0.14);
  background: color-mix(in srgb, var(--warm-ink) 14%, transparent);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Ripple inside the «Чухал» button */
.demo-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: #FFFFFF;
  opacity: 0;
  pointer-events: none;
}

.demo-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  margin-top: var(--space-2);
}

.demo-pause {
  --btn-shadow: inset 0 0 0 1px var(--line);
}

/* The real control is an invisible checkbox laid over the round button, so
   pausing works without JavaScript (:has) and with the keyboard. */
.demo-check {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: inherit;
  opacity: 0;
  cursor: pointer;
}

.demo-pause:has(.demo-check:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.demo-ico-play {
  display: none;
  fill: currentColor;
}

/* Looks like the app's «Дуусгах» button; it is part of the picture only. */
.demo-stop {
  --btn-shadow: inset 0 0 0 1px var(--line);
  flex: 1 1 0;
  pointer-events: none;
  cursor: default;
}

/* -- Paused: frozen and grey -- */

.demo:has(.demo-check:checked) .orb-halo,
.demo:has(.demo-check:checked) .orb-ring,
.demo:has(.demo-check:checked) .orb-core {
  animation: none;
  transition: transform var(--dur-4) var(--ease-out), background-color var(--dur-3) var(--ease-soft);
}

.demo:has(.demo-check:checked) .orb-halo {
  background: var(--surface-2);
  transform: scale(0.8);
}

.demo:has(.demo-check:checked) .orb-ring {
  background: var(--listen-paused);
  opacity: 0.4;
  transform: scale(0.84);
}

.demo:has(.demo-check:checked) .orb-core {
  background: var(--listen-paused);
  box-shadow: none;
  transform: scale(0.88);
}

.demo:has(.demo-check:checked) .demo-status-live,
.demo:has(.demo-check:checked) .demo-ico-pause {
  display: none;
}

.demo:has(.demo-check:checked) .demo-status-paused {
  display: inline-flex;
}

.demo:has(.demo-check:checked) .demo-ico-play {
  display: block;
}

.demo:has(.demo-check:checked) .demo-timer {
  color: var(--ink-3);
}

/* -- Notes card -- */

.notes {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
  max-width: 340px;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  text-align: left;
}

.notes-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notes-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  letter-spacing: -0.01em;
}

.notes-meta {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--ink-3);
  font-size: var(--text-sm);
}

.notes-meta .icon {
  width: 16px;
  height: 16px;
}

.notes-important {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--warm-soft);
  color: var(--warm-ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
}

.notes-important .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  fill: var(--warm);
  stroke: var(--warm);
}

.notes-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.notes-label {
  color: var(--ink-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.notes-list > li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

/* Bullet for decisions */
.notes-dot::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin: 7px 5px 0;
  border-radius: 50%;
  background: var(--accent);
}

/* Drawn checkbox for action items (picture only, not a control) */
.notes-box {
  flex: none;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
}

.notes-box.is-done {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.notes-box .icon {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.notes-done {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}

.notes-owner {
  color: var(--ink-3);
  white-space: nowrap;
}

/* 4 ---- Steps ------------------------------------------------------------- */

.steps {
  display: grid;
  gap: var(--space-3);
  counter-reset: step;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--bg);
  counter-increment: step;
}

.step .tile {
  grid-row: span 2;
}

.step-title {
  align-self: end;
}

/* "1." in front of each title */
.step-title::before {
  content: counter(step) ". ";
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.step-text {
  align-self: start;
  color: var(--ink-2);
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
  }

  .step {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: var(--space-2);
    padding: var(--space-8) var(--space-6);
  }

  .step .tile {
    grid-row: auto;
    margin-bottom: var(--space-4);
  }
}

/* 5 ---- Trust cards ------------------------------------------------------- */

.trust {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 800px) {
  .trust {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
  }
}

.trust-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) var(--space-6);
}

.trust-card > h3,
.trust-card > p {
  padding-inline: var(--space-3);
}

.trust-card > p {
  color: var(--ink-2);
}

/* Small picture at the top of each card */
.viz {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 132px;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  overflow: hidden;
}

/* a) Sound that goes nowhere: bars fade out before they reach the edge */
.viz-sound {
  gap: 5px;
  justify-content: flex-start;
  padding-left: var(--space-5);
  -webkit-mask-image: linear-gradient(to right, #000 38%, transparent 82%);
  mask-image: linear-gradient(to right, #000 38%, transparent 82%);
}

.viz-mic {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: var(--space-2);
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}

.viz-bar {
  flex: none;
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: var(--accent);
  transform-origin: center;
}

.viz-bar:nth-child(3n) {
  height: 44px;
}

.viz-bar:nth-child(3n + 1) {
  height: 28px;
}

.viz-bar:nth-child(4n) {
  height: 60px;
}

.viz-bar:nth-child(5n) {
  height: 14px;
}

/* b) What the server keeps: unreadable rows, locked */
.viz-cipher {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  padding: 0 72px 0 var(--space-5);
}

.viz-line {
  overflow: hidden;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0.75;
}

.viz-line:nth-child(2) {
  opacity: 0.5;
}

.viz-line:nth-child(3) {
  opacity: 0.3;
}

.viz-lock {
  position: absolute;
  top: 50%;
  right: var(--space-5);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 8px var(--accent-soft);
}

/* c) Minutes used per day */
.viz-usage {
  align-items: flex-end;
  gap: 8px;
  padding: var(--space-5) var(--space-5) 0;
  background: var(--warm-soft);
}

.viz-col {
  flex: 1 1 0;
  max-width: 22px;
  height: 30%;
  border-radius: 6px 6px 0 0;
  background: rgb(var(--warm-rgb) / 0.4);
  transform-origin: bottom;
}

.viz-col:nth-child(2) {
  height: 55%;
}

.viz-col:nth-child(3) {
  height: 18%;
}

.viz-col:nth-child(4) {
  height: 72%;
}

.viz-col:nth-child(5) {
  height: 40%;
}

.viz-col:nth-child(6) {
  height: 88%;
  background: var(--warm);
}

.viz-col:nth-child(7) {
  height: 48%;
}

.viz-usage .chip {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: var(--surface);
}

/* 6 ---- Pricing ----------------------------------------------------------- */

.price {
  display: grid;
  gap: var(--space-6);
  max-width: 920px;
  margin-inline: auto;
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}

.price-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.price-kicker {
  color: var(--accent);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
}

.price-amount {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-2);
  line-height: 1;
}

.price-num {
  font-size: clamp(3.5rem, 2.4rem + 5vw, 5rem);
  font-weight: var(--weight-bold);
  letter-spacing: -0.04em;
}

.price-per {
  color: var(--ink-2);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}

.ticks {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
  font-weight: var(--weight-medium);
}

.ticks > li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.ticks .icon {
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  stroke-width: 3;
}

.price-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.calc {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.calc-legend {
  padding: 0;
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.calc .segmented {
  margin-top: var(--space-2);
  background: var(--surface-2);
}

/* One result per choice; :has() shows the one that is picked. */
.calc-out {
  display: none;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 var(--space-3);
  padding-block: var(--space-2);
}

.calc-out.is-default {
  display: flex;
}

.calc:has(.calc-pick:checked) .calc-out {
  display: none;
}

.calc:has(.calc-pick-30:checked) .calc-out-30,
.calc:has(.calc-pick-60:checked) .calc-out-60,
.calc:has(.calc-pick-120:checked) .calc-out-120 {
  display: flex;
}

.calc-what {
  color: var(--ink-2);
  font-weight: var(--weight-medium);
}

.calc-sum {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
}

.price-note {
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-align: center;
}

@media (min-width: 800px) {
  .price {
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    align-items: center;
    gap: var(--space-10);
    padding: var(--space-10);
  }

  .price-side {
    padding: var(--space-6);
  }
}

/* 7 ---- FAQ --------------------------------------------------------------- */

.faq {
  display: grid;
  gap: var(--space-2);
  max-width: var(--w-app);
  margin-inline: auto;
}

.faq-item {
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
  padding: var(--space-3) var(--space-5);
  border-radius: inherit;
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  list-style: none;
  cursor: pointer;
  transition: color var(--dur-1) var(--ease-soft);
}

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

.faq-item > summary .icon {
  color: var(--accent);
  transition: transform var(--dur-3) var(--ease-out);
}

.faq-item[open] > summary .icon {
  transform: rotate(45deg);
}

@media (hover: hover) and (pointer: fine) {
  .faq-item > summary:hover {
    color: var(--accent-strong);
  }
}

.faq-answer {
  max-width: 56ch;
  padding: 0 var(--space-5) var(--space-5);
  color: var(--ink-2);
}

/* 8 ---- Closing band ------------------------------------------------------ */

.close {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
  padding: clamp(32px, 6vw, 64px) clamp(24px, 5vw, 64px);
  border-radius: var(--radius-xl);
  background: var(--accent);
  color: var(--accent-ink);
  overflow: hidden;
}

/* The listening rings again, as the band's only ornament. */
.close::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -60px;
  width: 420px;
  height: 420px;
  margin-top: -210px;
  border-radius: 50%;
  background: radial-gradient(
    circle closest-side,
    rgb(255 255 255 / 0.3) 0 16%,
    rgb(255 255 255 / 0.16) 17% 44%,
    rgb(255 255 255 / 0.1) 45% 72%,
    rgb(255 255 255 / 0.05) 73% 100%
  );
  pointer-events: none;
}

.close > * {
  position: relative;
}

.close-title {
  max-width: 14ch;
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.close .btn {
  --btn-shadow: var(--shadow-2);
  --btn-fg: var(--accent-strong);
}

.close :focus-visible {
  outline-color: var(--accent-ink);
}

@media (max-width: 639px) {
  .close::before {
    top: auto;
    right: -140px;
    bottom: -220px;
    margin-top: 0;
  }

  .close .btn {
    width: 100%;
  }
}

/* 9 ---- Legal pages ------------------------------------------------------- */

.legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding-block: var(--space-6) var(--space-16);
}

.legal-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.legal-title {
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem);
}

.legal-meta {
  color: var(--ink-3);
  font-size: var(--text-sm);
}

/* Three one-line promises under the title */
.legal-summary {
  display: grid;
  gap: var(--space-2);
}

.legal-summary > li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.35;
}

.legal-summary .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

@media (min-width: 640px) {
  .legal-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .legal-summary > li {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-4);
  }
}

.legal-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  scroll-margin-top: calc(var(--topbar-h) + var(--space-4));
}

.legal-section > h2 {
  font-size: var(--text-xl);
}

.legal-num {
  margin-right: 0.25em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.legal-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: var(--ink-2);
}

.legal-list > li {
  position: relative;
  padding-left: var(--space-5);
}

.legal-list > li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.legal-list strong {
  color: var(--ink);
  font-weight: var(--weight-semibold);
}

/* Who gets what: name on the left, data on the right */
.legal-table {
  display: grid;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.legal-row {
  display: grid;
  gap: 2px var(--space-4);
  padding: var(--space-3) var(--space-4);
}

.legal-row + .legal-row {
  border-top: 1px solid var(--line);
}

.legal-row > dt {
  font-weight: var(--weight-semibold);
}

.legal-row > dd {
  color: var(--ink-2);
}

@media (min-width: 640px) {
  .legal-row {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    padding: var(--space-4) var(--space-5);
  }
}

/* The one rule that must not be missed (consent to record) */
.legal-callout {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--warm-soft);
  color: var(--warm-ink);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
}

.legal-callout .icon {
  margin-top: 1px;
  color: var(--warm-strong);
}

.legal-contact {
  font-weight: var(--weight-semibold);
  color: var(--ink);
}

/* 10 --- Motion ------------------------------------------------------------ */

/* Entrance moves only: it never hides anything, so the page reads the same
   if an animation is late, frozen or skipped (background tab, screenshot). */
@keyframes site-rise {
  from {
    transform: translateY(14px);
  }
}

@keyframes site-settle {
  from {
    transform: translateY(28px) scale(0.97);
  }
}

/* Decibel circle without JavaScript: three uneven loops read as speech. */
@keyframes orb-core {
  0%, 100% { transform: scale(0.9); }
  9% { transform: scale(1.1); }
  17% { transform: scale(0.97); }
  28% { transform: scale(1.16); }
  39% { transform: scale(0.92); }
  52% { transform: scale(1.12); }
  61% { transform: scale(1.02); }
  73% { transform: scale(1.18); }
  86% { transform: scale(0.95); }
}

@keyframes orb-ring {
  0%, 100% { transform: scale(0.86); }
  14% { transform: scale(1.02); }
  31% { transform: scale(1.08); }
  47% { transform: scale(0.9); }
  63% { transform: scale(1.06); }
  80% { transform: scale(1.1); }
}

@keyframes orb-halo {
  0%, 100% { transform: scale(0.8); }
  35% { transform: scale(0.96); }
  70% { transform: scale(0.88); }
  85% { transform: scale(1); }
}

@keyframes orb-mark {
  from {
    opacity: 0.9;
    transform: scale(0.7);
  }

  to {
    opacity: 0;
    transform: scale(1.5);
  }
}

@keyframes mark-ripple {
  from {
    opacity: 0.45;
    transform: scale(0.4);
  }

  to {
    opacity: 0;
    transform: scale(7);
  }
}

@keyframes viz-wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.45); }
}

@keyframes viz-grow {
  from { transform: scaleY(0.3); }
}

@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance: once, on load. */
  .hero-copy > * {
    animation: site-rise var(--dur-5) var(--ease-out) backwards;
  }

  .hero-copy > :nth-child(2) {
    animation-delay: 60ms;
  }

  .hero-copy > :nth-child(3) {
    animation-delay: 120ms;
  }

  .phone {
    animation: site-settle 800ms var(--ease-out) backwards;
  }

  .notes {
    animation: site-settle 800ms var(--ease-out) 120ms backwards;
  }

  /* CSS-only loop; site.js replaces it with a livelier signal (.is-live). */
  .demo:not(.is-live) .orb-core {
    animation: orb-core 3.1s ease-in-out infinite;
  }

  .demo:not(.is-live) .orb-ring {
    animation: orb-ring 3.7s ease-in-out infinite;
  }

  .demo:not(.is-live) .orb-halo {
    animation: orb-halo 4.3s ease-in-out infinite;
  }

  .demo.is-marked .orb-mark {
    animation: orb-mark 700ms var(--ease-out);
  }

  .demo.is-marked .demo-mark::after {
    animation: mark-ripple 600ms var(--ease-out);
  }

  /* <details> opens smoothly where the browser can animate it. */
  .faq-item::details-content {
    block-size: 0;
    overflow: clip;
    transition:
      block-size var(--dur-3) var(--ease-out),
      content-visibility var(--dur-3) allow-discrete;
  }

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

/* Card pictures answer the pointer; they rest when it leaves. */
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .trust-card:hover .viz-bar {
    animation: viz-wave 900ms ease-in-out infinite;
  }

  .trust-card:hover .viz-bar:nth-child(2n) {
    animation-delay: -300ms;
  }

  .trust-card:hover .viz-bar:nth-child(3n) {
    animation-delay: -600ms;
  }

  .trust-card:hover .viz-col {
    animation: viz-grow var(--dur-5) var(--ease-out) backwards;
  }

  .trust-card:hover .viz-col:nth-child(2n) {
    animation-delay: 60ms;
  }

  .trust-card:hover .viz-col:nth-child(3n) {
    animation-delay: 120ms;
  }

  .viz-lock {
    transition: transform var(--dur-3) var(--ease-out);
  }

  .trust-card:hover .viz-lock {
    transform: scale(1.08);
  }
}

/* Reduced motion: the circle rests at a mid level; pausing still greys it. */
@media (prefers-reduced-motion: reduce) {
  .demo.is-live .orb-core,
  .demo.is-live .orb-ring,
  .demo.is-live .orb-halo,
  .demo:has(.demo-check:checked) .orb-core,
  .demo:has(.demo-check:checked) .orb-ring,
  .demo:has(.demo-check:checked) .orb-halo {
    transition: none;
  }

  .faq-item > summary .icon,
  .site-nav-link::after {
    transition: none;
  }
}

@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
  }

  .topbar,
  .skip-link,
  .site-footer-nav {
    display: none;
  }
}
