/* nunu.run — minimal light brand surface
   Tokens aligned with theme_nescode_v2 */

:root {
  --bg: #FBF9F9;
  --text: #121212;
  --text-muted: #4A4A4A;
  --text-subtle: #757575;
  --accent: #FFB800;
  --accent-text: #271900;
  --border: #E5E5E5;
  --surface: #FFFFFF;
  --surface-muted: #F7F7F7;
  --footer-bg: #EAEAEA;
  --green: #27C93F;
  --max: 1120px;
  --font-display: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--text);
}

strong {
  font-weight: 600;
}

.shell {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 1rem;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  font-weight: 600;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 0.45rem 0.85rem;
  background: var(--text);
  color: var(--bg) !important;
  font-size: 0.8125rem;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--accent-text) !important;
}

@media (max-width: 720px) {
  .nav a:not(.nav-cta) {
    display: none;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.7rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #e6a600;
  color: var(--accent-text);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--text);
}

/* Hero */

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 0 0;
  overflow: hidden;
}

.hero-inner {
  padding-bottom: 4rem;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero-brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4.5rem, 16vw, 9rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  color: var(--text);
}

.hero-headline {
  margin: 0 0 1rem;
  max-width: 18ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0 0 2rem;
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-wave {
  margin-top: auto;
  width: 100%;
  height: clamp(72px, 12vw, 120px);
  pointer-events: none;
}

.wave-svg {
  width: 100%;
  height: 100%;
}

.wave-path--accent {
  stroke-dasharray: 480 960;
  animation: wave-drift 8s linear infinite;
}

.wave-path--soft {
  stroke-dasharray: 360 1080;
  animation: wave-drift 14s linear infinite reverse;
}

@keyframes wave-drift {
  to {
    stroke-dashoffset: -1440;
  }
}

/* Sections */

.section {
  padding: clamp(4.5rem, 10vw, 7rem) 0;
  border-top: 1px solid var(--border);
}

.section--band {
  background: var(--surface-muted);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

@media (max-width: 800px) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.section-label {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.section-title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.section-copy {
  margin: 0 0 1.15rem;
  max-width: 40rem;
  color: var(--text-muted);
}

.section-copy:last-child {
  margin-bottom: 0;
}

.section-copy--accent-note {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
}

/* Pillars — not cards; hairline rows */

.pillars {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  max-width: 40rem;
  border-top: 1px solid var(--border);
}

.pillars li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 520px) {
  .pillars li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

.pillar-key {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  padding-top: 0.2rem;
}

.pillar-val {
  color: var(--text-muted);
}

/* Name / quote */

.origin-quote {
  margin: 0 0 1.5rem;
  padding: 0 0 0 1.25rem;
  border-left: 3px solid var(--accent);
  max-width: 36rem;
}

.origin-quote p {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--text);
}

.origin-quote em {
  font-style: italic;
  font-weight: 500;
}

/* Architecture diagram */

.arch {
  margin-top: 2.5rem;
  max-width: 44rem;
}

.arch-layer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  padding: 1rem 0;
}

.arch-layer--human .arch-name {
  font-weight: 600;
  color: var(--text);
}

.arch-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  min-width: 5.5rem;
}

.arch-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.arch-rail {
  height: 1.25rem;
  width: 1px;
  margin-left: 2.4rem;
  background: linear-gradient(to bottom, var(--border), var(--accent), var(--border));
  opacity: 0.9;
}

.arch-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0.35rem 0 0.75rem;
}

@media (max-width: 640px) {
  .arch-row {
    grid-template-columns: 1fr;
  }
}

.arch-row .arch-layer {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.arch-row--dense {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 1rem 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.arch-layer--tools {
  border-bottom: none;
}

.arch-layer--tools .arch-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0;
}

/* CTA */

.section--cta {
  background: var(--bg);
}

.cta-inner {
  max-width: 36rem;
}

.cta-copy {
  margin-bottom: 1.75rem;
}

.cta-form .hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cta-form {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cta-form input {
  flex: 1 1 16rem;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  outline: none;
}

.cta-form input:focus {
  border-color: var(--text);
}

.cta-form .btn {
  flex: 0 0 auto;
}

.form-note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-subtle);
}

.form-note a {
  color: var(--text-muted);
}

.form-note.is-success {
  color: var(--text);
}

.form-note.is-error {
  color: #8a1f1f;
}

/* Footer */

.site-footer {
  background: var(--footer-bg);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark--footer {
  font-size: 1.75rem;
}

.footer-meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

/* Reveal on scroll */

[data-reveal] {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

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

  .pulse-dot,
  .wave-path--accent,
  .wave-path--soft {
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
