/* Affirm Away homepage — loaded only on /. Tokens live in styles.css.
   Nothing here loads externally; all atmosphere is inline SVG from art.mjs. */

.eyebrow {
  font-family: var(--font-ui); font-weight: 600; font-size: 12px;
  letter-spacing: .10em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-4);
}
.sec { padding-block: var(--section-y); }
.sec > .wrap, .sec > .wrap-narrow { position: relative; z-index: 1; }
.sec-note { color: var(--muted); font-size: var(--step--1); margin-top: var(--space-5); }
.sec-link { margin-top: var(--space-5); font-weight: 500; }
.sec-link a { color: var(--slate); text-underline-offset: 3px; }
.band-card { background: linear-gradient(180deg, #F4F7F5 0%, #FFFFFF 100%); }

/* ------------------------------------------------------------------- hero */
.hero-v2 {
  position: relative; display: grid; align-items: center;
  min-height: min(88svh, 900px); padding-block: var(--space-9) var(--space-8); overflow: hidden;
}
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: grid; gap: var(--space-7); align-items: center; }
@media (min-width: 980px) { .hero-inner { grid-template-columns: 1.05fr .95fr; } }

.hero-v2 h1 {
  font-family: var(--font-display); font-weight: 400; font-size: var(--step-4);
  line-height: 1.06; letter-spacing: -.022em; max-width: 18ch; text-wrap: balance;
}
.lede { color: var(--muted); font-size: var(--step-1); line-height: 1.5; margin-top: var(--space-5); max-width: 46ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; margin-top: var(--space-6); }
.cta-center { justify-content: center; }
.store-link { display: inline-block; border-radius: var(--r-sm); }
.store-badge { height: 52px; width: auto; display: block; }
.cta-note { color: var(--muted); font-size: 15px; margin-top: var(--space-4); max-width: 42ch; }
.hero-alt { margin-top: var(--space-5); font-weight: 500; }
.hero-alt a { color: var(--slate); text-underline-offset: 3px; }
.trust { color: var(--muted); font-size: var(--step--1); margin-top: var(--space-5); }

/* the three-card cluster — the product, drawn in the app's own gradients */
.cards { position: relative; display: grid; place-items: center; min-height: 440px; }
.pcard {
  position: absolute; width: clamp(280px, 32vw, 340px); aspect-ratio: 3/4;
  border-radius: var(--r-card);
  box-shadow: 0 2px 6px rgba(40,55,61,.10), 0 24px 60px -18px rgba(40,55,61,.32);
}
.pcard-back { transform: rotate(-9deg) translate(-26px, 34px); opacity: .80; z-index: 1; }
.pcard-mid { transform: rotate(3.5deg) translate(28px, 18px); opacity: .92; z-index: 2; }
.pcard-front {
  z-index: 3; transform: rotate(-4deg); padding: 34px;
  display: grid; place-items: center; align-content: center; gap: var(--space-4); text-align: center;
}
.pcard-text {
  font-family: var(--font-display); font-weight: 300; font-style: italic;
  font-size: clamp(21px, 2.4vw, 28px); line-height: 1.28; letter-spacing: .005em; color: var(--ink);
}
.pcard-rule { display: block; width: 48px; height: 1px; background: rgba(40,55,61,.34); }
.pcard-mark {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-ui); font-weight: 600; font-size: 11px;
  letter-spacing: .14em; color: var(--muted);
}
.sparkle { width: 12px; height: 12px; }
@media (max-width: 640px) {
  .pcard-back, .pcard-mid { display: none; }
  .pcard-front { transform: rotate(-2deg); }
  .cards { min-height: 380px; }
}

/* ------------------------------------------------------------------ bands */
.band { position: relative; overflow: hidden; }
.band-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.band-inner { position: relative; z-index: 1; }
.band-stats { padding-block: var(--space-7); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
@media (min-width: 820px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-n { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; color: var(--ink); }
.stat-l { color: var(--muted); font-size: var(--step--1); }
.band-note { color: var(--muted); font-size: var(--step--1); margin-top: var(--space-5); }
.band-note a { color: var(--muted); }

/* ------------------------------------------------------------ honest part */
.argument { max-width: var(--measure); display: grid; gap: var(--space-6); margin-top: var(--space-6); }
.arg + .arg { border-top: 1px solid var(--hairline); padding-top: var(--space-6); }
.arg-lead { font-family: var(--font-ui); font-weight: 600; font-size: 17px; margin-bottom: var(--space-3); }
.arg p { color: var(--muted); }
.arg-quotes { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.arg-quotes span {
  font-family: var(--font-display); font-weight: 300; font-style: italic;
  font-size: var(--step-1); color: var(--slate); line-height: 1.35;
}

/* ------------------------------------------------------- voice demo */
.demo {
  position: relative; max-width: 620px; margin: var(--space-6) auto 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFCFB 100%);
  border-radius: var(--r-xl); box-shadow: var(--shadow-2); padding: var(--space-6); text-align: center;
}
.demo-breath { position: absolute; inset: 0; display: grid; place-items: center; opacity: .16; pointer-events: none; }
.demo-breath .breath { width: 220px; height: 220px; }
.demo-text {
  position: relative; font-family: var(--font-display); font-weight: 300; font-style: italic;
  font-size: var(--step-2); line-height: 1.3; text-wrap: balance; color: var(--ink);
}
.vpills { position: relative; display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-top: var(--space-6); }
.vpill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px;
  border-radius: var(--r-pill); border: 1px solid var(--hairline); background: var(--card);
  font-family: var(--font-ui); font-size: 15px; color: var(--ink); cursor: pointer;
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.vpill:hover { border-color: var(--slate); }
.vpill[aria-pressed="true"] { background: var(--slate); color: #fff; border-color: var(--slate); }
.vpill-name { font-weight: 600; }
.vpill-label { color: var(--muted); font-size: 13px; }
.vpill[aria-pressed="true"] .vpill-label { color: rgba(255,255,255,.78); }
.eq { display: none; align-items: flex-end; gap: 2px; height: 12px; }
.vpill[aria-pressed="true"] .eq { display: inline-flex; }
.eq i { width: 2px; background: currentColor; height: 4px; border-radius: 1px; }
.vbar { position: relative; height: 2px; background: var(--hairline); border-radius: 2px; margin-top: var(--space-5); overflow: hidden; }
.vbar span { display: block; height: 100%; width: 0; background: var(--slate); }
.demo-cap { position: relative; color: var(--muted); font-size: 14px; margin-top: var(--space-5); }

@media (prefers-reduced-motion: no-preference) {
  .eq i { animation: aa-eq .9s ease-in-out infinite; }
  .eq i:nth-child(2) { animation-delay: .15s; }
  .eq i:nth-child(3) { animation-delay: .3s; }
  @keyframes aa-eq { 0%, 100% { height: 4px; } 50% { height: 12px; } }
}

/* --------------------------------------------------------------- mechanism */
.steps { list-style: none; display: grid; gap: var(--space-6); margin-top: var(--space-6); padding: 0; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step-n { font-family: var(--font-display); font-weight: 400; font-size: 44px; line-height: 1; color: var(--sage); display: block; }
/* one fixed icon slot so all three headings sit on the same line, whatever
   the icon is (a 40px glyph or the breath ring) */
/* .step-* must out-specify the generic .glyph rule below, which sets height:40px */
.step .step-glyph, .step .step-breath { display: grid; place-items: center start; height: 64px; margin-top: var(--space-3); }
.step .step-glyph { width: 48px; }
.step .step-breath .breath { width: 56px; height: 56px; }
.step h3 { font-family: var(--font-ui); font-weight: 600; font-size: 15px; margin-top: var(--space-4); }
.step p { color: var(--muted); margin-top: var(--space-2); }

/* glyph family — stroke-width lives here so size tiers can override it */
.glyph { width: 40px; height: 40px; color: var(--muted); stroke-width: 1.75; display: block; }
.glyph-sm { width: 24px; height: 24px; stroke-width: 2.25; }

/* ------------------------------------------------------------------ bento */
.bento { display: grid; gap: clamp(16px, 2vw, 28px); margin-top: var(--space-6); }
.bento .card { container-type: inline-size; }
.bento .card h3 { margin-top: var(--space-4); }
.bento .card p { color: var(--muted); font-size: 15px; margin-top: var(--space-3); }
@media (min-width: 600px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(12, 1fr); }
  .b1 { grid-column: span 6; grid-row: span 2; }
  .b2 { grid-column: span 6; }
  .b3, .b4 { grid-column: span 3; }
  /* row 3 carries only two cards — span 6 each so it fills the grid instead of
     leaving half the row empty */
  .b5, .b6 { grid-column: span 6; }
}

/* device frame — abstract on purpose; never a fake screenshot */
.device { margin-top: var(--space-6); display: grid; justify-items: center; gap: var(--space-3); }
.device-body {
  position: relative; width: min(240px, 70%); aspect-ratio: 360/740;
  filter: drop-shadow(0 18px 40px rgba(40,55,61,.18));
}
.device-edge { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.device-screen {
  position: absolute; inset: 10px; border-radius: 36px; overflow: hidden;
  background: linear-gradient(158deg, #EAF1ED 0%, #C7DBDC 52%, #A6C5D6 100%);
  display: grid; place-content: center; justify-items: center; gap: var(--space-3);
  padding: 22px; text-align: center;
}
.device-affirmation {
  font-family: var(--font-display); font-weight: 300; font-style: italic;
  font-size: clamp(14px, 4.2cqw, 19px); line-height: 1.28; color: var(--ink);
}
.device-rule { width: 40px; height: 1px; background: rgba(40,55,61,.34); }
.device-kicker { font-family: var(--font-ui); font-weight: 500; font-size: 10px; letter-spacing: .10em; text-transform: uppercase; color: var(--muted); }
.device figcaption { color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 640px) { .device-body { filter: drop-shadow(0 10px 24px rgba(40,55,61,.18)); } }

/* ----------------------------------------------------------------- topics */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); margin-top: var(--space-6); }
/* 12 topics: pin to 6 columns on wide screens so they land 6+6 instead of a
   ragged 7+5 */
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.tile {
  position: relative; border-radius: var(--r-lg); padding: 16px; min-height: 148px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.tile-glyph { color: var(--ink); opacity: .55; position: absolute; top: 14px; left: 14px; }
.tile-name { font-family: var(--font-ui); font-weight: 600; font-size: 13.5px; color: var(--ink); }
.tile-sub { font-size: 12px; color: var(--ink); opacity: .68; line-height: 1.35; }
.tile-plus {
  position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.92);
  color: var(--muted); font-family: var(--font-ui); font-weight: 600; font-size: 11px;
  padding: 3px 8px; border-radius: var(--r-pill);
}

/* ----------------------------------------------------------------- limits */
.limits { list-style: none; padding: 0; display: grid; gap: var(--space-5); margin-top: var(--space-6); }
.limits li + li, .limits li:not(:first-child) { border-top: 1px solid var(--hairline); padding-top: var(--space-5); }
.limits p:not(.arg-lead) { color: var(--muted); }
.account { margin-top: var(--space-7); box-shadow: var(--shadow-1); border-radius: var(--r-md); }
.account h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); }
.account ul { list-style: none; padding: 0; margin-top: var(--space-4); display: grid; gap: var(--space-3); }
/* one checkmark for every feature list — the account card and both plan
   columns. A tick reads as "included"; the old dash read as a bullet. */
.account li, .plan li { color: var(--muted); font-size: 15px; padding-left: 26px; position: relative; }
.account li::before, .plan li::before {
  content: ''; position: absolute; left: 1px; top: .5em; width: 11px; height: 6px;
  border-left: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
}

/* ------------------------------------------------------------------ plans */
.plans { display: grid; gap: var(--space-6); margin-top: var(--space-6); padding: var(--space-6); }
@media (min-width: 560px) { .plans { grid-template-columns: 1fr 1fr; gap: var(--space-7); } }
.plan h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); margin-bottom: var(--space-4); }
.plan + .plan { border-top: 1px solid var(--hairline); padding-top: var(--space-6); }
@media (min-width: 560px) { .plan + .plan { border-top: none; border-left: 1px solid var(--hairline); padding-top: 0; padding-left: var(--space-7); } }
.plan ul { list-style: none; padding: 0; display: grid; gap: var(--space-3); }


/* -------------------------------------------------------------------- iOS */
.ios-card h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); }
.ios-card p { color: var(--muted); margin-top: var(--space-3); }
.ios-alt { color: var(--muted); font-size: 14px; margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid rgba(40,55,61,.14); }

/* -------------------------------------------------------------------- FAQ */
.faq { margin-top: var(--space-6); }
.faq details { border-top: 1px solid var(--hairline); }
.faq details:last-child { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; list-style: none; padding: var(--space-5) 32px var(--space-5) 0; position: relative;
  font-family: var(--font-ui); font-weight: 600; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform var(--dur) var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-a { padding-bottom: var(--space-5); }
.faq-a p { color: var(--muted); }

/* ---------------------------------------------------------------- closing */
.band-closing { background: var(--slate); color: #fff; padding-block: var(--space-9); text-align: center; }
.closing-inner { max-width: 620px; margin: 0 auto; }
.band-closing h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-3); color: #fff; }
.band-closing p { color: rgba(255,255,255,.86); margin-top: var(--space-4); }
.closing-note { color: rgba(255,255,255,.82); font-size: var(--step--1); margin-top: var(--space-5); }

/* ------------------------------------------------------------------ seams */
.seam { display: block; width: 100%; height: clamp(48px, 7vw, 96px); margin-bottom: -1px; }
@media (max-width: 480px) {
  .seam { height: 40px; }
  .seam-rise, .seam-settle { display: none; }
}

/* ----------------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {
  .hero-haze { animation: aa-drift 48s ease-in-out infinite alternate; }
  @keyframes aa-drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-32px,0,0); } }

  .breath-live .breath-ring { animation: aa-breathe 7s ease-in-out infinite; transform-origin: 50% 50%; transform-box: fill-box; }
  @keyframes aa-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

  html.js [data-reveal] { opacity: 0; transform: translateY(14px); }
  html.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
}
@media (max-width: 640px) {
  .hero-haze { display: none; }
  .breath-live .breath-ring { animation: none; }
}

/* --------------------------------------------------- sticky install (small) */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none;
  align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: 10px max(16px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.94); box-shadow: 0 -2px 18px rgba(40,55,61,.14);
}
@supports (backdrop-filter: blur(1px)) { .sticky-cta { backdrop-filter: blur(14px) saturate(120%); } }
.sticky-cta.is-on { display: flex; }
.sticky-cta .store-badge { height: 44px; }
.sticky-cta p { font-family: var(--font-ui); font-weight: 600; font-size: 14px; }
.sticky-x { background: none; border: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 8px; cursor: pointer; }
@media (min-width: 768px) { .sticky-cta { display: none !important; } }
