/* ============================================================
   2AM Ideas — one stylesheet for the whole site.
   Edit colors here and both pages follow.
   ============================================================ */

:root {
  --ink: #0a0e1a;          /* page background — deep night */
  --ink-2: #0e1428;        /* slightly lighter night */
  --surface: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.09);
  --text: #e9ebf4;
  --muted: #9aa2bb;
  --lamp: #ffb454;         /* desk-lamp amber — the accent */
  --lamp-soft: rgba(255, 180, 84, 0.14);
  --moon: #8ab4ff;         /* moonlight blue */
  --good: #4ade80;         /* the little green "working" dot */
  --warn: #ffb454;
  --radius: 16px;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* A quiet starfield + one warm lamp glow at the top. Pure CSS, no images. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(ellipse 60% 40% at 50% -10%, var(--lamp-soft), transparent 70%),
    radial-gradient(1px 1px at 22px 34px, rgba(255,255,255,.55), transparent 1.5px),
    radial-gradient(1px 1px at 131px 108px, rgba(255,255,255,.35), transparent 1.5px),
    radial-gradient(1.5px 1.5px at 260px 60px, rgba(255,255,255,.45), transparent 2px),
    radial-gradient(1px 1px at 340px 178px, rgba(255,255,255,.3), transparent 1.5px),
    radial-gradient(1px 1px at 68px 215px, rgba(255,255,255,.4), transparent 1.5px),
    radial-gradient(1.5px 1.5px at 195px 260px, rgba(138,180,255,.4), transparent 2px);
  background-size: 100% 100%, 420px 320px, 420px 320px, 420px 320px, 420px 320px, 420px 320px, 420px 320px;
  background-repeat: no-repeat, repeat, repeat, repeat, repeat, repeat, repeat;
}

.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */

header {
  padding: 28px 0 0;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.wordmark .two { color: var(--lamp); }
.nav-links { display: flex; gap: 22px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--text); }

/* ---------- hero ---------- */

.hero { padding: 96px 0 72px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--lamp);
  margin-bottom: 18px;
}
h1 {
  font-family: var(--sans);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.hero p.lede {
  margin-top: 22px;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 54ch;
}
.cursor {
  display: inline-block;
  width: 0.55ch;
  height: 0.9em;
  background: var(--lamp);
  margin-left: 6px;
  vertical-align: baseline;
  animation: blink 1.15s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.cta-row { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.btn {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--lamp); color: #1a1206; }
.btn-primary:hover { background: #ffc274; }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.25); }
.btn-note { font-size: 0.85rem; color: var(--muted); margin-top: 12px; font-family: var(--mono); }

/* ---------- sections ---------- */

section { padding: 56px 0; }
.section-eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.section-eyebrow::before { content: "— "; color: var(--lamp); }

h2 {
  font-family: var(--sans);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
h3 { font-family: var(--sans); font-size: 1.18rem; font-weight: 600; }

/* ---------- project cards ---------- */

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card.feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card.feature:hover { border-color: rgba(255, 180, 84, 0.45); transform: translateY(-2px); }
.card.wide { grid-column: 1 / -1; }
.videoframe {
  margin-top: 18px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}
.videoframe video { display: block; width: 100%; height: auto; }
.video-caption {
  font-family: var(--mono);
  font-size: 0.75rem !important;
  color: var(--muted);
  margin-top: 10px;
  opacity: 0.8;
}
.card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card h3 .emoji { margin-right: 6px; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card .more { margin-top: 16px; color: var(--lamp); font-family: var(--sans); font-weight: 600; font-size: 0.95rem; }

.pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.pill.live { color: var(--good); border-color: rgba(74, 222, 128, 0.35); }
.pill.amber { color: var(--lamp); border-color: rgba(255, 180, 84, 0.35); }

/* ---------- juicage ring illustration ---------- */

.rings-art { display: flex; justify-content: center; }
.rings-art svg { width: 150px; height: 150px; }

/* ---------- book maps ---------- */

.bookmaps-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.bookmaps-head h2 { margin-bottom: 0; }
.copy { color: var(--muted); max-width: 68ch; }
.copy + .copy { margin-top: 14px; }
#bookmaps .copy a, #who .copy a { color: var(--lamp); text-decoration: none; border-bottom: 1px solid rgba(255, 180, 84, 0.4); }
#bookmaps .copy a:hover, #who .copy a:hover { border-bottom-color: var(--lamp); }
#bookmaps .copy a { color: var(--lamp); text-decoration: none; border-bottom: 1px solid rgba(255, 180, 84, 0.4); }
#bookmaps .copy a:hover { border-bottom-color: var(--lamp); }
.poster {
  margin: 28px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f4f1e7;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.poster img { display: block; width: 100%; height: auto; }
.poster-caption {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 10px 0 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- about ---------- */

.about p { color: var(--muted); max-width: 62ch; }
.about p a { color: var(--lamp); text-decoration: none; border-bottom: 1px solid rgba(255, 180, 84, 0.4); }
.about p a:hover { border-bottom-color: var(--lamp); }
.about p + p { margin-top: 14px; }
.about .contact {
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 0.92rem;
}
.about .contact a { color: var(--lamp); text-decoration: none; }
.about .contact a:hover { text-decoration: underline; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 30px 0 46px;
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* ============================================================
   Juicage page bits
   ============================================================ */

.back-home {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}
.back-home:hover { color: var(--text); }

/* The fake menu bar + popover. It's an illustration, not a screenshot. */
.demo { margin: 40px 0 8px; }
.menubar {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 14px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}
.menubar .menu-left {
  margin-right: auto;
  opacity: 0.55;
  letter-spacing: 0.02em;
}
.menubar .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) {
  .menubar .dot, .cursor { animation: none; }
}
.menubar svg.glyph { width: 18px; height: 18px; display: block; }

.popover {
  margin: 10px 0 0 auto;
  max-width: 420px;
  background: #141a30;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.meter { margin-bottom: 16px; }
.meter .row {
  display: flex;
  justify-content: space-between;
  font-size: 0.83rem;
  font-family: var(--mono);
  color: var(--muted);
  margin-bottom: 6px;
}
.meter .row strong { color: var(--text); font-weight: 600; }
.track {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.fill { height: 100%; border-radius: 99px; }
.fill.blue { background: var(--moon); }
.fill.orange { background: var(--lamp); }
.popover .local {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.83rem; color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.popover .local .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
}
.popover .forecast {
  margin-top: 12px;
  font-size: 0.8rem;
  font-family: var(--mono);
  color: var(--warn);
}
.demo-caption {
  text-align: right;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 10px;
  opacity: 0.75;
}

/* feature grid on the juicage page */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.features .card { padding: 22px; }
.features h3 { font-size: 1.02rem; margin-bottom: 8px; }
.features p { font-size: 0.92rem; }

.fineprint {
  border: 1px solid var(--line);
  border-left: 3px solid var(--lamp);
  border-radius: 10px;
  padding: 18px 20px;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 68ch;
}

.namestory { max-width: 62ch; color: var(--muted); }
.namestory strong { color: var(--text); }

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .menubar .menu-left { display: none; }
  .cards, .features { grid-template-columns: 1fr; }
  .card.feature { grid-template-columns: 1fr; }
  .rings-art { order: -1; }
  .rings-art svg { width: 120px; height: 120px; }
  .hero { padding: 64px 0 48px; }
  .popover { max-width: 100%; }
}
