// ── DESIGN TOKENS for WiseTip homepage ──────────────────────
// Cinematic forest editorial. Dark default. Light parity.

const DARK = {
  bg:       "#080F0A",
  bg2:      "#0A1A10",
  bg3:      "#060D08",
  panel:    "#0E2318",
  panel2:   "#162C1A",
  border:   "rgba(125,190,90,.12)",
  border2:  "rgba(125,190,90,.22)",
  text:     "#F0EBE0",
  text2:    "rgba(240,235,224,.6)",
  text3:    "rgba(240,235,224,.35)",
  text4:    "rgba(240,235,224,.2)",
  sage:     "#7DBE5A",
  sage2:    "#9DC872",
  sage3:    "rgba(125,190,90,.08)",
  sage4:    "rgba(125,190,90,.16)",
  gold:     "#C8A85A",
  gold2:    "rgba(200,168,90,.14)",
  card:     "rgba(14,35,24,.55)",
  card2:    "rgba(22,44,26,.4)",
  inputBg:  "rgba(255,255,255,.04)",
  inputBd:  "rgba(255,255,255,.12)",
  navBg:    "rgba(8,15,10,.78)",
  divider:  "rgba(255,255,255,.06)",
  locked:   "rgba(200,168,90,.06)",
  lockedBd: "rgba(200,168,90,.18)",
};

const LIGHT = {
  bg:       "#F5F1E8",
  bg2:      "#EBE6D8",
  bg3:      "#E0DAC8",
  panel:    "#0E2318",   // panel stays dark for contrast moments
  panel2:   "#162C1A",
  border:   "rgba(46,107,58,.18)",
  border2:  "rgba(46,107,58,.32)",
  text:     "#1A1F12",
  text2:    "rgba(26,31,18,.65)",
  text3:    "rgba(26,31,18,.4)",
  text4:    "rgba(26,31,18,.22)",
  sage:     "#2E6B3A",
  sage2:    "#4A8A4A",
  sage3:    "rgba(46,107,58,.07)",
  sage4:    "rgba(46,107,58,.14)",
  gold:     "#8A6020",
  gold2:    "rgba(138,96,32,.12)",
  card:     "rgba(255,255,255,.7)",
  card2:    "rgba(255,255,255,.5)",
  inputBg:  "rgba(0,0,0,.03)",
  inputBd:  "rgba(0,0,0,.14)",
  navBg:    "rgba(245,241,232,.85)",
  divider:  "rgba(0,0,0,.07)",
  locked:   "rgba(138,96,32,.05)",
  lockedBd: "rgba(138,96,32,.18)",
};

const FONT_CSS = `
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500;1,600&family=Outfit:wght@300;400;500;600&family=JetBrains+Mono:wght@300;400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100vw;
  font-family: 'Outfit', sans-serif;
}
button { font-family: 'Outfit', sans-serif; cursor: pointer; }
input, textarea, select { font-family: 'Outfit', sans-serif; }
a { text-decoration: none; color: inherit; }
::selection { background: rgba(125,190,90,.3); color: inherit; }

.serif    { font-family: 'Cormorant Garamond', serif; }
.italic   { font-style: italic; }
.mono     { font-family: 'JetBrains Mono', monospace; }

.eyebrow {
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 400;
}
.label-tiny {
  font-size: .58rem;
  letter-spacing: .26em;
  text-transform: uppercase;
}

.section { padding: clamp(4rem, 9vh, 7rem) clamp(1.5rem, 5vw, 5vw); }
.wrap    { max-width: 1180px; margin: 0 auto; }
.wrap-sm { max-width: 760px; margin: 0 auto; }

.grid-2  { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.grid-6  { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; }

.flow-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; }
.flow-grid > :nth-child(-n+3) { grid-column: span 2; }
.flow-grid > :nth-child(4)    { grid-column: 2 / 4; }
.flow-grid > :nth-child(5)    { grid-column: 4 / 6; }

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
  .flow-grid { grid-template-columns: 1fr 1fr; }
  .flow-grid > :nth-child(-n+5) { grid-column: auto; }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .flow-grid { grid-template-columns: 1fr; }
  .hero-corner { display: none !important; }
}
/* Nav collapses to a hamburger earlier — grouped dropdowns need room */
@media (max-width: 900px) {
  .nav-links { display: none !important; }
  .nav-mobile-btn { display: inline-flex !important; }
  .nav-join-btn, .nav-profile-btn { display: none !important; }
}

/* Animations */
@keyframes float-up {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: .55; }
  90% { opacity: .25; }
  100% { transform: translateY(-90vh) translateX(20px); opacity: 0; }
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: .9; transform: scale(1); }
  50% { opacity: .4; transform: scale(1.6); }
}
@keyframes scroll-pulse {
  0%, 100% { opacity: .3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.4); }
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes mode-fade { from { opacity: .7 } to { opacity: 1 } }
@keyframes wave {
  0%, 100% { transform: scaleY(.3); }
  50% { transform: scaleY(1); }
}
@keyframes sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes nav-drop {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes nav-fade { from { opacity: 0; } to { opacity: 1; } }

.reveal { animation: reveal .8s ease both; }
.reveal-d1 { animation: reveal .8s .15s ease both; }
.reveal-d2 { animation: reveal .8s .3s ease both; }
.reveal-d3 { animation: reveal .8s .45s ease both; }
.reveal-d4 { animation: reveal .8s .6s ease both; }

/* Locked content */
.locked-blur {
  position: relative;
  user-select: none;
}
.locked-blur::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, currentColor 90%);
  opacity: .9;
  pointer-events: none;
  mix-blend-mode: normal;
}
`;

window.WS_DARK = DARK;
window.WS_LIGHT = LIGHT;
window.WS_FONT_CSS = FONT_CSS;
