/* Huia Sites — Nocturne tokens + layout. One stylesheet, mobile-first. */

:root {
  --bg: #161826;
  --surface: #232532;
  --text: #e9e9ed;
  --accent: #9184d9;
  --accent-300: #d2cefd;
  --accent-400: #b5abfc;
  --accent-900: #2b2741;
  --n-300: #cfd3e5;
  --n-400: #b2b6ca;
  --n-500: #9397ab;
  --n-800: #3f424d;
  --divider: rgba(233, 233, 237, 0.16);

  --font: "Inter", system-ui, -apple-system, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-sm: 0 0 0 1px #3f424d;

  --wrap: 1120px;
  --gutter: 22px;
}

@media (min-width: 700px) { :root { --gutter: 40px; } }

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

h1, h2, h3, h4 { font-weight: 500; margin: 0; text-wrap: pretty; }
p { margin: 0; text-wrap: pretty; }
img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-300); text-decoration: none; }
a:hover { color: var(--accent-400); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; color: var(--n-300); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--surface); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(22, 24, 38, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--divider); }

.header-inner {
  display: flex; align-items: center; gap: 20px;
  padding-top: 18px; padding-bottom: 18px;
}
@media (min-width: 960px) { .header-inner { padding-top: 26px; padding-bottom: 26px; } }

.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 14px rgba(145, 132, 217, 0.55);
}
.brand-name { font-size: 18px; letter-spacing: -0.02em; font-weight: 500; }
.brand-name-muted { color: var(--n-400); }

.site-nav { display: flex; gap: 26px; font-size: 14px; }
.site-nav a { color: var(--accent-300); white-space: nowrap; }

.nav-toggle {
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 1px solid var(--divider); border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 1.5px; background: var(--text); border-radius: 2px;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle:hover { border-color: var(--accent); }

@media (max-width: 959px) {
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--surface); border-top: 1px solid var(--divider);
    padding: 6px var(--gutter) 14px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 14px 0; font-size: 16px;
    border-bottom: 1px solid var(--divider);
  }
  .site-nav a:last-child { border-bottom: none; }
}
@media (min-width: 960px) { .nav-toggle { display: none; } }

/* ---------- hero ---------- */

.hero { padding: 56px 0 0; position: relative; overflow: hidden; }
@media (min-width: 700px) { .hero { padding-top: 84px; } }
.hero .wrap { position: relative; }

.glow {
  position: absolute; top: -260px; left: -180px;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(145, 132, 217, 0.16) 0%, rgba(145, 132, 217, 0) 68%);
  pointer-events: none;
}

.eyebrow {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 24px; position: relative;
  font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--n-400);
}
.pulse {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
}

.hero h1 {
  position: relative;
  font-size: clamp(38px, 8vw, 66px);
  line-height: 1.05; letter-spacing: -0.035em;
  max-width: 17ch; margin-bottom: 22px;
}

.lede {
  position: relative;
  font-size: clamp(17px, 2.2vw, 19px); line-height: 1.6;
  color: var(--n-300); max-width: 54ch; margin-bottom: 30px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; position: relative; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 20px;
  font: inherit; font-size: 15px; font-weight: 500;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { border-color: var(--accent); color: var(--accent-300); background: transparent; }
.btn-primary:hover { background: rgba(145, 132, 217, 0.14); color: var(--accent-300); }
.btn-primary:active { background: rgba(145, 132, 217, 0.24); }
.btn-ghost { color: var(--n-300); }
.btn-ghost:hover { background: rgba(233, 233, 237, 0.06); color: var(--text); }
.btn-block { width: 100%; }

.link-arrow { font-size: 15px; font-weight: 500; }

/* ---------- fact band ---------- */

.band-section { padding-top: 64px; }
@media (min-width: 700px) { .band-section { padding-top: 96px; } }

.band {
  display: grid; gap: 1px;
  background: var(--divider);
  border-radius: var(--radius-md); overflow: hidden;
}
@media (min-width: 760px) { .band { grid-template-columns: repeat(3, 1fr); } }

.band-cell { background: var(--surface); padding: 24px 26px; }
.band-title { font-size: clamp(24px, 4vw, 30px); letter-spacing: -0.02em; margin-bottom: 6px; }
.band-note { font-size: 13px; color: var(--n-400); line-height: 1.55; }

/* ---------- sections ---------- */

.section { padding-top: 88px; }
@media (min-width: 700px) { .section { padding-top: 128px; } }

.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 36px; }
@media (min-width: 700px) { .section-head { margin-bottom: 44px; } }

.kicker {
  font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--n-400); font-weight: 500; flex: none;
}
.rule { height: 1px; flex: 1; background: linear-gradient(to right, var(--divider), transparent); }
.rule-full {
  display: block; height: 1px; flex: none;
  background: linear-gradient(to right, transparent, var(--divider) 12%, var(--divider) 88%, transparent);
}

.grid-3 { display: grid; gap: 36px; }
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 44px; } }

.service .mark { display: block; width: 26px; height: 2px; background: var(--accent); margin-bottom: 16px; }
.service h3 { font-size: 19px; margin-bottom: 10px; }
.service p { font-size: 14px; line-height: 1.7; color: var(--n-400); }

/* ---------- project ---------- */

.project { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .project { grid-template-columns: 1.25fr 1fr; gap: 52px; } }

.project-media {
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm); background: var(--surface);
  max-height: 560px;
}
.project-media img { width: 100%; object-fit: cover; object-position: top center; }
.project-media.lighten { mix-blend-mode: lighten; }

.media-placeholder {
  aspect-ratio: 16 / 10;
  display: grid; place-content: center; justify-items: center; gap: 16px;
  padding: 24px; text-align: center;
  border: 1px dashed var(--divider); border-radius: var(--radius-md);
}
.media-placeholder p { font-size: 13px; color: var(--n-500); }
.media-placeholder-portrait { aspect-ratio: 4 / 5; }
.project-logo-ghost { width: 220px; opacity: 0.25; filter: brightness(0) invert(1); }

.project-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.num { font-size: 12px; letter-spacing: 0.12em; color: var(--accent); font-weight: 500; }

.tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; letter-spacing: 0.02em;
  background: var(--n-800); color: var(--n-300);
}
.tag-outline { background: transparent; border: 1px solid var(--divider); color: var(--n-400); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }

.project-logo { width: 280px; margin-bottom: 18px; filter: brightness(0) invert(1); opacity: 0.92; }
.project-body h3 { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 14px; color: var(--n-300); }
.project-body > p { font-size: 15px; line-height: 1.7; color: var(--n-300); max-width: 46ch; }
.project-body > p:not(.tags):not(.project-meta) { margin-bottom: 22px; }

.next-slot {
  display: flex; align-items: flex-start; gap: 18px;
  margin-top: 40px; padding: 26px 28px;
  border: 1px dashed var(--divider); border-radius: var(--radius-md);
}
.next-slot .num { color: var(--n-500); padding-top: 4px; }
.next-slot p { font-size: 14px; line-height: 1.6; color: var(--n-400); max-width: 62ch; }

/* ---------- about ---------- */

.about { display: grid; gap: 36px; align-items: start; }

.about-copy h3 { font-size: clamp(22px, 3.4vw, 28px); letter-spacing: -0.025em; margin-bottom: 16px; max-width: 26ch; }
.about-copy p { font-size: 15px; line-height: 1.75; color: var(--n-300); max-width: 54ch; margin-bottom: 16px; }

.placeholder-note {
  font-size: 13px !important; color: var(--accent-300) !important;
  border-left: none; padding: 0;
}

/* ---------- contact ---------- */

.contact { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .contact { grid-template-columns: 1.15fr 1fr; gap: 64px; } }

.contact-copy h2 {
  font-size: clamp(30px, 5vw, 42px); letter-spacing: -0.03em;
  line-height: 1.1; max-width: 20ch; margin-bottom: 16px;
}
.contact-copy > p { font-size: 16px; line-height: 1.7; color: var(--n-300); max-width: 46ch; margin-bottom: 26px; }
.contact-copy .placeholder-note { margin-top: 20px; }

.card {
  background: var(--surface); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 24px;
}
.contact-form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--n-400); }

input, textarea {
  font: inherit; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--divider);
  border-radius: var(--radius-sm); padding: 11px 12px; width: 100%;
  min-height: 44px;
}
textarea { resize: vertical; min-height: 96px; }
input::placeholder, textarea::placeholder { color: var(--n-500); }
input:hover, textarea:hover { border-color: var(--n-500); }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--accent); }

.form-status { font-size: 13px; color: var(--accent-300); min-height: 1.2em; }

::selection { background: rgba(145, 132, 217, 0.35); }

/* ---------- footer ---------- */

.site-footer { padding: 96px 0 48px; }
@media (min-width: 700px) { .site-footer { padding-top: 140px; } }
.site-footer .rule-full { margin-bottom: 22px; }

.footer-inner {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--n-500);
}
