/* ==========================================================================
   Southtowns Digital — styles.css
   Zero dependencies. One stylesheet. Native web-platform features only.
   ========================================================================== */

/* ---- Self-hosted variable fonts (latin subset) ------------------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/fraunces-latin-var.woff2") format("woff2");
}

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* Brand palette */
  --lake-deep: #1B3A4B;
  --harbor: #2E5F74;
  --foundry: #C8551B;   /* decorative accent only */
  --cta-bg: #BE4E15;    /* text-bearing foundry surfaces (AA vs #fff ~4.7:1) */
  --limestone: #F5F2EC;
  --slate-text: #24303A;
  --mist: #D8DFE3;

  /* Semantic roles (light theme) */
  --bg: var(--limestone);
  --bg-elevated: #FFFFFF;
  --surface: #FFFFFF;
  --text: var(--slate-text);
  --text-strong: var(--lake-deep);
  --text-muted: #4B5A64;
  --heading: var(--lake-deep);
  --link: var(--harbor);
  --link-hover: #21495a;
  --border: var(--mist);
  --header-bg: var(--lake-deep);
  --header-text: #EAF1F4;
  --footer-bg: var(--lake-deep);
  --footer-text: #C6D3DA;

  /* Shoreline motif colours */
  --wave-back: #2E5F74;
  --wave-front: #1B3A4B;

  /* Depth: layered soft shadows */
  --shadow-sm: 0 1px 2px rgba(27, 58, 75, 0.06), 0 2px 6px rgba(27, 58, 75, 0.05);
  --shadow-md: 0 2px 4px rgba(27, 58, 75, 0.06), 0 8px 20px rgba(27, 58, 75, 0.08);
  --shadow-lg: 0 6px 12px rgba(27, 58, 75, 0.08), 0 18px 40px rgba(27, 58, 75, 0.12);
  --glow-cta: 0 6px 18px rgba(200, 85, 27, 0.32);

  /* Fluid type scale (1.25 ratio) */
  --step--1: clamp(0.833rem, 0.81rem + 0.11vw, 0.9rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.125rem);
  --step-1:  clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --step-2:  clamp(1.25rem, 1.12rem + 0.6vw, 1.5rem);
  --step-3:  clamp(1.5rem, 1.3rem + 1vw, 1.9rem);
  --step-4:  clamp(2rem, 1.6rem + 2vw, 2.75rem);
  --step-5:  clamp(2.5rem, 1.8rem + 3.5vw, 4rem);

  /* Fluid spacing */
  --space-2xs: clamp(0.5rem, 0.47rem + 0.15vw, 0.6rem);
  --space-xs:  clamp(0.75rem, 0.7rem + 0.25vw, 0.9rem);
  --space-s:   clamp(1rem, 0.92rem + 0.4vw, 1.25rem);
  --space-m:   clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
  --space-l:   clamp(2.5rem, 2.1rem + 2vw, 3.75rem);
  --space-xl:  clamp(4rem, 3.2rem + 4vw, 6.5rem);

  --measure: 68ch;
  --container: 72rem;
  --radius: 12px;
  --radius-sm: 8px;
  --focus-ring: 3px solid var(--harbor);
}

/* ---- Dark theme --------------------------------------------------------- */
/* Four distinct depth levels so sections and cards don't blur together:
   header/footer (darkest) < page bg < section band < card surface (lightest). */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191A1D;          /* warm charcoal page background (not blue) */
    --bg-elevated: #212327; /* alternating section bands + hero */
    --surface: #2A2D31;     /* cards / panels — lighter, they pop */
    --text: #E8E6E0;        /* warm off-white */
    --text-strong: #F7F4EE;
    --text-muted: #A7A39B;  /* warm grey */
    --heading: #F7F4EE;
    --link: #7FC0DA;        /* blue kept only as an accent */
    --link-hover: #A6D8EC;
    --border: #3B3E44;
    --header-bg: #141518;   /* darkest — anchors top + bottom */
    --header-text: #EDECE6;
    --footer-bg: #141518;
    --footer-text: #A7A39B;
    --wave-back: #2E5F74;   /* blue waves read as an accent on charcoal */
    --wave-front: #141518;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.34);
    --shadow-md: 0 2px 4px rgba(0,0,0,0.42), 0 10px 24px rgba(0,0,0,0.46);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.5), 0 22px 48px rgba(0,0,0,0.6);
    --glow-cta: 0 6px 20px rgba(200, 85, 27, 0.42);
  }
}

/* ---- Reset & base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  color: var(--heading);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-3); }
p { text-wrap: pretty; }
p, li { max-width: var(--measure); }

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

/* ---- Skip link ---------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 200;
  background: var(--cta-bg);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0.5rem; color: #fff; }

/* ---- Layout helpers ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 0.5rem + 3vw, 2.5rem);
}
.section { padding-block: var(--space-xl); }
.section--tight { padding-block: var(--space-l); }
.stack > * + * { margin-top: var(--space-s); }
.lead {
  font-size: var(--step-1);
  color: var(--text-muted);
  max-width: 60ch;
}
.eyebrow {
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--harbor);
  margin-bottom: var(--space-2xs);
}
@media (prefers-color-scheme: dark) {
  .eyebrow { color: #8CC4D8; }
}
.section-head { max-width: 60ch; margin-bottom: var(--space-l); }
.center { text-align: center; margin-inline: auto; }
.center p, .center .lead { margin-inline: auto; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.1;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
  will-change: transform;
}
.btn--primary {
  background: var(--cta-bg);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  color: #fff;
  background: #a94012;
  box-shadow: var(--glow-cta);
}
.btn--secondary {
  background: transparent;
  color: var(--text-strong);
  border-color: var(--border);
}
.btn--secondary:hover {
  color: var(--text-strong);
  border-color: var(--harbor);
  background: color-mix(in srgb, var(--harbor) 8%, transparent);
}
.btn--on-accent {
  background: #fff;
  color: var(--cta-bg);
}
.btn--on-accent:hover { background: #fff; color: #8f360e; }

@media (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0) scale(0.985); }
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--header-text);
}
.brand:hover { color: #fff; }
.brand-mark { height: 34px; width: 34px; flex: 0 0 auto; }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: #fff;
}
.brand-sub {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #9FC0CE;
  margin-top: 2px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid rgba(255,255,255,0.25);
  color: var(--header-text);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  align-items: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: var(--step--1);
}
.nav-toggle .bars { width: 20px; height: 14px; position: relative; display: inline-block; }
.nav-toggle .bars::before,
.nav-toggle .bars::after,
.nav-toggle .bars span {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle .bars::before { top: 0; }
.nav-toggle .bars span { top: 6px; }
.nav-toggle .bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.5rem + 1.5vw, 2rem);
  padding: 0;
}
.site-nav a {
  color: var(--header-text);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--step-0);
  position: relative;
  padding: 0.35rem 0;
  display: inline-block;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--foundry);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s ease;
}
.site-nav a:hover, .site-nav a:focus-visible { color: #fff; }
.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: #fff; }
.site-nav .btn { color: #fff; }
.site-nav .btn::after { display: none; }

@media (prefers-reduced-motion: reduce) {
  .site-nav a::after { transition: none; }
}

/* Mobile nav */
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--header-bg);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-md);
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s ease;
  }
  .site-nav > ul { overflow: hidden; }
  .site-header[data-nav-open="true"] .site-nav { grid-template-rows: 1fr; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-xs) clamp(1rem, 0.5rem + 3vw, 2.5rem) var(--space-s);
  }
  .site-nav li { border-top: 1px solid rgba(255,255,255,0.08); }
  .site-nav li:first-child { border-top: none; }
  .site-nav a { padding: 0.9rem 0; display: block; }
  .site-nav a::after { display: none; }
  .site-nav .btn { margin-top: var(--space-xs); }
  @media (prefers-reduced-motion: reduce) {
    .site-nav { transition: none; }
  }
}

/* ==========================================================================
   Hero — the showpiece
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.hero .container {
  position: relative;
  z-index: 2;
  padding-block: clamp(3rem, 2rem + 6vw, 6rem) clamp(9rem, 6rem + 12vw, 14rem);
  max-width: 60rem;
}
.hero h1 { color: var(--text-strong); max-width: 18ch; }
.hero .lead { margin-top: var(--space-s); max-width: 46ch; }
.hero .btn { margin-top: var(--space-m); }

/* animated shoreline behind hero content */
.hero-shore {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: clamp(120px, 22vw, 260px);
  z-index: 1;
  pointer-events: none;
}
.hero-shore svg { width: 100%; height: 100%; }
.hero-shore .wave { transform-origin: center; }
.hero-shore .wave-back  { fill: #7BA0B1; fill: color-mix(in srgb, var(--wave-back) 55%, var(--bg-elevated)); }
.hero-shore .wave-mid   { fill: var(--wave-back); }
.hero-shore .wave-front { fill: var(--wave-front); }

@media (prefers-reduced-motion: no-preference) {
  .wave-back { animation: drift-back 14s ease-in-out infinite alternate; }
  .wave-mid  { animation: drift-mid 11s ease-in-out infinite alternate; }
  .wave-front{ animation: drift-front 9s ease-in-out infinite alternate; }
}
@keyframes drift-back  { from { transform: translateX(-2.5%);} to { transform: translateX(2.5%);} }
@keyframes drift-mid   { from { transform: translateX(2%);}    to { transform: translateX(-2%);} }
@keyframes drift-front { from { transform: translateX(-1.5%);} to { transform: translateX(1.5%);} }

/* Headline staggered load reveal */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-reveal > * {
    opacity: 0;
    transform: translateY(14px);
    animation: hero-in 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  }
  .js .hero-reveal > *:nth-child(1) { animation-delay: 0.05s; }
  .js .hero-reveal > *:nth-child(2) { animation-delay: 0.18s; }
  .js .hero-reveal > *:nth-child(3) { animation-delay: 0.31s; }
  .js .hero-reveal > *:nth-child(4) { animation-delay: 0.44s; }
}
@keyframes hero-in { to { opacity: 1; transform: none; } }
/* JS backstop: force visible even if animations are disabled */
.js .hero-reveal.is-shown > * { opacity: 1; transform: none; }

/* ==========================================================================
   Shoreline divider (between sections)
   ========================================================================== */
.shoreline {
  display: block;
  width: 100%;
  height: clamp(28px, 5vw, 48px);
  color: var(--wave-front);
  line-height: 0;
}
.shoreline svg { width: 100%; height: 100%; }
.shoreline .s-back { color: var(--wave-back); }

/* ==========================================================================
   Cards / grids
   ========================================================================== */
.grid { display: grid; gap: var(--space-m); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }

.card {
  container-type: inline-size;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-m);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  height: 100%;
}
.card h3 { color: var(--text-strong); }
.card p { color: var(--text-muted); }
.card .card-link {
  margin-top: auto;
  font-weight: 600;
  color: var(--harbor);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
@media (prefers-color-scheme: dark) { .card .card-link { color: #8CC4D8; } }
.card .card-link .arrow { transition: transform 0.2s ease; }
.card:hover .card-link .arrow { transform: translateX(4px); }

@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--harbor) 40%, var(--border)); }
}
@media (prefers-reduced-motion: reduce) {
  .card:hover { box-shadow: var(--shadow-md); border-color: var(--harbor); }
}

/* card mini-divider that tints to accent on hover */
.card-rule {
  height: 3px; width: 44px;
  border-radius: 3px;
  background: var(--harbor);
  transition: background-color 0.25s ease, width 0.25s ease;
}
.card:hover .card-rule { background: var(--foundry); width: 64px; }

/* Container-query: give roomy cards a two-column inner header */
.card .card-num {
  font-family: "Fraunces", serif;
  font-size: var(--step-3);
  color: #7595a4;
  color: color-mix(in srgb, var(--harbor) 55%, transparent);
  line-height: 1;
}
@container (min-width: 22rem) {
  .card { padding: var(--space-l) var(--space-m); }
  .card h3 { font-size: var(--step-3); }
}

/* Feature list (why local) */
.features { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.feature { display: flex; gap: var(--space-xs); align-items: flex-start; }
.feature .tick {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(46, 95, 116, 0.14);
  background: color-mix(in srgb, var(--harbor) 14%, transparent);
  color: var(--harbor);
  display: grid; place-items: center;
  margin-top: 2px;
}
@media (prefers-color-scheme: dark) { .feature .tick { color: #8CC4D8; } }
.feature h3 { font-size: var(--step-1); color: var(--text-strong); margin-bottom: 0.15rem; }
.feature p { color: var(--text-muted); font-size: var(--step-0); }

/* How we work steps */
.steps { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); counter-reset: step; }
.step { position: relative; padding-top: var(--space-s); }
.step-num {
  font-family: "Fraunces", serif;
  font-size: var(--step-4);
  color: var(--foundry);
  line-height: 1;
  display: block;
  margin-bottom: var(--space-2xs);
}
.step h3 { font-size: var(--step-2); color: var(--text-strong); }
.step p { color: var(--text-muted); }

/* ==========================================================================
   Alternating section backgrounds
   ========================================================================== */
.band-soft { background: var(--bg-elevated); border-block: 1px solid var(--border); }

/* Final CTA band — the page's foundry signature */
.cta-band {
  background: var(--cta-bg);
  color: #fff;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band .eyebrow { color: #FBE6DA; }
.cta-band p { color: rgba(255,255,255,0.94); margin-inline: auto; }
.cta-band .btn { margin-top: var(--space-m); }

/* ==========================================================================
   Services page
   ========================================================================== */
.service-block { padding-block: var(--space-l); border-bottom: 1px solid var(--border); }
.service-block:last-of-type { border-bottom: none; }
.service-grid { display: grid; gap: var(--space-m); align-items: start; }
@media (min-width: 780px) {
  .service-grid { grid-template-columns: 1.1fr 1fr; gap: var(--space-l); }
}
.service-block h2 { color: var(--text-strong); }
.included { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.included li { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--text); }
.included li::before {
  content: "";
  flex: 0 0 auto;
  width: 20px; height: 20px;
  margin-top: 3px;
  background: var(--harbor);
  -webkit-mask: var(--check-mask) center / contain no-repeat;
  mask: var(--check-mask) center / contain no-repeat;
}
:root { --check-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"/></svg>'); }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-m);
  box-shadow: var(--shadow-sm);
}
.panel h3 { font-size: var(--step-1); color: var(--text-strong); }
.who { font-size: var(--step-0); color: var(--text-muted); }

/* ==========================================================================
   About page
   ========================================================================== */
.values { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.value h3 { font-size: var(--step-1); color: var(--text-strong); }
.value p { color: var(--text-muted); }
.todo-block {
  border: 1px dashed #dca07f;
  border: 1px dashed color-mix(in srgb, var(--foundry) 55%, var(--border));
  background: #fbf1eb;
  background: color-mix(in srgb, var(--foundry) 6%, transparent);
  border-radius: var(--radius);
  padding: var(--space-m);
  color: var(--text-muted);
}
.todo-block strong { color: var(--text-strong); }

/* ==========================================================================
   Contact / forms
   ========================================================================== */
.contact-layout { display: grid; gap: var(--space-l); }
@media (min-width: 860px) {
  .contact-layout { grid-template-columns: 1.2fr 0.8fr; }
}
.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 1rem + 2vw, 2rem);
  box-shadow: var(--shadow-sm);
}
.field { display: grid; gap: 0.4rem; margin-bottom: var(--space-s); }
.field label { font-weight: 600; color: var(--text-strong); font-size: var(--step-0); }
.field .req { color: var(--foundry); }
.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  width: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--harbor);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--harbor) 25%, transparent);
}
.field input:user-invalid,
.field textarea:user-invalid,
.field select:user-invalid { border-color: #b3311b; }
.field .hint { font-size: var(--step--1); color: var(--text-muted); }
.field-error {
  font-size: var(--step--1);
  color: #9c2a16;
  min-height: 1.1em;
}
@media (prefers-color-scheme: dark) { .field-error { color: #f0a48d; } }

/* honeypot: visually + programmatically hidden from users, visible to bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}
.form-note { font-size: var(--step--1); color: var(--text-muted); margin-top: var(--space-xs); }
.form-status {
  margin-top: var(--space-s);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  display: none;
}
.form-status.is-error { display: block; background: #f7e2dc; background: color-mix(in srgb, #b3311b 12%, transparent); color: #8f2513; border: 1px solid #e0b3a6; border: 1px solid color-mix(in srgb, #b3311b 40%, transparent); }
@media (prefers-color-scheme: dark) { .form-status.is-error { color: #f0a48d; } }

.contact-aside .info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-m);
  box-shadow: var(--shadow-sm);
}
.contact-aside h3 { font-size: var(--step-1); color: var(--text-strong); }
.contact-aside p, .contact-aside address { color: var(--text-muted); font-style: normal; }
.contact-aside a { font-weight: 600; }

/* ==========================================================================
   Prose (privacy)
   ========================================================================== */
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); margin-top: var(--space-l); color: var(--text-strong); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin-top: var(--space-s); color: var(--text); }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-top: 0.35rem; }

/* ==========================================================================
   404
   ========================================================================== */
.error-page {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-xl) var(--space-s);
}
.error-actions { display: flex; gap: var(--space-s); flex-wrap: wrap; justify-content: center; }
.error-page .code {
  font-family: "Fraunces", serif;
  font-size: clamp(4rem, 3rem + 8vw, 8rem);
  color: var(--foundry);
  line-height: 1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: auto;
  padding-block: var(--space-l) var(--space-m);
}
.site-footer a { color: #C6D3DA; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  padding-bottom: var(--space-m);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand { margin-bottom: var(--space-xs); }
.footer-brand .brand-mark { height: 40px; width: 40px; }
.footer-brand .brand-name { font-size: 1.5rem; }
.footer-brand p { color: var(--footer-text); font-size: var(--step-0); max-width: 32ch; }
.footer-col h4 {
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--step--1);
  color: #fff;
  margin-bottom: var(--space-xs);
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-m);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-m);
  font-size: var(--step--1);
  color: var(--footer-text);
}
.footer-receipts {
  font-weight: 500;
  color: #DDE6EB;
}
.footer-receipts strong { color: #fff; }

/* ==========================================================================
   Scroll reveals — elements fade + rise in as they enter the viewport.
   Driven by IntersectionObserver (main.js adds .is-visible). Grid/feature/step
   children stagger into a gentle cascade. Fully off under reduced motion.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition:
      opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }

  /* Staggered cascade for grouped items */
  .grid > .reveal:nth-child(2),
  .features > .reveal:nth-child(2),
  .steps > .reveal:nth-child(2),
  .values > .reveal:nth-child(2) { --reveal-delay: 0.09s; }
  .grid > .reveal:nth-child(3),
  .features > .reveal:nth-child(3),
  .steps > .reveal:nth-child(3),
  .values > .reveal:nth-child(3) { --reveal-delay: 0.18s; }
  .grid > .reveal:nth-child(4),
  .features > .reveal:nth-child(4),
  .values > .reveal:nth-child(4) { --reveal-delay: 0.27s; }
}

/* Subtle parallax drift on the hero waves as you scroll (decorative). */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .hero-shore {
      animation: hero-parallax linear both;
      animation-timeline: scroll(root);
      animation-range: 0 70vh;
    }
  }
}
@keyframes hero-parallax { to { transform: translateY(34px); } }

/* ==========================================================================
   View Transitions — smooth cross-page fades
   ========================================================================== */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-fade-out 0.18s ease both; }
  ::view-transition-new(root) { animation: vt-fade-in 0.28s ease both; }
}
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }

/* ---- utilities ---------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.text-muted { color: var(--text-muted); }
.mt-m { margin-top: var(--space-m); }
.mt-l { margin-top: var(--space-l); }
