/* ==========================================================================
   Northlight — site styles
   ========================================================================== */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f8fafc;
  --text:      #0f172a;
  --text-mute: #55627a;
  --border:    #e2e8f0;
  --brand:     #5b8cff;
  --brand-2:   #8b5cf6;
  --shadow:    0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --radius:    14px;
  --wrap:      1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0b1120;
    --bg-soft:   #111a2e;
    --text:      #e8edf7;
    --text-mute: #9aa8c2;
    --border:    #22304d;
    --shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1rem; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.muted { color: var(--text-mute); }
.lead { font-size: 1.125rem; color: var(--text-mute); max-width: 62ch; }
.center { text-align: center; }

/* Spacing utilities — keeps layout decisions out of the markup. */
.center .lead, .lead.center { margin-inline: auto; }
.mt   { margin-top: 1.5rem; }
.mt-l { margin-top: 2.5rem; }
.pt-0 { padding-top: 0; }

/* --- Header / nav ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }

.nav-toggle {
  margin-left: auto;
  display: none;
  padding: .5rem .75rem;
  font: inherit;
  color: var(--text);
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.nav a {
  padding: .45rem .75rem;
  border-radius: 9px;
  color: var(--text-mute);
  font-weight: 500;
}
.nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--bg-soft); }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-block;
  padding: .7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: var(--shadow);
}
.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: var(--bg);
}

/* --- Sections ----------------------------------------------------------- */

.section { padding: 4rem 0; }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--border); }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4.5rem 0;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* Two-column split: wide column + sidebar, stacked on small screens. */
.split {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
}

.card {
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card img { width: 44px; height: 44px; }
.card p:last-child { margin-bottom: 0; }
.card a { overflow-wrap: anywhere; }

/* Reveal-on-scroll (progressive enhancement — see js/main.js).
   Scoped to .js so the content stays visible when JavaScript doesn't run. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* --- Video reel --------------------------------------------------------- */

.reel { margin: 0; }

.reel video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #0b1120;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.reel figcaption { font-size: .9rem; }

/* --- Stats -------------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; }
.stat { text-align: center; }
.stat b { display: block; font-size: 2.25rem; letter-spacing: -.03em; }

/* --- Team / list -------------------------------------------------------- */

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 1.5rem 1.5rem; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px; top: .55rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--brand);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline b { display: block; }

/* --- Form --------------------------------------------------------------- */

.form { display: grid; gap: 1rem; max-width: 560px; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .9rem; }

.field input,
.field textarea {
  width: 100%;
  padding: .7rem .85rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: transparent;
}
.field textarea { resize: vertical; min-height: 140px; }

.field .error { min-height: 1.1rem; font-size: .85rem; color: #dc2626; }
.field.invalid input,
.field.invalid textarea { border-color: #dc2626; }

.form-status {
  padding: .85rem 1rem;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.form-status[hidden] { display: none; }

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font-size: .9rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.site-footer a { color: var(--text-mute); }

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: 3rem 0; }
  .split { grid-template-columns: 1fr; }
  .hero .art { order: -1; }

  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    inset: 64px 1.25rem auto 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    padding: .5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
