/* G-IA-N prototype | local, flat files, no external dependencies */
:root {
  --bg: #101323;
  --bg-2: #15192b;
  --surface: rgba(255,255,255,.065);
  --surface-strong: rgba(255,255,255,.11);
  --text: #f9efe4;
  --muted: #b8bac7;
  --line: rgba(249,239,228,.14);
  --brand: #ff6748;
  --brand-2: #e64932;
  --sand: #f9e7d7;
  --mint: #9fe3d2;
  --amber: #f2c572;
  --violet: #b7a7ff;
  --danger: #ff856d;
  --success: #72e3bd;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
  --radius: 20px;
  --radius-sm: 12px;
  --max: 1180px;
  --nav-h: 72px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f7f2eb;
  --bg-2: #fffaf4;
  --surface: rgba(16,19,35,.06);
  --surface-strong: rgba(16,19,35,.10);
  --text: #111424;
  --muted: #565b6c;
  --line: rgba(16,19,35,.14);
  --brand: #d94a31;
  --brand-2: #b83d2b;
  --sand: #332b26;
  --shadow: 0 24px 70px rgba(21,21,30,.15);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 18% 12%, rgba(255,103,72,.16), transparent 30%),
              radial-gradient(circle at 80% 0%, rgba(159,227,210,.10), transparent 28%),
              linear-gradient(145deg, var(--bg), var(--bg-2));
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.78), transparent 72%);
  opacity: .55;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }

.shell { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.section { padding: 86px 0; position: relative; }
.section.compact { padding: 54px 0; }

.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 16px; top: 16px; background: var(--brand); color: #111424; padding: 10px 14px; border-radius: 10px; z-index: 99; }

.nav {
  height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 900; letter-spacing: .02em; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand small { display: block; font-weight: 600; color: var(--muted); letter-spacing: .04em; font-size: 11px; margin-top: -3px; }
.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-links a { color: var(--muted); font-weight: 650; font-size: 14px; padding: 9px 10px; border: 1px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); border-color: var(--line); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn, .primary-btn, .ghost-btn, .mini-btn {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 13px;
  font-weight: 800;
  transition: transform .22s ease, background .22s ease, border .22s ease, box-shadow .22s ease;
}
.icon-btn:hover, .primary-btn:hover, .ghost-btn:hover, .mini-btn:hover { transform: translateY(-2px); background: var(--surface-strong); }
.primary-btn { color: #111424; background: linear-gradient(135deg, var(--brand), #ff8c63); border-color: transparent; box-shadow: 0 14px 34px rgba(255,103,72,.22); }
.ghost-btn { background: transparent; }
.mini-btn { padding: 8px 10px; font-size: 13px; }
.menu-btn { display: none; }

.mobile-panel { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 60; background: var(--bg); border-bottom: 1px solid var(--line); padding: 16px 20px 20px; box-shadow: var(--shadow); }
.mobile-panel.open { display: block; }
.mobile-panel a { display: block; padding: 14px 0; color: var(--muted); font-weight: 800; border-bottom: 1px solid var(--line); }

.hero { min-height: calc(100svh - var(--nav-h)); display: grid; align-items: center; padding: 74px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 54px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 800; border: 1px solid var(--line); background: var(--surface); padding: 8px 12px; border-radius: 999px; font-size: 13px; }
.eyebrow:before { content: ""; width: 9px; height: 9px; background: var(--brand); display: inline-block; box-shadow: 0 0 0 6px rgba(255,103,72,.15); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(42px, 7vw, 86px); line-height: .94; letter-spacing: -.06em; margin: 18px 0 22px; }
h2 { font-size: clamp(32px, 4.5vw, 56px); line-height: 1; letter-spacing: -.045em; margin-bottom: 18px; }
h3 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 10px; }
.lead { color: var(--muted); font-size: clamp(17px, 1.8vw, 22px); max-width: 780px; }
.hero .lead { max-width: 650px; }
.mark { color: var(--brand); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.trust-row span { color: var(--muted); font-weight: 700; border: 1px solid var(--line); background: rgba(0,0,0,.08); padding: 8px 10px; border-radius: 10px; font-size: 13px; }

.hero-visual { position: relative; min-height: 530px; perspective: 1200px; }
.process-board {
  position: relative;
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotateX(3deg) rotateY(-4deg);
}
.process-board:before { content: ""; position: absolute; inset: -2px; background: radial-gradient(circle at 70% 20%, rgba(255,103,72,.20), transparent 30%); pointer-events: none; }
.board-top { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 16px 18px; }
.window-dots { display: flex; gap: 7px; }
.window-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.window-dots i:nth-child(1) { background: var(--brand); }
.window-dots i:nth-child(2) { background: var(--amber); }
.window-dots i:nth-child(3) { background: var(--mint); }
.status-pill { color: var(--muted); font-weight: 800; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.floating-card {
  position: absolute;
  width: min(255px, 42%);
  padding: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0,0,0,.28);
  animation: floatCard 6s ease-in-out infinite;
}
.floating-card b { display: block; margin-bottom: 6px; }
.floating-card p { color: var(--muted); margin: 0; font-size: 13px; }
.floating-card .tag { display: inline-flex; margin-bottom: 9px; color: #111424; background: var(--sand); padding: 4px 8px; border-radius: 8px; font-size: 11px; font-weight: 900; }
.floating-card.c1 { left: 8%; top: 18%; border-color: rgba(255,103,72,.45); }
.floating-card.c2 { left: 52%; top: 15%; animation-delay: -1.4s; border-color: rgba(159,227,210,.45); }
.floating-card.c3 { left: 16%; top: 50%; animation-delay: -2.2s; border-color: rgba(242,197,114,.45); }
.floating-card.c4 { left: 57%; top: 52%; animation-delay: -3s; border-color: rgba(183,167,255,.45); }
.path-line { position: absolute; left: 50%; top: 35%; width: 250px; height: 170px; border-top: 2px dashed rgba(249,231,215,.36); border-right: 2px dashed rgba(249,231,215,.36); transform: translateX(-50%) rotate(-8deg); opacity: .8; }
.pixel-guide { position: absolute; right: 28px; bottom: 26px; width: 142px; height: 142px; border-radius: 28px; background: #101323; border: 1px solid rgba(255,255,255,.18); display: grid; place-items: center; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.pixel-guide img { width: 94px; height: 94px; }
.pulse-orb { position: absolute; left: 43%; bottom: 52px; width: 72px; height: 72px; border: 1px solid rgba(255,103,72,.8); animation: pulse 2.8s ease infinite; }
@keyframes floatCard { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse { 0% { transform: scale(.82); opacity: .6; } 100% { transform: scale(1.6); opacity: 0; } }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: 0 14px 40px rgba(0,0,0,.12); position: relative; overflow: hidden; }
.card:after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(255,255,255,.09), transparent 45%); opacity: .6; }
.card > * { position: relative; z-index: 1; }
.card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.card .num { color: var(--brand); font-weight: 900; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.card p, .muted { color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge { border: 1px solid var(--line); color: var(--muted); background: rgba(0,0,0,.08); padding: 6px 8px; border-radius: 9px; font-size: 12px; font-weight: 800; }

.manifesto { display: grid; grid-template-columns: .95fr 1.05fr; gap: 34px; align-items: start; }
.quote-card { border: 1px solid rgba(255,103,72,.32); background: linear-gradient(145deg, rgba(255,103,72,.14), var(--surface)); border-radius: 28px; padding: 32px; }
.quote-card strong { font-size: clamp(28px, 3.5vw, 48px); line-height: 1.02; letter-spacing: -.045em; display: block; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.check-list li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; color: var(--muted); }
.check-list li:before { content: "✓"; display: grid; place-items: center; width: 25px; height: 25px; background: rgba(159,227,210,.15); color: var(--mint); border: 1px solid rgba(159,227,210,.35); font-weight: 900; }

.demo-zone { border: 1px solid var(--line); background: rgba(0,0,0,.12); border-radius: 28px; overflow: hidden; }
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px; border-bottom: 1px solid var(--line); }
.demo-body { display: grid; grid-template-columns: 330px 1fr; gap: 0; }
.demo-side { border-right: 1px solid var(--line); padding: 18px; background: rgba(255,255,255,.035); }
.demo-main { padding: 18px; }
.demo-message { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.demo-message small { color: var(--brand); font-weight: 900; text-transform: uppercase; }
.flow-canvas { min-height: 330px; border: 1px dashed var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 12px; align-content: start; }
.flow-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px; }
.flow-row .step { display: grid; place-items: center; min-width: 34px; height: 34px; background: var(--brand); color: #111424; font-weight: 950; }
.flow-row .owner { color: var(--muted); font-size: 13px; font-weight: 750; }

.kicker { color: var(--brand); font-weight: 950; letter-spacing: .13em; text-transform: uppercase; font-size: 12px; }
.feature-strip { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-top: 30px; }
.strip-item { border: 1px solid var(--line); background: var(--surface); padding: 16px; min-height: 130px; display: flex; flex-direction: column; justify-content: space-between; }
.strip-item b { font-size: 17px; }
.strip-item small { color: var(--muted); font-weight: 700; }

.path-card { min-height: 310px; display: flex; flex-direction: column; justify-content: space-between; }
.path-card .icon { width: 48px; height: 48px; display: grid; place-items: center; background: rgba(255,103,72,.13); border: 1px solid rgba(255,103,72,.32); margin-bottom: 16px; font-weight: 950; color: var(--brand); }
.path-card ul { margin: 16px 0 0; padding-left: 18px; color: var(--muted); }

.evidence-source { color: var(--muted); font-size: 13px; margin-top: 10px; }
.source-link { color: var(--brand); font-weight: 900; border-bottom: 1px dashed currentColor; }

.footer { padding: 45px 0; border-top: 1px solid var(--line); color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }

/* Simulators */
.sim-layout { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.sim-nav { position: sticky; top: calc(var(--nav-h) + 18px); }
.sim-nav a { display: block; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 8px; font-weight: 800; color: var(--muted); }
.sim-nav a:hover { color: var(--text); border-color: var(--brand); }
.score-panel { margin-top: 16px; }
.score-number { font-size: 48px; font-weight: 950; letter-spacing: -.04em; }
.progress { height: 10px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand), var(--mint)); transition: width .4s ease; }
.quiz { display: grid; gap: 12px; }
.option { text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 14px; border-radius: 12px; font-weight: 750; }
.option:hover { border-color: var(--brand); }
.option.correct { border-color: var(--success); background: rgba(114,227,189,.12); }
.option.wrong { border-color: var(--danger); background: rgba(255,133,109,.12); }
.drag-bank, .drop-zone { display: flex; flex-wrap: wrap; gap: 10px; min-height: 64px; border: 1px dashed var(--line); background: rgba(0,0,0,.08); padding: 12px; border-radius: 14px; }
.drag-card { border: 1px solid var(--line); background: var(--surface-strong); padding: 10px 12px; border-radius: 12px; font-weight: 850; user-select: none; }
.drag-card[draggable="true"] { cursor: grab; }
.drop-zone.over { border-color: var(--brand); background: rgba(255,103,72,.10); }
.result-box { display: none; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 16px; margin-top: 14px; }
.result-box.show { display: block; }
.waste-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.waste-item { border: 1px solid var(--line); background: var(--surface); padding: 14px; border-radius: 14px; }
.waste-item label { display: block; font-weight: 800; margin-bottom: 8px; }
.waste-item select { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); padding: 10px; }
.prompt-builder { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.prompt-builder label { display: grid; gap: 7px; font-weight: 850; color: var(--muted); }
.prompt-builder input, .prompt-builder textarea, .feedback-form input, .feedback-form select, .feedback-form textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); padding: 12px; border-radius: 12px; }
.prompt-preview { white-space: pre-wrap; border: 1px solid var(--line); background: rgba(0,0,0,.14); padding: 16px; border-radius: 14px; color: var(--sand); }

/* Feedback */
.feedback-form { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.feedback-form .full { grid-column: 1 / -1; }
.feedback-list { display: grid; gap: 12px; margin-top: 18px; }
.feedback-item { border: 1px solid var(--line); background: var(--surface); padding: 14px; border-radius: 14px; }
.feedback-item b { color: var(--brand); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text); background: var(--surface); }
td { color: var(--muted); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero-grid, .manifesto, .grid-2, .demo-body, .sim-layout { grid-template-columns: 1fr; }
  .hero-visual { min-height: 430px; }
  .process-board { min-height: 430px; transform: none; }
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .feature-strip { grid-template-columns: 1fr 1fr; }
  .demo-side { border-right: none; border-bottom: 1px solid var(--line); }
  .sim-nav { position: static; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 26px, var(--max)); }
  .section { padding: 58px 0; }
  .grid-3, .grid-4, .feature-strip, .waste-grid, .prompt-builder, .feedback-form { grid-template-columns: 1fr; }
  .floating-card { width: 72%; }
  .floating-card.c2, .floating-card.c4 { left: 22%; }
  .pixel-guide { width: 100px; height: 100px; }
  .pixel-guide img { width: 72px; height: 72px; }
  .hero-actions { flex-direction: column; }
  .primary-btn, .ghost-btn { width: 100%; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  h1 { letter-spacing: -.045em; }
}
