/* ============================================================
   Pixel Pane — site styles
   Palette: mostly black, warm off-white, single beige accent.
   Type: Geist (display) · system sans (body) ·
         JetBrains Mono (micro-labels).
   ============================================================ */

:root {
  --ink:          #0b0b0c;   /* page background            */
  --ink-raised:   #121214;   /* faint raised surfaces      */
  --paper:        #f3efe6;   /* primary text (warm white)  */
  --beige:        #c9b896;   /* the one accent             */
  --beige-deep:   #b8a47e;
  --muted:        rgba(243, 239, 230, 0.56);
  --faint:        rgba(243, 239, 230, 0.34);
  --line:         rgba(243, 239, 230, 0.12);
  --line-strong:  rgba(243, 239, 230, 0.30);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
          system-ui, Helvetica, Arial, sans-serif;
  --display: "Geist", -apple-system, "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1160px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* faint grain-free vignette so pure black doesn't feel flat */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(120% 80% at 50% -10%, rgba(201,184,150,0.05), transparent 55%);
}

a { color: inherit; text-decoration: none; }
em { font-style: italic; }

/* ── structural frame ──────────────────────────────────────── */
.frame { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.frame-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
}
.frame-line--left  { left: max(calc((100vw - var(--maxw)) / 2), var(--gutter)); }
.frame-line--right { right: max(calc((100vw - var(--maxw)) / 2), var(--gutter)); }
@media (max-width: 720px) { .frame { display: none; } }

/* ── shared layout ─────────────────────────────────────────── */
.site-header,
.hero,
.demo,
.how,
.principles,
.access,
.footer-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 2;
}

.rule {
  border: 0;
  height: 1px;
  background: var(--line);
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ── micro-labels ──────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow-dot {
  width: 6px; height: 6px;
  background: var(--beige);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(201,184,150,0.14);
}

/* ── header ────────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  padding-bottom: 26px;
}
.wordmark { display: flex; align-items: center; gap: 11px; }
.wordmark-mark { color: var(--paper); display: flex; }
.wordmark-text {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}
.site-nav a:hover { color: var(--paper); }
.nav-cta {
  color: var(--paper) !important;
  border: 1px solid var(--line-strong);
  padding: 8px 16px;
  border-radius: 999px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav-cta:hover { border-color: var(--beige); background: rgba(201,184,150,0.08); }
@media (max-width: 600px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

/* ── buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease),
              border-color 0.3s var(--ease), color 0.3s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
button.btn { cursor: pointer; font: inherit; -webkit-appearance: none; appearance: none; }
button.btn.btn--lg { font-family: var(--mono); font-size: 14px; }
.btn.is-copied { background: var(--paper); transform: none; }
.btn--primary {
  background: var(--beige);
  color: #1a160d;
  font-weight: 500;
}
.btn--primary:hover { background: var(--paper); }
.btn--ghost {
  border-color: var(--line-strong);
  color: var(--paper);
}
.btn--ghost:hover { border-color: var(--beige); background: rgba(201,184,150,0.07); }
.btn--lg { padding: 17px 34px; font-size: 14px; }

/* ════════════════════════════ HERO ════════════════════════ */
.hero {
  padding-top: clamp(64px, 12vw, 132px);
  padding-bottom: clamp(56px, 10vw, 112px);
}
.hero-copy { max-width: 820px; }
.hero-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(42px, 6.8vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  margin: 0 0 26px;
}
.hero-title em { color: var(--beige); font-style: normal; }
.hero-sub {
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.62;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 36px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }
.hero-meta {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
}
.hero-meta li {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--faint);
  position: relative;
  padding-left: 18px;
}
.hero-meta li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 8px; height: 1px;
  background: var(--beige);
  transform: translateY(-50%);
}


/* ════════════════════════ HOW IT WORKS ════════════════════ */
.section-head { max-width: 640px; margin-bottom: clamp(48px, 7vw, 80px); }
.how, .principles, .access { padding-top: clamp(72px, 11vw, 130px); padding-bottom: clamp(72px, 11vw, 130px); }
.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
}
.section-lede {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  max-width: 56ch;
  margin: 0;
}

.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 56px);
}
.step { position: relative; padding-top: 30px; }
.step::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--line);
}
.step-index {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--beige);
}
.step-icon { display: block; width: 76px; height: 76px; margin: 22px 0 24px; }
.step-icon .line-art { width: 100%; height: 100%; overflow: visible; }
.step-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.step-body { color: var(--muted); font-size: 15.5px; line-height: 1.6; margin: 0; max-width: 34ch; }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { padding: 30px 0; }
}

/* ════════════════════════ PRINCIPLES ══════════════════════ */
.principles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.principles-statement .btn { margin-top: 30px; }
.principles-list { list-style: none; margin: 0; padding: 0; }
.principle {
  display: flex;
  gap: 22px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.principle:last-child { border-bottom: 1px solid var(--line); }
.principle-no {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--beige);
  line-height: 1.6;
  flex: none;
  width: 36px;
}
.principle h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
  line-height: 1.25;
}
.principle p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

@media (max-width: 820px) {
  .principles-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════ ACCESS ══════════════════════ */
.access { text-align: center; overflow: hidden; }
.access-art {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
  opacity: 0.9;
}
.access-copy { max-width: 620px; margin: 0 auto; }
.access-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.026em;
  margin: 0 0 20px;
}
.access-logo { display: flex; justify-content: center; margin-bottom: 26px; color: var(--paper); }
.access-logo svg { width: 84px; height: auto; }
.access .eyebrow { justify-content: center; }
.access-sub {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  max-width: 48ch;
  margin: 0 auto 36px;
}

/* ════════════════════════════ FOOTER ══════════════════════ */
.site-footer { border-top: 1px solid var(--line); position: relative; z-index: 2; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 30px;
  padding-bottom: 30px;
  flex-wrap: wrap;
}
.footer-mark { display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.footer-mark svg { width: 38px; height: auto; color: var(--paper); }
.footer-note, .footer-year {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
}

/* ════════════════════════════ DEMO ════════════════════════ */
.demo { padding-top: clamp(72px, 11vw, 130px); padding-bottom: clamp(72px, 11vw, 130px); }

.stage {
  position: relative;
  height: 400px;
  margin-top: 8px;
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(120% 75% at 50% -12%, rgba(201,184,150,0.12), transparent 52%),
    linear-gradient(180deg, #121215, #0a0a0b);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 50px 90px -50px rgba(0,0,0,0.9);
}
@media (max-width: 560px) { .stage { height: 360px; } }

/* faux macOS menu bar for context */
.menubar {
  position: absolute; top: 0; left: 0; right: 0; height: 27px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 15px;
  font-family: var(--sans); font-size: 11.5px; font-weight: 500;
  color: rgba(243,239,230,0.42);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  z-index: 1;
}
.mb-group { display: flex; align-items: center; gap: 15px; }
.mb-strong { color: rgba(243,239,230,0.72); font-weight: 600; }
.mb-logo { width: 11px; height: 13px; background: rgba(243,239,230,0.6);
  -webkit-mask: radial-gradient(circle at 50% 42%, #000 42%, transparent 43%);
  border-radius: 2px 2px 3px 3px; }
.mb-batt { width: 18px; height: 10px; border: 1px solid rgba(243,239,230,0.42);
  border-radius: 2px; position: relative; }
.mb-batt::before { content: ""; position: absolute; inset: 1.5px; right: 5px;
  background: rgba(243,239,230,0.42); border-radius: 1px; }
@media (max-width: 560px) { .menubar .mb-group span:nth-child(n+4) { display: none; } }

/* the notch itself */
.notch {
  position: absolute; top: 0; left: 50%;
  width: 210px; height: 30px;
  transform: translateX(-50%);
  background: #060608;
  border: 1px solid rgba(255,255,255,0.05); border-top: none;
  border-radius: 0 0 17px 17px;
  z-index: 5;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 12px 26px -12px rgba(0,0,0,0.7);
  transition:
    width  0.6s cubic-bezier(0.32, 1.28, 0.5, 1),
    height 0.6s cubic-bezier(0.32, 1.28, 0.5, 1),
    border-radius 0.5s ease,
    box-shadow 0.5s ease;
}
.notch.is-open, .notch:hover, .notch:focus-visible, .notch:focus-within {
  width: min(444px, calc(100% - 40px));
  height: 262px;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 50px 90px -34px rgba(0,0,0,0.9);
  outline: none;
}

/* collapsed content */
.notch-idle {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity 0.25s ease;
}
.notch.is-open .notch-idle, .notch:hover .notch-idle, .notch:focus-within .notch-idle {
  opacity: 0;
}

/* expanded panel */
.notch-panel {
  position: absolute; top: 0; left: 50%;
  width: min(444px, calc(100vw - 80px));
  transform: translate(-50%, -10px);
  padding: 15px 17px 17px;
  display: flex; flex-direction: column; gap: 11px;
  font-family: var(--sans);
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease, transform 0.4s ease;
}
.notch.is-open .notch-panel, .notch:hover .notch-panel, .notch:focus-within .notch-panel {
  opacity: 1; transform: translate(-50%, 0); pointer-events: auto;
  transition-delay: 0.16s;
}

.np-head { display: flex; align-items: center; justify-content: space-between; }
.np-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 14.5px; font-weight: 600; color: var(--paper); letter-spacing: -0.01em;
}
.np-status {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--beige); box-shadow: 0 0 0 3px rgba(201,184,150,0.2);
}
.np-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 5px 11px; border-radius: 8px;
}
.np-sub {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.01em;
  color: var(--faint); margin-top: -2px;
}
.np-mode {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content;
  font-family: var(--sans); font-size: 12.5px; color: var(--paper);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  padding: 7px 13px; border-radius: 9px; cursor: pointer;
}
.np-tools { display: flex; gap: 9px; }
.np-tool {
  width: 38px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 9px;
  color: var(--muted); transition: color 0.2s ease, border-color 0.2s ease;
}
.np-tool:hover { color: var(--beige); border-color: rgba(201,184,150,0.4); }
.np-input {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 7px 0 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 13px;
}
.np-placeholder {
  flex: 1; display: flex; align-items: center;
  font-size: 14px; color: var(--muted);
}
.np-caret {
  display: inline-block; width: 1.5px; height: 16px; margin-left: 2px;
  background: var(--beige);
}
.notch.is-open .np-caret, .notch:hover .np-caret, .notch:focus-within .np-caret {
  animation: caret 1.1s steps(1, end) infinite 0.7s;
}
.np-send {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--beige); color: #1a160d;
}

.stage-hint {
  position: absolute; left: 0; right: 0; top: 78px;
  text-align: center;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em;
  color: var(--faint);
  transition: opacity 0.3s ease;
  z-index: 4; pointer-events: none;
}
.notch.is-open ~ .stage-hint,
.stage:hover .stage-hint { opacity: 0; }

/* ════════════════════ line-draw animation ═════════════════ */
/* Default (no JS): art is fully drawn and static.
   When JS is present (.js on <html>) it hides the strokes and draws
   them in as each SVG scrolls into view. Progressive enhancement. */
.js .line-art .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.js .line-art.is-visible .draw {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.5s var(--ease);
}
/* stagger via nth-child delays */
.js .line-art.is-visible .draw:nth-child(1)  { transition-delay: 0.00s; }
.js .line-art.is-visible .draw:nth-child(2)  { transition-delay: 0.10s; }
.js .line-art.is-visible .draw:nth-child(3)  { transition-delay: 0.20s; }
.js .line-art.is-visible .draw:nth-child(4)  { transition-delay: 0.30s; }
.js .line-art.is-visible .draw:nth-child(5)  { transition-delay: 0.40s; }
.js .line-art.is-visible .draw:nth-child(6)  { transition-delay: 0.50s; }
.js .line-art.is-visible .draw:nth-child(7)  { transition-delay: 0.60s; }
.js .line-art.is-visible .draw:nth-child(8)  { transition-delay: 0.70s; }
.js .line-art.is-visible .draw:nth-child(9)  { transition-delay: 0.80s; }
.js .line-art.is-visible .draw:nth-child(10) { transition-delay: 0.90s; }

/* blinking caret, only once everything is drawn */
.js .line-art.is-visible .blink {
  animation: caret 1.1s steps(1, end) infinite 1.5s;
}
@keyframes caret { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .line-art .draw { stroke-dashoffset: 0 !important; }
  .js .line-art.is-visible .draw { transition: none; }
  .js .line-art.is-visible .blink { animation: none; }
  .btn:hover { transform: none; }
}
