/* Home page — design bake-off winner (design-lab/home-2026-10/v2-jakub) + mobile sticky CTA
   (v1-emil) + numbered package checklist (v4-elaya-tastemaker). Loaded only by templates/home.html.
   Every class is prefixed hm- and scoped under .hm: rf.css owns .btn/.card/.hero/.eyebrow/.lead,
   and its `a:hover` (0,1,1) would otherwise repaint button labels. */

/* ── Page shell: base.html chrome restyled for this page only ─────────────── */
.page-home { background: #fcfbf8; background-image: none; }
.page-home::before { display: none; }
.page-home main { padding: 0; }
.page-home main > .container { max-width: none; padding: 0; }
.page-home main > .container > .stack { max-width: 1200px; margin: 16px auto 0; padding-left: 24px; padding-right: 24px; }
.page-home .navbar { background: rgba(252, 251, 248, 0.92); }
.page-home .disclaimer { background: #efece7; color: #211f1b; font-size: 0.875rem; line-height: 1.45; padding: 10px 20px; }
.page-home .disclaimer strong { color: #211f1b; font-weight: 600; }
.page-home .footer { background: #f6f4f0; }

/* ── Tokens ───────────────────────────────────────────────────────────────── */
.hm {
  /* Neutrals: warm ramp, hex for old Android WebViews */
  --paper: #fcfbf8;
  --subtle: #f6f4f0;
  --sunken: #efece7;
  --white: #ffffff;
  --ink: #211f1b;        /* 15.9:1 on paper */
  --ink-2: #3f3d38;      /* 9.9:1 on subtle */
  --muted: #65635e;      /* 5.8:1 on paper */
  --line-strong: #8f8c85;
  --accent-50: #f1f6fe;
  --accent-600: #1b56ca; /* white text 6.5:1 */
  --accent-700: #0d45b0;
  --accent-900: #04215b;
  --on-dark: #dae5f9;
  --green: #147f5b;      /* white check 5.2:1 */
  --focus: #1b56ca;

  --font-ui: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;

  --r-sm: 10px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-2xl: 24px;

  --shadow-border: 0 0 0 1px rgba(0,0,0,.06), 0 1px 2px -1px rgba(0,0,0,.06), 0 2px 4px 0 rgba(0,0,0,.04);
  --shadow-lift: 0 0 0 1px rgba(0,0,0,.05), 0 1px 2px -1px rgba(0,0,0,.06), 0 8px 16px -8px rgba(33,31,27,.12), 0 28px 56px -28px rgba(33,31,27,.22);
  --shadow-btn: 0 0 0 1px rgba(4,33,91,.12), 0 1px 2px -1px rgba(4,33,91,.30), 0 4px 10px -4px rgba(4,33,91,.38);

  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;   /* 17px: ESL readers, small phones */
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (min-width: 40em) { .hm { font-size: 1.125rem; } }

/* rf.css already zeroes margin/padding on *; only its h1–h3 margin-bottom needs undoing.
   Keep resets to properties the hm- classes never set: a (0,1,1) `.hm ul {margin:0}`
   would beat `.hm-checklist {margin-top}`. */
.hm h1, .hm h2, .hm h3 { margin-bottom: 0; }
.hm ul, .hm ol { list-style: none; }
.hm h1, .hm h2, .hm h3 { color: var(--ink); text-wrap: balance; }
.hm p { text-wrap: pretty; }
.hm a { color: var(--accent-600); }

.hm h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.875rem; line-height: 1.1; letter-spacing: -0.02em;
}
@media (min-width: 40em) { .hm h1 { font-size: clamp(2.25rem, 1.2rem + 3vw, 3.5rem); } }
.hm h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.625rem, 1.3rem + 1.8vw, 2.5rem); line-height: 1.2; letter-spacing: -0.015em;
}
.hm h3 { font-family: var(--font-ui); font-weight: 600; font-size: 1.25rem; line-height: 1.3; }

.hm :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.hm [id] { scroll-margin-top: 88px; }   /* sticky navbar is 64px */

/* Same box as rf.css .container (1200 + 24) so content lines up with the navbar logo */
.hm-wrap { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }

.hm-section { padding-block: 72px; }
@media (min-width: 64em) { .hm-section { padding-block: 112px; } }
.hm-section-alt { background: var(--subtle); }

.hm-eyebrow { font-size: 1rem; line-height: 1.4; font-weight: 600; color: var(--ink-2); }
.hm-lead { font-size: 1.0625rem; line-height: 1.5; color: var(--ink-2); max-width: 34em; }
@media (min-width: 40em) { .hm-lead { font-size: 1.3125rem; } }
.hm-supporting { color: var(--ink-2); max-width: 34em; }
.hm-smallprint { font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.hm-price { font-variant-numeric: tabular-nums; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.hm .hm-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding-block: 14px;
  padding-left: 22px;   /* optical: 2px less on the icon side (physical props: pre-87 WebViews drop logical ones) */
  padding-right: 20px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font: 600 1.0625rem/1.2 var(--font-ui);
  text-align: center; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.hm .hm-btn-primary, .hm .hm-btn-primary:hover { color: var(--white); }
.hm .hm-btn-primary { background: var(--accent-600); box-shadow: var(--shadow-btn); }
.hm .hm-btn-secondary, .hm .hm-btn-secondary:hover { color: var(--ink); }
.hm .hm-btn-secondary { background: var(--white); border-color: var(--line-strong); }
.hm .hm-btn-inverse, .hm .hm-btn-inverse:hover { color: var(--accent-900); }
.hm .hm-btn-inverse { background: var(--white); }
.hm .hm-btn-block { width: 100%; }
@media (hover: hover) {
  .hm .hm-btn-primary:hover { background: var(--accent-700); }
  .hm .hm-btn-secondary:hover { background: var(--subtle); }
  .hm .hm-btn-inverse:hover { background: var(--accent-50); }
}
.hm-cta-row { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
@media (min-width: 40em) { .hm-cta-row { flex-direction: row; flex-wrap: wrap; align-items: center; } }
.hm .hm-cta-row .hm-btn-primary { padding-left: 24px; padding-right: 20px; }

.hm-icon {
  display: block; flex: none; width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.hm-btn .hm-icon { stroke-width: 2.2; }
.hm-btn-label { min-width: 0; text-align: center; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hm-hero { position: relative; isolation: isolate; padding-block: 20px 48px; }
@media (min-width: 64em) { .hm-hero { padding-block: 88px 104px; } }
.hm-hero::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70rem 36rem at 90% -8%, rgba(27,86,202,.07), transparent 70%);
}
.hm-hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 64em) { .hm-hero-grid { grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 72px; } }
.hm-hero-copy { display: grid; gap: 12px; }
.hm-hero-copy h1 { margin-top: 4px; }
.hm-hero-copy .hm-lead { margin-top: 8px; }
.hm-hero-copy .hm-smallprint { margin-top: 14px; }

/* ── Package card: outer 24 = inner 16 + padding 8 ────────────────────────── */
.hm-pkg { border-radius: var(--r-2xl); background: var(--white); padding: 8px; box-shadow: var(--shadow-lift); }
.hm-pkg-inner { border-radius: var(--r-lg); background: var(--subtle); padding: 24px; }
@media (max-width: 22.5rem) { .hm-pkg-inner { padding: 20px 16px; } }
.hm-pkg-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
@media (min-width: 30em) { .hm-pkg-head { flex-direction: row; align-items: center; gap: 16px; } }
.hm-pkg-icon {
  flex: none; width: 52px; height: 52px; border-radius: 14px;
  background: var(--sunken); color: var(--ink);
  display: grid; place-items: center;
}
.hm-pkg-icon .hm-icon { width: 24px; height: 24px; }
.hm .hm-pkg h2 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.01em; }
.hm-pkg-sub { margin-top: 4px; color: var(--ink-2); font-size: 1rem; line-height: 1.45; }

/* Numbered rows with a green tick (from v4) */
.hm-checklist { margin-top: 20px; display: grid; gap: 10px; }
.hm-checklist li {
  display: grid; grid-template-columns: 22px minmax(0,1fr) 24px; align-items: center; gap: 12px;
  min-height: 48px; padding: 10px 14px; border-radius: var(--r-md);
  background: var(--white); box-shadow: var(--shadow-border);
  font-size: 1rem; font-weight: 500; line-height: 1.4; color: var(--ink);
}
.hm-num { font-size: .875rem; line-height: 1.4; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.hm-tick { width: 24px; height: 24px; border-radius: 999px; background: var(--green); display: grid; place-items: center; }
.hm-tick svg { width: 14px; height: 14px; fill: none; stroke: var(--white); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hm .hm-pkg .hm-btn { margin-top: 20px; }

/* ── Trust bar ────────────────────────────────────────────────────────────── */
.hm-trust { background: var(--subtle); padding-block: 32px; }
@media (min-width: 64em) { .hm-trust { padding-block: 40px; } }
.hm-trust-list { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 28px 20px; }
@media (min-width: 64em) { .hm-trust-list { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px 32px; } }
.hm-trust-list li { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
@media (min-width: 40em) { .hm-trust-list li { flex-direction: row; gap: 12px; } }
.hm-trust-icon {
  flex: none; width: 40px; height: 40px; border-radius: var(--r-md);
  background: var(--white); color: var(--ink-2);
  display: grid; place-items: center; box-shadow: var(--shadow-border);
}
.hm-trust-list strong { display: block; font-weight: 600; font-size: 1rem; line-height: 1.3; color: var(--ink); }
.hm-trust-list strong + span { display: block; margin-top: 2px; font-size: .9375rem; line-height: 1.4; color: var(--muted); }

/* ── Sections ─────────────────────────────────────────────────────────────── */
.hm-section-head { display: grid; gap: 12px; max-width: 44rem; margin-bottom: 40px; }
@media (min-width: 64em) { .hm-section-head { margin-bottom: 56px; } }
.hm-sub { font-size: 1.125rem; color: var(--muted); }

.hm-cards-wrap { container-type: inline-size; }
.hm-cards { display: grid; gap: 16px; }
@container (min-width: 52rem) { .hm-cards { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; } }
.hm-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 28px 24px; border-radius: var(--r-xl);
  background: var(--white); box-shadow: var(--shadow-border);
}
.hm-card p { color: var(--ink-2); line-height: 1.6; }
.hm-tile {
  width: 44px; height: 44px; margin-bottom: 8px; border-radius: var(--r-md);
  background: var(--subtle); color: var(--ink-2);
  display: grid; place-items: center;
}
.hm-section-cta { margin-top: 40px; }

/* How it works */
.hm-steps { display: grid; gap: 36px; }
@media (min-width: 64em) { .hm-steps { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 32px; } }
.hm-step { display: grid; gap: 8px; align-content: start; }
.hm-step::before { content: ""; display: block; width: 32px; height: 4px; margin-bottom: 12px; border-radius: 999px; background: var(--ink); }
.hm-step-label { font-size: 1rem; line-height: 1.4; font-weight: 600; color: var(--ink-2); }
.hm-step p:not(.hm-step-label) { color: var(--ink-2); }

/* FAQ */
.hm-faq { display: grid; gap: 12px; max-width: 48rem; }
.hm-faq-item { border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow-border); }
.hm-faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 16px 20px; border-radius: var(--r-lg);
  cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.0625rem; line-height: 1.4; color: var(--ink);
}
.hm-faq-item summary::-webkit-details-marker { display: none; }
.hm-faq-chev { flex: none; width: 20px; height: 20px; color: var(--ink-2); }
.hm-faq-item[open] .hm-faq-chev { transform: rotate(180deg); }
.hm-faq-a { padding: 0 20px 20px; }
.hm-faq-a p { color: var(--ink-2); max-width: 62ch; }

/* Final CTA */
.hm-final {
  display: grid; gap: 16px; justify-items: start;
  padding: 40px 24px; border-radius: var(--r-2xl);
  background: var(--accent-900); color: var(--white);
}
@media (min-width: 40em) { .hm-final { padding: 56px 48px; } }
.hm .hm-final h2 { color: var(--white); }
.hm-final p { color: var(--on-dark); max-width: 44ch; }
.hm-final .hm-btn { margin-top: 8px; }
.hm .hm-final :focus-visible { outline-color: var(--white); }

/* ── Sticky CTA (from v1): phones only; shown while neither the hero CTA, the final
   CTA nor the footer is on screen. JS-only — without JS it is never rendered. ── */
.hm-sticky { display: none; }
@media (max-width: 768px) {
  .hm-js .hm-sticky {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    padding: 12px 16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));   /* dropped whole where env() is unknown */
    background: rgba(252, 251, 248, 0.97);
    border-top: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 -10px 30px -18px rgba(33,31,27,.35);
    visibility: hidden; transform: translateY(110%);
  }
  .hm-js .hm-sticky.is-shown { visibility: visible; transform: none; }
  .hm .hm-sticky .hm-btn { display: flex; width: 100%; max-width: 480px; margin-left: auto; margin-right: auto; }
  /* Keyboard focus scrolled into view must not land under the fixed bar */
  html.hm-js { scroll-padding-bottom: 96px; }
}

/* ── Motion: only under no-preference; hidden states gated on html.hm-js ─── */
@media (prefers-reduced-motion: no-preference) {
  .hm-js .hm-hero-anim { animation: hm-rise 300ms ease-out both; animation-delay: calc(var(--i, 0) * 100ms); }
  .hm-js .hm-reveal:not(.is-in) { opacity: 0; }
  .hm-js .hm-reveal.is-in { animation: hm-rise 300ms ease-out both; animation-delay: calc(var(--i, 0) * 100ms); }
  .hm .hm-btn { transition-property: scale, background-color, box-shadow, color; transition-duration: 150ms; transition-timing-function: ease-out; }
  .hm .hm-btn:active { scale: .96; }
  .hm-btn .hm-icon { transition: translate 200ms cubic-bezier(.2,0,0,1); }
  @media (hover: hover) { .hm-btn:hover .hm-icon { translate: 2px 0; } }
  .hm-faq-chev { transition: transform 200ms cubic-bezier(.2,0,0,1); }
  .hm-faq-item[open] .hm-faq-a { animation: hm-faq-in 200ms ease-out both; }
  /* Package ticks pop in one after another once the card is on screen (v4) */
  .hm-tick { transition: transform 300ms cubic-bezier(.32,.72,0,1), opacity 300ms ease-out; transition-delay: calc(var(--i, 0) * 70ms + 200ms); }
  .hm-js .hm-pkg:not(.is-in) .hm-tick { opacity: 0; transform: scale(.6); }
}
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
  /* Drawer curve in, quicker exit; visibility delayed on exit so the bar leaves the tab order */
  .hm-js .hm-sticky { transition: transform 260ms cubic-bezier(.23,1,.32,1), visibility 0s linear 260ms; }
  .hm-js .hm-sticky.is-shown { transition: transform 440ms cubic-bezier(.32,.72,0,1), visibility 0s; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }   /* rf.css sets smooth unconditionally */
@keyframes hm-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes hm-faq-in { from { opacity: 0; transform: translateY(-4px); } }
@media print {
  .hm-js .hm-reveal, .hm-js .hm-hero-anim { opacity: 1 !important; animation: none !important; }
  .hm-sticky { display: none !important; }
}
