/* LatchDesk design system. Nursery soft: milk white, oat, muted sage.
   Light only. Contrast comes from type, rules, tints and photography. */

:root {
  --bg: #FAF9F5;
  --surface: #FFFFFF;
  --ink: #22261F;
  --primary: #4F7A5B;
  --accent: #F2C7A7;
  --muted: #66705F;

  --oat: #F0EBDF;
  --oat-deep: #E5DDCB;
  --sage-05: #F1F5F1;
  --sage-10: #E4EDE6;
  --sage-20: #CBDDD0;
  --sage-40: #A2BFAA;
  --sage-ink: #3B5E45;
  --accent-soft: #FBEDE1;
  --accent-line: #E9C0A0;
  --line: #E3E0D6;
  --line-strong: #CFCBBD;

  --space-1: 0.375rem;
  --space-2: 0.75rem;
  --space-3: 1.125rem;
  --space-4: 1.75rem;
  --space-5: 2.5rem;
  --space-6: 3.75rem;
  --space-7: 5.5rem;
  --space-8: 7.5rem;

  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 30px;
  --radius-xl: 44px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(34, 38, 31, 0.04), 0 6px 18px rgba(34, 38, 31, 0.05);
  --shadow-2: 0 2px 6px rgba(34, 38, 31, 0.05), 0 18px 44px rgba(34, 38, 31, 0.07);
  --shadow-3: 0 30px 70px rgba(34, 38, 31, 0.10);

  --display: "Lora", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Nunito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.16rem, 1.09rem + 0.34vw, 1.32rem);
  --step-2: clamp(1.4rem, 1.28rem + 0.6vw, 1.75rem);
  --step-3: clamp(1.72rem, 1.5rem + 1.05vw, 2.35rem);
  --step-4: clamp(2.1rem, 1.72rem + 1.85vw, 3.2rem);
  --step-5: clamp(2.5rem, 1.9rem + 2.9vw, 4.1rem);

  --wrap: 1180px;
  --ease: cubic-bezier(0.24, 0.6, 0.28, 1);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(58rem 34rem at 88% -8%, var(--sage-05), transparent 70%),
    radial-gradient(46rem 30rem at 4% 22%, var(--accent-soft), transparent 66%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.68;
  font-weight: 400;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.012em;
  margin: 0 0 var(--space-3);
  color: var(--ink);
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 var(--space-3); }
a { color: var(--sage-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 var(--space-3); padding-left: 1.15rem; }
li { margin-bottom: 0.4rem; }
strong { font-weight: 700; }
small { font-size: var(--step--1); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }
section { padding-block: var(--space-7); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- droplet motif ---------- */
.droplet {
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) 8px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--step--1); font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sage-ink);
  background: var(--sage-10);
  border: 1px solid var(--sage-20);
  padding: 0.35rem 0.85rem 0.35rem 0.7rem;
  border-radius: var(--radius-pill) var(--radius-pill) var(--radius-pill) 6px;
  margin-bottom: var(--space-3);
}
.eyebrow::before {
  content: ""; width: 9px; height: 11px; background: var(--primary);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  transform: rotate(180deg);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--body); font-weight: 800; font-size: var(--step-0);
  padding: 0.85rem 1.5rem; border-radius: var(--radius-pill);
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background-color 0.5s var(--ease);
}
.btn-primary { background: var(--primary); color: #FFFFFF; box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--sage-ink); color: #FFFFFF; transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--sage-05); color: var(--sage-ink); transform: translateY(-2px); }
.btn-soft { background: var(--accent-soft); color: var(--ink); border-color: var(--accent-line); }
.btn-soft:hover { background: var(--accent); color: var(--ink); }
.btn-sm { padding: 0.6rem 1.15rem; font-size: var(--step--1); }
.btn-wide { width: 100%; }

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

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 999;
  background: var(--surface); color: var(--ink); font-weight: 800;
  padding: 0.7rem 1.1rem; border-radius: var(--radius-s); border: 1.5px solid var(--primary);
  transition: top 0.35s var(--ease);
}
.skip:focus { top: 1rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, #FFFFFF);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: 0 8px 26px rgba(34, 38, 31, 0.05); }
.header-inner { display: flex; align-items: center; gap: var(--space-3); padding-block: 0.85rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--display); font-size: 1.32rem; font-weight: 600; letter-spacing: -0.01em; }
.brand-name span { color: var(--primary); }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 1.3rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav a {
  text-decoration: none; color: var(--muted); font-weight: 700; font-size: 0.95rem;
  padding: 0.35rem 0; border-bottom: 2px solid transparent;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--sage-40); }
.header-cta { margin-left: 0.4rem; }
.nav-toggle {
  display: none; margin-left: auto; background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill); padding: 0.5rem 0.7rem; cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; margin: 4px 0; }

/* ---------- hero ---------- */
.hero { padding-top: var(--space-6); padding-bottom: var(--space-6); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -8rem; top: -6rem; width: 26rem; height: 30rem;
  background: var(--sage-05); opacity: 0.8; z-index: -1;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}
.hero-grid { display: grid; grid-template-columns: 1.04fr 0.96fr; gap: var(--space-6); align-items: center; }
.hero h1 { margin-bottom: var(--space-3); }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero-lede { font-size: var(--step-1); color: var(--muted); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: var(--space-4) 0 var(--space-4); }
.trust {
  list-style: none; margin: 0; padding: var(--space-3) 0 0; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3);
}
.trust li { margin: 0; font-size: 0.92rem; color: var(--muted); font-weight: 600; }
.trust b { display: block; font-family: var(--display); font-size: 1.32rem; color: var(--ink); font-weight: 600; }
.hero-figure { position: relative; }
.hero-figure img {
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) var(--space-5);
  box-shadow: var(--shadow-3); width: 100%; object-fit: cover; aspect-ratio: 4 / 3;
}
.hero-figure figcaption {
  position: absolute; left: -1rem; bottom: -1.4rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-m) var(--radius-m) var(--radius-m) 8px;
  padding: 0.8rem 1.1rem; box-shadow: var(--shadow-2); font-size: 0.88rem; font-weight: 700;
  max-width: 17rem; color: var(--muted);
}
.hero-figure figcaption b { display: block; color: var(--ink); font-family: var(--display); font-size: 1.05rem; }

/* ---------- section headers ---------- */
.sec-head { max-width: 44rem; margin-bottom: var(--space-5); }
.sec-head p { color: var(--muted); font-size: var(--step-1); margin-bottom: 0; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.band-oat { background: var(--oat); }
.band-sage { background: var(--sage-05); }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-l); padding: var(--space-4);
  box-shadow: var(--shadow-1);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.card h3 { font-size: var(--step-1); }
.card p:last-child { margin-bottom: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }

.pain .card { border-radius: var(--radius-l) var(--radius-l) var(--radius-l) 10px; }
.pain .cost {
  display: inline-block; margin-top: var(--space-2); font-weight: 800; font-size: 0.9rem;
  color: var(--sage-ink); background: var(--sage-10); border-radius: var(--radius-pill);
  padding: 0.3rem 0.85rem;
}

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: var(--space-3); }
.step {
  display: grid; grid-template-columns: 3.2rem 1fr; gap: var(--space-3); align-items: start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-l) var(--radius-l) var(--radius-l) 10px;
  padding: var(--space-3) var(--space-4);
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--display); font-size: 1.5rem; color: var(--primary);
  width: 3rem; height: 3rem; display: grid; place-items: center;
  background: var(--sage-10); border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
}
.step h3 { font-size: var(--step-1); margin-bottom: 0.35rem; }
.step p { margin: 0; color: var(--muted); }
.solution-grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: var(--space-5); align-items: start; }
.solution-figure img {
  border-radius: var(--radius-xl) var(--space-5) var(--radius-xl) var(--radius-xl);
  box-shadow: var(--shadow-2); aspect-ratio: 3 / 4; object-fit: cover; width: 100%;
}

/* ---------- features ---------- */
.feature { position: relative; }
.feature .ico {
  width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: var(--space-3);
  background: var(--sage-05); border: 1px solid var(--sage-20);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}
.feature .ico svg { width: 26px; height: 26px; stroke: var(--primary); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.feature p { color: var(--muted); margin-bottom: 0; }

/* ---------- outcomes with weight curve ---------- */
.outcomes { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.outcome { border-top: 3px solid var(--sage-20); padding-top: var(--space-3); }
.outcome .num { font-family: var(--display); font-size: var(--step-4); color: var(--primary); line-height: 1; display: block; }
.outcome h3 { font-size: var(--step-1); margin: 0.6rem 0 0.4rem; }
.outcome p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.curve-panel {
  margin-top: var(--space-5); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-l); padding: var(--space-4); box-shadow: var(--shadow-1);
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--space-4); align-items: center;
}
.curve-panel svg { width: 100%; height: auto; }
.curve-line { fill: none; stroke: var(--primary); stroke-width: 2.4; stroke-linecap: round;
  stroke-dasharray: 420; stroke-dashoffset: 420; }
.is-visible .curve-line { animation: draw 2.6s var(--ease) forwards; }
.curve-dot { fill: var(--primary); opacity: 0; }
.is-visible .curve-dot { animation: pop 0.8s var(--ease) forwards; }
.is-visible .curve-dot:nth-of-type(1) { animation-delay: 0.35s; }
.is-visible .curve-dot:nth-of-type(2) { animation-delay: 0.8s; }
.is-visible .curve-dot:nth-of-type(3) { animation-delay: 1.25s; }
.is-visible .curve-dot:nth-of-type(4) { animation-delay: 1.7s; }
.is-visible .curve-dot:nth-of-type(5) { animation-delay: 2.15s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
.curve-grid { stroke: var(--line); stroke-width: 1; }

/* ---------- testimonials ---------- */
.testimonial {
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  border-radius: var(--radius-l) var(--radius-l) var(--radius-l) 10px;
  padding: var(--space-4); margin: 0; position: relative;
}
.testimonial::before {
  content: ""; position: absolute; top: var(--space-4); right: var(--space-4);
  width: 16px; height: 20px; background: var(--accent);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; opacity: 0.75;
}
.testimonial p { font-size: 1.03rem; }
.testimonial footer { font-size: 0.9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: var(--space-2); }
.testimonial footer b { display: block; color: var(--ink); font-size: 1rem; font-family: var(--display); font-weight: 600; }
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-top: var(--space-5);
  background: var(--sage-05); border: 1px solid var(--sage-20); border-radius: var(--radius-l); padding: var(--space-4); text-align: center; }
.results b { display: block; font-family: var(--display); font-size: var(--step-3); color: var(--sage-ink); }
.results span { color: var(--muted); font-size: 0.92rem; font-weight: 600; }

/* ---------- pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); align-items: stretch; }
.tier {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: var(--space-4); display: flex; flex-direction: column; box-shadow: var(--shadow-1);
}
.tier.is-featured { border: 2px solid var(--primary); box-shadow: var(--shadow-2); position: relative; }
.tier-flag {
  position: absolute; top: -0.85rem; left: var(--space-4); background: var(--primary); color: #FFFFFF;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3rem 0.85rem; border-radius: var(--radius-pill);
}
.tier .price { font-family: var(--display); font-size: var(--step-4); color: var(--ink); line-height: 1; }
.tier .price small { font-family: var(--body); font-size: 0.95rem; color: var(--muted); font-weight: 700; }
.tier ul { list-style: none; padding: 0; margin: var(--space-3) 0 var(--space-4); }
.tier li { position: relative; padding-left: 1.6rem; font-size: 0.96rem; color: var(--muted); }
.tier li::before {
  content: ""; position: absolute; left: 0; top: 0.55rem; width: 10px; height: 12px;
  background: var(--sage-40); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
}
.tier .btn { margin-top: auto; }
.billing-note { margin-top: var(--space-4); text-align: center; color: var(--muted); font-weight: 600; }

/* ---------- faq ---------- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--display); font-size: var(--step-1); color: var(--ink); font-weight: 600;
  padding: var(--space-3) 2.5rem var(--space-3) 0; position: relative; line-height: 1.3;
}
.faq-q::after {
  content: ""; position: absolute; right: 0.5rem; top: 50%; width: 12px; height: 12px;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.5s var(--ease);
}
.faq-q[aria-expanded="true"]::after { transform: translateY(-20%) rotate(-135deg); }
.faq-a { padding: 0 3rem var(--space-3) 0; color: var(--muted); }
.faq-a[hidden] { display: none; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--space-5); align-items: start; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: var(--space-4); box-shadow: var(--shadow-2); }
.field { margin-bottom: var(--space-3); }
.field label { display: block; font-weight: 800; font-size: 0.92rem; margin-bottom: 0.35rem; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line-strong); border-radius: var(--radius-s);
  padding: 0.7rem 0.85rem;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field [aria-invalid="true"] { border-color: #A6412F; background: var(--surface); }
.err { display: block; color: #8E3524; font-size: 0.85rem; font-weight: 700; margin-top: 0.3rem; }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.92rem; }
.consent input { width: 1.15rem; height: 1.15rem; margin-top: 0.25rem; flex: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.form-note { color: var(--muted); font-size: 0.9rem; margin-top: var(--space-3); }

/* ---------- author byline ---------- */
.byline {
  display: flex; gap: var(--space-3); align-items: center; background: var(--oat);
  border: 1px solid var(--oat-deep); border-radius: var(--radius-l) var(--radius-l) var(--radius-l) 10px;
  padding: var(--space-3) var(--space-4); margin-top: var(--space-5);
}
.byline img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; flex: none; }
.byline p { margin: 0; font-size: 0.95rem; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { background: var(--oat); border-top: 1px solid var(--oat-deep); padding-block: var(--space-6) var(--space-4); }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--space-4); }
.footer-cols h2 { font-size: 1rem; font-family: var(--body); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sage-ink); margin-bottom: var(--space-2); }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-cols a:hover { color: var(--primary); text-decoration: underline; }
.footer-lede { color: var(--muted); max-width: 24rem; }
.socials { display: flex; gap: 0.5rem; margin-top: var(--space-3); }
.socials a {
  width: 38px; height: 38px; display: grid; place-items: center; background: var(--surface);
  border: 1px solid var(--oat-deep); border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
}
.socials svg { width: 18px; height: 18px; stroke: var(--sage-ink); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.socials a:hover { background: var(--sage-10); }
.footer-base {
  margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid var(--oat-deep);
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between;
  font-size: 0.88rem; color: var(--muted);
}

/* ---------- legal / prose pages ---------- */
.page-head { padding-block: var(--space-6) var(--space-4); border-bottom: 1px solid var(--line); }
.prose { padding-block: var(--space-5) var(--space-7); }
.prose h2 { font-size: var(--step-2); margin-top: var(--space-5); }
.prose h3 { font-size: var(--step-1); margin-top: var(--space-4); }
.prose dl { margin: 0 0 var(--space-3); }
.prose dt { font-weight: 800; margin-top: var(--space-2); }
.prose dd { margin: 0 0 0.3rem; color: var(--muted); }
.mini-nav { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: var(--space-4); }
.mini-nav a { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0.4rem 0.95rem; text-decoration: none; font-weight: 700; font-size: 0.9rem; }

/* ---------- author page ---------- */
.author-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: var(--space-5); align-items: start; }
.author-portrait img { border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) var(--space-4); box-shadow: var(--shadow-2); }
.profile-links { list-style: none; padding: 0; display: grid; gap: 0.5rem; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .solution-grid, .contact-grid, .curve-panel, .author-grid { grid-template-columns: 1fr; }
  .outcomes { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav { display: none; width: 100%; margin: 0; }
  .nav.is-open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .nav ul { flex-direction: column; align-items: flex-start; gap: 0.3rem; padding-block: var(--space-3); }
  .nav a { display: block; padding: 0.5rem 0; }
  .header-cta { display: none; }
  .grid-3, .grid-2, .tiers, .results, .trust { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  section { padding-block: var(--space-6); }
}
@media (max-width: 520px) {
  .outcomes { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .hero-figure figcaption { position: static; margin-top: var(--space-3); max-width: none; }
  .step { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .curve-line { stroke-dashoffset: 0; }
  .curve-dot { opacity: 1; }
}

/* ================================================================
   The Visit Bag: the LatchDesk magazine.
   Built from the tokens above. Light only, like the rest of the site.
   ================================================================ */

.mag-measure { width: min(100% - 2.5rem, 68ch); margin-inline: auto; }
.mag-measure-wide { width: min(100% - 2.5rem, 940px); margin-inline: auto; }

/* ---------- breadcrumb ---------- */
.mag-crumb { padding-block: var(--space-3) 0; }
.mag-crumb ol {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap;
  gap: 0.4rem 0.6rem; font-size: var(--step--1); font-weight: 700; color: var(--muted);
}
.mag-crumb li + li::before { content: "/"; margin-right: 0.6rem; color: var(--line-strong); }
.mag-crumb a { color: var(--muted); text-decoration: none; }
.mag-crumb a:hover { color: var(--primary); text-decoration: underline; }
.mag-crumb [aria-current="page"] { color: var(--ink); }

/* ---------- article header ---------- */
.mag-head { padding-block: var(--space-4) var(--space-4); }
.mag-head h1 { font-size: var(--step-4); margin-bottom: var(--space-3); }
.mag-standfirst {
  font-family: var(--display); font-size: var(--step-1); font-style: italic;
  line-height: 1.5; color: var(--muted); margin-bottom: var(--space-4);
}
.mag-byline {
  display: flex; align-items: center; gap: var(--space-3);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding-block: var(--space-3);
}
.mag-byline img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.mag-byline p { margin: 0; font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.mag-byline a { font-weight: 800; color: var(--sage-ink); }
.mag-byline span { display: inline-block; margin-right: 0.9rem; }
.mag-byline time { font-weight: 700; }

.mag-figure { margin: 0 0 var(--space-5); }
.mag-figure img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-xl) var(--space-5);
  box-shadow: var(--shadow-2);
}

/* ---------- article body typography ---------- */
.mag-body { padding-bottom: var(--space-5); }
.mag-body p, .mag-body li { font-size: 1.06rem; line-height: 1.72; }
.mag-body p { margin: 0 0 var(--space-3); }
.mag-body h2 {
  font-size: var(--step-2); margin: var(--space-6) 0 var(--space-3);
  padding-top: var(--space-3); border-top: 2px solid var(--sage-20);
}
.mag-body h3 { font-size: var(--step-1); margin: var(--space-4) 0 var(--space-2); }
.mag-body ul, .mag-body ol { margin: 0 0 var(--space-3); padding-left: 1.3rem; }
.mag-body li { margin-bottom: 0.55rem; }
.mag-body li::marker { color: var(--primary); font-weight: 800; }
.mag-body strong { color: var(--ink); }
.mag-body blockquote {
  margin: var(--space-4) 0; padding: var(--space-3) var(--space-4);
  background: var(--sage-05); border-left: 4px solid var(--sage-40);
  border-radius: var(--radius-m) var(--radius-m) var(--radius-m) 8px;
  font-family: var(--display); font-size: var(--step-1); font-style: italic; color: var(--sage-ink);
}
.mag-body blockquote p:last-child { margin-bottom: 0; }
.mag-table-scroll, .mag-body table { display: block; overflow-x: auto; }
.mag-body table {
  width: 100%; border-collapse: collapse; margin: var(--space-4) 0;
  font-size: 0.95rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-m);
}
.mag-body th, .mag-body td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mag-body thead th { background: var(--oat); font-weight: 800; color: var(--ink); }
.mag-body tbody tr:last-child td { border-bottom: 0; }

/* contextual links dropped into the body by the build */
.inline-read {
  margin: var(--space-4) 0; padding: var(--space-3) var(--space-4);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: var(--radius-m) var(--radius-m) var(--radius-m) 8px;
  font-weight: 700; font-size: 0.98rem !important; color: var(--ink);
}
.inline-read a { color: var(--sage-ink); font-weight: 800; }

/* ---------- call to action ---------- */
.mag-cta { padding-block: var(--space-4); }
.mag-cta-inner {
  background: var(--sage-05); border: 1px solid var(--sage-20);
  padding: var(--space-4) var(--space-5); box-shadow: var(--shadow-1); text-align: left;
}
.mag-cta-inner h2 { font-size: var(--step-2); margin-bottom: var(--space-2); }
.mag-cta-inner p { color: var(--muted); margin-bottom: var(--space-3); }

/* ---------- author box ---------- */
.mag-author { padding-block: var(--space-4) var(--space-5); }
.mag-author-inner {
  display: grid; grid-template-columns: 132px 1fr; gap: var(--space-4); align-items: start;
  background: var(--oat); border: 1px solid var(--oat-deep);
  border-radius: var(--radius-l) var(--radius-l) var(--radius-l) 10px;
  padding: var(--space-4);
}
.mag-author-inner img {
  width: 132px; height: 132px; object-fit: cover;
  border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
}
.mag-author-inner h2 { font-size: var(--step-1); margin-bottom: var(--space-2); }
.mag-author-inner p { color: var(--muted); font-size: 0.98rem; margin-bottom: var(--space-2); }
.mag-author-inner p:last-child { margin-bottom: 0; }

/* ---------- read also ---------- */
.mag-related { padding-block: var(--space-6); background: var(--surface); border-top: 1px solid var(--line); }
.mag-related > .wrap > h2 { font-size: var(--step-3); margin-bottom: var(--space-4); }
.mag-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.mag-rel {
  background: var(--bg); border: 1px solid var(--line); overflow: hidden;
  border-radius: var(--radius-l) var(--radius-l) var(--radius-l) 10px;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  display: flex; flex-direction: column;
}
.mag-rel:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.mag-rel-media { display: block; }
.mag-rel img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-rel-body { padding: var(--space-3); }
.mag-rel h3 { font-size: 1.08rem; line-height: 1.3; margin-bottom: 0.5rem; }
.mag-rel h3 a { color: var(--ink); text-decoration: none; }
.mag-rel h3 a:hover { color: var(--primary); text-decoration: underline; }
.mag-rel p { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.mag-related-all { margin: var(--space-4) 0 0; font-weight: 800; }

.mag-meta {
  display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 0 !important;
  font-size: var(--step--1); font-weight: 700; color: var(--muted);
}

/* ---------- magazine index ---------- */
.mag-head-index { padding-block: var(--space-6) var(--space-4); }
.mag-head-index h1 { font-size: var(--step-5); }
.mag-head-index .mag-standfirst { max-width: 46rem; }
.mag-issue { color: var(--muted); font-size: var(--step--1); font-weight: 700; border-top: 1px solid var(--line); padding-top: var(--space-3); margin: 0; }
.mag-index { padding-block: var(--space-4) var(--space-7); }
.mag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.mag-card {
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  border-radius: var(--radius-l) var(--radius-l) var(--radius-l) 12px;
  box-shadow: var(--shadow-1); display: flex; flex-direction: column;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.mag-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); }
.mag-card-media { display: block; }
.mag-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-card-body { padding: var(--space-4); display: flex; flex-direction: column; gap: 0.55rem; }
.mag-card h3 { font-size: var(--step-1); line-height: 1.24; margin: 0; }
.mag-card h3 a { color: var(--ink); text-decoration: none; }
.mag-card h3 a:hover { color: var(--primary); text-decoration: underline; }
.mag-card p { color: var(--muted); margin: 0; font-size: 0.96rem; }
.mag-tag {
  align-self: flex-start; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--sage-ink); background: var(--sage-10);
  border: 1px solid var(--sage-20); border-radius: var(--radius-pill); padding: 0.25rem 0.7rem;
}
.mag-card.lead { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
.mag-card.lead .mag-card-media { flex: 1 1 56%; }
.mag-card.lead img { height: 100%; aspect-ratio: auto; min-height: 340px; }
.mag-card.lead .mag-card-body { flex: 1 1 44%; justify-content: center; padding: var(--space-5); gap: 0.75rem; }
.mag-card.lead h3 { font-size: var(--step-3); }
.mag-card.lead p { font-size: var(--step-0); }

/* ---------- magazine teaser on the home page ---------- */
.mag-home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.mag-home-all { margin-top: var(--space-4); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .mag-grid, .mag-related-grid, .mag-home-grid { grid-template-columns: repeat(2, 1fr); }
  .mag-card.lead { flex-direction: column; }
  .mag-card.lead img { min-height: 0; aspect-ratio: 3 / 2; }
  .mag-card.lead .mag-card-body { padding: var(--space-4); }
  .mag-card.lead h3 { font-size: var(--step-2); }
}
@media (max-width: 700px) {
  .mag-grid, .mag-related-grid, .mag-home-grid { grid-template-columns: 1fr; }
  .mag-head h1 { font-size: var(--step-3); }
  .mag-author-inner { grid-template-columns: 1fr; }
  .mag-author-inner img { width: 104px; height: 104px; }
  .mag-byline { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
  .mag-figure img { border-radius: var(--radius-l) var(--radius-l) var(--radius-l) var(--space-4); }
  .mag-cta-inner { padding: var(--space-4) var(--space-3); }
  .mag-body p, .mag-body li { font-size: 1rem; }
}

/* ---------- published articles list on the author page ---------- */
.article-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.article-list li {
  margin: 0; padding: var(--space-2) 0; border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; align-items: baseline;
}
.article-list a { font-weight: 700; }
.article-list time { font-size: var(--step--1); color: var(--muted); font-weight: 700; white-space: nowrap; }


/* Network column: five sibling products, rotated so every site is linked the same
   number of times. Sits in the footer link grid and inherits its type and colour. */
.site-network ul { list-style: none; margin: 0; padding: 0; }
.site-network li + li { margin-top: 0.4rem; }
.site-network a { text-decoration: none; border-bottom: 1px solid transparent; }
.site-network a:hover, .site-network a:focus-visible { border-bottom-color: currentColor; }
