/* Ask Ever — house stylesheet, v3 design pass (2026-11-22).
   A printed-matter redesign: warm paper, deep navy, apricot, and one
   ink per service. Fraunces for display, Libre Franklin for text —
   both self-hosted. Plain CSS, no build step, no JavaScript.
   Tokens and rationale are documented in DESIGN-V3-NOTES.md. */

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

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-600-italic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("/assets/fonts/franklin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("/assets/fonts/franklin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("/assets/fonts/franklin-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: #de7a35;
  --amber-deep: #b25a1b;
  --sky: #dfeaf1;
  --cream: #f6efdd;
  --cream-dim: #c3d0dd;

  /* per-page accent — home/terms/404 default to the house apricot */
  --accent: #de7a35;
  --accent-deep: #b25a1b;
  --tint: #fdf0e2;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-text: "Libre Franklin", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 68rem;
  --radius: 10px;
  --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: #2e7cb8; --accent-deep: #1e5c89; --tint: #e4eff7; }
.page-keep  { --accent: #4c7a57; --accent-deep: #38603f; --tint: #e8f0e4; }
.page-tab   { --accent: #a63a50; --accent-deep: #872e41; --tint: #f7e8eb; }
.page-tap   { --accent: #c08f1f; --accent-deep: #8a6310; --tint: #f6eeda; }

/* ---------- 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(222, 122, 53, 0.32); }

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.01em;
}
.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: 500;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  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: 4px 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: 4px;
  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.04;
  letter-spacing: -0.015em;
  font-weight: 700;
  margin: 0 0 0.8rem;
}
h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.3rem);
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
}
h3 {
  font-size: 1.3rem;
  line-height: 1.28;
  font-weight: 600;
  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;
  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 .tagline { grid-column: 1; color: var(--accent-deep); }
.product-hero .lede { grid-column: 1; padding-bottom: 1.6rem; }
.product-hero .mark {
  grid-column: 2;
  grid-row: 1 / span 3;
  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-style: italic;
  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); }
.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: #2e7cb8; --accent-deep: #1e5c89; }
.card-keep  { --accent: #4c7a57; --accent-deep: #38603f; }
.card-tab   { --accent: #a63a50; --accent-deep: #872e41; }
.card-tap   { --accent: #c08f1f; --accent-deep: #8a6310; }
.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 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: 6px;
  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: 700;
  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: 700;
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.65rem;
  border-radius: 8px;
  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 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  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: 6px;
  padding: 0.55rem 0.95rem;
  font-weight: 500;
}

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

.site-footer {
  background-color: var(--navy-deep);
  background-image: var(--grain-light);
  border-top: 4px 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: 500;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.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; }
}
