/* ===========================================================
   DOCKHAND — shared stylesheet
   Design tokens live at the top. Content editors should never
   need to touch anything below the "COMPONENTS" marker.
   =========================================================== */

:root {
  /* --- Color tokens --- */
  --ink: #14181c;          /* primary text, dark surfaces */
  --ink-soft: #3a4149;     /* secondary text on light */
  --paper: #ece9e2;        /* base background, warehouse concrete */
  --paper-raised: #f6f4ef; /* card surfaces, slightly lighter than paper */
  --steel: #5b6570;        /* muted UI / borders on dark */
  --line: #d8d5cc;         /* hairline borders on light */
  --line-dark: #2a2f35;    /* hairline borders on dark */
  --safety: #f2b705;       /* accent — safety yellow, dock hazard striping */
  --safety-ink: #1a1400;   /* text on safety yellow */
  --route: #25588f;        /* links, secondary interactive */
  --route-dark: #1f4e85;
  --steel-on-dark: #8993a0; /* muted text on dark surfaces — AA contrast */
  --good: #2f7d4f;         /* on-time / success state */
  --late: #b8452f;         /* delayed / error state */

  /* --- Type tokens --- */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;

  --step-1: clamp(0.83rem, 0.8rem + 0.15vw, 0.95rem);
  --step0:  clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  --step1:  clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  --step2:  clamp(1.6rem, 1.4rem + 0.8vw, 2.1rem);
  --step3:  clamp(2.1rem, 1.7rem + 1.6vw, 3.2rem);
  --step4:  clamp(2.8rem, 2.1rem + 2.8vw, 4.6rem);

  /* --- Layout tokens --- */
  --content-max: 1180px;
  --gap: 1.5rem;
  --radius: 2px; /* dock-plate hardware, not soft UI — sharp corners throughout */
}

/* ===========================================================
   RESET / BASE
   =========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.01em; line-height: 1.05; margin: 0 0 0.5em; text-transform: uppercase; }
h1 { font-size: var(--step4); }
h2 { font-size: var(--step3); }
h3 { font-size: var(--step2); }
h4 { font-size: var(--step1); }
p { margin: 0 0 1em; max-width: 62ch; }
a { color: var(--route); }
a:hover { color: var(--route-dark); }
ul, ol { padding-left: 1.2em; }
code, .mono { font-family: var(--font-mono); }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--safety);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--safety);
  color: var(--safety-ink);
  padding: 0.75em 1.25em;
  font-weight: 700;
  z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ===========================================================
   LAYOUT PRIMITIVES
   =========================================================== */
.wrap { max-width: var(--content-max); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: clamp(3rem, 6vw, 6rem); }
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: #c7ccd1; }
.section--raised { background: var(--paper-raised); }
.grid { display: grid; gap: var(--gap); }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--step-1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--route-dark);
  margin-bottom: 0.75em;
}
.section--dark .eyebrow { color: var(--safety); }
.eyebrow::before { content: ""; width: 0.6em; height: 0.6em; background: currentColor; display: inline-block; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===========================================================
   COMPONENTS
   These blocks are reused verbatim across every page.
   Editors: change text inside them; do not change structure.
   =========================================================== */

/* --- Site header / nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 3px solid var(--safety);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.brand:hover { color: var(--safety); }
.brand-mark {
  width: 1.6em; height: 1.6em;
  background: var(--safety);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
}
.nav-toggle {
  display: inline-flex;
  background: none;
  border: 2px solid var(--paper);
  color: var(--paper);
  padding: 0.4em 0.7em;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
}
.primary-nav {
  display: none;
}
.primary-nav.is-open { display: block; }
.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.primary-nav a {
  display: block;
  padding: 0.6em 0;
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--line-dark);
}
.primary-nav a[aria-current="page"] { color: var(--safety); }
.primary-nav a:hover { color: var(--safety); }
.nav-cta {
  display: none;
}
@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .primary-nav { display: block; }
  .primary-nav ul { flex-direction: row; gap: 1.75rem; padding: 0; }
  .primary-nav a { border-bottom: none; padding: 0.25em 0; }
  .nav-cta { display: inline-flex; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85em 1.5em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--safety); color: var(--safety-ink); }
.btn--primary:hover { background: #d9a300; color: var(--safety-ink); }
.btn--ghost { background: transparent; border-color: var(--paper); color: var(--paper); }
.btn--ghost:hover { border-color: var(--safety); color: var(--safety); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--line-dark); }
.btn--block { width: 100%; justify-content: center; }

/* --- Site footer --- */
.site-footer {
  background: var(--ink);
  color: #c7ccd1;
  padding-block: 3rem 2rem;
  border-top: 3px solid var(--safety);
}
.site-footer a { color: #c7ccd1; text-decoration: none; }
.site-footer a:hover { color: var(--safety); }
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-grid h3 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.75em;
  text-transform: uppercase;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5em; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--steel-on-dark);
}
.credit-line {
  font-size: 0.8rem;
  color: var(--steel-on-dark);
}
.credit-line a { color: var(--steel-on-dark); text-decoration: underline; }

/* --- Cards --- */
.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 1.75rem;
}
.card h3 { font-size: var(--step1); }
.card--dark { background: var(--line-dark); border-color: #3a4149; color: #fff; }

/* --- Board (signature hero element): dock schedule board --- */
.board {
  background: var(--ink);
  border: 3px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: var(--step-1);
  overflow-x: auto;
}
.board table { width: 100%; border-collapse: collapse; min-width: 560px; }
.board caption {
  text-align: left;
  padding: 0.9em 1em;
  color: var(--safety);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--safety);
  font-size: 0.8rem;
}
.board th, .board td {
  text-align: left;
  padding: 0.7em 1em;
  border-bottom: 1px solid var(--line-dark);
  color: #dfe3e6;
  white-space: nowrap;
}
.board thead th {
  color: var(--steel);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}
.status { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 700; }
.status::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; display: inline-block; }
.status--good::before { background: var(--good); }
.status--good { color: #6bd39b; }
.status--wait::before { background: var(--safety); }
.status--wait { color: var(--safety); }
.status--late::before { background: var(--late); }
.status--late { color: #e88a76; }

/* --- Stat row --- */
.stat { border-top: 3px solid var(--safety); padding-top: 0.5em; }
.stat .num { font-family: var(--font-mono); font-size: var(--step2); font-weight: 700; display: block; }
.stat .label { font-size: 0.85rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.section--dark .stat .label { color: var(--steel-on-dark); }

/* --- Pricing table --- */
.price-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.price-card--featured {
  background: var(--ink);
  color: #fff;
  border-color: var(--safety);
  position: relative;
}
.price-card--featured h3, .price-card--featured .price-amount { color: #fff; }
.price-card--featured .price-tag {
  position: absolute; top: -0.9em; left: 1.5rem;
  background: var(--safety); color: var(--safety-ink);
  font-family: var(--font-mono); font-size: 0.7rem;
  padding: 0.35em 0.7em; letter-spacing: 0.06em; text-transform: uppercase;
}
.price-amount { font-family: var(--font-display); font-size: var(--step3); display: flex; align-items: baseline; gap: 0.2em; }
.price-amount .per { font-family: var(--font-body); font-size: 0.9rem; font-weight: 400; color: var(--ink-soft); }
.price-card--featured .price-amount .per { color: #c7ccd1; }
.price-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6em; }
.price-list li { padding-left: 1.4em; position: relative; }
.price-list li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.price-card--featured .price-list li::before { color: var(--safety); }

/* --- FAQ --- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  padding: 1.1em 0;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: var(--step1);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.5rem; color: var(--route); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding-bottom: 1.1em; }

/* --- Form --- */
.form-field { display: grid; gap: 0.4em; margin-bottom: 1.25rem; }
.form-field label { font-weight: 700; font-size: 0.9rem; }
.form-field .hint { font-size: 0.8rem; color: var(--ink-soft); }
.form-field input, .form-field select, .form-field textarea {
  font: inherit;
  padding: 0.75em 0.9em;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--route);
}
fieldset { border: 2px solid var(--line); padding: 1rem 1.25rem 1.25rem; margin: 0 0 1.25rem; }
legend { font-weight: 700; padding: 0 0.5em; font-family: var(--font-display); text-transform: uppercase; }
.required::after { content: " *"; color: var(--late); }

/* --- Breadcrumb / eyebrow nav --- */
.crumb { font-family: var(--font-mono); font-size: 0.8rem; color: var(--steel); margin-bottom: 1rem; }
.crumb a { color: var(--steel); }

/* --- Two column feature row --- */
.feature-row { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 820px) {
  .feature-row { grid-template-columns: 1fr 1fr; }
  .feature-row.reverse .feature-row__text { order: 2; }
}
.step-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--route-dark);
  border: 1px solid var(--route-dark);
  padding: 0.2em 0.5em;
  display: inline-block;
  margin-bottom: 0.6em;
}
