/* Kreva — shared styles */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ink: #121212;
  --ink-70: #121212b3;
  --ink-50: #12121280;
  --ink-20: #12121233;
  --ink-10: #1212121a;
  --paper: #F2EEE6;
  --paper-2: #E8E3D8;
  --paper-3: #DCD5C6;
  --accent: #D84315;     /* signal red — Space10 energy */
  --accent-ink: #FFFFFF;
  --lime: #C8E86A;
  --sky: #A8C5E8;
  --butter: #F0D878;
  --clay: #C7805A;
  --mute: #6E6A62;
  --rule: #12121222;
  --radius: 0px;
  --ease: cubic-bezier(.2,.7,.2,1);

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

[data-theme="dark"] {
  --ink: #EFEADD;
  --ink-70: #EFEADDb3;
  --ink-50: #EFEADD80;
  --ink-20: #EFEADD33;
  --ink-10: #EFEADD1a;
  --paper: #141311;
  --paper-2: #1D1B17;
  --paper-3: #25221C;
  --accent: #FF6B3D;
  --accent-ink: #141311;
  --rule: #EFEADD22;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
  text-rendering: optimizeLegibility;
  transition: background .3s var(--ease), color .3s var(--ease);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* Layout */
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 32px; }
.rule { height: 1px; background: var(--rule); border: 0; width: 100%; }

/* Type */
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.serif-i { font-family: var(--serif); font-style: italic; font-weight: 400; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.025em;
  font-size: clamp(64px, 12vw, 220px);
}
.h1 { font-family: var(--serif); font-size: clamp(48px, 7vw, 112px); line-height: .95; letter-spacing: -.02em; font-weight: 400; }
.h2 { font-family: var(--serif); font-size: clamp(36px, 5vw, 72px); line-height: 1.0; letter-spacing: -.02em; font-weight: 400; }
.h3 { font-family: var(--sans); font-size: 22px; line-height: 1.25; font-weight: 500; letter-spacing: -.01em; }
.lead { font-family: var(--sans); font-size: clamp(18px, 1.4vw, 22px); line-height: 1.4; color: var(--ink-70); max-width: 60ch; font-weight: 400; }
.body { font-size: 15px; line-height: 1.55; color: var(--ink-70); }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-70);
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.nav-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 16px 32px;
}
.brand {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -.02em;
  line-height: 1;
  display: flex; align-items: baseline; gap: 8px;
}
.brand-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; display: inline-block; transform: translateY(-4px); }
.nav-links { display: flex; gap: 28px; justify-content: center; }
.nav-links a { font-size: 14px; letter-spacing: -.005em; position: relative; padding: 4px 0; }
.nav-links a.active::after,
.nav-links a:hover::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--ink);
}
.nav-right { display: flex; gap: 12px; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  transition: transform .2s var(--ease), background .2s var(--ease);
  letter-spacing: -.005em;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn .arrow { width: 14px; height: 14px; }
.btn:hover .arrow { transform: translateX(3px); transition: transform .2s var(--ease); }

/* Footer */
.foot {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 40px;
  margin-top: 120px;
}
.foot .wordmark {
  font-family: var(--serif);
  font-size: clamp(80px, 18vw, 280px);
  line-height: .85;
  letter-spacing: -.03em;
  color: var(--paper);
  padding: 0 32px;
  position: relative;
}
.foot .wordmark .star { color: var(--accent); }
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 80px 32px 40px;
  border-top: 1px solid var(--paper);
  margin-top: 40px;
}
.foot-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #EFEADD80; font-weight: 500; margin-bottom: 16px; }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { font-size: 14px; color: var(--paper); }
.foot-col a:hover { color: var(--accent); }
.foot-bottom {
  display: flex; justify-content: space-between;
  padding: 24px 32px;
  border-top: 1px solid #EFEADD22;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: #EFEADD80;
}

/* Theme toggle */
.theme-tog {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color .2s var(--ease);
}
.theme-tog:hover { border-color: var(--ink); }
.theme-tog svg { width: 14px; height: 14px; }

/* Utility */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--ink-20);
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase;
  line-height: 1;
}
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--paper-2);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: -.005em;
}

/* Marquee */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 16px 0;
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 64px);
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: marq 40s linear infinite;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 48px; }
.marquee .star { color: var(--accent); font-family: var(--sans); }
@keyframes marq {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Sections */
section { padding: 96px 0; }
.section-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  margin-bottom: 56px;
  align-items: baseline;
}
.section-head .idx {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-70);
}

/* Common card */
.card {
  background: var(--paper-2);
  padding: 32px;
  position: relative;
  border: 1px solid transparent;
  transition: background .2s var(--ease);
}
.card:hover { background: var(--paper-3); }

/* Responsive */
@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .nav-row { padding: 14px 20px; grid-template-columns: auto auto; }
  .nav-links { display: none; }
  .section-head { grid-template-columns: 1fr; gap: 12px; }
  .foot-grid { grid-template-columns: 1fr 1fr; padding: 60px 20px 32px; }
}
