/* Polish pass (Dan, 2026-11-20: "fix this up across screen sizes including
   ultrawide ... the typography pops and is premium refined"). Findings came
   from a design review of every phone screen, one reviewer per screen.
   Loaded last; tokens only, no raw hex. */

/* ── the top bar keeps the page's own soft fade (Dan: "it blended better
   before"); only phones get a slightly deeper fade, where text scrolls
   right under the wordmark ── */
@media (max-width: 760px) {
  .site-top::before {
    height: calc(100% + 22px);
    background: linear-gradient(to bottom,
      color-mix(in srgb, var(--paper) 98%, transparent) 0%,
      color-mix(in srgb, var(--paper) 92%, transparent) 70%,
      transparent 100%);
  }
}
.frame-door {
  padding: 0.55em 1.05em; border-radius: 999px;
  background: var(--pen); color: white !important; font-weight: 600;
  text-shadow: none;
}

/* ── what we care about: story cards, no flip (Dan, 2026-11-20). Each card
   shows its drawing and what people tell us; a beat later our answer rises
   in beneath it in gold. Cards arrive one after another, slowly enough to
   read each line, then everything stays to scan. ── */
.care-card.cq { perspective: none; min-height: 0; display: flex; flex-direction: column; }
.cq-art {
  display: block; width: 100%; height: auto; margin-bottom: 0.4em;
  -webkit-mask-image: radial-gradient(ellipse closest-side, var(--ink) 72%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side, var(--ink) 72%, transparent 100%);
  opacity: 0; transform: translateY(14px);
  transition: opacity 900ms ease, transform 1100ms cubic-bezier(.2,.8,.25,1);
  transition-delay: calc(var(--n) * 520ms);
}
.cq-heard {
  margin: 0; padding: 0 0.2em;
  font: italic 500 var(--text-md)/1.4 var(--display); color: var(--ink-2);
  opacity: 0; transition: opacity 900ms ease; transition-delay: calc(var(--n) * 520ms + 250ms);
}
.cq-heard span {
  display: block; margin-bottom: 0.35em;
  font: 600 var(--text-xs)/1.2 var(--body); font-style: normal; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3);
}
.cq-answer {
  margin-top: 0.9em; padding: 0.9em 0.2em 0; position: relative;
  opacity: 0; transform: translateY(10px);
  transition: opacity 1000ms ease, transform 1100ms cubic-bezier(.2,.8,.25,1);
  transition-delay: calc(var(--n) * 520ms + 1500ms);
}
/* a short gold rule, drawn left to right, turns the hearing into the answer */
.cq-answer::before {
  content: ""; position: absolute; left: 0.2em; top: 0; height: 2px; width: 2.6em;
  background: var(--kind-reference); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 700ms ease; transition-delay: calc(var(--n) * 520ms + 1300ms);
}
.cq-a { margin: 0; font: 600 var(--text-lg)/1.25 var(--display); color: var(--kind-reference); }
.cq-s { margin: 0.4em 0 0; font: var(--text-sm)/1.5 var(--body); color: var(--ink-2); }
.cq.flipped .cq-art, .cq.flipped .cq-heard, .cq.flipped .cq-answer { opacity: 1; transform: none; }
.cq.flipped .cq-answer::before { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  .cq-art, .cq-heard, .cq-answer { opacity: 1; transform: none; transition: none; }
  .cq-answer::before { transform: none; transition: none; }
}

/* ── the main actions are filled, never an outline ── */
.hh .cta, .hero-foot .cta, .tm-price-row .cta {
  background: var(--pen); border-color: var(--pen); color: white; text-shadow: none;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--pen) 32%, transparent);
}
.hh .act-quiet, .hero-foot .act-quiet { border-bottom: 1px solid color-mix(in srgb, var(--pen) 70%, transparent); padding-bottom: 2px; }

/* ── type: no orphans, balanced headings, quieter lead-in questions ── */
h1, h2, h3, .et-head, .ud-cap, .care-a { text-wrap: balance; }
p, li, .app-card span, .care-s, .tm-row div { text-wrap: pretty; }
:is(.et-ask, .fb-ask, .bd-ask, .org-ask, .ap-ask, .tm-ask) {
  font-size: var(--text-md); color: var(--ink-2); letter-spacing: 0.005em;
}

/* ── cards: one readable neutral for descriptions, color stays on the icon ── */
.app-card span { color: var(--ink-2); line-height: 1.45; }
.apps-grid, .big-grid { gap: 16px; }

/* ── comparison rows: the dot hangs, wrapped lines align with the text ── */
.tm-row:not(.tm-hdr) .tm-ours { position: relative; padding-left: 1em; }
.tm-row:not(.tm-hdr) .tm-ours::before { position: absolute; left: 0; top: 0.55em; margin: 0; }

/* ── the note from us: a calm letter, not a shout ── */
.letter-body { font-weight: 400; line-height: 1.55; }

/* ───────────────────────── phones ───────────────────────── */
@media (max-width: 760px) {
  /* tighter rhythm between sections */
  main > section:not(.hero) { padding-top: 40px; padding-bottom: 40px; }
  main > section:is(.fb, .bd, .org, .ap, .tm, .ud, .care, .apps):not(.hero) { padding-top: 28px; padding-bottom: 28px; }

  /* long paragraphs read left-aligned on a phone */
  :is(.et-text, .tm-text, .ap-text, .bd-text) { text-align: left; }
  :is(.et-lead, .tm-lead, .ap-lead, .bd-lead) { margin-left: 0; font-size: 17px; line-height: 1.55; }

  /* the hero: the riders first, so the opening screen has its art */
  .hh { display: flex; flex-direction: column; }
  .hs-stage { order: -2; aspect-ratio: 16 / 11; margin: 0 0 -12px; }
  .hh .hh-text { order: 0; padding-top: 0; text-align: left; }
  .hh .hh-statement { font-size: 40px; line-height: 1.02; }
  .hh .hh-bridge, .hh .hh-models, .hh .hh-quote { margin-left: 0; margin-right: 0; }
  .hh .hh-bridge { font-size: 17px; line-height: 1.55; }
  .hh .hh-quote { padding-left: 1.1em; }
  .hh .hh-quote::before { left: 0; translate: 0 0; top: -0.1em; font-size: 2em; }
  .hh .acts { justify-content: flex-start; flex-wrap: wrap; }

  /* build: the shelf above a full-width slip, its rows stacked */
  .bd-shelf { flex-direction: column; align-items: center; }
  .bd-shelf img { width: 62%; }
  .bd-receipt { width: 100%; }
  .bd-line { display: block; }
  .bd-line i { display: block; text-align: left; }

  /* the diagrams: labels that read at phone size */
  .org-who, .tm-who { font-size: 36px; }
  .org-note, .ap-note { font-size: 32px; }
  .org-world-label { font-size: 38px; }
  .tm-cap { font-size: 40px; }
  .org-svg, .ap-svg, .tm-svg { width: 112%; margin-left: -6%; }

  /* care cards: just tall enough for their words */
  .care-card, .care-in { min-height: 400px; }

  /* the closing world: less empty sky, the wordmark fully on screen */
  .hero-foot { min-height: 0; padding-bottom: 40px; }
  .hero-foot .hero-sky { opacity: 0.85; }
  footer, .foot { padding-bottom: 48px; }
}

/* ───────────────────────── ultrawide ───────────────────────── */
@media (min-width: 2200px) {
  :root { --page-w: 1680px; }
  .site-top { padding-left: max(var(--site-pad), calc((100vw - var(--page-w)) / 2)); padding-right: max(var(--site-pad), calc((100vw - var(--page-w)) / 2)); }
  .care-grid, .apps-grid, .big-grid, .tm-table { max-width: 1680px; margin-left: auto; margin-right: auto; }
}

/* the closing world on wide and ultrawide screens: held to the page's content
   column like everything above it, so the words and the globe sit together
   instead of at opposite edges of the window (Dan, 2026-11-21) */
@media (min-width: 1500px) {
  main > section.hero-foot {
    max-width: calc(var(--page-w) + 2 * var(--site-pad));
    margin-left: auto; margin-right: auto;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  }
  .hero-foot .hero-text { align-self: center; margin-top: 0; }
  .hero-foot .hero-sky { inset: 0 0 -10% 0; }
}
