/* Shared marketing-site styles for opal-engine.com */
:root {
  --bg: #0b0c0e;
  --bg-soft: #0f1012;
  --surface: #141619;
  --card: #16181b;
  --card-2: #1d2024;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f3f4f5;
  --text-soft: #9aa0a6;
  --text-faint: #666c73;
  --accent: #b2ef84;
  --accent-press: #c8f5a4;
  --accent-ink: #0c1705;
  --accent-bg: rgba(178, 239, 132, 0.12);
  --accent-line: rgba(178, 239, 132, 0.30);
  --violet: #b69cf0;
  --violet-bg: rgba(182, 156, 240, 0.13);
  --amber: #e3c069;
  --amber-bg: rgba(227, 192, 105, 0.14);
  --sky: #84b6ef;
  --sky-bg: rgba(132, 182, 239, 0.14);
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;
  --maxw: 1120px;
  --fs: "Inter", ui-sans-serif, system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--fs);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.muted { color: var(--text-soft); }
.faint { color: var(--text-faint); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent-line);
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--r-md);
  padding: 11px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-press); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.22); }
.btn-sm { padding: 9px 14px; font-size: 13.5px; }
.icn {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -2px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* —— Nav —— */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 12, 14, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
  flex: none;
}
.brand svg { display: block; }
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 4px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  padding: 7px 11px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-links a.active { color: var(--text); }
.nav-cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-cta .signin {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
}
.nav-cta .signin:hover { color: var(--text); }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 18px; height: 18px; }
.nav-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 12px 28px 18px;
}
.nav-panel.open { display: block; }
.nav-panel a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
  border-bottom: 1px solid var(--line);
}
.nav-panel a:last-child { border-bottom: 0; }
.nav-panel a:hover { color: var(--text); }
.nav-panel .panel-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

/* —— Sections —— */
section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.sec-head { max-width: 36em; }
h2.sec {
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.sec-sub {
  font-size: 15.5px;
  color: var(--text-soft);
  margin-top: 10px;
  line-height: 1.55;
}
.sec-actions { margin-top: 22px; }

/* —— Game cards —— */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.gcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.15s ease;
  cursor: pointer;
  color: inherit;
  text-align: left;
  display: block;
  width: 100%;
  font: inherit;
}
.gcard:hover { border-color: var(--line-2); }
.gcard .thumb {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: #0a0b0e;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.02em;
  text-align: center;
  padding: 0 16px;
}
.gcard .thumb .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.15s;
}
.gcard:hover .thumb .play,
.gcard:focus-within .thumb .play { opacity: 1; }
@media (hover: none) {
  .gcard .thumb .play { opacity: 1; background: rgba(0, 0, 0, 0.22); }
}
.pbtn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
}
.gcard .body { padding: 13px 14px 14px; }
.gcard .title {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gcard .meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 550;
  margin-top: 7px;
}
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge.remix { background: var(--violet-bg); color: var(--violet); }

/* —— Empty state —— */
.empty-state {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--surface), var(--bg));
  padding: 48px 28px;
  text-align: center;
}
.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.empty-state p {
  color: var(--text-soft);
  font-size: 14.5px;
  max-width: 34em;
  margin: 10px auto 22px;
}
.empty-state .cta-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* —— Features —— */
.feat {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 32px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.fcard {
  background: var(--card);
  padding: 22px 20px;
}
.fcard .fi {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  color: var(--accent);
  margin-bottom: 14px;
}
.fcard .fi svg { width: 18px; height: 18px; }
.fcard h3 { font-size: 14.5px; font-weight: 650; margin-bottom: 6px; }
.fcard p { font-size: 13.5px; color: var(--text-soft); line-height: 1.5; }

/* —— Remix —— */
.remix-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.settings {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 20px;
}
.settings .lbl {
  font-size: 11.5px;
  color: var(--text-faint);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.srow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.srow .l {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 500;
}
.srow svg { width: 16px; height: 16px; }
.toggle {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  position: relative;
  flex: none;
  pointer-events: none;
}
.toggle.on { background: var(--accent); }
.toggle .knob {
  position: absolute;
  top: 2px;
  left: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
}

/* —— Two ways —— */
.ways {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}
.way {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 24px;
}
.way h3 { font-size: 16px; font-weight: 650; margin: 14px 0 8px; }
.way p { font-size: 14px; color: var(--text-soft); margin-bottom: 18px; }
.pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pill.browser { background: var(--accent-bg); color: var(--accent); }
.pill.docs { background: var(--sky-bg); color: var(--sky); }
.pill svg { width: 13px; height: 13px; }

/* —— Final + footer —— */
.final { text-align: center; padding: 88px 0; }
.final h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 750;
  letter-spacing: -0.03em;
}
.final p { color: var(--text-soft); margin: 12px auto 24px; max-width: 30em; }
footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  color: var(--text-faint);
  font-size: 13px;
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}
.foot-in .cols {
  display: flex;
  gap: 22px;
  margin-left: auto;
  flex-wrap: wrap;
}
.foot-in a { color: var(--text-soft); }
.foot-in a:hover { color: var(--text); }

/* —— Page hero (landing) —— */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  top: -240px;
  right: -180px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(178, 239, 132, 0.08), transparent 70%);
  pointer-events: none;
}
.hero-in {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 44px;
  align-items: center;
  padding: 72px 0 64px;
}
.hero h1 {
  font-size: clamp(2.4rem, 4.8vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 18px 0 0;
}
.hero h1 .g { color: var(--accent); }
.hero p.sub {
  font-size: 16.5px;
  color: var(--text-soft);
  max-width: 32em;
  margin: 18px 0 26px;
  line-height: 1.55;
}
.hero .cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .trust {
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 16px;
}
.hero-shot {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #06070a;
  box-shadow: 0 28px 70px -40px rgba(0, 0, 0, 0.85);
}
.hero-shot img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}

/* —— Arcade page header —— */
.page-head { padding: 44px 0 8px; }
.page-head h1 {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.page-head p {
  color: var(--text-soft);
  margin-top: 8px;
  font-size: 15px;
}

@media (max-width: 900px) {
  .hero-in,
  .remix-band { grid-template-columns: 1fr; gap: 28px; }
  .cards,
  .feat,
  .ways { grid-template-columns: 1fr 1fr; }
  .feat { gap: 1px; }
  .nav-links,
  .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .cards,
  .feat,
  .ways { grid-template-columns: 1fr; }
  .hero-in { padding: 48px 0 44px; }
  section { padding: 56px 0; }
  .foot-in .cols { margin-left: 0; }
}
