/* SaltGrid static site — shared stylesheet
   Tokens bound from the live saltgrid.com brand: essence-pro theme,
   custom ink #002b38, Alegreya Sans (display) + Lora (body). */

/* self-hosted fonts — only the weights actually used in this file:
   Alegreya Sans has no true 600 face, so 600-weight declarations below
   fall back to the browser's nearest-weight matching against 400/700,
   same as the Google Fonts CDN version did. Lora's 400 and 600 both
   point at the same variable-font file; the browser reads the correct
   static instance from it based on the declared font-weight (this is
   the same technique Google Fonts' own CSS uses for these two weights). */
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/alegreya-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/alegreya-sans-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/lora-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/lora-variable.woff2') format('woff2');
}

:root {
  --bg:      #f7f8f7;
  --surface: #ffffff;
  --fg:      #171b1c;
  --muted:   #5c6b70;
  --border:  #dfe4e3;
  --accent:  #002b38;
  /* secondary brand blue, sampled from the SaltGrid logo mark (not derived from --accent).
     Reserved for closing CTA bands only — never buttons/links elsewhere. */
  --accent2: #2c7490;

  --accent-soft: color-mix(in oklch, var(--accent) 12%, transparent);
  --fg-soft:     color-mix(in oklch, var(--fg) 6%, transparent);

  --font-display: 'Alegreya Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Lora', Georgia, 'Times New Roman', serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-h1: clamp(38px, 5.6vw, 64px);
  --fs-h2: clamp(28px, 3.6vw, 42px);
  --fs-h3: 21px;
  --fs-lead: 19px;
  --fs-body: 16px;
  --fs-meta: 13px;

  --gap-xs: 8px; --gap-sm: 12px; --gap-md: 20px; --gap-lg: 32px; --gap-xl: 56px; --gap-2xl: 96px;
  --container: 1120px;
  --gutter: 32px;
  --radius: 8px;
  --radius-lg: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(48px, 8vw, var(--gap-2xl)); }
.section + .section { border-top: 1px solid var(--border); }
.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-top: var(--gap-md); }
.row { display: flex; align-items: center; gap: var(--gap-md); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-md); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-lg); }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: var(--gap-xl); align-items: start; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: var(--gap-xl); align-items: start; }
@media (max-width: 920px) {
  .grid-2, .grid-3, .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
}

.h1, h1 { font-family: var(--font-display); font-size: var(--fs-h1); line-height: 1.06; letter-spacing: -0.01em; margin: 0; font-weight: 700; }
.h2, h2 { font-family: var(--font-display); font-size: var(--fs-h2); line-height: 1.12; letter-spacing: -0.008em; margin: 0; font-weight: 700; }
.h3, h3 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; line-height: 1.3; margin: 0; }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--muted); max-width: 62ch; margin: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--gap-md);
}
.meta { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--muted); }

/* chrome */
.topnav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 12px; gap: var(--gap-lg); }
.topnav .brand { display: flex; align-items: center; gap: 10px; }
.topnav .brand img { height: 48px; width: auto; }
.topnav nav { display: flex; gap: var(--gap-lg); flex-wrap: wrap; }
.topnav nav a { font-family: var(--font-display); font-size: 14px; color: var(--muted); font-weight: 600; }
.topnav nav a:hover, .topnav nav a.active { color: var(--accent); }

/* mobile menu — pure CSS, no JS. Checkbox is visually hidden but stays
   keyboard-focusable; :has() drives the open/closed state. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nav-toggle {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nav-toggle-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-btn:hover { background: var(--fg-soft); }
.nav-toggle:focus-visible + .nav-toggle-btn { outline: 2px solid var(--accent); outline-offset: 2px; }
.hamburger { display: block; width: 20px; height: 14px; position: relative; }
.hamburger span, .hamburger::before, .hamburger::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 2px;
  background: var(--fg); transition: transform 0.15s ease, opacity 0.15s ease;
}
.hamburger::before { top: 0; }
.hamburger span { top: 6px; }
.hamburger::after { top: 12px; }
.topnav:has(.nav-toggle:checked) .hamburger span { opacity: 0; }
.topnav:has(.nav-toggle:checked) .hamburger::before { transform: translateY(6px) rotate(45deg); }
.topnav:has(.nav-toggle:checked) .hamburger::after { transform: translateY(-6px) rotate(-45deg); }

.topnav .mobile-nav {
  display: none;
  flex-direction: column;
  padding: 4px var(--gutter) 20px;
  border-top: 1px solid var(--border);
}
.mobile-nav a:not(.btn) {
  font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--fg);
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.mobile-nav a.active { color: var(--accent); }
.mobile-nav .btn { justify-content: center; }
.topnav:has(.nav-toggle:checked) .mobile-nav { display: flex; }

@media (max-width: 760px) {
  .topnav-inner .row { display: none; }
  .nav-toggle-btn { display: flex; }
}

.pagefoot { padding-block: var(--gap-xl); color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }
.pagefoot .row-between { flex-wrap: wrap; gap: var(--gap-md); align-items: flex-start; }
.pagefoot nav { display: flex; gap: var(--gap-md); flex-wrap: wrap; }
.pagefoot nav a:hover { color: var(--fg); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700; letter-spacing: 0.002em;
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.btn-primary:hover { background: color-mix(in oklch, var(--accent) 82%, white); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--fg); }
.btn-ghost { background: transparent; color: var(--accent); border-color: transparent; padding-inline: 0; }
.btn-ghost:hover { color: color-mix(in oklch, var(--accent) 82%, white); }
.btn-arrow::after { content: '→'; transition: transform 0.15s ease; margin-left: 2px; }
.btn-arrow:hover::after { transform: translateX(2px); }

/* card / pillar */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0; overflow: hidden; }
.card .card-img { aspect-ratio: 16/10; overflow: hidden; }
.card .card-img img { width: 100%; height: 100%; object-fit: cover; }
.card .card-body { padding: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .btn-ghost { margin-top: 14px; display: inline-flex; font-size: 14px; }

/* full color-bleed statement band — for brand/mission copy, not testimonials */
.section-bleed {
  background: var(--accent);
  padding-block: clamp(64px, 9vw, 108px);
}
.section-bleed .eyebrow { color: color-mix(in oklch, var(--surface) 70%, var(--accent)); }
.section-bleed .statement {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: -0.005em;
  color: var(--surface);
  max-width: 30ch;
  margin: 0 auto;
}

/* full color-bleed CTA close — distinct brand blue, reserved for the final ask */
.cta-bleed {
  background: var(--accent2);
  padding-block: clamp(64px, 9vw, 108px);
  text-align: center;
}
.cta-bleed h2 { color: var(--surface); }
.cta-bleed .lead { color: color-mix(in oklch, var(--surface) 82%, transparent); }
.cta-bleed .btn-primary {
  background: var(--surface); color: var(--accent2); border-color: var(--surface);
}
.cta-bleed .btn-primary:hover { background: color-mix(in oklch, var(--surface) 85%, var(--accent2)); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.input, .textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 15px;
}
.input:focus, .textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }

.content-img {
  display: block; max-width: 100%; max-height: min(70vh, 640px);
  width: auto; height: auto; object-fit: contain; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.rule { border: 0; border-top: 1px solid var(--border); margin: 0; }

.hero { padding-block: clamp(72px, 11vw, 140px); }
.hero-center { text-align: center; max-width: 800px; margin-inline: auto; }
.hero-center h1 { margin-bottom: var(--gap-lg); }
.hero-center .lead { margin: 0 auto var(--gap-lg); }
.hero-cta { display: inline-flex; gap: var(--gap-sm); flex-wrap: wrap; }
.hero-center .hero-cta { justify-content: center; }
.hero-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--gap-2xl); align-items: center; }
@media (max-width: 920px) { .hero-split { grid-template-columns: 1fr; } }

.hero-photo-wrap {
  position: relative;
  background-size: cover;
  background-position: center 62%;
  border-bottom: 1px solid var(--border);
}
.hero-photo-wrap::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,10,14,0.8) 20%, rgba(0,10,14,0.38) 100%);
}
.hero-photo-wrap .container {
  position: relative; z-index: 1;
  padding-block: clamp(88px, 13vw, 168px);
}
.hero-photo-wrap .eyebrow { color: color-mix(in oklch, var(--surface) 80%, var(--accent)); }
.hero-photo-wrap .lead { color: color-mix(in oklch, var(--surface) 86%, transparent); }
.hero-photo-wrap h1 { color: var(--surface); }
.hero-photo-wrap .btn-primary {
  background: var(--surface); color: var(--accent); border-color: var(--surface);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.hero-photo-wrap .btn-primary:hover { background: color-mix(in oklch, var(--surface) 85%, var(--accent)); }
.hero-photo-wrap .btn-secondary {
  background: color-mix(in oklch, black 35%, transparent);
  border-color: rgba(255,255,255,0.7); color: var(--surface);
  backdrop-filter: blur(6px);
}
.hero-photo-wrap .btn-secondary:hover { background: color-mix(in oklch, black 55%, transparent); border-color: var(--surface); }

.industry-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-md); }
@media (max-width: 760px) { .industry-strip { grid-template-columns: 1fr; } }
.industry-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px;
  background: var(--surface);
}
.industry-card h3 { margin-bottom: 6px; }
.industry-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* accessibility: sitewide keyboard focus ring + skip link */
a:focus-visible, button:focus-visible, .btn:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.hero-photo-wrap :focus-visible, .cta-bleed :focus-visible, .section-bleed :focus-visible {
  outline-color: var(--surface);
}
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 100;
  background: var(--accent);
  color: var(--surface);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 8px;
}
