/* ============================================================
   Narwall Labs — static site
   Arctic-ink theme · Space Grotesk / Inter / IBM Plex Mono
   ============================================================ */

:root {
  --ink:        #0B0F14;
  --ink-2:      #0d1922;
  --panel:      #121A22;
  --panel-2:    #16212b;
  --line:       rgba(255,255,255,0.09);
  --line-strong:rgba(255,255,255,0.18);
  --text:       #E6EDF3;
  --muted:      #8A97A6;
  --muted-2:    #63707e;
  --accent:     #4DE1C1;   /* glacial cyan */
  --accent-dim: #2f9d89;
  --amber:      #F5A623;   /* signal amber, sparing */

  --maxw: 1140px;
  --pad: clamp(20px, 5vw, 48px);

  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  font-family: var(--f-mono);
  font-size: 13px;
  z-index: 200;
}
.skip-link:focus { left: 0; }

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

/* ---------- shared type ---------- */
.eyebrow, .marker {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0;
}
.marker { color: var(--muted); }
.marker::first-line { color: var(--accent); }

.accent { color: var(--accent); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-text { font-size: 19px; }
.brand-dim { color: var(--muted); font-weight: 500; margin-left: 3px; }

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 15px;
}
.nav a {
  color: var(--muted);
  transition: color .2s var(--ease);
  font-weight: 500;
}
.nav a:hover { color: var(--text); }
.nav .nav-cta {
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding: 8px 16px;
  border-radius: 999px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav .nav-cta:hover { background: var(--accent); color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}
.mobile-nav a {
  padding: 16px var(--pad);
  color: var(--text);
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 15px;
}
.mobile-nav.open { display: flex; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg .sonar { width: 100%; height: 100%; }
.hero-bg .rings circle { opacity: 0.10; }
.hero-bg .rings circle:nth-child(1) { opacity: 0.22; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 70% 30%, #000 0%, transparent 75%);
}
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 55%, var(--ink) 100%),
              linear-gradient(90deg, var(--ink) 8%, transparent 55%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; padding-block: 80px; max-width: 780px; }

.eyebrow { margin-bottom: 22px; }

.hero-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--muted);
  max-width: 44ch;
  margin: 0 0 38px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--ink); font-weight: 500; }
.btn-primary:hover { background: #6cf0d4; }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.scroll-cue {
  position: absolute;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-cue span {
  width: 3px; height: 8px;
  border-radius: 2px;
  background: var(--accent);
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0%{opacity:0;transform:translateY(-4px)} 40%{opacity:1} 100%{opacity:0;transform:translateY(12px)} }

/* ============================================================
   Sections
   ============================================================ */
.section { padding-block: clamp(70px, 11vw, 130px); }
.section-head { margin-bottom: 48px; }
.marker { margin-bottom: 12px; }
.section-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

/* ---------- Work cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--ink-2) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 22px 50px -30px rgba(77,225,193,0.5);
}
.card-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.02);
  transition: transform .5s var(--ease), filter .3s var(--ease);
}
.card:hover .card-media img { transform: scale(1.05); filter: saturate(1.05); }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-kicker {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin: 0;
}
.card-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0;
  letter-spacing: -0.01em;
}
.card-text { color: var(--muted); font-size: 0.98rem; margin: 0 0 4px; }
.card-link {
  margin-top: auto;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--text);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  transition: gap .2s var(--ease), color .2s var(--ease);
}
.card-link:hover { color: var(--accent); gap: 12px; }
.card-link .i-arrow { transition: transform .2s var(--ease); }
.card-link:hover .i-arrow { transform: translateX(3px); }

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  align-items: stretch;
}
.member {
  display: flex;
  gap: 26px;
  align-items: center;
  background: linear-gradient(180deg, var(--panel) 0%, var(--ink-2) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.member-photo {
  flex: 0 0 132px;
  width: 132px; height: 132px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  position: relative;
}
.member-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(11,15,20,0.5));
}
.member-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.15); }
.member-role {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 4px;
  letter-spacing: 0.03em;
}
.member-name {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.6rem;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.member-bio { color: var(--muted); font-size: 0.98rem; margin: 0 0 16px; }
.member-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.member-social:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

.team-note {
  background:
    radial-gradient(140% 100% at 100% 0%, rgba(77,225,193,0.08), transparent 60%),
    var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.team-note-text { color: var(--text); font-size: 1.05rem; margin: 0; }

/* ---------- Contact ---------- */
.contact {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(77,225,193,0.07), transparent 55%);
}
.contact-inner { max-width: 720px; }
.contact .marker { margin-bottom: 14px; }
.contact-lead { color: var(--muted); font-size: 1.15rem; margin: 18px 0 34px; max-width: 52ch; }
.contact-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}
.contact-email {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--accent);
  letter-spacing: -0.01em;
  border-bottom: 2px solid transparent;
  transition: border-color .2s var(--ease);
}
.contact-email:hover { border-color: var(--accent); }
.contact-loc {
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.contact-loc svg { color: var(--accent); vertical-align: -2px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink-2);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: 34px;
}
.brand-sm .brand-text { font-size: 16px; }
.footer-nav { display: flex; gap: 24px; font-family: var(--f-mono); font-size: 13px; }
.footer-nav a { color: var(--muted); transition: color .2s var(--ease); }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { font-family: var(--f-mono); font-size: 13px; color: var(--muted-2); margin: 0; }

/* ============================================================
   Reveal animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { transition-delay: .05s; }
.hero .hero-title.reveal { transition-delay: .12s; }
.hero .hero-sub.reveal { transition-delay: .2s; }
.hero .hero-actions.reveal { transition-delay: .28s; }

.tusk {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 2.6s var(--ease) .3s forwards;
}
.tusk-2 { animation-delay: .5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .team-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .member { flex-direction: column; text-align: center; align-items: center; }
  .member-social { align-self: center; }
  .hero::after { background: linear-gradient(180deg, transparent 60%, var(--ink) 100%); }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tusk { animation: none; stroke-dashoffset: 0; }
  .scroll-cue span { animation: none; }
  .card:hover, .btn:hover { transform: none; }
}
