/* ViaMount Landscaping — tokens from DESIGN.md (Verdant Craft) */
:root {
  --forest: #1E3A2F;
  --hero-top: #34474B; /* color of the top of the hero photo; Safari paints its bars with the page background */
  --forest-hover: #2A4F41;
  --forest-deep: #07241A;
  --sage: #8A9A86;
  --lichen: #D4DDD1;
  --canvas: #F9F8F5;
  --chalk: #FFFFFF;
  --ink: #1A1A1A;
  --moss: #5A665A;
  --error: #BA1A1A;

  --border: rgba(138, 154, 134, 0.25);
  --border-input: rgba(138, 154, 134, 0.45);
  --shadow: 0 4px 20px -2px rgba(30, 58, 47, 0.04), 0 2px 6px -1px rgba(30, 58, 47, 0.02);
  --shadow-lift: 0 12px 32px -4px rgba(30, 58, 47, 0.08), 0 4px 12px -2px rgba(30, 58, 47, 0.03);
  --shadow-modal: 0 24px 48px -12px rgba(30, 58, 47, 0.16);

  --display: "Epilogue", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", system-ui, sans-serif;

  --margin: 1.25rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 768px) { :root { --margin: 2rem; } }
@media (min-width: 1200px) { :root { --margin: 3rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html { background: var(--hero-top); }
body {
  margin: 0;
  background: var(--hero-top);
  color: var(--ink);
  font: 400 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
.muted { color: var(--moss); }
.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--margin); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--chalk); color: var(--forest); padding: .6rem 1rem; border-radius: 999px;
}
.skip:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.pill {
  --bg: var(--forest); --fg: var(--chalk); --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  height: 52px; padding: 0 1.5rem; border-radius: 999px;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd);
  font: 600 .95rem/1 var(--body); letter-spacing: .01em; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s, color .25s;
}
.pill svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.pill:active { transform: translateY(0); }
.pill:not(.pill--light):not(.pill--ghost):not(.pill--ghost-light):hover { --bg: var(--forest-hover); }
.pill--light { --bg: var(--chalk); --fg: var(--forest); }
.pill--light:hover { --bg: var(--lichen); }
.pill--ghost { --bg: transparent; --fg: var(--forest); --bd: var(--forest); }
.pill--ghost:hover { --bg: rgba(30, 58, 47, .06); }
.pill--ghost-light { --bg: transparent; --fg: var(--chalk); --bd: rgba(255,255,255,.55); }
.pill--ghost-light:hover { --bg: rgba(255,255,255,.08); --bd: var(--chalk); }
.pill--sm { height: 40px; padding: 0 1rem; font-size: .875rem; }
.pill--block { width: 100%; }
.pill:focus-visible { outline-color: var(--chalk); box-shadow: 0 0 0 4px var(--forest); }

/* ---------- Header ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 30;
  padding-top: env(safe-area-inset-top);
  transition: background-color .35s, box-shadow .35s, backdrop-filter .35s;
}
.top.is-solid {
  background: var(--hero-top); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 8px 24px -12px rgba(7, 36, 26, .5);
}
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 84px; transition: height .35s var(--ease); }
.top.is-solid .top__row { height: 68px; }
.brand img { transition: width .35s var(--ease); }
.brand img { width: 112px; height: auto; }
.top__actions { display: flex; align-items: center; gap: .5rem; }
.lang {
  height: 40px; min-width: 44px; padding: 0 .75rem; border-radius: 999px;
  background: transparent; color: var(--chalk); border: 1.5px solid rgba(255,255,255,.35);
  font: 600 .8rem/1 var(--body); letter-spacing: .04em; cursor: pointer; transition: border-color .2s, background-color .2s;
}
.lang:hover { border-color: var(--chalk); background: rgba(255,255,255,.08); }
@media (min-width: 900px) { .brand img { width: 132px; } .top.is-solid .brand img { width: 108px; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--forest);
  color: var(--chalk);
  min-height: min(100svh, 920px);
  display: flex; align-items: center;
  padding: calc(120px + env(safe-area-inset-top)) 0 clamp(6rem, 14vw, 10rem);
}
.hero::before { /* green veil over the photo so the text stays readable */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, var(--hero-top) 0, rgba(52, 71, 75, 0) 160px),
    linear-gradient(90deg, rgba(20, 44, 35, .94) 0%, rgba(30, 58, 47, .86) 45%, rgba(30, 58, 47, .55) 100%),
    linear-gradient(0deg, rgba(20, 44, 35, .85) 0%, rgba(20, 44, 35, 0) 40%);
}
@media (max-width: 979px) { .hero::before { background: linear-gradient(180deg, var(--hero-top) 0, rgba(52, 71, 75, 0) 160px), linear-gradient(180deg, rgba(20, 44, 35, .78) 0%, rgba(30, 58, 47, .9) 45%, rgba(20, 44, 35, .97) 100%); } }
.hero__bg { position: absolute; inset: 0; z-index: -3; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: settle 2.4s var(--ease) forwards; }
@keyframes settle { to { transform: scale(1); } }
.trust { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.trust li {
  display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: var(--chalk);
  font-size: .9rem; font-weight: 500; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.trust a { color: inherit; text-decoration: none; }
.trust a:hover { text-decoration: underline; text-underline-offset: 3px; }
.trust .star { color: #E9C46A; }
.ridge { position: absolute; inset: auto 0 0 0; width: 100%; height: clamp(170px, 34vw, 480px); z-index: -1; }
.ridge path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.ridge__line { stroke: rgba(212, 221, 209, .28); stroke-width: 2; stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 2.4s var(--ease) .15s forwards; }
.ridge__line--far { stroke: rgba(212, 221, 209, .12); animation-delay: 0s; animation-duration: 2.8s; }
.ridge__arc { stroke: var(--chalk); stroke-width: 6; opacity: .9; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1.6s var(--ease) 1.1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__inner { position: relative; display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 980px) { .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(380px, 450px); gap: clamp(3rem, 6vw, 6rem); } }
.hero__title {
  font-weight: 600; letter-spacing: -0.035em; line-height: 1.02;
  font-size: clamp(2.6rem, 6.6vw, 5.25rem);
  max-width: 12ch;
}
.hero__lead { margin-top: 1.25rem; max-width: 36ch; font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.55; color: rgba(255,255,255,.82); }
/* hero entrance: one orchestrated sequence */
.hero__title, .hero__lead, .trust, .quote { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; }
.hero__title { animation-delay: .2s; }
.hero__lead { animation-delay: .35s; }
.trust { animation-delay: .5s; }
.quote { animation-delay: .45s; animation-duration: 1s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 10vw, 7rem) 0; background: var(--canvas); }
.section--tint { background: #F0EFEA; }
.h2 { font-size: clamp(1.75rem, 4.2vw, 2.75rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; color: var(--forest); }

/* Results: slider + what changed */
.results { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 960px) { .results { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2.5rem, 5vw, 4.5rem); } }
.results__text { order: -1; }
@media (min-width: 960px) { .results__text { order: 0; } }
.results__hint { margin-top: .6rem; }
.results__sub { margin-top: 2rem; font-size: 1rem; font-weight: 600; color: var(--ink); }
.checks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .85rem; }
@media (max-width: 959px) {
  .results__text { display: contents; }
  .results__text .h2 { order: -2; }
  .results__hint { order: -1; margin-top: -.75rem; }
  .results__sub { margin-top: .5rem; }
  .checks { margin-top: -.5rem; }
}
.results__note { margin-top: 1.25rem; font-size: .78rem; color: var(--moss); opacity: .85; }
.checks li { position: relative; padding-left: 2rem; color: #2E352E; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .2rem; width: 20px; height: 20px; border-radius: 50%;
  background: var(--forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

/* Services: one featured + secondary list */
.services { display: grid; gap: 2rem; margin-top: clamp(2rem, 5vw, 3rem); }
@media (min-width: 960px) { .services { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; } }
.feature {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--forest); color: var(--chalk); border-radius: 1rem; box-shadow: var(--shadow-lift);
  padding: clamp(1.75rem, 4vw, 2.75rem);
}
.feature::after { /* the logo's ridge, quietly, in the corner */
  content: ''; position: absolute; right: -8%; bottom: -14%; width: 70%; aspect-ratio: 920 / 388; z-index: -1;
  background: url('assets/mark-white.svg') center / contain no-repeat; opacity: .07;
}
.feature__body { padding: 0; }
.feature__kicker {
  display: inline-block; padding: .3rem .75rem; border-radius: 999px;
  background: rgba(212, 221, 209, .16); color: var(--lichen); font-size: .8rem; font-weight: 600;
}
.feature h3 { margin-top: 1rem; font-size: clamp(1.6rem, 3.4vw, 2.25rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: var(--chalk); }
.feature p:last-child { margin-top: .6rem; color: rgba(255, 255, 255, .8); font-size: 1.05rem; max-width: 34ch; }
.svc-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.svc-list li { padding: 1.35rem 0; border-bottom: 1px solid var(--border); }
.svc-list h3 { font-size: 1.15rem; font-weight: 500; color: var(--ink); }
.svc-list p { margin-top: .3rem; color: var(--moss); font-size: .95rem; }

/* Reviews (shown only with real data) */
.reviews { list-style: none; padding: 0; margin: clamp(2rem, 5vw, 3rem) 0 0; display: grid; gap: 1.25rem; }
@media (min-width: 860px) { .reviews { grid-template-columns: repeat(3, 1fr); } }
.review { margin: 0; background: var(--chalk); border: 1px solid var(--border); border-radius: 1rem; padding: 1.5rem 1.5rem 1.75rem; box-shadow: var(--shadow); }
.review__stars { color: #C9A227; letter-spacing: .1em; }
.review blockquote { margin: .75rem 0 0; color: #2E352E; }
.review figcaption { margin-top: 1rem; font-size: .9rem; color: var(--moss); }
.review figcaption strong { color: var(--ink); font-weight: 600; }

/* FAQ */
.faq { display: grid; gap: 2rem; }
@media (min-width: 960px) { .faq { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; } }
.faq__list { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 1.25rem 3rem 1.25rem 0; font: 500 1.1rem/1.4 var(--display); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .25rem; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%;
  background: rgba(138, 154, 134, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M9 14h10M14 9v10' stroke='%231E3A2F' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 28px no-repeat;
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--forest); }
.faq details p { padding: 0 3rem 1.35rem 0; color: var(--moss); max-width: 60ch; }
.faq details[open] p { animation: rise .35s var(--ease); }

.foot { background: var(--canvas); padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); font-size: .85rem; }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; }
.foot__links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.foot__links a { color: var(--forest); text-decoration: none; font-weight: 500; }
.foot__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

.consent { margin-top: .25rem; font-size: .75rem; line-height: 1.5; color: var(--moss); text-align: center; text-wrap: pretty; }
.consent a { color: var(--forest); font-weight: 600; }

/* ---------- Before / after slider ---------- */
.ba {
  --pos: 50%;
  position: relative;
  width: 100%; aspect-ratio: 941 / 675;
  border-radius: 1rem; overflow: hidden; isolation: isolate;
  box-shadow: var(--shadow-lift); background: var(--lichen);
  user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: var(--chalk); box-shadow: 0 0 0 1px rgba(7, 36, 26, .15); pointer-events: none;
}
.ba__knob {
  position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--chalk); color: var(--forest); box-shadow: var(--shadow-lift);
  transition: transform .25s var(--ease);
}
.ba__knob svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ba:hover .ba__knob { transform: scale(1.08); }
.ba:has(.ba__range:focus-visible) .ba__knob { outline: 2px solid var(--forest); outline-offset: 3px; }
.ba__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none;
}
.ba__tag {
  position: absolute; top: 1rem; z-index: 1; padding: .35rem .85rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; pointer-events: none; transition: opacity .25s;
}
.ba__tag--before { left: 1rem; background: rgba(26, 26, 26, .6); color: var(--chalk); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ba__tag--after { right: 1rem; background: var(--chalk); color: var(--forest); }
.ba[data-edge="left"] .ba__tag--before, .ba[data-edge="right"] .ba__tag--after { opacity: 0; }
.ba.is-sweeping .ba__before { transition: clip-path 1.4s var(--ease); }
.ba.is-sweeping .ba__handle { transition: left 1.4s var(--ease); }

/* ---------- Legal pages ---------- */
.top--page { position: sticky; background: var(--hero-top); }
.top--page .top__row { height: 68px; }
.top--page .brand img { width: 108px; }
.back { color: var(--chalk); text-decoration: none; font-size: .9rem; font-weight: 500; opacity: .85; }
.back:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.legal { background: var(--canvas); padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(3rem, 8vw, 6rem); }
.legal article { max-width: 68ch; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; color: var(--forest); }
.legal .updated { margin-top: .75rem; color: var(--moss); font-size: .9rem; }
.legal h2 { margin-top: 2.5rem; font-size: 1.25rem; font-weight: 600; color: var(--forest); }
.legal p, .legal li { margin-top: .75rem; color: #2E352E; }
.legal ul { padding-left: 1.25rem; margin: 0; }
.legal a { color: var(--forest); font-weight: 600; }
[data-lang-block][hidden] { display: none !important; }

/* scroll reveal (only enabled when JS runs) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Quote form (inline card in hero) ---------- */
.quote {
  position: relative; width: 100%;
  background: var(--chalk); color: var(--ink);
  border: 1px solid var(--border); border-radius: 1.5rem; box-shadow: var(--shadow-modal);
  scroll-margin: 100px;
}
@keyframes fade { from { opacity: 0; } }
.quote__view { padding: 1.75rem 1.25rem 1.5rem; }
@media (min-width: 561px) { .quote__view { padding: 2.25rem 2.25rem 2rem; } }
.quote__view:focus { outline: none; }
.quote__title { font-size: clamp(1.5rem, 3vw, 1.75rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: var(--forest); }
.quote__view > .muted { margin-top: .5rem; font-size: .95rem; }

#form { margin-top: 1.5rem; display: grid; gap: 1.1rem; }
.field { position: relative; display: grid; gap: .4rem; }
.field label { font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--moss); }
.field input {
  height: 52px; width: 100%; padding: 0 1.1rem; border-radius: .75rem;
  border: 1px solid var(--border-input); background: var(--chalk); color: var(--ink);
  font: 400 1rem/1 var(--body); /* 16px avoids iOS zoom */
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: #A3ABA2; }
.field input:hover { border-color: var(--sage); }
.field input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 1.5px var(--forest); }
.field.has-error input { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.field__hint { font-size: .8rem; color: var(--moss); }
.field__err { font-size: .8rem; color: var(--error); }
.field__err:empty, .form__err:empty, .field__note:empty { display: none; }
.field__note { font-size: .78rem; line-height: 1.4; color: #7A5A12; background: #FBF3DC; border-radius: .5rem; padding: .4rem .6rem; }
.suggest li strong { font-weight: 700; color: var(--forest); }
.field__spin {
  position: absolute; right: 1rem; top: calc(.8rem * 1.6 + .4rem + 16px);
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--lichen); border-top-color: var(--forest);
  opacity: 0; transition: opacity .2s; animation: spin .7s linear infinite;
}
.field__spin.is-on { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.suggest {
  position: absolute; z-index: 5; top: calc(.8rem * 1.6 + .4rem + 56px); left: 0; right: 0;
  list-style: none; margin: 0; padding: .35rem;
  background: var(--chalk); border: 1px solid var(--border); border-radius: .75rem; box-shadow: var(--shadow-lift);
  max-height: 260px; overflow-y: auto;
  animation: fade .18s ease;
}
.suggest li {
  display: grid; gap: .1rem; padding: .7rem .8rem; border-radius: .5rem; cursor: pointer;
  font-size: .95rem; line-height: 1.35;
}
.suggest li small { color: var(--moss); font-size: .8rem; }
.suggest li[aria-selected="true"], .suggest li:hover { background: rgba(138, 154, 134, .15); }
.suggest .suggest__empty { cursor: default; color: var(--moss); font-size: .85rem; }
.suggest .suggest__empty:hover { background: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#sendBtn { margin-top: .25rem; height: 54px; font-size: 1rem; }
#sendBtn[disabled] { opacity: .7; cursor: progress; transform: none; box-shadow: none; }
#sendBtn.is-loading span::after { content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .6rem; vertical-align: -2px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
.form__err { margin-top: -.25rem; font-size: .85rem; color: var(--error); text-align: center; }
.form__err a { color: inherit; font-weight: 600; white-space: nowrap; }

.quote__done { text-align: center; display: grid; justify-items: center; gap: .75rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.quote__done:not([hidden]) { animation: fade .4s ease; }
.quote__done .quote__title { padding-right: 0; }
.quote__done .pill { margin-top: 1rem; }
.check { width: 72px; height: 72px; margin-bottom: .5rem; }
.check circle { fill: none; stroke: var(--lichen); stroke-width: 2; }
.check path { fill: none; stroke: var(--forest); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.quote__done:not([hidden]) .check path { animation: draw .6s var(--ease) .15s forwards; }

.quote__view[hidden], .suggest[hidden] { display: none !important; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
.section { scroll-margin-top: 72px; }
main { background: var(--canvas); }

/* ==========================================================================
   Responsive first screen
   Goal: title + the whole quote form fit on the first screen of any device.
   Sizes scale with the real screen height (svh), not just the width.
   ========================================================================== */
:root {
  --head: 84px;                                    /* header height */
  --fh: clamp(40px, 6svh, 52px);                   /* input height */
  --fg: clamp(.5rem, 1.5svh, 1.1rem);              /* gap between fields */
  --card-pad: clamp(1.1rem, 3svh, 2.25rem);        /* form card padding */
}
@media (max-width: 979px), (max-height: 760px) { :root { --head: 64px; } }

/* header */
.top__row { height: var(--head); }
.top.is-solid .top__row { height: calc(var(--head) - 8px); }
@media (max-width: 979px), (max-height: 760px) {
  .brand img, .top.is-solid .brand img { width: 96px; }
  .top .pill--sm { height: 38px; }
  .lang { height: 38px; min-width: 40px; }
}

/* hero shell: fills the screen, content starts right under the header */
.hero {
  overflow: visible; z-index: 2;                   /* address suggestions may hang below the hero */
  min-height: 100svh;
  padding: calc(var(--head) + clamp(.5rem, 3svh, 2.5rem) + env(safe-area-inset-top)) 0 clamp(2.5rem, 8svh, 7rem);
}
.hero__bg { overflow: hidden; }
.hero__title { font-size: clamp(1.4rem, min(6.6vw, 9svh), 5.25rem); }

/* form: one set of fluid sizes everywhere */
.quote__view { padding: var(--card-pad) clamp(1.1rem, 4vw, 2.25rem) calc(var(--card-pad) * .85); }
.quote__title { font-size: clamp(1.25rem, min(5.6vw, 3.6svh), 1.75rem); }
.quote__view > .muted { margin-top: .35rem; font-size: clamp(.85rem, 2svh, .95rem); line-height: 1.45; }
#form { margin-top: clamp(.75rem, 2.2svh, 1.5rem); gap: var(--fg); }
.field { gap: clamp(.2rem, .6svh, .4rem); }
.field label { font-size: clamp(.72rem, 1.7svh, .8rem); }
.field input { height: var(--fh); }
.field__control { position: relative; }
.field__spin { top: 50%; margin-top: -10px; }
.suggest { top: calc(100% + 6px); }
#sendBtn { height: calc(var(--fh) + 4px); margin-top: .15rem; }
.consent { font-size: clamp(.68rem, 1.6svh, .75rem); line-height: 1.4; }
.trust { margin-top: clamp(1rem, 3svh, 2rem); }

/* the address hint and the subtitle are the first things to go when height is tight */
@media (max-height: 820px) { .field__hint { display: none; } }
@media (max-height: 700px), (max-width: 979px) and (orientation: portrait) and (max-height: 900px) { .quote__view > .muted { display: none; } }

/* ---------- Phones and tablets in portrait: stacked ---------- */
@media (max-width: 979px) {
  .hero { min-height: 0; align-items: flex-start; padding-bottom: clamp(3.5rem, 12vw, 6rem); }
  .hero__inner { gap: clamp(.6rem, 1.8svh, 1.25rem); max-width: 640px; }
  .hero__copy { display: contents; }               /* lets the trust row move below the form */
  .trust { order: 2; margin-top: .25rem; }
  .hero__title { font-size: clamp(1.4rem, min(8.2vw, 5.4svh), 3.2rem); line-height: 1.05; max-width: 16ch; }
  .hero__lead { margin-top: -.4rem; font-size: clamp(.85rem, min(3.9vw, 2.2svh), 1.15rem); line-height: 1.4; }
}
/* tablets in portrait have room: center the content */
@media (min-width: 640px) and (max-width: 979px) and (min-height: 900px) {
  .hero__inner { margin: 0 auto; }
}

/* ---------- Phones in landscape: very little height ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --head: 52px; --fh: 38px; --fg: .5rem; --card-pad: .85rem; }
  .brand img, .top.is-solid .brand img { width: 76px; }
  .top .pill--sm, .lang { height: 34px; }
  .hero { min-height: 0; align-items: flex-start; padding: calc(var(--head) + .5rem + env(safe-area-inset-top)) 0 2.5rem; }
  .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 1.25rem; align-items: start; max-width: none; }
  .hero__copy { display: block; }
  .trust { order: 0; }
  .hero__title { font-size: clamp(1.2rem, 3.4vw, 1.9rem); max-width: 14ch; }
  .hero__lead { margin-top: .5rem; font-size: .85rem; }
  .quote__title { font-size: 1.1rem; }
  .quote__view > .muted, .field__hint { display: none; }
  #form { margin-top: .6rem; grid-template-columns: 1fr 1fr; column-gap: .75rem; }
  #form > .field:nth-of-type(1) { grid-column: 1; grid-row: 1; }   /* name */
  #form > .field:nth-of-type(3) { grid-column: 2; grid-row: 1; }   /* phone */
  #form > .field--addr { grid-column: 1; grid-row: 2; }            /* address */
  #sendBtn { grid-column: 2; grid-row: 2; align-self: end; height: var(--fh); margin: 0; }
  #eSend, .consent { grid-column: 1 / -1; }
  .field label { font-size: .7rem; }
  .consent { font-size: .65rem; margin-top: -.15rem; }
  .suggest { max-height: 180px; }
}


/* ---------- Installed app (PWA): iOS draws the status bar over the page, give the header extra room ---------- */
:root { --app-gap: 0px; }
@media (display-mode: standalone), (display-mode: fullscreen) { :root { --app-gap: 12px; } }
.is-standalone { --app-gap: 12px; }                  /* older iOS: set from app.js */
.top { padding-top: calc(env(safe-area-inset-top) + var(--app-gap)); }
.hero { padding-top: calc(var(--head) + clamp(.5rem, 3svh, 2.5rem) + env(safe-area-inset-top) + var(--app-gap)); }

/* ---------- Very short phones in portrait (e.g. 320x480): keep the Send button on the first screen ---------- */
@media (orientation: portrait) and (max-height: 600px) {
  :root { --head: 56px; --fh: 38px; --fg: .45rem; --card-pad: .9rem; }
  .hero { padding-top: calc(var(--head) + .4rem + env(safe-area-inset-top) + var(--app-gap)); }
  .brand img, .top.is-solid .brand img { width: 84px; }
  .hero__title { font-size: clamp(1.3rem, 7.4vw, 1.7rem); }
  .quote__title { font-size: 1.15rem; }
  #form { margin-top: .55rem; }
  .field label { font-size: .7rem; }
}

/* ---------- Hero reaches the bottom of the screen + scroll invitation ---------- */
.hero { min-height: 100vh; min-height: 100lvh; }   /* lvh: down to the real bottom edge, behind Safari's floating bar */
@media (max-width: 979px), (orientation: landscape) and (max-height: 520px) {
  .hero { min-height: 100vh; min-height: 100lvh; display: flex; align-items: stretch; }
  .hero__inner { align-content: start; }
}
.scroll-cue {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--chalk); border: 1.5px solid rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .08); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  text-decoration: none; transition: opacity .4s, background-color .2s, border-color .2s;
  animation: cue 2.2s var(--ease) 1.6s infinite both;
}
.scroll-cue svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scroll-cue:hover { background: rgba(255, 255, 255, .16); border-color: var(--chalk); }
.scroll-cue.is-gone { opacity: 0; pointer-events: none; }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(8px); opacity: .7; } }
/* phones/tablets: a round button sitting on the bottom edge of the form card, so it is always on screen */
@media (max-width: 979px) {
  .hero { padding-bottom: clamp(2.5rem, 8svh, 4rem); }
  .hero__inner { --hgap: clamp(.6rem, 1.8svh, 1.25rem); gap: var(--hgap); }
  .scroll-cue {
    order: 3; justify-self: center; position: relative; z-index: 3;
    margin-top: calc(6px - var(--hgap));
    background: var(--forest); border: 3px solid var(--chalk); box-shadow: var(--shadow-lift);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .scroll-cue:hover { background: var(--forest-hover); border-color: var(--chalk); }
}
/* desktop and phone landscape: centered at the bottom of the hero */
@media (min-width: 980px), (orientation: landscape) and (max-height: 520px) {
  .hero__inner { position: static; }
  .scroll-cue { position: absolute; z-index: 1; left: 50%; bottom: clamp(1rem, 3.5svh, 2.25rem); margin-left: -22px; }
}
@media (orientation: landscape) and (max-height: 520px) { .scroll-cue { display: none; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue { animation: none; } }
@media (max-width: 979px) and (orientation: portrait) and (max-height: 620px) { .scroll-cue { margin-top: calc(-8px - var(--hgap)); } }

/* ---------- 404 ---------- */
.notfound { min-height: calc(100svh - 68px - 80px); display: grid; align-items: center; }
.notfound article { text-align: left; }
.notfound__mark { width: 120px; height: auto; margin-bottom: 1.5rem; opacity: .9; }
.notfound .pill { margin-top: .75rem; color: var(--chalk); }

.foot p a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
