/* ───────────────────────────────────────────────
   Gladco Co. — tokens. Rebrand here, nothing else.
   Sampled from logo.png:
     green #0C783C   (the G)
     navy  #12485A   (the laurel wreath)
   Both are brand colours. Navy carries the dark theme,
   the footer block, and the body text tint.
   ─────────────────────────────────────────────── */
:root {
  --brand: #0c783c;
  --brand-soft: #095c2d;
  --brand-ink: #ffffff;

  --navy: #12485a;
  --navy-soft: #0e3a49;
  --navy-ink: #12485a;

  --bg: #f6faf9;
  --surface: #ffffff;
  --surface-2: #eaf2f1;
  --text: #0b2a33;
  --muted: #4f6d76;
  --line: #dbe7e6;

  --shadow: 0 20px 50px -28px rgb(11 45 58 / 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1140px;
  --gutter: clamp(1rem, 4vw, 2rem);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"] {
  --brand: #2fb562;
  --brand-soft: #26a156;
  --brand-ink: #04220f;

  --navy: #12485a;
  --navy-ink: #8fc3d4;

  --bg: #0a2530;
  --surface: #10333e;
  --surface-2: #16404c;
  --text: #e9f4f3;
  --muted: #9fb9be;
  --line: #1d4a55;
  --shadow: 0 20px 50px -25px rgb(0 0 0 / 0.6);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 12px 20px; background: var(--brand); color: var(--brand-ink); font-weight: 650;
}
.skip-link:focus { left: 0; }

/* ───────────── layout ───────────── */
.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section + .section { padding-block-start: 0; }
.stack { display: grid; gap: 1rem; }
.row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 1.25rem; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
@media (min-width: 760px) { .split { grid-template-columns: 1.05fr 0.95fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.76rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; opacity: 0.6; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-block-end: 2rem; }
.section-head h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
.section-head p { color: var(--muted); max-width: 48ch; margin-block-start: 0.5rem; }

/* ───────────── header ───────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid transparent;
  transition: border-color 0.25s;
}
.site-header[data-stuck="true"] { border-block-end-color: var(--line); }

.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 70px; }

.brand-mark { display: inline-flex; align-items: center; gap: 0.62rem; }
.brand-logo { width: 40px; height: auto; display: block; }
.brand-words { height: 34px; width: auto; display: block; }
.brand-dot {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink);
  line-height: 1;
}
.brand-dot svg { width: 24px; height: 24px; display: block; }
/* Text lockup used by the standalone pages (email-sent, 404), not the SPA. */
.brand-txt { display: grid; line-height: 1.05; }
.brand-txt b { font-size: 0.95rem; letter-spacing: 0.14em; font-weight: 800; color: var(--brand); }
.brand-txt i { font-style: normal; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.nav { margin-inline-start: auto; }
.nav a {
  padding: 0.45rem 0.8rem; border-radius: var(--radius-sm);
  color: var(--muted); font-size: 0.94rem; font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--brand); background: var(--surface-2); }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: transparent; color: var(--text); cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.icon-btn:hover { border-color: var(--brand); background: var(--surface); }

.menu-btn { display: none; }

@media (max-width: 800px) {
  .menu-btn { display: grid; margin-inline-start: auto; }
  .nav {
    position: absolute; inset-inline: 0; top: 100%; margin: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0.2rem;
    padding: 0.6rem var(--gutter) 1.1rem;
    background: var(--bg); border-block-end: 1px solid var(--line);
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: 0.75rem 0.5rem; }
  .header-actions { margin-inline-start: 0; }
}

/* ───────────── buttons ───────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.82rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--brand); color: var(--brand-ink);
  font: inherit; font-weight: 650; font-size: 0.95rem; cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn.small { padding: 0.6rem 1.05rem; font-size: 0.88rem; }

/* ───────────── hero ───────────── */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2.5rem, 5vw, 4rem); }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); max-width: 18ch; }
.hero .lede { margin-block-start: 1.3rem; font-size: clamp(1rem, 1.7vw, 1.14rem); color: var(--muted); max-width: 50ch; }
.hero .row { margin-block-start: 2rem; }

.media {
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface-2);
}
.media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

/* ───────────── stats ───────────── */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border-block: 1px solid var(--line);
}
.stat { padding: 1.5rem 0.4rem; }
.stat b { display: block; font-size: clamp(1.3rem, 2.6vw, 1.8rem); letter-spacing: -0.02em; }
.stat b { color: var(--brand); }
.stat i { font-style: normal; color: var(--muted); font-size: 0.84rem; }
@media (min-width: 760px) {
  .stat + .stat { border-inline-start: 1px solid var(--line); padding-inline-start: 1.5rem; }
}

/* ───────────── cards ───────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.3rem, 2.4vw, 1.8rem);
  transition: border-color 0.25s;
}
.card:hover { border-color: color-mix(in oklab, var(--brand) 40%, var(--line)); }
.card h3 { font-size: 1.1rem; margin-block-end: 0.55rem; }
.card p { color: var(--muted); font-size: 0.94rem; }

.product-card { padding: 0; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.product-card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.product-card .body { padding: clamp(1.2rem, 2.2vw, 1.7rem); display: grid; gap: 0.7rem; align-content: start; }
.product-card .body p { color: var(--muted); font-size: 0.94rem; }
.product-card .more { color: var(--brand); font-weight: 650; font-size: 0.9rem; }

.tag {
  font-size: 0.74rem; padding: 0.22rem 0.62rem; border-radius: 999px;
  background: color-mix(in oklab, var(--navy-ink) 12%, transparent);
  color: var(--navy-ink);
  border: 1px solid color-mix(in oklab, var(--navy-ink) 26%, transparent);
  font-weight: 600;
}

/* ───────────── product detail ───────────── */
.case-head { display: grid; gap: 1.2rem; justify-items: start; }
.case-head h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.case-head .lede { color: var(--muted); max-width: 60ch; font-size: clamp(1rem, 1.6vw, 1.1rem); }

.specs {
  display: grid; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
.spec {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 1rem;
  padding: 0.9rem 1.2rem; border-block-start: 1px solid var(--line);
  font-size: 0.92rem;
}
.spec:first-child { border-block-start: 0; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 600; }

.prose { display: grid; gap: 2.2rem; max-width: 70ch; }
.prose h2 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); margin-block-end: 0.7rem; }
.prose p { color: var(--muted); }
.items { display: grid; gap: 1.1rem; margin-block-start: 1rem; }
.items li { display: grid; gap: 0.25rem; padding-inline-start: 1rem; border-inline-start: 2px solid var(--brand); }
.items h3 { font-size: 0.98rem; }
.items p { font-size: 0.92rem; }

/* ───────────── cta ───────────── */
.cta-band {
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(2rem, 5vw, 3.4rem);
  background:
    radial-gradient(120% 150% at 100% 0%, color-mix(in oklab, var(--brand) 16%, transparent), transparent 62%),
    radial-gradient(90% 130% at 0% 100%, color-mix(in oklab, var(--navy-ink) 10%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  display: grid; gap: 1rem; justify-items: start;
}
.cta-band h2 { font-size: clamp(1.4rem, 3.2vw, 2.1rem); max-width: 22ch; }
.cta-band p { color: var(--muted); max-width: 52ch; }

/* ───────────── form ───────────── */
.form-grid { display: grid; gap: 1rem; }
@media (min-width: 680px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }

.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.84rem; color: var(--muted); font-weight: 550; }
.field input, .field textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem; transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus { border-color: var(--brand); outline: none; }
.field textarea { resize: vertical; min-height: 140px; }

.honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { font-size: 0.86rem; color: var(--muted); margin: 0; }
.form-note.err { color: #b3261e; }
:root[data-theme="dark"] .form-note.err { color: #ff9b93; }

.contact-list { display: grid; gap: 1rem; }
.contact-list li { display: grid; gap: 0.15rem; }
.contact-list b { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.contact-list span, .contact-list a { font-size: 0.98rem; }
.contact-list a:hover { color: var(--brand); }

/* ───────────── footer ───────────── */
/* Navy block, not another white card — this is where the wreath colour lands. */
.site-footer {
  background: var(--navy);
  color: color-mix(in oklab, #ffffff 80%, var(--navy));
  border-block-start: 0;
  padding-block: 3rem 1.6rem;
  margin-block-start: clamp(3rem, 7vw, 5rem);
  font-size: 0.9rem;
}
:root[data-theme="dark"] .site-footer { background: #071e27; }

.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-block-end: 2rem; }
.footer-grid h4 { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.13em; color: #ffffff; margin: 0 0 0.85rem; font-weight: 650; }
.footer-grid a { color: color-mix(in oklab, #ffffff 92%, var(--navy)); }
.footer-grid a:hover { color: #8fe3b0; }
.footer-grid ul { display: grid; gap: 0.45rem; }
.footer-logo { width: 140px; height: auto; }
.legal {
  border-block-start: 1px solid color-mix(in oklab, #ffffff 18%, transparent);
  padding-block-start: 1.4rem;
  font-size: 0.82rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* ───────────── misc ───────────── */
/* Progressive enhancement: content stays visible if JS never runs.
   The `js` class is set by app.js before the first paint. */
.reveal { opacity: 1; }
html.js .reveal { opacity: 0; transform: translateY(14px); }
html.js .reveal.in { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.5s ease; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal, html.js .reveal.in { opacity: 1; transform: none; transition: none; }
}
