/* ---------------------------------------------------------------
   Deploy Console — styles
   Dark "signal" theme by default, with a light variant toggled via
   the data-theme attribute on <html> from main.js.
----------------------------------------------------------------- */

:root {
  --bg: #0e1116;
  --bg-panel: #161b22;
  --bg-panel-2: #1c232d;
  --border: #2a3240;
  --text: #e7ecf3;
  --text-dim: #8b97a7;
  --accent: #3ddc84;       /* signal green = live */
  --accent-soft: rgba(61, 220, 132, 0.12);
  --amber: #ffb454;
  --grid-line: rgba(255, 255, 255, 0.025);
  --radius: 14px;
  --maxw: 920px;
}

html[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-panel: #ffffff;
  --bg-panel-2: #f7f5ef;
  --border: #ddd6c8;
  --text: #1d2129;
  --text-dim: #6b7280;
  --accent: #0f9d58;
  --accent-soft: rgba(15, 157, 88, 0.1);
  --amber: #b4690e;
  --grid-line: rgba(0, 0, 0, 0.03);
}

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

body {
  font-family: "Sora", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem 1.5rem 3rem;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
  position: relative;
  overflow-x: hidden;
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

header, main, footer { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; }

.mono { font-family: "JetBrains Mono", monospace; }
.dim { color: var(--text-dim); }
code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86em;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 5px;
}

/* ---- header ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2.5rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.brand-mark { color: var(--accent); font-size: 1.1rem; }
.brand-name { font-family: "JetBrains Mono", monospace; letter-spacing: -0.02em; }

.status {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: 100px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-dim);
}
.status.live .dot { background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
.status.live .status-text { color: var(--accent); }
.status.dev .dot { background: var(--amber); }
.status.dev .status-text { color: var(--amber); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

/* ---- hero ---- */
.hero { padding: 1rem 0 2.5rem; }
.kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
.lede { color: var(--text-dim); font-size: 1.05rem; max-width: 48ch; }

/* ---- build card ---- */
.build-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2rem;
}
.build-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.build-card-head h2 {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  font-weight: 500;
}
.copy-btn {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.35rem 0.7rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }

.build-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 2rem; }
.field dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}
.field dd { font-size: 1rem; word-break: break-all; }
.field dd.big { font-size: 1.5rem; font-weight: 700; color: var(--accent); }

/* ---- demos ---- */
.demos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.demo {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.demo h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 500;
}
.demo-readout { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.demo-note { font-size: 0.8rem; color: var(--text-dim); }
.action {
  margin-top: auto;
  align-self: flex-start;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid transparent;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.action:hover { border-color: var(--accent); transform: translateY(-1px); }
.action:active { transform: translateY(0); }

/* ---- how ---- */
.how {
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}
.how h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.how ol { padding-left: 1.2rem; display: grid; gap: 0.6rem; color: var(--text-dim); }
.how li { padding-left: 0.3rem; }
.how strong { color: var(--text); }

/* ---- footer ---- */
footer {
  display: flex;
  justify-content: space-between;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--text-dim);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ---- reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--d, 0) * 90ms);
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .status.live .dot { animation: none; }
}

/* ---- responsive ---- */
@media (max-width: 680px) {
  .demos { grid-template-columns: 1fr; }
  .build-grid { grid-template-columns: 1fr; }
}
