/* ============================================================
   WEBES GNG - global styles + DUAL THEME
   Light is the default (the brand's true identity: warm off-white
   field lit by mint + lavender washes). Dark is the moody alternate.
   :root          = LIGHT tokens (default)
   [data-theme=dark] = DARK tokens (override)
   ============================================================ */

:root {
  /* ---- Stage / surfaces ---- */
  --stage:        #F6F4FB;   /* warm off-white, faint lavender breath */
  --stage-2:      #FFFFFF;
  --stage-3:      #EEEBF6;   /* recessed wells */
  --stage-warm:   #F3EEFD;   /* lavender spotlight zone */

  /* ---- Brand (text-safe on light) ---- */
  --green:        #0E9E57;   /* text-safe green */
  --green-deep:   #0B7E45;
  --green-bright: #16E07A;   /* vivid fill / washes */
  --purple:       #6D28D9;   /* text-safe purple */
  --purple-deep:  #5B21B6;
  --purple-bright:#8B5CF6;
  --yellow:       #FFC700;
  --yellow-2:     #FFD60A;

  /* ---- Text ---- */
  --text:         #16121F;   /* near-black, warm - matches logo */
  --muted:        #5A5470;
  --faint:        #8A839E;

  /* ---- Status ---- */
  --danger:       #D92D4E;
  --danger-soft:  rgba(217,45,78,.12);
  --warning:      #C77700;

  /* ---- Gradient (the signature, kept) ---- */
  --grad: linear-gradient(120deg, #12C06D 0%, #1FB59A 35%, #6D28D9 70%, #8B5CF6 100%);
  --grad-soft: linear-gradient(120deg, rgba(22,224,122,.12), rgba(139,92,246,.12));

  /* ---- Soft tinted shadows (replace neon glow on light) ---- */
  --glow-green:  0 12px 40px -12px rgba(14,158,87,.24);
  --glow-purple: 0 16px 50px -16px rgba(109,40,217,.22);
  --glow-yellow: 0 12px 40px -12px rgba(214,150,0,.30);

  /* ---- Semantic surface overlays (were rgba white on dark) ---- */
  --w-01:  rgba(99,72,160,.030);
  --w-012: rgba(99,72,160,.032);
  --w-02:  rgba(99,72,160,.035);
  --w-025: rgba(99,72,160,.040);
  --w-03:  rgba(99,72,160,.048);
  --w-04:  rgba(99,72,160,.060);
  --w-05:  rgba(99,72,160,.072);
  --w-06:  rgba(99,72,160,.085);
  --w-07:  rgba(99,72,160,.100);
  --w-08:  rgba(99,72,160,.105);
  --w-1:   rgba(99,72,160,.130);

  /* ---- Semantic hairlines (were rgba light-ink on dark) ---- */
  --ln-04: rgba(48,36,72,.070);
  --ln-05: rgba(48,36,72,.085);
  --ln-06: rgba(48,36,72,.095);
  --ln-07: rgba(48,36,72,.105);
  --ln-08: rgba(48,36,72,.115);
  --ln-1:  rgba(48,36,72,.135);
  --ln-12: rgba(48,36,72,.150);
  --ln-16: rgba(48,36,72,.180);
  --ln-2:  rgba(48,36,72,.220);
  --ln-45: rgba(48,36,72,.480);

  /* ---- Glass (translucent floating surfaces) ---- */
  --glass:        rgba(255,255,255,.72);
  --glass-strong: rgba(255,255,255,.86);

  /* ---- Card primitive ---- */
  --card-bg:       #FFFFFF;
  --card-shadow:        0 2px 8px rgba(91,33,182,.06), 0 8px 24px -8px rgba(91,33,182,.09);
  --card-shadow-hover:  0 8px 18px rgba(91,33,182,.10), 0 26px 60px -22px rgba(109,40,217,.22);

  /* ---- Modal ---- */
  --modal-bg: linear-gradient(180deg, #FFFFFF, #F6F4FB);
  --modal-shadow: 0 40px 100px -30px rgba(91,33,182,.30), 0 0 0 1px rgba(109,40,217,.06);

  /* ---- Atmosphere (banner washes) ---- */
  --atmosphere:
    radial-gradient(58% 50% at 0% 18%, rgba(195,253,204,.60), transparent 62%),
    radial-gradient(55% 52% at 100% 28%, rgba(196,173,248,.55), transparent 62%),
    radial-gradient(80% 60% at 50% 102%, rgba(255,255,255,.55), transparent 70%);
  --grain-opacity: .035;
  --grain-blend: multiply;

  /* ---- Selection ---- */
  --sel-bg: #DED3FB;
  --sel-fg: #16121F;

  /* ---- Cursor ---- */
  --cursor-dot: #6D28D9;
  --cursor-dot-glow: 0 0 10px rgba(109,40,217,.5);
  --cursor-ring: rgba(48,36,72,.40);
  --cursor-blend: normal;

  /* ---- Type ---- */
  --font-display: "Clash Display", "Space Grotesque", system-ui, sans-serif;
  --font-tight:   "Anton", "Bebas Neue", "Clash Display", sans-serif;
  --font-body:    "Satoshi", "General Sans", -apple-system, system-ui, sans-serif;
  --font-stamp:   "Permanent Marker", "Caveat Brush", "Caveat", cursive;

  /* ---- Radii ---- */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* ---- Easing ---- */
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-overshoot: cubic-bezier(.34,1.56,.64,1);
}

/* ============================================================
   DARK THEME - restores the original cinematic void
   ============================================================ */
[data-theme="dark"] {
  --stage:        #0A0711;
  --stage-2:      #0B0813;
  --stage-3:      #110820;
  --stage-warm:   #150a26;

  --green:        #16E07A;
  --green-deep:   #0FB866;
  --green-bright: #16E07A;
  --purple:       #8B5CF6;
  --purple-deep:  #6D28D9;
  --purple-bright:#8B5CF6;
  --yellow:       #FFC700;
  --yellow-2:     #FFD60A;

  --text:         #F3F0FA;
  --muted:        #A39DB8;
  --faint:        #6e6783;

  --danger:       #FF4D6D;
  --danger-soft:  rgba(255,77,109,.12);
  --warning:      #FFC700;

  --grad: linear-gradient(120deg, #16E07A 0%, #2CC7A8 35%, #6D28D9 70%, #8B5CF6 100%);
  --grad-soft: linear-gradient(120deg, rgba(22,224,122,.18), rgba(139,92,246,.18));

  --glow-green:  0 0 60px rgba(22,224,122,.35);
  --glow-purple: 0 0 80px rgba(139,92,246,.35);
  --glow-yellow: 0 0 60px rgba(255,199,0,.45);

  --w-01:  rgba(255,255,255,.010);
  --w-012: rgba(255,255,255,.012);
  --w-02:  rgba(255,255,255,.020);
  --w-025: rgba(255,255,255,.025);
  --w-03:  rgba(255,255,255,.030);
  --w-04:  rgba(255,255,255,.040);
  --w-05:  rgba(255,255,255,.050);
  --w-06:  rgba(255,255,255,.060);
  --w-07:  rgba(255,255,255,.070);
  --w-08:  rgba(255,255,255,.080);
  --w-1:   rgba(255,255,255,.100);

  --ln-04: rgba(243,240,250,.04);
  --ln-05: rgba(243,240,250,.05);
  --ln-06: rgba(243,240,250,.06);
  --ln-07: rgba(243,240,250,.07);
  --ln-08: rgba(243,240,250,.08);
  --ln-1:  rgba(243,240,250,.10);
  --ln-12: rgba(243,240,250,.12);
  --ln-16: rgba(243,240,250,.16);
  --ln-2:  rgba(243,240,250,.20);
  --ln-45: rgba(243,240,250,.45);

  --glass:        rgba(11,8,19,.55);
  --glass-strong: rgba(10,7,17,.82);

  --card-bg:       linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.012));
  --card-shadow:        none;
  --card-shadow-hover:  0 30px 80px -30px rgba(139,92,246,.45), 0 0 60px -20px rgba(22,224,122,.3);

  --modal-bg: linear-gradient(180deg, rgba(20,12,40,.95), rgba(10,7,17,.95));
  --modal-shadow: 0 40px 100px rgba(0,0,0,.6), 0 0 80px rgba(139,92,246,.18);

  --atmosphere:
    radial-gradient(120% 80% at 20% 0%, rgba(22,224,122,.06), transparent 60%),
    radial-gradient(120% 80% at 100% 20%, rgba(139,92,246,.08), transparent 60%),
    radial-gradient(80% 80% at 50% 100%, rgba(0,0,0,.55), transparent 60%);
  --grain-opacity: .07;
  --grain-blend: overlay;

  --sel-bg: #8B5CF6;
  --sel-fg: #F3F0FA;

  --cursor-dot: #FFC700;
  --cursor-dot-glow: 0 0 12px #FFC700;
  --cursor-ring: rgba(243,240,250,.45);
  --cursor-blend: screen;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--stage);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* smooth theme cross-fade */
html, body,
.card, .btn, .stamp, .nav, .adm, .adm-sidebar, .adm-input,
.cursor-dot, .cursor-ring {
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out),
              border-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}

body {
  font-size: 16px;
  line-height: 1.65;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Readability rhythm - paragraphs and copy breathe */
p { line-height: 1.7; }
p + p { margin-top: 0.9em; }

/* Grain overlay - the "warmth" move */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 .85 0 0 0 0 .6 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

/* Atmospheric washes (pastel on light, neon-void on dark) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8999;
  background: var(--atmosphere);
}

::selection { background: var(--sel-bg); color: var(--sel-fg); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }
img, svg { display: block; max-width: 100%; }

h1,h2,h3,h4 { font-family: var(--font-display); margin: 0; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }

.h-display {
  font-family: var(--font-tight);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: .92;
  text-transform: uppercase;
  text-wrap: balance;
}

.h-display.italic { font-style: italic; }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .26em;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 14px;
}

/* ============================================================
   Slang stamps - pastel sticker on light, neon on dark
   ============================================================ */
.stamp {
  display: inline-block;
  font-family: var(--font-stamp);
  font-weight: 400;
  transform: rotate(-4deg);
  color: #9A6B00;
  background: rgba(255,199,0,.16);
  border: 1.5px solid rgba(214,150,0,.55);
  padding: 2px 12px 4px;
  border-radius: 4px;
  font-size: 14px;
  letter-spacing: .02em;
  white-space: nowrap;
}
.stamp.green  { color: var(--green);  background: rgba(22,224,122,.14); border-color: rgba(14,158,87,.5); }
.stamp.purple { color: var(--purple); background: rgba(139,92,246,.14); border-color: rgba(109,40,217,.5); }

[data-theme="dark"] .stamp {
  color: var(--yellow);
  background: rgba(255,199,0,.08);
  border: 1.5px solid rgba(255,199,0,.6);
}
[data-theme="dark"] .stamp.green  { color: var(--green); background: rgba(22,224,122,.08); border-color: rgba(22,224,122,.55); }
[data-theme="dark"] .stamp.purple { color: #b794ff; background: rgba(139,92,246,.1); border-color: rgba(139,92,246,.6); }

/* ============================================================
   Custom cursor - theme-aware so it's visible on both fields
   ============================================================ */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cursor-dot);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: var(--cursor-blend);
  box-shadow: var(--cursor-dot-glow);
  transform: translate(-50%,-50%);
  transition: width .25s var(--ease-out), height .25s var(--ease-out), background .25s;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--cursor-ring);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%,-50%);
  transition: width .3s var(--ease-out), height .3s var(--ease-out), border-color .3s, background .3s;
}
.cursor-ring.hot {
  width: 56px; height: 56px;
  border-color: var(--green);
  background: radial-gradient(circle, rgba(22,224,122,.12), transparent 70%);
}

@media (hover: none) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
  button, a { cursor: pointer; }
}

/* ============================================================
   Smooth-scroll wrapper
   ============================================================ */
#smooth-content { will-change: transform; }

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: .08s; }
.reveal.delay-2 { transition-delay: .16s; }
.reveal.delay-3 { transition-delay: .24s; }
.reveal.delay-4 { transition-delay: .32s; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), background .3s;
  will-change: transform;
  white-space: nowrap;
}
.btn-spark {
  background: var(--yellow);
  color: #1a1205;
  box-shadow: 0 8px 26px rgba(214,150,0,.32), inset 0 0 0 1px rgba(0,0,0,.06);
}
.btn-spark:hover {
  box-shadow: 0 12px 44px rgba(214,150,0,.5), inset 0 0 0 1px rgba(0,0,0,.06);
}
[data-theme="dark"] .btn-spark {
  color: #0a0711;
  box-shadow: 0 8px 30px rgba(255,199,0,.35), inset 0 0 0 1px rgba(0,0,0,.06);
}
[data-theme="dark"] .btn-spark:hover {
  box-shadow: 0 12px 50px rgba(255,199,0,.55), inset 0 0 0 1px rgba(0,0,0,.06);
}
.btn-ghost {
  background: var(--w-04);
  color: var(--text);
  border: 1px solid var(--ln-16);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: var(--w-08);
  border-color: rgba(14,158,87,.5);
  box-shadow: var(--glow-green);
}
[data-theme="dark"] .btn-ghost:hover { border-color: rgba(22,224,122,.5); }
.btn .arrow {
  display: inline-block;
  width: 14px;
  height: 14px;
  transition: transform .3s var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   Layout helpers
   ============================================================ */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .container { padding: 0 20px; } }

section { position: relative; }

.section-pad { padding: 140px 0; }
@media (max-width: 720px) { .section-pad { padding: 96px 0; } }

/* ============================================================
   Card primitive - the "trophy panel"
   ============================================================ */
.card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--ln-08);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform .4s var(--ease-out), border-color .4s, box-shadow .4s;
}
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--r-lg);
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: transparent; box-shadow: var(--card-shadow-hover); }
.card:hover::before { opacity: 1; }

/* ============================================================
   Light pool - soft pastel bloom on light, neon glow on dark
   ============================================================ */
.light-pool {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: .55;
  mix-blend-mode: normal;
}
.light-pool.green  { background: rgba(171,251,185,.7); }
.light-pool.purple { background: rgba(196,173,248,.65); }
.light-pool.yellow { background: rgba(255,236,170,.5); }

[data-theme="dark"] .light-pool { opacity: .65; mix-blend-mode: screen; }
[data-theme="dark"] .light-pool.green  { background: rgba(22,224,122,.5); }
[data-theme="dark"] .light-pool.purple { background: rgba(139,92,246,.55); }
[data-theme="dark"] .light-pool.yellow { background: rgba(255,199,0,.35); }

@keyframes drift1 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(60px,-40px); }
}
@keyframes drift2 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(-80px,50px); }
}
.drift-a { animation: drift1 14s ease-in-out infinite; }
.drift-b { animation: drift2 18s ease-in-out infinite; }

/* ============================================================
   Marquee
   ============================================================ */
.marquee {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 60s linear infinite;
  will-change: transform;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   Theme toggle (shared by public nav + admin)
   ============================================================ */
.theme-toggle {
  position: relative;
  width: 52px; height: 28px;
  border-radius: 999px;
  background: var(--w-06);
  border: 1px solid var(--ln-1);
  flex-shrink: 0;
  transition: background .3s, border-color .3s;
}
.theme-toggle .tt-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--grad);
  display: grid; place-items: center;
  transition: transform .4s var(--ease-overshoot);
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
[data-theme="dark"] .theme-toggle .tt-thumb { transform: translateX(24px); }
.theme-toggle .tt-ico { width: 12px; height: 12px; color: #fff; }
.theme-toggle:hover { border-color: rgba(109,40,217,.45); }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
