:root {
  /* From the real OneMoreDay app */
  --bg: #171717;
  --surface: #1e1e1e;
  --surface-2: #262626;
  --fg: #f4f4f4;
  --muted: #a1a1a1;
  --border: #2a2a2a;
  --border-strong: #333333;

  --accent-green:  #33BB5C;
  --accent-yellow: #ebc726;
  --accent-red:    #FF4540;
  --accent-orange: #FF6B35;

  /* Semantic aliases used across the landing */
  --life:  var(--accent-yellow);   /* HP bar yellow */
  --ember: var(--accent-red);
  --gold:  var(--accent-yellow);

  --hero-subtitle: #d4d4d4;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.font-serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.font-mono  { font-family: var(--font-mono); }

/* ---------- Liquid glass pill (from spec, kept) ---------- */
.liquid-glass {
  background: rgba(255, 255, 255, 0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.15) 80%, rgba(255,255,255,0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Primary CTA ---------- */
.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 9999px;
  padding: 14px 28px;
  font: 500 16px/1 var(--font-sans);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 0 0 0 rgba(255,255,255,0);
}
.btn-primary:hover { transform: scale(1.03); box-shadow: 0 10px 40px -10px rgba(255,255,255,.25); }
.btn-primary:active { transform: scale(.98); }

.btn-ghost {
  background: var(--fg); color: var(--bg);
  border: none; border-radius: 10px;
  padding: 8px 14px; font: 600 13px/1 var(--font-sans);
  cursor: pointer; transition: opacity .2s ease;
  white-space: nowrap;
}
.btn-ghost:hover { opacity: .85; }

/* ---------- Voxel stage ---------- */
.voxel-stage {
  position: relative;
  perspective: 1400px;
  perspective-origin: 50% 40%;
  transform-style: preserve-3d;
}
.voxel-scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(26deg) rotateZ(-38deg);
  animation: voxel-bob 6s ease-in-out infinite;
}
@keyframes voxel-bob {
  0%, 100% { transform: rotateX(26deg) rotateZ(-38deg) translateZ(0); }
  50%      { transform: rotateX(26deg) rotateZ(-38deg) translateZ(6px); }
}
.cube { position: absolute; transform-style: preserve-3d; }
.face {
  position: absolute;
  inset: 0;
  outline: 1px solid rgba(0,0,0,0.35); /* voxel seam */
}

/* ---------- Habit ring ---------- */
.ring-track { stroke: rgba(255,255,255,0.08); }
.ring-fill  { stroke: var(--life); transition: stroke-dashoffset .6s ease, stroke .3s ease; }
.ring-fill.dying { stroke: var(--ember); }

/* ---------- Amber radial glow (home-screen signature) ---------- */
.amber-glow {
  background:
    radial-gradient(ellipse 60% 50% at 50% 42%, rgba(255,107,53,0.28), transparent 60%),
    radial-gradient(ellipse 45% 35% at 50% 45%, rgba(235,199,38,0.18), transparent 70%);
  pointer-events: none;
}

/* ---------- Ambient drift blobs ---------- */
@keyframes drift-a {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(18px, -14px) scale(1.04); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes drift-b {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-22px, 16px) scale(0.96); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes drift-c {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(12px, 20px) scale(1.03); }
  100% { transform: translate(0, 0) scale(1); }
}
.drift-blob { will-change: transform; }
.blob-a { animation: drift-a 14s ease-in-out infinite; }
.blob-b { animation: drift-b 18s ease-in-out -3s infinite; }
.blob-c { animation: drift-c 11s ease-in-out -6s infinite; }

/* ---------- Grid BG ---------- */
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 35%, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000 40%, transparent 75%);
}

/* ---------- Streak flame gradient ---------- */
.flame {
  background: radial-gradient(circle at 50% 60%,
    oklch(0.92 0.18 85) 0%,
    oklch(0.75 0.22 55) 40%,
    oklch(0.55 0.22 28) 75%,
    transparent 100%);
  filter: blur(0.5px);
}

/* ---------- Placeholder block (for imagery we don't have) ---------- */
.placeholder {
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.03) 0 10px,
      rgba(255,255,255,0.06) 10px 20px);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font: 500 11px/1 var(--font-mono);
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Scroll reveal text ---------- */
.reveal-word { color: hsl(0 0% 28%); transition: color .2s linear; }
.reveal-word.on { color: #fff; }

/* ---------- HR line ---------- */
.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }

/* ---------- Golden header (Train/Goals/Profile screens) ---------- */
.golden-header {
  background: linear-gradient(180deg, #f0c43a 0%, #e5a817 60%, #c68a0a 100%);
  color: #1a1308;
}

/* ---------- Tweaks panel ---------- */
.tweaks {
  position: fixed; right: 20px; bottom: 20px;
  width: 280px; background: rgba(23,23,23,0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 14px;
  font: 500 12px/1.4 var(--font-sans);
  color: var(--fg); z-index: 200;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.tweaks h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tweaks label { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; gap: 10px; }
.tweaks input[type="range"] { flex: 1; accent-color: #fff; }
.tweaks select, .tweaks input[type="text"] {
  background: #000; color: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; font: 500 12px var(--font-sans);
}
.tweaks button.row {
  width: 100%; text-align: left; background: transparent; color: #fff; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; margin-top: 6px; cursor: pointer; font: 500 12px var(--font-sans);
}
.tweaks button.row:hover { background: rgba(255,255,255,0.05); }

/* Ember pulse when avatar is dying */
@keyframes ember-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255,80,40,0)); }
  50%      { filter: drop-shadow(0 0 20px rgba(255,80,40,0.55)); }
}
.dying .voxel-scene { animation: voxel-bob 2.2s ease-in-out infinite, ember-pulse 1.6s ease-in-out infinite; }
