/* ============================================================
   DriveDeck — shared stylesheet
   Brand palette extracted from DriveDeck logo artwork:
     Deck Green #114734 · Clay #996B59
   ============================================================ */

:root {
  /* Brand */
  --green: #114734;
  --green-dark: #0C3628;
  --green-deep: #092A1F;
  --green-tint: #E7EFEA;
  --clay: #996B59;
  --clay-dark: #7F5847;
  --clay-tint: #F1E8E4;

  /* Neutrals */
  --paper: #FFFFFF;
  --cream: #F5F2EC;
  --ink: #1D2420;
  --muted: #57615A;
  --line: #E2DED4;
  --line-dark: rgba(255, 255, 255, .14);

  /* Type */
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 10px 30px rgba(9, 42, 31, .10);
  --shadow-sm: 0 4px 14px rgba(9, 42, 31, .08);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
a:hover { color: var(--clay-dark); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; color: var(--green-deep); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--green-deep); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 24px;
  min-height: 72px;
}
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 40px; width: auto; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  display: inline-block; padding: .55rem .8rem;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  border-radius: 8px;
}
.nav a:hover { background: var(--green-tint); color: var(--green-deep); }
.nav a[aria-current="page"] { color: var(--green); box-shadow: inset 0 -3px 0 var(--clay); border-radius: 8px 8px 2px 2px; }
.nav .btn { margin-left: 10px; }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: .5rem .65rem; cursor: pointer; color: var(--green-deep);
}
.nav-toggle svg { display: block; }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 10px 16px 18px; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem .9rem; font-size: 1.02rem; }
  .nav .btn { margin: 10px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: .8rem 1.5rem;
  background: var(--green); color: #fff !important;
  border: 2px solid var(--green); border-radius: 999px;
  font-weight: 700; font-size: .98rem; text-decoration: none; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); transform: translateY(-1px); }
.btn.clay { background: var(--clay); border-color: var(--clay); }
.btn.clay:hover { background: var(--clay-dark); border-color: var(--clay-dark); }
.btn.ghost { background: transparent; color: var(--green) !important; }
.btn.ghost:hover { background: var(--green-tint); }
.btn.on-dark { background: #fff; border-color: #fff; color: var(--green-deep) !important; }
.btn.on-dark:hover { background: var(--cream); border-color: var(--cream); }
.btn.on-dark.ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.7); }
.btn.on-dark.ghost:hover { background: rgba(255,255,255,.12); }
.btn.small { padding: .5rem 1.05rem; font-size: .9rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff;
  background: var(--green-deep);
  overflow: hidden;
}
.hero .bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.hero .bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(9, 42, 31, .93) 0%, rgba(9, 42, 31, .78) 45%, rgba(9, 42, 31, .45) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding-top: 96px; padding-bottom: 96px; }
.hero.short .wrap { padding-top: 64px; padding-bottom: 64px; }
.eyebrow {
  display: inline-block; margin-bottom: 1.1rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; background: rgba(153, 107, 89, .92);
  padding: .35rem .8rem; border-radius: 999px;
}
.hero h1 {
  color: #fff; font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 900; max-width: 17ch;
}
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 56ch; color: rgba(255,255,255,.92); }
.hero .cta-row { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 14px; }

/* Page heroes (interior) */
.hero.interior .wrap { padding-top: 72px; padding-bottom: 72px; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section.tight { padding: 56px 0; }
.section.cream { background: var(--cream); }
.section.green { background: var(--green-deep); color: #fff; }
.section.green h2, .section.green h3 { color: #fff; }
.section.green p { color: rgba(255,255,255,.9); }

.kicker {
  display: block; font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--clay); margin-bottom: .7rem;
}
.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); max-width: 26ch; }
.section .lead { font-size: 1.12rem; color: var(--muted); max-width: 68ch; }
.section.green .lead { color: rgba(255,255,255,.85); }
.center { text-align: center; }
.center h2, .center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 24px; margin-top: 2.2rem; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .97rem; margin-bottom: 0; }
.card .spec-mini { margin: .9rem 0 0; padding: 0; list-style: none; font-size: .92rem; }
.card .spec-mini li { display: flex; justify-content: space-between; gap: 12px; padding: .38rem 0; border-top: 1px dashed var(--line); }
.card .spec-mini li span:first-child { color: var(--muted); }
.card .spec-mini li span:last-child { font-weight: 700; color: var(--green-deep); text-align: right; }
.card .card-cta { margin-top: 1.1rem; }

.icon-chip {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-tint); color: var(--green); margin-bottom: 1rem;
}
.icon-chip.clay { background: var(--clay-tint); color: var(--clay-dark); }
.icon-chip svg { width: 24px; height: 24px; }

/* Trust band */
.trust-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.trust-band .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-top: 28px; padding-bottom: 28px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-item svg { flex: 0 0 auto; width: 26px; height: 26px; color: var(--clay); margin-top: 2px; }
.trust-item strong { display: block; font-size: .98rem; color: var(--green-deep); line-height: 1.3; }
.trust-item span { font-size: .85rem; color: var(--muted); line-height: 1.45; display: block; margin-top: 2px; }
@media (max-width: 940px) { .trust-band .wrap { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .trust-band .wrap { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: inline-block; font-weight: 900; font-size: 1rem;
  color: #fff; background: var(--clay);
  border-radius: 999px; padding: .25rem .75rem; margin-bottom: .9rem;
  letter-spacing: .04em;
}
.step h3 { font-size: 1.08rem; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }
/* Steps keep dark text even inside dark-green sections */
.section.green .step h3 { color: var(--green-deep); }
.section.green .step p { color: var(--muted); }

/* ---------- Split layouts ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 2rem; }
.split.text-first > .split-media { order: 2; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.text-first > .split-media { order: 0; }
}
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.split-media.plain img { box-shadow: none; border-radius: 0; }
.figure-note { font-size: .85rem; color: var(--muted); margin-top: .8rem; }

/* Layer legend */
.layer-list { list-style: none; margin: 1.4rem 0 0; padding: 0; }
.layer-list li {
  display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); align-items: baseline;
}
.layer-list .n {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 999px;
  background: var(--green); color: #fff; font-weight: 800; font-size: .9rem;
  display: inline-flex; align-items: center; justify-content: center; transform: translateY(4px);
}
.layer-list strong { color: var(--green-deep); }
.layer-list p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Tables ---------- */
.table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff; box-shadow: var(--shadow-sm);
  margin-top: 2rem;
}
.table-scroll table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: .95rem; }
.table-scroll caption {
  text-align: left; font-weight: 800; color: var(--green-deep); font-size: 1.05rem;
  padding: 20px 22px 6px;
}
.table-scroll th, .table-scroll td { padding: 14px 18px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.table-scroll thead th {
  border-top: 0; background: var(--green-deep); color: #fff;
  font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.table-scroll tbody th { font-weight: 700; color: var(--green-deep); background: var(--cream); min-width: 150px; }
.table-scroll td.dd { background: var(--green-tint); font-weight: 600; }
.table-scroll td small, .table-scroll th small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.table-scroll td.dd small { color: var(--muted); }
.table-hint { font-size: .84rem; color: var(--muted); margin: .7rem 4px 0; display: none; }
.table-hint.always { display: block; }
@media (max-width: 880px) { .table-hint { display: block; } }

/* Spec table (system page) */
.spec-table table { min-width: 640px; }

/* ---------- Swatches ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px; margin-top: 2rem; }
.swatch { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.swatch .chip { height: 86px; }
.swatch figcaption { padding: 10px 12px; font-size: .88rem; font-weight: 600; color: var(--green-deep); }
.swatch figcaption small { display: block; font-weight: 400; color: var(--muted); }

/* ---------- Resources ---------- */
.doc-group { margin-top: 2.6rem; }
.doc-group h3 { font-size: 1.25rem; border-bottom: 2px solid var(--clay); display: inline-block; padding-bottom: .3rem; }
.doc-list { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: 12px; }
.doc-list.cols { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .doc-list.cols { grid-template-columns: 1fr; } }
.doc-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px;
}
.doc-item:hover { border-color: var(--clay); }
.doc-item .doc-ico {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 9px;
  background: var(--clay-tint); color: var(--clay-dark);
  display: flex; align-items: center; justify-content: center;
}
.doc-item .doc-ico svg { width: 20px; height: 20px; }
.doc-item .doc-body { flex: 1 1 auto; min-width: 0; }
.doc-item .doc-body strong { display: block; color: var(--green-deep); font-size: .98rem; line-height: 1.3; }
.doc-item .doc-body span { display: block; color: var(--muted); font-size: .87rem; margin-top: 2px; }
.doc-item .doc-dl { flex: 0 0 auto; align-self: center; }
a.doc-item { text-decoration: none; }

/* ---------- Rep gate ---------- */
.gate-card {
  max-width: 560px; margin: 2.4rem auto 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px; box-shadow: var(--shadow); text-align: center;
}
.gate-card .icon-chip { margin: 0 auto 1rem; }
.gate-form { display: flex; gap: 10px; margin-top: 1.4rem; }
.gate-form input[type="password"], .gate-form input[type="text"] {
  flex: 1 1 auto; min-width: 0;
  font: inherit; padding: .78rem 1rem;
  border: 2px solid var(--line); border-radius: 10px;
}
.gate-form input:focus-visible { outline: 3px solid var(--clay); outline-offset: 1px; border-color: var(--clay); }
.gate-error { color: #8C2B1E; font-weight: 600; font-size: .93rem; margin-top: .9rem; display: none; }
.gate-error.show { display: block; }
.gate-note { font-size: .85rem; color: var(--muted); margin-top: 1.1rem; margin-bottom: 0; }
@media (max-width: 520px) { .gate-form { flex-direction: column; } }

.portal { display: none; }
.portal.open { display: block; }
.portal-form-card {
  background: var(--green-deep); color: #fff; border-radius: var(--radius-lg);
  padding: 36px; margin-top: 2.2rem;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
}
.portal-form-card h3 { color: #fff; margin: 0 0 .3rem; }
.portal-form-card p { color: rgba(255,255,255,.85); margin: 0; max-width: 52ch; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; color: #fff; overflow: hidden; background: var(--green-deep); }
.cta-band .bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.cta-band .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9,42,31,.95), rgba(9,42,31,.72)); }
.cta-band .wrap { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 72px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); max-width: 60ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-deep); color: rgba(255,255,255,.82); font-size: .93rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #D8BFB3; }
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px;
  padding: 56px 0 40px; border-bottom: 1px solid var(--line-dark);
}
.footer-top img { height: 52px; width: auto; margin-bottom: 1rem; }
.footer-top h4 { color: #fff; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-top ul { list-style: none; margin: 0; padding: 0; }
.footer-top li { margin-bottom: .55rem; }
.footer-top address { font-style: normal; line-height: 1.6; }
.footer-top .f-note { max-width: 34ch; line-height: 1.6; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding: 22px 0 30px; font-size: .82rem; color: rgba(255,255,255,.6); }
@media (max-width: 940px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Reveal (only hidden when JS is running; see inline
   `document.documentElement.classList.add("js")` in each page head) ---------- */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; } }
@media print { html.js .reveal { opacity: 1 !important; transform: none !important; } }

/* ---------- Misc ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.6rem; }
.badge {
  display: inline-block; padding: .4rem .9rem; border-radius: 999px;
  background: var(--green-tint); color: var(--green-deep);
  font-size: .85rem; font-weight: 700;
}
.section.green .badge { background: rgba(255,255,255,.12); color: #fff; }
.smallprint { font-size: .84rem; color: var(--muted); }
.section.green .smallprint { color: rgba(255,255,255,.65); }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
.needs-info { background: #FFF3CD; color: #6B5200; padding: .1rem .4rem; border-radius: 4px; font-weight: 600; }
