/* ============================================================
   Sand Simulation · Process site
   Blends Sidfolio editorial chrome (Playfair + Work Sans, indigo/navy)
   with the game's pixel-art identity (Jersey 10, warm earth palette).
   ============================================================ */

:root {
  /* Sidfolio brand */
  --indigo-50:  #EBEBFF;
  --indigo-100: #D6D6FF;
  --indigo-300: #8B8AB7;
  --indigo-400: #6B66E8;
  --indigo-500: #4E48F0;
  --indigo-600: #403AE0;
  --indigo-700: #302CA5;
  --indigo-800: #333089;
  --indigo-900: #100F33;
  --indigo-950: #0B094A;

  --slate-50:  #F8F9FA;
  --slate-100: #F5F5F5;
  --slate-200: #ECEDF3;
  --slate-300: #C9C9C9;
  --slate-400: #8B8AB7;
  --slate-500: #54527A;
  --slate-600: #767487;
  --slate-700: #3E4654;

  --white: #FFFFFF;
  --ink:   #0A090B;
  --gray-800: #373737;
  --gray-500: #6B7280;
  --navy-text: #03234D;

  /* Game palette (sampled from the real sprites) */
  --sand-deep:  #DC8F50;
  --sand-mid:   #F6D084;
  --sand-light: #FFC698;
  --sand-tint:  #FFDCC0;
  --water:      #2C7BE5;
  --water-deep: #1B5BB8;
  --fire:       #F0641E;
  --fire-hot:   #FFB300;
  --stone:      #888780;
  --soil:       #65432B;
  --seed:       #D4BA6A;
  --leaf:       #55AF5F;

  /* Type */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-sans:    'Work Sans', system-ui, -apple-system, sans-serif;
  --font-pixel:   'Jersey 10', monospace;
  --font-block:   'Archivo Black', 'Arial Black', sans-serif;
  --font-mono:    'Fira Mono', ui-monospace, Menlo, monospace;

  /* Radii / shadow */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(16,15,51,0.08), 0 1px 2px rgba(16,15,51,0.04);
  --shadow-md: 0 6px 18px rgba(16,15,51,0.10);
  --shadow-lg: 0 18px 44px rgba(16,15,51,0.16);

  /* Light theme semantics */
  --bg:        #FBFBFD;
  --bg-panel:  #FFFFFF;
  --bg-subtle: var(--slate-50);
  --border:    var(--slate-200);
  --border-strong: #E0E1EA;
  --fg:        var(--ink);
  --fg-2:      var(--slate-500);
  --fg-3:      var(--slate-400);
  --accent:    var(--indigo-500);
  --accent-2:  var(--indigo-800);
  --canvas-bg: #FFFFFF;
  --grid-line: #F0F0F2;
  --sidebar-bg: #FFFFFF;
}

[data-theme="dark"] {
  --bg:        #0C0B26;
  --bg-panel:  #15143A;
  --bg-subtle: #1A1947;
  --border:    #2A285C;
  --border-strong: #36346E;
  --fg:        #F2F2FA;
  --fg-2:      #A9A8CE;
  --fg-3:      #7170A8;
  --accent:    #8B86FF;
  --accent-2:  #B9B6FF;
  --canvas-bg: #1E1E1E;
  --grid-line: #2C2C30;
  --sidebar-bg: #110F30;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

::selection { background: var(--indigo-100); color: var(--indigo-900); }

/* ---- Type helpers ---- */
.serif { font-family: var(--font-display); }
.pixel { font-family: var(--font-pixel); }

.overline {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 { margin: 0; font-weight: 700; }

a { color: inherit; }

/* ---- Reusable surfaces ---- */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--fg-2);
}

/* scrollbars */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.mono { font-family: var(--font-mono); }

/* ---- V5 teaser ---- */
@keyframes v5-drift { from { background-position: 0 0; } to { background-position: 28px 28px; } }
@keyframes v5-pulse { 0%, 100% { opacity: 0.45; transform: scale(1); } 50% { opacity: 1; transform: scale(1.25); } }
@keyframes v5-rise { 0% { transform: translateY(0); } 50% { transform: translateY(-9px); } 100% { transform: translateY(0); } }
@keyframes v5-scan { 0% { top: -10%; } 100% { top: 110%; } }
.v5-card {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 60px); color: #F2F2FA; background: #0A0922;
  border: 1px solid #2A285C; box-shadow: var(--shadow-lg);
}
.v5-gridlines {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px; animation: v5-drift 7s linear infinite;
}
.v5-glow {
  position: absolute; width: 460px; height: 460px; border-radius: 999px; pointer-events: none;
  background: radial-gradient(circle, rgba(78,72,240,0.45), transparent 70%);
  filter: blur(26px); top: -180px; left: -90px;
}
.v5-glow.two { background: radial-gradient(circle, rgba(240,100,30,0.30), transparent 70%); top: auto; left: auto; right: -120px; bottom: -200px; }
.v5-watermark {
  position: absolute; right: 2%; bottom: -16%; font-family: var(--font-pixel);
  font-size: clamp(180px, 32vw, 440px); line-height: 0.8; color: #fff; opacity: 0.05;
  pointer-events: none; user-select: none;
}
.v5-split { position: relative; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,0.95fr); gap: clamp(28px,4vw,52px); align-items: center; }
.v5-peek { filter: blur(7px) saturate(1.15); transform: scale(1.03); }
.v5-lock {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px;
  align-items: center; justify-content: center; text-align: center;
  background: rgba(10,9,34,0.40); backdrop-filter: blur(1px);
}
.v5-scanline { position: absolute; left: 0; right: 0; height: 40px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(120,160,255,0.18), transparent); animation: v5-scan 3.2s linear infinite; }
@media (max-width: 720px) { .v5-split { grid-template-columns: 1fr; } }

