/* Fonts: self-hosted from brand kit v5 (variable TTF). No third-party font requests. */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/DMSans-Variable.ttf") format("truetype");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal: #1F4E5A;
  --teal-deep: #183C46;
  --sage: #8FB8A8;
  --sage-soft: #DCE8E1;
  --cream: #F6F1E7;
  --card: #FBF8F2;
  --line: #E3DCCB;
  --terracotta: #C8643C;
  --terracotta-text: #A5481F;
  --charcoal: #2B2B2B;
  --muted: #52514E;
  --radius-card: 16px;
  --radius-control: 10px;
  --display: "Fraunces", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --ease: cubic-bezier(.22, 1.2, .36, 1);
  --ease-draw: cubic-bezier(.22, 1, .36, 1); /* same curve without the overshoot, so a drawn stroke never over-runs its end */
  --gutter: clamp(20px, 5vw, 56px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
}
/* quiet paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: .05;
  z-index: 100;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1, h2 { font-family: var(--display); color: var(--teal); letter-spacing: -.03em; }
p { margin: 0; }

.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* focus + buttons */
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 10px; }
.on-dark :focus-visible { outline-color: var(--cream); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  border-radius: var(--radius-control);
  font: 600 16px/1.25 var(--sans);
  text-align: center;
  text-decoration: none;
  border: 2px solid var(--teal);
  transition: transform .35s var(--ease), background-color .2s, color .2s;
  cursor: pointer;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--teal); color: var(--cream); }
.btn-primary:hover { background: var(--teal-deep); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--teal); border-color: var(--sage); }
.btn-ghost:hover { border-color: var(--teal); transform: translateY(-2px); }

.eyebrow {
  font: 600 13px/18px var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--terracotta-text);
}

/* logo: SVG wordmark, 90px minimum on screen */
.logo { display: block; width: 150px; height: auto; aspect-ratio: 476 / 160; }

/* header */
header.site { padding-block: 22px; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
header.site .home { display: block; border-radius: 10px; }
nav.primary { display: flex; align-items: center; gap: 32px; }
nav.primary a.link {
  text-decoration: none; font-weight: 500; color: var(--charcoal);
  min-height: 44px; display: inline-flex; align-items: center;
  border-bottom: 2px solid transparent;
}
nav.primary a.link:hover { color: var(--teal); border-bottom-color: var(--terracotta); border-radius: 0; }
@media (max-width: 720px) { nav.primary a.link.section { display: none; } .logo { width: 124px; } }
@media (max-width: 420px) { .logo { width: 96px; } }

/* Home page only: the big animated wordmark in the hero is the logo, so the header carries just the links.
   On desktop the links float at the top right, level with the wordmark, so there is no empty band above it.
   On small screens the section links are already hidden, so the empty header is hidden too. */
header.site.no-logo .wrap { justify-content: flex-end; }
@media (min-width: 901px) {
  header.site.no-logo { position: absolute; inset: 0 0 auto 0; z-index: 2; }
  header.site.no-logo + main .hero { padding-top: 34px; }
  header.site.no-logo + main .hero .tuesday { margin-top: 36px; } /* keeps the card clear of the links */
}
@media (min-width: 721px) and (max-width: 900px) {
  header.site.no-logo + main .hero { padding-top: 8px; }
}
@media (max-width: 720px) {
  header.site.no-logo { display: none; }
  header.site.no-logo + main .hero { padding-top: 28px; }
}

/* hero */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 112px); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero h1 { font-size: clamp(44px, 7vw, 88px); line-height: 1.02; margin-top: 20px; }
.hero .lede { margin-top: 28px; max-width: 34em; font-size: 18px; line-height: 1.7; color: var(--charcoal); }
.hero .actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .hero .actions .btn { width: 100%; } }

/* hero wordmark: the logo as inline SVG, drawn in once on load (see the intro animation below).
   Size is reserved by width + aspect ratio, so nothing moves while it plays. */
.wm {
  width: clamp(220px, 32vw, 340px); height: auto; aspect-ratio: 476 / 160;
  margin-bottom: clamp(24px, 3vw, 36px);
  /* timing: first letter, gap between letters, time to draw one stroke, and when each x stroke starts */
  --wm-start: .2s; --wm-step: .12s; --wm-dur: .3s; --wm-x1: 1.3s; --wm-x2: 1.65s;
}

/* the Tuesday list */
.tuesday {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px clamp(20px, 3vw, 32px) 24px;
  rotate: 1.2deg;
}
.tuesday-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.tuesday-head h2 { font-size: 28px; letter-spacing: -.02em; }
.tuesday-head span { font-size: 14px; color: var(--muted); }
.tuesday ul { list-style: none; margin: 0; padding: 0; }
.tuesday li {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.tuesday li:last-child { border-bottom: 0; padding-bottom: 8px; }
.box {
  flex: none; width: 22px; height: 22px;
  border: 2px solid var(--teal); border-radius: 6px;
}
.box svg {
  width: 100%; height: 100%; fill: none;
  stroke: var(--terracotta); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.task { position: relative; }
/* The finished state is the default: four items crossed off, dimmed, with an x in each box.
   The strike-through is a background on the text itself, so when a task wraps
   onto two lines, every line gets its own line through the words. */
.leak .task .t {
  background: linear-gradient(var(--terracotta), var(--terracotta)) no-repeat 0 56% / 100% 3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 4px; margin: 0 -4px;
}
.leak .task { opacity: .5; }
.leak .box { opacity: .45; }
.real .task { font-family: var(--display); font-weight: 600; color: var(--teal); font-size: 19px; letter-spacing: -.01em; }
.real .box { border-color: var(--terracotta); }
.tuesday .foot { margin-top: 14px; font-size: 14px; color: var(--muted); }
@keyframes cross { to { background-size: 100% 3px; } }
@keyframes dim { to { opacity: .5; } }
@keyframes boxdim { to { opacity: .45; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes show { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 900px) { .tuesday { rotate: 0deg; } }

/* Intro animation: wordmark first, then the list. Everything that starts hidden is scoped to
   .js, so without JavaScript (or if it fails) the page shows the finished state. With reduced
   motion nothing here applies. The animation only moves stroke-dashoffset and opacity, apart from
   the strike-through, which grows a background so it follows wrapped lines. */
@media (prefers-reduced-motion: no-preference) {
  /* wordmark: starts at page load */
  .js .wm .d {
    --dl: calc(var(--wm-start) + var(--n) * var(--wm-step));
    stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0;
    animation: draw var(--wm-dur) var(--ease-draw) var(--dl) both, show .05s linear var(--dl) both;
  }
  .js .wm .x1 { --dl: var(--wm-x1); }
  .js .wm .x2 { --dl: var(--wm-x2); }
  /* once drawn, drop the dash setup so the wordmark is exactly the logo file */
  .js .wm.done .d { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; opacity: 1; }

  /* list: waits until JS adds .go (wordmark finished and list at least 60% on screen).
     --list-gap: time between items; --list-x: time to draw one stroke of the box x;
     --x-lag: gap between the two box strokes; --strike-lag: when the line starts after the box x. */
  .js .tuesday {
    --list-gap: .45s; --list-x: .25s; --x-lag: .12s;
    --strike-lag: calc(var(--x-lag) + var(--list-x)); --strike-dur: .6s; --dim-lag: .25s;
  }
  .js .leak {
    --s: calc(var(--i) * var(--list-gap));
    --t: calc(var(--s) + var(--strike-lag));
  }
  .js .leak .box svg path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
  .js .leak .task .t { background-size: 0% 3px; }
  .js .leak .task, .js .leak .box { opacity: 1; }

  .js .go .leak .box svg path {
    animation: draw var(--list-x) var(--ease-draw) var(--s) both, show .05s linear var(--s) both;
  }
  .js .go .leak .box svg path + path {
    animation-delay: calc(var(--s) + var(--x-lag)), calc(var(--s) + var(--x-lag));
  }
  .js .go .leak .task .t { animation: cross var(--strike-dur) var(--ease) var(--t) forwards; }
  .js .go .leak .task { animation: dim .4s forwards; animation-delay: calc(var(--t) + var(--dim-lag)); }
  .js .go .leak .box { animation: boxdim .4s forwards; animation-delay: calc(var(--t) + var(--dim-lag)); }
}

/* sections */
section.block { padding-block: clamp(64px, 9vw, 120px); }
.section-head { max-width: 640px; }
.section-head h2 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.08; margin-top: 14px; }
.section-head p { margin-top: 18px; color: var(--muted); font-size: 17px; line-height: 1.7; max-width: 34em; }

/* leaks */
.leaks { margin-top: 56px; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(32px, 6vw, 96px); }
.leaks article { display: grid; grid-template-columns: 52px 1fr; gap: 20px; padding-block: 28px; border-top: 1px solid var(--line); }
.ico {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--teal);
}
.ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico .accent { stroke: var(--terracotta); }
.leaks h3 { font: 600 20px/28px var(--sans); color: var(--teal); }
.leaks p { margin-top: 6px; color: var(--muted); max-width: 30em; }
@media (max-width: 800px) { .leaks { grid-template-columns: 1fr; } }

/* how it works */
.on-dark { background: var(--teal); color: var(--cream); position: relative; overflow: hidden; }
.on-dark h2 { color: var(--cream); }
.on-dark .section-head p { color: #C9DAD3; }
.on-dark .eyebrow { color: var(--sage); }
.ghost-x { position: absolute; right: -90px; top: -60px; width: 460px; opacity: .08; pointer-events: none; }
.steps { margin-top: 60px; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); counter-reset: s; position: relative; }
.steps li { position: relative; padding-top: 28px; border-top: 2px solid var(--sage); }
.steps li::before {
  counter-increment: s; content: counter(s);
  font: 600 56px/1 var(--display); letter-spacing: -.03em;
  color: var(--sage);
  display: block; margin-bottom: 20px;
}
.steps h3 { font: 600 22px/30px var(--sans); }
.steps p { margin-top: 10px; color: #C9DAD3; max-width: 26em; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* offers */
.offers { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; grid-auto-rows: 1fr; }
.offer { border-radius: var(--radius-card); padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; }
.offer h3 { font: 600 clamp(26px, 3vw, 34px)/1.15 var(--display); letter-spacing: -.02em; color: var(--teal); }
.offer .for { margin-top: 12px; font-weight: 500; color: var(--terracotta-text); }
.offer p.body { margin: 18px 0 22px; max-width: 30em; }
.offer ul { margin: auto 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.offer li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.offer li svg { width: 22px; height: 22px; margin-top: 2px; fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.offer.sage { background: var(--sage-soft); border: 1px solid var(--sage); }
.offer.plain { background: var(--card); border: 1px solid var(--line); }
@media (max-width: 800px) { .offers { grid-template-columns: 1fr; grid-auto-rows: auto; } }

/* closing CTA */
.closing { padding-block: clamp(48px, 7vw, 88px) clamp(64px, 9vw, 112px); }
.closing .panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: clamp(32px, 6vw, 80px);
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 32px; align-items: center;
}
.closing h2 { font-size: clamp(34px, 5vw, 60px); line-height: 1.05; }
.closing p { margin-top: 18px; color: var(--muted); font-size: 17px; max-width: 30em; }
.closing .cta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
@media (max-width: 800px) { .closing .panel { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .closing .cta, .closing .cta .btn { width: 100%; } }

/* footer */
footer.site { border-top: 1px solid var(--line); padding-block: 32px 40px; }
footer.site .foot-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
footer.site .logo { width: 110px; }
footer.site .foot-id { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
footer.site p { font-size: 14px; color: var(--muted); }
footer.site .legal { display: flex; flex-wrap: wrap; gap: 4px 24px; }
footer.site .legal a, footer.site .foot-id a { font-size: 14px; color: var(--teal); min-height: 44px; display: inline-flex; align-items: center; }
footer.site .foot-id a.home { border-radius: 10px; } /* keeps the 44px tap height from the rule above */
footer.site .legal a:hover { color: var(--terracotta-text); }

.follow { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; }
.follow-label { font-size: 14px; color: var(--muted); }
.follow ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 28px; }
.follow a {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  font-size: 14px; font-weight: 500; text-decoration: none;
  color: var(--teal);
  transition: color .2s;
}
.follow a svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.follow a:hover, .follow a:focus-visible { color: var(--terracotta-text); }
.follow a:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
@media (max-width: 600px) {
  .follow { display: block; }
  .follow-label { margin-bottom: 4px; }
  .follow ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
}

/* legal + 404 pages */
.doc { padding-block: clamp(32px, 6vw, 72px) clamp(64px, 9vw, 112px); }
.prose { max-width: 65ch; }
.prose h1 { font-size: clamp(38px, 5.5vw, 60px); line-height: 1.05; }
.prose h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.15; letter-spacing: -.02em; margin-top: 44px; }
.prose p { margin-top: 16px; line-height: 1.7; }
.prose h1 + p { margin-top: 20px; }
.prose ul { margin: 16px 0 0; padding-left: 22px; line-height: 1.7; }
.prose li { margin-top: 8px; padding-left: 4px; }
.prose li::marker { color: var(--terracotta); }
.prose strong { font-weight: 600; color: var(--teal); }
.prose .back { margin-top: 56px; }
.prose a.text-link { color: var(--teal); text-underline-offset: 3px; }
.prose a.text-link:hover { color: var(--terracotta-text); }
.lost { padding-block: clamp(56px, 10vw, 140px); }
.lost h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.04; }
.lost p { margin-top: 20px; font-size: 18px; line-height: 1.7; max-width: 30em; }
.lost .btn { margin-top: 32px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .follow a { transition: none; }
}
