/* ═══════════════════════════════════════════════════════════════
   MULLON VENTURES × GARGANTUA — stylesheet
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #030304;
  --ink: #e9e4da;
  --ink-dim: #9a938a;
  --accent: #e8a34b;      /* accretion amber   */
  --accent-hot: #ffd9a0;
  --line: rgba(233, 228, 218, 0.14);
  --card: rgba(10, 10, 14, 0.55);
  --card-hover: rgba(20, 18, 22, 0.72);
  --mono: "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --serifish: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); }
body {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(232, 163, 75, 0.35); }

/* ── Canvas ─────────────────────────────────────────────────── */
#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  outline: none;
}
body[data-mode="site"]    #gl { pointer-events: none; }
body[data-mode="explore"] #gl { pointer-events: auto; cursor: grab; }
body[data-mode="explore"] #gl:active { cursor: grabbing; }

body[data-mode="explore"] #site { display: none; }
body[data-mode="explore"] { overflow: hidden; }

/* ── GL overlay (context loss) ──────────────────────────────── */
.gl-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3, 3, 4, 0.92);
  backdrop-filter: blur(6px);
}
.gl-overlay-inner { text-align: center; max-width: 420px; padding: 24px; }
.gl-overlay-title {
  font-family: var(--mono); letter-spacing: 0.35em; color: var(--accent);
  margin-bottom: 12px; font-size: 14px;
}
.gl-overlay p { color: var(--ink-dim); margin-bottom: 20px; font-size: 15px; }

/* ── HUD ────────────────────────────────────────────────────── */
.hud { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.hud-block { position: absolute; padding: 14px 18px; }
.hud-tl { top: 52px; left: 0; }
.hud-tr { top: 52px; right: 0; text-align: right; }
.hud-bl { bottom: 0; left: 0; }
.hud-br { bottom: 0; right: 0; text-align: right; }
.hud-title {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em;
  color: var(--accent); margin-bottom: 6px;
}
.hud-mono {
  font-family: var(--mono); font-size: 11px; line-height: 1.75;
  color: rgba(233, 228, 218, 0.82); white-space: pre;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}
.hud-dim { color: rgba(233, 228, 218, 0.4); }
kbd {
  font-family: var(--mono); font-size: 0.85em; border: 1px solid var(--line);
  border-radius: 3px; padding: 0 4px;
}

/* ── Explore bar ────────────────────────────────────────────── */
.explore-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  background: linear-gradient(rgba(3,3,4,0.75), transparent);
}
.explore-bar-right { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ── Parameter panel ────────────────────────────────────────── */
.panel {
  position: fixed; top: 56px; right: 12px; bottom: 12px; z-index: 60;
  width: 308px; max-width: calc(100vw - 24px);
  background: rgba(6, 6, 9, 0.88);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--accent);
}
.panel-head-btns { display: flex; gap: 6px; }
.panel-presets {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.panel-body { overflow-y: auto; padding: 10px 14px 20px; flex: 1; }
.panel-body::-webkit-scrollbar { width: 6px; }
.panel-body::-webkit-scrollbar-thumb { background: rgba(233,228,218,0.15); border-radius: 3px; }

.param { margin-bottom: 11px; }
.param-label {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--ink-dim); margin-bottom: 3px;
}
.param-label b { color: var(--ink); font-weight: 500; }
.param input[type="range"] {
  width: 100%; height: 18px; -webkit-appearance: none; appearance: none;
  background: transparent; cursor: pointer;
}
.param input[type="range"]::-webkit-slider-runnable-track {
  height: 3px; background: rgba(233,228,218,0.18); border-radius: 2px;
}
.param input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); margin-top: -4.5px; border: none;
}
.param input[type="range"]::-moz-range-track {
  height: 3px; background: rgba(233,228,218,0.18); border-radius: 2px;
}
.param input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: none;
}
.param-group {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.25em;
  color: var(--accent); opacity: 0.8; margin: 16px 0 8px;
  border-bottom: 1px solid var(--line); padding-bottom: 4px;
}
.param-group:first-child { margin-top: 2px; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  padding: 10px 20px; border-radius: 6px; cursor: pointer;
  text-decoration: none; display: inline-block;
  transition: all 0.2s ease; border: 1px solid transparent;
  background: none; color: var(--ink);
}
.btn-solid {
  background: var(--accent); color: #140b02; border-color: var(--accent);
  font-weight: 600;
}
.btn-solid:hover { background: var(--accent-hot); border-color: var(--accent-hot); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: rgba(6,6,9,0.5); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost.active { border-color: var(--accent); color: var(--accent); }
.btn-mini {
  font-size: 10px; padding: 3px 8px; border: 1px solid var(--line);
  border-radius: 4px; color: var(--ink-dim);
}
.btn-mini:hover { color: var(--accent); border-color: var(--accent); }

/* ── Site ───────────────────────────────────────────────────── */
#site { position: relative; z-index: 10; }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
.nav.scrolled {
  background: rgba(3, 3, 4, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.28em;
}
.nav-logo svg { color: var(--accent); }
.nav-links { display: flex; gap: 30px; }
.nav-links a {
  color: var(--ink-dim); text-decoration: none; font-size: 14px;
  letter-spacing: 0.06em; transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-burger span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  margin: 5px 0; transition: 0.25s;
}

/* Hero */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px 28px 80px;
  position: relative;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero-kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.4em;
  color: var(--accent); margin-bottom: 22px;
}
.hero-title {
  font-family: var(--serifish);
  font-size: clamp(46px, 8.5vw, 104px);
  font-weight: 400; line-height: 1.03; letter-spacing: -0.015em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.75);
  margin-bottom: 26px;
}
.hero-sub {
  max-width: 560px; font-size: 19px; color: var(--ink-dim);
  text-shadow: 0 1px 12px rgba(0,0,0,0.8);
  margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 36px; border: 1px solid var(--line); border-radius: 12px;
}
.hero-scroll span {
  position: absolute; top: 6px; left: 50%; width: 3px; height: 7px;
  margin-left: -1.5px; border-radius: 2px; background: var(--accent);
  animation: scrollhint 2s infinite ease-in-out;
}
@keyframes scrollhint {
  0%   { transform: translateY(0);    opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 0; }
}

/* Sections */
.section { padding: 110px 28px; position: relative; }
.section-alt { background: linear-gradient(rgba(4,4,6,0.55), rgba(4,4,6,0.55)); }
.section-inner { max-width: var(--maxw); margin: 0 auto; }
.section-narrow { max-width: 720px; }
.section-kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.4em;
  color: var(--accent); margin-bottom: 16px;
}
.section h2 {
  font-family: var(--serifish); font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 400; line-height: 1.12; margin-bottom: 20px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.7);
}
.section-lead {
  max-width: 640px; color: var(--ink-dim); font-size: 18px; margin-bottom: 52px;
}

/* Cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px 26px;
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: rgba(232, 163, 75, 0.4);
}
.card h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; letter-spacing: 0.01em; }
.card p { color: var(--ink-dim); font-size: 15.5px; }
.card-num {
  font-family: var(--serifish); font-size: 30px; color: var(--accent);
  margin-bottom: 16px;
}
.card-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.28em;
  color: var(--accent); margin-bottom: 12px !important;
}

/* Timeline */
.timeline { list-style: none; max-width: 680px; position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px;
  width: 1px; background: linear-gradient(var(--accent), rgba(232,163,75,0.05));
}
.timeline li { position: relative; padding-bottom: 42px; }
.timeline li:last-child { padding-bottom: 0; }
.tl-marker {
  position: absolute; left: -30px; top: 7px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
}
.timeline h3 { font-size: 19px; margin-bottom: 6px; }
.timeline p { color: var(--ink-dim); font-size: 15.5px; max-width: 560px; }

/* Impact */
.impact-list {
  list-style: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px; max-width: 900px;
}
.impact-list li {
  padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); font-size: 15px; backdrop-filter: blur(6px);
  transition: border-color 0.25s;
}
.impact-list li:hover { border-color: rgba(232,163,75,0.4); }
.impact-list li::before { content: "◈ "; color: var(--accent); }

/* Contact */
.contact-form label {
  display: block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; color: var(--ink-dim); margin-bottom: 16px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form input, .contact-form select, .contact-form textarea {
  display: block; width: 100%; margin-top: 6px;
  background: rgba(10, 10, 14, 0.6); border: 1px solid var(--line);
  border-radius: 6px; color: var(--ink); font-family: var(--sans);
  font-size: 15px; padding: 12px 14px; outline: none;
  transition: border-color 0.2s;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  border-color: var(--accent);
}
.contact-form textarea { resize: vertical; }
.contact-form .btn { margin-top: 6px; }
.form-note { margin-top: 14px; color: var(--accent); font-size: 14px; font-family: var(--mono); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 54px 28px 90px; background: rgba(3,3,4,0.7); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer p:first-child { font-family: var(--serifish); font-size: 20px; margin-bottom: 18px; }
.footer-meta { color: var(--ink-dim); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; }
.footer-meta a { color: var(--ink-dim); }
.footer-meta a:hover { color: var(--accent); }
.footer-sim { margin-top: 26px; font-family: var(--mono); font-size: 11px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cards-3, .cards-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .cards-3, .cards-grid, .form-row { grid-template-columns: 1fr; }
  .nav-links {
    display: none; position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; gap: 0; background: rgba(3,3,4,0.96);
    border-bottom: 1px solid var(--line); padding: 10px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 28px; }
  .nav-burger { display: block; }
  .section { padding: 80px 20px; }
  .hero { padding: 110px 20px 70px; }
  .hud-tr { display: none; }
  .hud-br { display: none; }
  .panel { width: calc(100vw - 24px); }
}
