/* ==========================================================================
   Kern Media Group — Design tokens
   Concept: white is the stock, navy ink is what's printed on it, and CMY —
   the process colors every print job is built from — are the only color
   allowed near either, used as small restrained pops (ticks, accents).
   Signature motif: halftone dot texture + registration-mark crosshairs.
   ========================================================================== */

:root {
  /* Base */
  --color-ink: #0b1c33;
  --color-ink-soft: #1c3253;
  --color-paper: #fdfdfd;
  --color-paper-dim: #f1f2f2;
  --color-line: #dfe2e5;

  /* CMY accents — used as pops, never as large fields */
  --color-cyan: #00aeef;
  --color-magenta: #ec1e79;
  --color-yellow: #ffce00;

  --color-gray: #6b7280;
  --color-gray-light: #9aa1ac;

  --color-success: #1a7f4e;

  /* Text */
  --text-primary: var(--color-ink);
  --text-muted: var(--color-gray);
  --text-on-ink: var(--color-paper);

  /* Type — two faces only. Data/numeric emphasis comes from weight +
     tabular-nums on the body face, not a separate monospace typeface. */
  --font-display: "Archivo Black", "Arial Black", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --step-1: clamp(0.85rem, 0.82rem + 0.15vw, 0.95rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.1rem);
  --step-2: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-3: clamp(1.6rem, 1.4rem + 1vw, 2.1rem);
  --step-4: clamp(2.1rem, 1.7rem + 2vw, 3rem);
  --step-5: clamp(2.6rem, 2rem + 3vw, 4.2rem);

  /* Space */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  --radius: 10px;
  --radius-sm: 6px;
  --container: 1180px;

  --shadow-card: 0 1px 2px rgba(11, 28, 51, 0.06), 0 8px 24px rgba(11, 28, 51, 0.06);
}

@media (prefers-reduced-motion: no-preference) {
  :root {
    --transition: 180ms ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition: 0ms;
  }
  * {
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--color-paper);
  min-height: 100svh;
}
img, picture, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul[class], ol[class] { list-style: none; padding: 0; }

:focus-visible {
  outline: 3px solid var(--color-cyan);
  outline-offset: 2px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.05;
  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); }
h4 { font-size: var(--step-2); }

p { max-width: 62ch; }
p.lede { font-size: var(--step-2); color: var(--text-muted); max-width: 48ch; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--step-1);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
}
.eyebrow::before {
  content: "";
  display: block;
  flex: none;
  width: 13px;
  height: 12px;
  border-radius: 1px;
  background-image: linear-gradient(
    to right,
    var(--color-cyan) 0 3px,
    transparent 3px 5px,
    var(--color-magenta) 5px 8px,
    transparent 8px 10px,
    var(--color-yellow) 10px 13px
  );
}
.section--ink .eyebrow,
.site-footer .eyebrow {
  color: var(--text-on-ink);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-sm);
}
@media (min-width: 640px) {
  .container { padding-inline: var(--space-lg); }
}

.section { padding-block: var(--space-xl); }
.section--tight { padding-block: var(--space-lg); }
.section--ink {
  background: var(--color-ink);
  color: var(--text-on-ink);
}
.section--ink h2, .section--ink h3 { color: var(--text-on-ink); }
.section--ink p { color: #c9d3e0; }

.stack { display: flex; flex-direction: column; gap: var(--space-md); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }

.grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Responsive alternatives to hardcoded grid-template-columns — collapse to
   a single column below 768px so content never overflows on mobile. */
.grid--split {
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .grid--split { grid-template-columns: var(--split-cols, 1fr 1fr); }
}

.grid--triple {
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .grid--triple { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
  .grid--triple { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Registration-mark / halftone motif — the site's signature element
   ========================================================================== */

.regmark {
  --size: 22px;
  width: var(--size);
  height: var(--size);
  flex: none;
  position: relative;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  opacity: 0.55;
}
.regmark::before, .regmark::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.regmark::before { inset: 0 0 0 calc(50% - 0.75px); width: 1.5px; }
.regmark::after { inset: calc(50% - 0.75px) 0 0 0; height: 1.5px; }

.halftone-field {
  position: relative;
  isolation: isolate;
}
.halftone-field::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, currentColor 1.3px, transparent 1.3px);
  background-size: 14px 14px;
  opacity: 0.08;
  color: var(--color-ink);
}
.section--ink .halftone-field::before { color: var(--color-paper); opacity: 0.06; }

.cropmarks {
  position: relative;
  padding: var(--space-md);
}
.cropmarks::before, .cropmarks::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--color-ink);
  opacity: 0.35;
}
.cropmarks::before { top: 0; left: 0; border-top: 1.5px solid; border-left: 1.5px solid; }
.cropmarks::after { bottom: 0; right: 0; border-bottom: 1.5px solid; border-right: 1.5px solid; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--step-1);
  padding: 0.85em 1.5em;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
  text-decoration: none;
  line-height: 1.1;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--color-magenta);
  color: white;
}
.btn--primary:hover { background: #cf1567; }

.btn--ink {
  background: var(--color-ink);
  color: var(--color-paper);
}
.btn--ink:hover { background: var(--color-ink-soft); }

.btn--ghost {
  background: transparent;
  border-color: currentColor;
  color: var(--color-ink);
}
.btn--ghost:hover { background: var(--color-ink); color: var(--color-paper); }

.btn--ghost-light {
  background: transparent;
  border-color: rgba(250, 247, 240, 0.5);
  color: var(--color-paper);
}
.btn--ghost-light:hover { background: var(--color-paper); color: var(--color-ink); }

.btn--block { width: 100%; }
.btn--lg { font-size: var(--step-2); padding: 1em 1.75em; }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: white;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
}

.path-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--text-primary);
  transition: transform var(--transition), box-shadow var(--transition);
}
.path-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(11, 28, 51, 0.12); }
.path-card__accent {
  width: 2.5rem;
  height: 4px;
  border-radius: 2px;
}
.path-card--cyan .path-card__accent { background: var(--color-cyan); }
.path-card--magenta .path-card__accent { background: var(--color-magenta); }
.path-card--yellow .path-card__accent { background: var(--color-yellow); }

/* ==========================================================================
   Site header / nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-line);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: 0.9rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-ink);
  flex: none;
}
.site-logo img { height: 34px; width: auto; }

.site-nav {
  display: none;
  align-items: center;
  gap: var(--space-md);
}
.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: var(--step-1);
  color: var(--text-primary);
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-color: var(--color-magenta); }

.nav-toggle {
  display: inline-flex;
  background: none;
  border: 1.5px solid var(--color-ink);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-ink);
  position: relative;
  transition: transform var(--transition);
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: var(--space-sm) 0 var(--space-md);
  border-top: 1px solid var(--color-line);
}
.mobile-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.6rem 0.25rem;
}
body.nav-open .mobile-nav { display: flex; }

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-ink);
  color: var(--color-paper);
  padding-block: var(--space-lg);
}
.site-footer a { text-decoration: none; color: var(--color-paper); }
.site-footer a:hover { color: var(--color-yellow); }
.site-footer__grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.site-footer__meta {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(250, 247, 240, 0.15);
  color: var(--color-gray-light);
  font-size: var(--step-1);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* ==========================================================================
   Forms (shared: contact + quote tool)
   ========================================================================== */

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-weight: 700; font-size: var(--step-1); }
.field input,
.field textarea,
.field select {
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-sm);
  padding: 0.75em 0.9em;
  background: white;
  font-size: var(--step-0);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--color-cyan);
}
.field-note { font-size: var(--step-1); color: var(--text-muted); }
.form-grid { display: grid; gap: var(--space-sm); }
@media (min-width: 640px) {
  .form-grid--2 { grid-template-columns: 1fr 1fr; }
}

.form-status[hidden] { display: none; }
.form-status {
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  font-weight: 600;
}
.form-status--success { background: #e6f4ec; color: var(--color-success); }
.form-status--error { background: #fde8ee; color: #9c1c46; }

/* ==========================================================================
   Utilities
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.mt-md { margin-top: var(--space-md); }

/* ==========================================================================
   Quote wizard
   ========================================================================== */

.wizard-shell {
  max-width: 42rem;
  margin-inline: auto;
  padding: var(--space-lg) var(--space-md);
}
@media (min-width: 640px) {
  .wizard-shell { padding: var(--space-xl) var(--space-lg); }
}

.wizard-progress {
  height: 4px;
  background: var(--color-line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--space-lg);
}
.wizard-progress__bar {
  height: 100%;
  width: 8%;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-magenta), var(--color-yellow));
  transition: width var(--transition);
}

.wizard-step__eyebrow {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--step-1);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.option-grid {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .option-grid--2col { grid-template-columns: 1fr 1fr; }
}

.option-card {
  display: block;
  width: 100%;
  text-align: left;
  background: white;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius);
  padding: var(--space-sm) var(--space-md);
  font: inherit;
  font-weight: 700;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.option-card:hover { border-color: var(--color-cyan); transform: translateY(-1px); }
.option-card[aria-pressed="true"] {
  border-color: var(--color-magenta);
  background: #fdf1f6;
}
.option-card__desc {
  display: block;
  font-weight: 400;
  font-size: var(--step-1);
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-lg);
  gap: var(--space-sm);
}

.wizard-back {
  background: none;
  border: none;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.5em 0;
}
.wizard-back:hover { color: var(--color-ink); }

.result-panel {
  text-align: center;
}
.result-panel__range {
  font-family: var(--font-body);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: var(--step-4);
  color: var(--color-ink);
  margin-block: var(--space-sm);
}
.result-panel__range .sep { color: var(--color-magenta); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: var(--space-sm);
}
.chip {
  font-family: var(--font-body);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: var(--step-1);
  background: var(--color-paper-dim);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 0.3em 0.8em;
}
