/* ══════════════════════════════════════
   UVWIND — Landing Page Styles
   Structure:
   1. Variables  2. Reset  3. Base
   4. Nav  5. Hero  6. Ticker
   7. Why  8. Playground  9. Docs
   10. Footer  11. Responsive
══════════════════════════════════════ */

/* ── 1. VARIABLES ─────────────────── */
:root {
  --orange: #f97316;
  --bg:     #080808;
  --bg2:    #111111;
  --bg3:    #1a1a1a;
  --border: #222222;
  --text:   #ededed;
  --muted:  #555555;
  --green:  #22c55e;
  --mono:   'JetBrains Mono', monospace;
  --sans:   'Space Grotesk', sans-serif;
}

[data-theme="light"] {
  --bg:     #ffffff;
  --bg2:    #f5f5f5;
  --bg3:    #ebebeb;
  --border: #e0e0e0;
  --text:   #111111;
  --muted:  #999999;
}

/* ── 2. RESET ─────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── 3. BASE ──────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 2rem; }

.section-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--orange);
  letter-spacing: 2px;
  margin-bottom: 0.8rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.section-sub { font-size: 0.85rem; color: var(--muted); margin-bottom: 2.5rem; }

/* code syntax colors */
.cc { color: #444; }
.ct { color: #60a5fa; }
.ca { color: var(--orange); }
.cs { color: #22c55e; }
.cp { color: #e879f9; }
.cm { color: #555; }

/* ── 4. NAV ───────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 56px;
  background: rgba(8,8,8,0.88); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] #navbar { background: rgba(255,255,255,0.88); }

.nav-logo { display: flex; align-items: center; gap: 3px; font-family: var(--mono); font-weight: 700; }
.logo-mark { background: var(--orange); color: #000; padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; letter-spacing: 1px; }
.logo-name { font-size: 0.9rem; }

.nav-links { display: flex; gap: 2rem; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-link-orange { color: var(--orange) !important; }

.nav-actions { display: flex; align-items: center; gap: 1rem; }

.version-badge {
  font-family: var(--mono); font-size: 0.65rem; color: var(--muted);
  background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 2px 8px;
}

.github-link { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); transition: color 0.2s; }
.github-link:hover { color: var(--text); }

.theme-btn {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 6px;
  padding: 6px; cursor: pointer; color: var(--text);
  display: flex; align-items: center; transition: border-color 0.2s;
}
.theme-btn:hover { border-color: var(--orange); }

[data-theme="dark"]  .icon-sun  { display: none; }
[data-theme="dark"]  .icon-moon { display: block; }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: block; }

/* ── 5. HERO ──────────────────────── */
.hero {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: 100vh; padding-top: 56px;
  border-bottom: 1px solid var(--border);
}

.hero-left {
  padding: 5rem 3rem 5rem 2.5rem;
  display: flex; flex-direction: column; justify-content: center;
  border-right: 1px solid var(--border);
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  margin-bottom: 1.8rem;
}

.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 8px var(--orange);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-left h1 {
  font-size: clamp(3rem, 6vw, 5.5rem); font-weight: 700;
  letter-spacing: -3px; line-height: 0.95; margin-bottom: 1.8rem;
}

.h1-orange { display: block; color: var(--orange); font-style: italic; }
.h1-white  { display: block; }

.hero-desc {
  font-size: 0.88rem; color: var(--muted); line-height: 1.8;
  max-width: 420px; margin-bottom: 2.2rem;
}

.hero-desc code {
  font-family: var(--mono); font-size: 0.82rem;
  background: var(--bg3); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 4px; color: var(--orange);
}

.hero-btns { display: flex; gap: 10px; margin-bottom: 2.5rem; flex-wrap: wrap; }

.btn-primary {
  font-family: var(--mono); font-size: 0.82rem; font-weight: 700;
  background: var(--orange); color: #000;
  padding: 0.65rem 1.4rem; border-radius: 6px;
  transition: opacity 0.15s, transform 0.1s; display: inline-block;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-ghost {
  font-family: var(--mono); font-size: 0.82rem; color: var(--muted);
  padding: 0.65rem 1.4rem; border-radius: 6px; border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s; display: inline-block;
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

.hero-stats { display: flex; align-items: center; gap: 1.5rem; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.68rem; color: var(--muted); letter-spacing: 1px; }
.stat-divider { width: 1px; height: 32px; background: var(--border); }

.hero-right {
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  padding: 4rem 2.5rem;
}

.editor {
  width: 100%; max-width: 500px;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

.editor-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 0.65rem 1rem; background: var(--bg3); border-bottom: 1px solid var(--border);
}

.editor-dots { display: flex; gap: 6px; }
.edot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.edot-red    { background: #ff5f57; }
.edot-yellow { background: #febc2e; }
.edot-green  { background: #28c840; }
.editor-filename { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); flex: 1; }
.editor-lang { font-family: var(--mono); font-size: 0.6rem; background: var(--bg2); color: var(--muted); padding: 2px 8px; border-radius: 4px; }

.editor-body { display: flex; background: var(--bg2); padding: 1rem 0; min-height: 200px; }

.line-numbers { display: flex; flex-direction: column; padding: 0 1rem; user-select: none; }
.line-numbers span { font-family: var(--mono); font-size: 0.72rem; color: var(--border); line-height: 1.75; text-align: right; }

.code-lines { flex: 1; padding-right: 1rem; overflow-x: auto; }
.cl { font-family: var(--mono); font-size: 0.75rem; line-height: 1.75; white-space: nowrap; }
.typed-line { background: rgba(249,115,22,0.06); border-left: 2px solid var(--orange); padding-left: 4px; }
.injected-line { background: rgba(232,121,249,0.05); }

.editor-preview {
  border-top: 1px solid var(--border); padding: 0.8rem 1rem;
  display: flex; align-items: center; gap: 1rem; background: var(--bg3);
}
.preview-label { font-family: var(--mono); font-size: 0.6rem; color: var(--muted); letter-spacing: 2px; flex-shrink: 0; }
#preview-el { font-family: var(--mono); font-size: 0.82rem; font-weight: 700; padding: 6px 14px; border-radius: 6px; background: var(--bg2); color: var(--text); transition: all 0.4s ease; }

/* ── 6. TICKER ────────────────────── */
.ticker { overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg2); padding: 0.8rem 0; }
.ticker-inner { display: flex; gap: 2rem; width: max-content; animation: scroll 28s linear infinite; }
.ticker-inner span { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.sep { color: var(--orange); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── 7. WHY ───────────────────────── */
.why { padding: 6rem 0; border-bottom: 1px solid var(--border); }

.why-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  margin: 2rem 0 2.5rem;
}

.why-card { background: var(--bg); padding: 2rem; transition: background 0.2s; }
.why-card:hover { background: var(--bg2); }
.why-num { display: block; font-family: var(--mono); font-size: 2rem; font-weight: 700; color: var(--border); line-height: 1; margin-bottom: 0.8rem; }
.why-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; }
.why-card p { font-size: 0.78rem; color: var(--muted); line-height: 1.8; }

.compare-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; font-family: var(--mono); font-size: 0.78rem; }
.compare-head { display: grid; grid-template-columns: 1fr 120px 120px; padding: 0.65rem 1.5rem; background: var(--bg3); border-bottom: 1px solid var(--border); font-size: 0.65rem; color: var(--muted); letter-spacing: 1px; }
.compare-row { display: grid; grid-template-columns: 1fr 120px 120px; padding: 0.65rem 1.5rem; border-bottom: 1px solid var(--border); transition: background 0.15s; }
.compare-row:last-child { border-bottom: none; }
.compare-row:hover { background: var(--bg2); }
.compare-row span:first-child { color: var(--muted); }
.compare-row span:not(:first-child) { text-align: center; }
.good    { color: var(--green); }
.neutral { color: var(--muted); }

/* ── 8. PLAYGROUND ────────────────── */
.playground { padding: 6rem 0; background: var(--bg2); border-bottom: 1px solid var(--border); }
.pg-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.pg-left { display: flex; flex-direction: column; gap: 1rem; }

#pg-input {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.75rem 1rem; font-family: var(--mono); font-size: 0.82rem; color: var(--text);
  outline: none; transition: border-color 0.2s;
}
#pg-input:focus { border-color: var(--orange); }
#pg-input::placeholder { color: var(--muted); }

.chip-groups { display: flex; flex-direction: column; gap: 0.8rem; }
.chip-group  { display: flex; flex-direction: column; gap: 5px; }
.chip-label  { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; }
.chip-row    { display: flex; flex-wrap: wrap; gap: 5px; }

.chip {
  font-family: var(--mono); font-size: 0.68rem;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 5px;
  padding: 3px 10px; cursor: pointer; color: var(--muted);
  transition: all 0.15s; user-select: none;
}
.chip:hover { border-color: var(--orange); color: var(--orange); background: rgba(249,115,22,0.06); }

.pg-proof { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.8rem 1rem; }
.proof-label { display: block; font-family: var(--mono); font-size: 0.62rem; color: var(--orange); letter-spacing: 1px; margin-bottom: 4px; }
#pg-output { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); display: block; word-break: break-all; line-height: 1.6; }

.pg-right { display: flex; flex-direction: column; gap: 1rem; }

.pg-scene {
  position: relative; background: linear-gradient(135deg, #f97316, #3b82f6, #a855f7);
  border-radius: 12px; overflow: hidden; min-height: 180px;
  display: flex; align-items: center; justify-content: center; padding: 2rem;
}

.orb { position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.6; pointer-events: none; }
.orb-1 { width: 200px; height: 200px; background: #f97316; top: -60px; left: -60px; }
.orb-2 { width: 180px; height: 180px; background: #3b82f6; bottom: -50px; right: -50px; }
.orb-3 { width: 150px; height: 150px; background: #a855f7; top: 30%; left: 30%; }

#pg-box {
  position: relative; z-index: 2;
  padding: 1rem 2rem; border-radius: 8px;
  background: #111; color: white;
  font-family: var(--mono); font-weight: 700;
  text-align: center; transition: all 0.3s ease;
}

.devtools-panel { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.dt-titlebar { display: flex; align-items: center; gap: 6px; padding: 0.5rem 0.8rem; background: var(--bg3); border-bottom: 1px solid var(--border); }
.dt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.dt-name { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); margin-left: 4px; }
.dt-body { padding: 0.6rem 0.8rem; }
.dt-line { font-family: var(--mono); font-size: 0.7rem; line-height: 1.9; }
.dt-indent  { padding-left: 1rem; }
.dt-indent2 { padding-left: 2rem; }
.dt-tag  { color: #60a5fa; }
.dt-attr { color: var(--orange); }
.dt-str  { color: #22c55e; }
.dt-muted { color: var(--muted); }
#dt-content { color: #e879f9; }

/* ── 9. DOCS ──────────────────────── */
.docs { padding: 6rem 0; border-bottom: 1px solid var(--border); }

.tab-row { display: flex; gap: 6px; margin: 1.5rem 0 1rem; }
.tab { font-family: var(--mono); font-size: 0.75rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 0.45rem 1rem; color: var(--muted); cursor: pointer; transition: all 0.2s; }
.tab.active { border-color: var(--orange); color: var(--orange); background: rgba(249,115,22,0.06); }

.code-block { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 2.5rem; }
.code-block.hidden { display: none; }
.cb-head { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 1rem; background: var(--bg3); border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }
.copy-btn { background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; padding: 2px 10px; font-family: var(--mono); font-size: 0.65rem; color: var(--muted); cursor: pointer; transition: color 0.15s; }
.copy-btn:hover { color: var(--text); }
.code-block pre { padding: 1.2rem; font-family: var(--mono); font-size: 0.78rem; line-height: 1.9; color: var(--muted); white-space: pre-wrap; }

.ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ref-card { background: var(--bg); }
.ref-head { padding: 0.75rem 1rem; background: var(--bg2); border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 0.72rem; color: var(--orange); letter-spacing: 1px; }
.ref-special .ref-head { color: #e879f9; }
.ref-rows { padding: 0.3rem 0; }
.ref-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 1rem; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.ref-row:last-child { border-bottom: none; }
.ref-row code { color: #60a5fa; background: var(--bg3); padding: 1px 6px; border-radius: 3px; }
.special-note { color: var(--orange); font-size: 0.68rem; justify-content: flex-start; }

/* ── 10. FOOTER ───────────────────── */
footer { border-top: 1px solid var(--border); padding: 1.5rem 0; }
.footer-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-family: var(--mono); }
.footer-sub { font-size: 0.72rem; color: var(--muted); }
.footer-links { display: flex; align-items: center; gap: 1.2rem; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-credit { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }

/* ── 11. COLORS SECTION ───────────── */
.colors-section { padding: 5rem 0; border-top: 1px solid var(--border); }

.color-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2rem;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.color-name {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  width: 60px;
  flex-shrink: 0;
  text-align: right;
}

.color-name.chai-row { color: var(--orange); }

.swatches {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
}

.swatch:hover {
  transform: scale(1.2) translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  z-index: 10;
}

.swatch:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.62rem;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}

.swatch-lg {
  width: 48px;
  box-shadow: 0 0 0 2px var(--orange);
}

.color-hint {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 1.5rem;
  text-align: center;
}

/* ── 12. RESPONSIVE ───────────────── */
@media (max-width: 900px) {
  #navbar { padding: 0 1.5rem; }
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-left { padding: 4rem 1.5rem 2rem; border-right: none; border-bottom: 1px solid var(--border); }
  .hero-right { padding: 2rem 1.5rem 4rem; }
  .pg-layout { grid-template-columns: 1fr; }
  .compare-head, .compare-row { grid-template-columns: 1fr 80px 80px; font-size: 0.7rem; }
  .footer-row { flex-direction: column; text-align: center; }
}