/* ==========================================================================
   Skarpvect OPC — Site styles
   Built on tokens.css (imported separately, before this file). Import the
   tokens, don't copy the hex — see tokens.css for the single source of truth.
   ========================================================================== */

@font-face {
  font-family: "Familjen Grotesk";
  src: url("../assets/fonts/FamiljenGrotesk[wght].ttf") format("truetype");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/JetBrainsMono[wght].ttf") format("truetype");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --max-width: 1120px;

  /* skarpvect-primary.svg's viewBox (0 -2.56 778.97 128.21) is a tight crop
     of the ink — no padding baked in. Its own geometric centre (y=61.54 in
     that coordinate space) is NOT where the wordmark optically balances,
     because the "p" descender in "vect" reaches ~76 units below the S while
     the tallest ascender only reaches ~53 units above it — a symmetric crop
     around that centre would add a dead zone above the letters to match the
     descender's reach below, which is what made earlier passes at this
     still read as bottom-heavy. Instead crop tight and nudge the rendered
     logo down by the gap between the box centre and the S glyph's own
     optical centre (y=50.0), so flex-centering the header aligns the S —
     not the box, not the descender-inclusive bbox — with the row's midline.
     11.54 / 128.21 = box centre (61.54) minus S centre (50.0), as a
     fraction of the tight-crop viewBox height. */
  --sv-logo-height: 28px;
  --sv-logo-center-shift: calc(var(--sv-logo-height) * 11.54 / 128.21);

  /* Header height = 2× nav padding + logo + border. Scroll-margin below is
     derived from this so the two can't drift apart when the logo resizes. */
  --sv-header-height: calc(2 * var(--sv-space-2) + var(--sv-logo-height) + 1px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sv-font-body);
  font-size: var(--sv-text-base);
  color: var(--sv-text);
  background: var(--sv-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--sv-accent); }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 {
  font-family: var(--sv-font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--sv-space-2);
}

h1 { font-size: clamp(var(--sv-text-3xl), 5vw, var(--sv-text-4xl)); }
h2 { font-size: clamp(var(--sv-text-xl), 3.5vw, var(--sv-text-2xl)); }
h3 { font-size: var(--sv-text-lg); }

p { margin: 0 0 var(--sv-space-2); max-width: 70ch; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sv-space-3);
}

.eyebrow {
  font-family: var(--sv-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-size: var(--sv-text-xs);
  font-weight: 500;
  color: var(--sv-accent);
  margin-bottom: var(--sv-space-2);
}

/* Skip link for keyboard/screen-reader users */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--sv-ink);
  color: var(--sv-paper);
  padding: var(--sv-space-1) var(--sv-space-2);
  z-index: 100;
}
.skip-link:focus {
  left: var(--sv-space-2);
  top: var(--sv-space-2);
}

:focus-visible {
  outline: 2px solid var(--sv-accent);
  outline-offset: 2px;
}

/* ---- Header / nav ---- */
.site-header {
  border-bottom: 1px solid var(--sv-border);
  background: var(--sv-bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sv-space-2) 0;
  gap: var(--sv-space-3);
}

.brand-link {
  display: inline-flex;
  align-items: center;
}
.brand-link .logo {
  height: var(--sv-logo-height);
  width: auto;
  color: var(--sv-ink);
  transform: translateY(var(--sv-logo-center-shift));
}

/* Anchor targets need to clear the sticky header, or a jump link tucks the
   heading underneath it. Reads --sv-header-height (defined above, next to
   the logo sizing it's built from) instead of a hard-coded px figure, so
   this can't drift out of sync the way it did when the logo box resized. */
#services,
#about,
#contact {
  scroll-margin-top: calc(var(--sv-header-height) + var(--sv-space-2));
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius);
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--sv-text);
}

.nav-links {
  display: flex;
  gap: var(--sv-space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--sv-text-muted);
  font-weight: 500;
  font-size: var(--sv-text-sm);
}
.nav-links a[aria-current="page"],
.nav-links a:hover { color: var(--sv-text); }

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: var(--sv-space-2);
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--sv-bg);
    border-bottom: 1px solid var(--sv-border);
    padding: var(--sv-space-2) var(--sv-space-3) var(--sv-space-3);
  }
  .nav-links.is-open { display: flex; }
}

/* ---- Hero ---- */
.hero {
  padding: var(--sv-space-8) 0 var(--sv-space-6);
  border-bottom: 1px solid var(--sv-border);
}
.hero p.lede {
  font-size: var(--sv-text-lg);
  max-width: 60ch;
  color: var(--sv-text-muted);
}

.cta-row {
  display: flex;
  gap: var(--sv-space-2);
  flex-wrap: wrap;
  margin-top: var(--sv-space-3);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--sv-radius);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  font-size: var(--sv-text-sm);
}
.btn-primary {
  background: var(--sv-ink);
  color: var(--sv-paper);
}
.btn-primary:hover { background: var(--sv-graphite); }
.btn-secondary {
  background: transparent;
  color: var(--sv-text);
  border-color: var(--sv-border);
}
.btn-secondary:hover { border-color: var(--sv-text); }

/* ---- Sections ---- */
section { padding: var(--sv-space-6) 0; }
section + section { border-top: 1px solid var(--sv-border); }
.section-head { max-width: 65ch; margin-bottom: var(--sv-space-4); }
.section-head p { color: var(--sv-text-muted); }

.grid {
  display: grid;
  gap: var(--sv-space-3);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--sv-surface);
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius);
  padding: var(--sv-space-3);
}
.card .index {
  font-family: var(--sv-font-mono);
  color: var(--sv-accent);
  font-size: var(--sv-text-sm);
  font-weight: 500;
  margin-bottom: var(--sv-space-1);
}

.band {
  background: var(--sv-ink);
  color: #EDEAF4;
}
.band h2, .band .section-head p { color: #EDEAF4; }
.band .eyebrow { color: var(--sv-iris-light); }
.band p { color: #9A93AD; }
.band .card {
  background: var(--sv-graphite);
  border-color: #383150;
}
.band .card h3 { color: #EDEAF4; }
.band .card p { color: #9A93AD; }
.band .btn-primary { background: var(--sv-paper); color: var(--sv-ink); }
.band .btn-primary:hover { background: #FFFFFF; }
.band .btn-secondary { color: #EDEAF4; border-color: #383150; }
.band .btn-secondary:hover { border-color: #EDEAF4; }

.list-clean {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-clean li {
  padding: var(--sv-space-2) 0;
  border-bottom: 1px solid var(--sv-border);
}
.list-clean li:first-child { padding-top: 0; }
.band .list-clean li { border-bottom-color: #383150; }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sv-space-4);
  align-items: start;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--sv-border);
  padding: var(--sv-space-4) 0;
  font-size: var(--sv-text-sm);
  color: var(--sv-text-muted);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sv-space-2);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--sv-space-2);
}
.footer-brand .logo {
  height: 18px;
  width: auto;
  color: var(--sv-text-muted);
}
.footer-tagline {
  font-family: var(--sv-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-size: var(--sv-text-xs);
}
.footer-links {
  display: flex;
  gap: var(--sv-space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-row a { color: var(--sv-text-muted); }
.footer-row a:hover { color: var(--sv-text); }

/* ---- Contact ---- */
.contact-card {
  max-width: 40ch;
}
