/* Ask Ever — house stylesheet, v4 design pass (2026-11-22).
   The Apple pass: colour goes bold — saturated service colours in
   large fields, in the manner of Apple's product pages — and type
   matches Apple's own: the SF Pro system stack (genuine SF on Apple
   devices), with self-hosted Inter as the cross-platform fallback.
   Navy stays the anchor; the bird system is unchanged. Plain CSS,
   no build step, no JavaScript. Tokens and rationale are documented
   in DESIGN-V4-NOTES.md. */

/* ---------- fonts (self-hosted) ---------- */

/* Inter is the fallback face only: on Apple devices the stack below
   resolves to the system's own SF Pro before Inter is ever reached.
   Self-hosted so the site makes no external calls. */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */

:root {
  --navy: #162f4d;
  --navy-deep: #0b1d31;
  --navy-soft: #33506f;
  --paper: #faf5ea;
  --paper-deep: #f1e7d0;
  --card: #fffdf7;
  --ink: #25313e;
  --muted: #59636f;
  --line: #ddd0b2;
  --line-soft: #e7dcc2;
  --amber: #f06a1d;
  --amber-deep: #a34d00;
  --sky: #a9d6f5;
  --cream: #f6efdd;
  --cream-dim: #c3d0dd;

  /* per-page accent — home/terms/404 default to the house apricot.
     Three tiers per service: --accent is the bold field colour
     (rules, borders, band edges — it carries no text); --accent-deep
     is the text shade for paper and card grounds; --accent-ink is
     the darker text shade for the service's own tinted hero field.
     Every text shade is WCAG-checked in DESIGN-V4-NOTES.md. */
  --accent: #f06a1d;
  --accent-deep: #a34d00;
  --accent-ink: #8a3e00;
  --tint: #fbe2c6;

  /* Apple's own stack: SF Pro on Apple devices (Display for the
     big text, Text for the small), Inter everywhere else. Display
     and text share the stack, as they do on Apple's pages; the
     display manner — semibold, tight tracking, large sizes — is
     carried by the headline rules below. */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "SF Pro Display", "Inter", "Helvetica Neue", Helvetica, Arial,
    sans-serif;

  --wrap: 68rem;
  --radius: 14px;
  --shadow-card: 0 1px 2px rgba(22, 47, 77, 0.05),
    0 14px 30px -22px rgba(22, 47, 77, 0.35);
  --shadow-card-hover: 0 2px 3px rgba(22, 47, 77, 0.06),
    0 22px 38px -20px rgba(22, 47, 77, 0.42);

  /* paper grain — two specks, one for light grounds, one for navy */
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.13'/%3E%3C/svg%3E");
}

.page-perch { --accent: #0a84ff; --accent-deep: #005fcc; --accent-ink: #004a9e; --tint: #a9d6f8; }
.page-keep  { --accent: #00b140; --accent-deep: #007a33; --accent-ink: #005c26; --tint: #a9dfb0; }
.page-tab   { --accent: #ff2d55; --accent-deep: #c4003b; --accent-ink: #9e0030; --tint: #f9c2ce; }
.page-tap   { --accent: #f5a800; --accent-deep: #8f6200; --accent-ink: #755000; --tint: #fbd98a; }

/* ---------- base ---------- */

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--grain-dark);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(240, 106, 29, 0.30); }

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

a {
  color: var(--accent-deep);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}
a:hover { color: var(--navy); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--cream);
  padding: 0.6rem 1rem;
  z-index: 10;
  font-weight: 500;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; color: var(--cream); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main p, main li { max-width: 46rem; }

/* ---------- header ---------- */

.site-header {
  background-color: var(--paper);
  background-image: var(--grain-dark);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--navy);
}
.brand img { width: 46px; height: auto; display: block; }
.brand .wordmark {
  font-family: var(--font-display);
  font-size: 1.32rem;
  letter-spacing: -0.02em;
}
.brand .wordmark .w-ask { font-weight: 600; color: var(--navy-soft); }
.brand .wordmark .w-ever { font-weight: 700; color: var(--navy); }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.7rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-nav a {
  text-decoration: none;
  font-weight: 400;
  font-size: 0.92rem;
  color: #44536a;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--navy); text-decoration: none; }
.site-nav a[aria-current="page"] {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}

/* ---------- bands ---------- */

.band { padding: 3.6rem 0 3.9rem; }
.band-sky {
  background-color: var(--sky);
  background-image: var(--grain-dark);
}
.band-tint {
  background-color: var(--tint);
  background-image: var(--grain-dark);
  border-bottom: 6px solid var(--accent);
}
.band-navy {
  background-color: var(--navy-deep);
  background-image: var(--grain-light);
  color: var(--cream);
}

/* the perch: a stout rule the whole site stands on — apricot head, navy run */
.perch-rule {
  height: 6px;
  background: linear-gradient(90deg,
    var(--amber) 0, var(--amber) 7.5rem,
    var(--navy) 7.5rem, var(--navy) 100%);
}

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--font-display); color: var(--navy); }

h1 {
  font-size: clamp(2.9rem, 6.5vw, 4.3rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: 0 0 0.8rem;
}
h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.3rem);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
}
h3 {
  font-size: 1.3rem;
  line-height: 1.28;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 2rem 0 0.5rem;
}

.tagline {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  line-height: 1.32;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--navy-soft);
  margin: 0 0 1.3rem;
  max-width: 38rem;
}
.lede {
  font-size: 1.16rem;
  line-height: 1.6;
  color: #44536a;
  max-width: 44rem;
  margin: 0;
}

/* ---------- heroes ---------- */

.hero { padding: 4.2rem 0 1.2rem; }
.hero .mark { width: 150px; height: auto; margin-bottom: 1.2rem; display: block; }

/* home: type on the left, Ever large on the right, standing on the perch */
.hero-home {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  column-gap: 3rem;
  align-items: end;
  padding: 4.6rem 0 0;
}
.hero-home h1 {
  grid-column: 1;
  font-size: clamp(3.6rem, 9vw, 5.6rem);
  margin-bottom: 0.4rem;
}
.hero-home .tagline { grid-column: 1; font-size: clamp(1.5rem, 3.4vw, 1.9rem); }
.hero-home .lede { grid-column: 1; padding-bottom: 2.6rem; }
.hero-home .mark {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: min(400px, 88%);
  justify-self: center;
  align-self: end;
  margin: 0;
}

/* product pages: the same stance, inside the tinted band */
.product-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  column-gap: 3rem;
  align-items: end;
  padding: 1.4rem 0 0.4rem;
}
.product-hero h1 { grid-column: 1; }
.product-hero .side {
  grid-column: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 0.9rem;
}
.product-hero .tagline { grid-column: 1; color: var(--accent-ink); }
.product-hero .lede { grid-column: 1; padding-bottom: 1.6rem; }
.product-hero .mark {
  grid-column: 2;
  grid-row: 1 / span 4;
  width: min(290px, 80%);
  justify-self: center;
  align-self: end;
  margin: 0;
}

/* ---------- numbered sections (home) ---------- */

.numbered { counter-reset: sec; }
.numbered section > h2 {
  counter-increment: sec;
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
}
.numbered section > h2::before {
  content: counter(sec, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--amber-deep);
}
.numbered section > h2::after {
  content: "";
  flex: 1 1 auto;
  border-top: 1px solid var(--line);
  transform: translateY(-0.35em);
}
.band-navy section > h2::before { color: var(--amber); }
/* on the bold sky band the deep tier drops under text contrast, so
   the numeral steps down to the ink tier there */
.numbered .band-sky section > h2::before { color: var(--accent-ink); }
.band-navy section > h2::after { border-top-color: rgba(246, 239, 221, 0.25); }

/* ---------- the flock (home cards) ---------- */

.flock {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 1.4rem;
  margin: 2rem 0 0.5rem;
  padding: 0;
  list-style: none;
}
.flock li { max-width: none; }
.card {
  --accent: var(--amber);
  --accent-deep: var(--amber-deep);
  display: block;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.55rem 1.6rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card-perch { --accent: #0a84ff; --accent-deep: #005fcc; }
.card-keep  { --accent: #00b140; --accent-deep: #007a33; }
.card-tab   { --accent: #ff2d55; --accent-deep: #c4003b; }
.card-tap   { --accent: #f5a800; --accent-deep: #8f6200; }
.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
  color: var(--ink);
  text-decoration: none;
}
.card .card-bird {
  width: 58px;
  height: auto;
  display: block;
  margin-bottom: 0.9rem;
  transition: transform 0.3s ease;
}
.card:hover .card-bird { transform: translateX(3px); }
.card h3 { margin: 0 0 0.4rem; font-size: 1.32rem; }
.card .line {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.09rem;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.card p { margin: 0.45rem 0; font-size: 0.99rem; }
.card .price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.06rem;
  color: var(--accent-deep);
  border-top: 1px solid var(--line-soft);
  padding-top: 0.7rem;
  margin-top: 0.9rem;
}

/* ---------- lists & steps ---------- */

ol.steps, ul.plain { padding-left: 1.35rem; margin: 0.6rem 0 0; }
ol.steps li, ul.plain li { margin-bottom: 0.75rem; padding-left: 0.25rem; }
ol.steps li::marker {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-deep);
}
ul.plain li::marker { color: var(--accent); }

/* Section rhythm is carried by padding-top, never by margin-top.
   Padding cannot collapse through the borderless .wrap wrappers, and
   no first-child-style rule can zero it — the two failure modes that
   crushed section headings against their bands in the first v3 build
   (the perch "How it works" heading, the home house-rules heading).
   Section margins are therefore always 0 here; the blocks that keep
   their own margin rhythm (.offer 2.8rem, .terms 3.5rem) set it by
   class and override this rule. Band sections take their rhythm from
   the band's own padding, so their padding-top is zeroed straight
   back out — heroes excepted: a hero's padding is its own (the .hero
   rules below) and outranks the generic section rule. */
main section { margin-top: 0; padding-top: 3.4rem; }
.band section { margin-top: 0; }
.band section:not(.hero) { padding-top: 0; }

/* A section's bottom edge is owned by the section: the last child's
   bottom margin never protrudes into the gap that follows, so every
   gap above is exact rather than a collapse maximum. */
main section > :last-child { margin-bottom: 0; }
main section li:last-child { margin-bottom: 0; }

/* navy band: steps become a ledger of cream rows */
.band-navy h2 { color: var(--cream); }
.band-navy ol.steps { list-style: none; padding-left: 0; }
.band-navy ol.steps li {
  counter-increment: step;
  position: relative;
  padding: 1.05rem 0 1.05rem 4.6rem;
  margin: 0;
  border-top: 1px solid rgba(246, 239, 221, 0.18);
  max-width: 52rem;
  color: var(--cream-dim);
}
.band-navy ol.steps li:last-child { border-bottom: 1px solid rgba(246, 239, 221, 0.18); }
.band-navy ol.steps { counter-reset: step; }
.band-navy ol.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.05rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.15;
  color: var(--amber);
}
.band-navy ol.steps strong { color: var(--cream); }
.band-bird {
  width: 118px;
  height: auto;
  float: right;
  margin: 0.4rem 0 1rem 2rem;
}

/* house rules: a ruled ledger on paper */
.rules-list { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.rules-list li {
  border-top: 1px solid var(--line);
  padding: 0.95rem 0 0.95rem 1.1rem;
  margin: 0;
  border-left: 3px solid var(--amber);
  padding-left: 1.1rem;
}
.rules-list li strong { font-family: var(--font-display); font-weight: 600; color: var(--navy); font-size: 1.08rem; }

/* ---------- callouts, offer, terms ---------- */

.never {
  position: relative;
  background: var(--paper-deep);
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  padding: 1.35rem 1.6rem 1.35rem 5.4rem;
  margin: 2.4rem 0;
  max-width: 46rem;
}
.never::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 43px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.page-perch .never::before { background-image: url("/assets/ever-perch.webp"); }
.page-keep .never::before { background-image: url("/assets/ever-keep.webp"); }
.never p { margin: 0.3rem 0; }

.offer {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 6px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 2.1rem 2.2rem 2.2rem;
  margin: 2.8rem 0;
  max-width: 46rem;
}
.offer h2 { margin-top: 0; }
.offer .offer-price {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0 0 0.6rem;
}
.offer p { margin: 0.45rem 0; }

.btn {
  display: inline-block;
  background: var(--accent-deep);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.65rem;
  border-radius: 999px;
  margin-top: 0.9rem;
  box-shadow: 0 10px 20px -12px rgba(11, 29, 49, 0.55);
  transition: background-color 0.25s ease, transform 0.25s ease,
    box-shadow 0.25s ease;
}
.btn:hover {
  background: var(--navy);
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
}
.btn:active { background: var(--navy-deep); }

.terms {
  border-top: 2px solid var(--navy);
  margin-top: 3.5rem;
  padding-top: 1.3rem;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 46rem;
}
.terms p { margin: 0.4rem 0; }
.terms strong { color: var(--navy); }

.fineprint {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 46rem;
  /* explicit, so the gap never depends on the UA default 1em;
     computes identically to before in every position it occupies */
  margin: 1rem 0 0;
}

.note {
  display: inline-block;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.95rem;
  font-weight: 500;
}

/* ---------- footer ---------- */

.site-footer {
  background-color: var(--navy-deep);
  background-image: var(--grain-light);
  border-top: 6px solid var(--amber);
  color: var(--cream-dim);
  margin-top: 4.5rem;
}
.band + .site-footer { margin-top: 0; }
.site-footer .wrap { padding-top: 3rem; padding-bottom: 2.6rem; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--amber); }
.footer-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid rgba(246, 239, 221, 0.16);
}
.footer-top img { width: 52px; height: 52px; border-radius: 50%; display: block; }
.footer-top .wordmark {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--cream);
}
.footer-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0;
  margin: 1.5rem 0 0.9rem;
}
.footer-nav a {
  text-decoration: none;
  font-weight: 400;
  font-size: 0.88rem;
}
.footer-nav a:hover { text-decoration: underline; }
.site-footer .small { font-size: 0.88rem; max-width: 46rem; margin: 0.45rem 0; }

/* ---------- small screens ---------- */

@media (max-width: 56rem) {
  .hero-home, .product-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-home { padding-top: 3.2rem; }
  .hero-home .mark {
    width: 148px;
    align-self: flex-start;
    margin-bottom: 1.1rem;
  }
  .hero-home .lede { padding-bottom: 1.8rem; }
  .product-hero .mark {
    width: 118px;
    align-self: flex-start;
    margin-bottom: 1rem;
  }
  .product-hero .lede { padding-bottom: 1.2rem; }
  .band-bird { width: 84px; margin-left: 1rem; }
}

@media (max-width: 34rem) {
  .site-nav ul { gap: 1.05rem; }
  .brand img { width: 40px; }
  .offer { padding: 1.6rem 1.3rem; }
  .never { padding-left: 1.4rem; padding-top: 3.6rem; }
  .never::before { top: 1rem; transform: none; }
  .band-navy ol.steps li { padding-left: 3.6rem; }
  .numbered section > h2::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
