/* ============================================================
   Fireball OS — site styles
   Palette sampled from the desktop itself:
   dark grey base, medium-dark orange highlights, cream text.
   ============================================================ */

:root {
  --bg:          #242220;   /* dark grey (wallpaper base) */
  --bg-deep:     #1d1b1a;   /* deeper sections */
  --bg-alt:      #2a2826;   /* alternate section */
  --surface:     #2e2c29;   /* cards */
  --surface-2:   #363330;   /* raised */
  --line:        #3d3a36;   /* borders */
  --accent:      #e0590f;   /* medium-dark orange */
  --accent-deep: #cf420c;   /* wave / deep orange */
  --accent-red:  #a92c07;   /* deepest wave */
  --accent-bright:#ff952b;  /* hover orange */
  --flame:       #ffc23c;   /* flame yellow */
  --text:        #efe9dd;   /* warm cream */
  --muted:       #b0a99e;   /* muted text */
  --muted-2:     #8b857c;
  --radius:      12px;
  --radius-sm:   8px;
  --max:         1100px;
  --header-h:    62px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: var(--flame);
}

::selection { background: rgba(224, 89, 15, 0.45); color: #fff; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 22px;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(29, 27, 26, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(29, 27, 26, 0.94);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-flame { width: 34px; height: auto; }
.brand-name {
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: .01em;
}
.brand-name em {
  font-style: normal;
  color: var(--accent);
}
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: .94rem;
  transition: color .2s, background .2s;
}
.site-nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.site-nav a.active { color: var(--accent-bright); background: rgba(224, 89, 15, 0.12); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + 72px);
  padding-bottom: 250px;
  text-align: center;
  background:
    radial-gradient(1000px 420px at 50% -80px, rgba(224, 89, 15, 0.14), transparent 65%),
    var(--bg-deep);
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; }
.hero-logo {
  margin: 0 auto 26px;
  width: 150px; height: auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.45));
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.02);
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 10px rgba(255, 149, 43, .8);
}
.hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}
.accent-text {
  color: var(--accent);
  background: linear-gradient(92deg, var(--accent) 10%, var(--flame) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  max-width: 640px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: 1.08rem;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .98rem;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s, border-color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(224, 89, 15, .35);
}
.btn-primary:hover { background: var(--accent-bright); box-shadow: 0 10px 28px rgba(255, 149, 43, .35); }
.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255,255,255,0.03);
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(224,89,15,0.10); }

.hero-wave {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  width: 100%;
  height: 300px;
  z-index: 1;
  display: block;
}

/* ---------- Stats ---------- */
.stats {
  background: var(--bg-deep);
  border-block: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-block: 26px;
  text-align: center;
}
.stat-num {
  display: block;
  font-weight: 800;
  color: var(--accent-bright);
  font-size: 1.05rem;
}
.stat-label { color: var(--muted-2); font-size: .85rem; }

/* ---------- Sections ---------- */
.section { padding-block: 84px; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}
.section-title::after,
.section-title.left::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 52px; height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--flame));
}
.section-lead { color: var(--muted); max-width: 640px; margin-bottom: 42px; }
.section-lead.left { margin-top: 18px; }

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform .2s ease, border-color .2s ease, background .2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--surface-2);
}
.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(224, 89, 15, 0.14);
  color: var(--accent-bright);
  margin-bottom: 16px;
}
.card-icon svg { width: 24px; height: 24px; fill: currentColor; }
.card h3 { font-size: 1.06rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .94rem; }

/* ---------- Split rows (desktop experience) ---------- */
.split { display: grid; gap: 64px; }
.split-row {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 40px;
  align-items: center;
}
.split-row.reverse .shot-frame { order: 2; }
.split-row.reverse .split-text { order: 1; }
.split-text h3 { font-size: 1.35rem; margin-bottom: 12px; }
.split-text p { color: var(--muted); }
.check-list { list-style: none; margin-top: 16px; }
.check-list li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .95rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 8px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--accent-bright);
  border-bottom: 2px solid var(--accent-bright);
  transform: rotate(-45deg);
}
.shot-frame {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-deep);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
}
.shot-frame img { width: 100%; height: auto; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.gallery-item {
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-deep);
  cursor: zoom-in;
  transition: transform .2s ease, border-color .2s;
}
.gallery-item:hover { transform: translateY(-4px); border-color: var(--accent); }
.gallery-item img { width: 100%; height: auto; }
.gallery-label {
  position: absolute;
  left: 12px; bottom: 12px;
  background: rgba(29, 27, 26, .85);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------- Components table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.components-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
.components-table th,
.components-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.components-table tr:last-child td { border-bottom: 0; }
.components-table th {
  background: var(--bg-deep);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.components-table td:first-child { white-space: nowrap; width: 1%; }
.components-table td { color: var(--muted); font-size: .95rem; }
.components-table code { color: var(--accent-bright); white-space: nowrap; }

/* ---------- Tech chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; max-width: 780px; }
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: .92rem;
  color: var(--muted);
  transition: border-color .2s;
}
.chip:hover { border-color: var(--accent); }
.chip strong { color: var(--text); margin-right: 4px; }
.chip code { color: var(--accent-bright); }

/* ---------- Status ---------- */
.status-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 44px;
  align-items: start;
}
.limits {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.limits h3 { margin-bottom: 14px; font-size: 1.1rem; }
.muted-list li::before { border-color: var(--muted-2); }
.pkg {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 22px 0 12px;
  max-width: 460px;
}
.pkg code { color: var(--flame); font-size: .98rem; flex: 1; }
.btn-copy {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 7px;
  padding: 6px 14px;
  font-size: .85rem;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.btn-copy:hover { color: var(--text); border-color: var(--accent); }
.btn-copy.copied { color: var(--flame); border-color: var(--flame); }
.fine-print { color: var(--muted-2); font-size: .86rem; margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  padding-block: 34px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 14, 13, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: min(1280px, 92vw); }
.lightbox img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.lightbox figcaption {
  margin-top: 12px;
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  width: 44px; height: 44px;
  border-radius: 10px;
  cursor: pointer;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  border-color: var(--accent); color: var(--accent-bright);
}
.lightbox-close { top: 22px; right: 22px; }
.lightbox-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 18px; top: 50%; transform: translateY(-50%); }

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .split-row, .status-grid { grid-template-columns: 1fr; }
  .split-row.reverse .shot-frame { order: 0; }
  .split-row.reverse .split-text { order: 0; }
  .hero { padding-bottom: 210px; }
  .hero-wave { height: 230px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
    padding: 10px 22px 16px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; }
  .section { padding-block: 60px; }
}
