/* ═══════════════════════════════════════════════════════
   base.css — Variables · Reset · Typography · Shared UI
   neuromexa / matnon
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Epilogue:wght@400;500;600;700;800;900&family=Manrope:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── TOKENS ── */
:root {
  --bg:        #04040d;
  --surface:   #080818;
  --surface2:  #0d0d22;
  --surface3:  #14142e;

  --border:    rgba(255,255,255,0.09);
  --border-md: rgba(255,255,255,0.17);
  --border-lg: rgba(255,255,255,0.28);

  --gold:      #f0a500;
  --gold-lt:   #ffc233;
  --gold-dk:   #c07d00;
  --gold-dim:  rgba(240,165,0,0.14);
  --gold-glow: rgba(240,165,0,0.40);

  --text:       #f5f1e9;
  --text-muted: #9590a8;
  --text-dim:   #3c3a58;

  --green:     #2dd48a;
  --green-dim: rgba(45,212,138,0.12);

  --header-h: 70px;
  --max-w:    1180px;
  --r:        12px;
  --r-sm:      8px;
  --r-xs:      6px;

  --font-display: 'Epilogue',       sans-serif;
  --font-body:    'Manrope',        sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

/* ── RESET ── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
img,svg { display: block; }
a { color: inherit; }
button { font-family: inherit; }
h1,h2,h3,h4,h5 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.025em; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 2px; }

/* ── GRAIN ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9999;
}

/* ═══════════════════════════
   HEADER
═══════════════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  background: rgba(4,4,13,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
}

.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.logo-icon { width: 28px; height: 28px; }
.logo-icon svg { width: 28px; height: 28px; }
.logo-text { font-family: var(--font-display); font-size: 0.9rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.logo-text span { color: var(--gold); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav-link { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); text-decoration: none; padding: 7px 14px; border-radius: var(--r-xs); transition: color 0.18s; }
.nav-link:hover, .nav-link.is-active { color: var(--text); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--bg); background: var(--gold);
  text-decoration: none; padding: 8px 18px;
  border-radius: var(--r-xs); margin-left: 10px;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  letter-spacing: 0.02em;
}
.nav-cta:hover { background: var(--gold-lt); transform: translateY(-1px); box-shadow: 0 4px 18px var(--gold-glow); }
.nav-cta svg { width: 13px; height: 13px; stroke: var(--bg); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── HEADER LANGUAGE SWITCHER ── */
.header-lang {
  display: flex; align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  overflow: hidden;
  margin-left: 14px; flex-shrink: 0;
}
.header-lang-btn {
  padding: 6px 11px;
  font-family: var(--font-mono); font-size: 0.63rem; font-weight: 500; letter-spacing: 0.06em;
  color: var(--text-muted); background: transparent; border: none; cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.header-lang-btn.is-active { background: var(--gold); color: var(--bg); font-weight: 700; }
.header-lang-btn:not(.is-active):hover { color: var(--text); }

/* ═══════════════════════════
   BUTTONS
═══════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.88rem; font-weight: 600; color: var(--bg); background: var(--gold);
  border: none; padding: 13px 26px; border-radius: var(--r-sm);
  text-decoration: none; cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { background: var(--gold-lt); transform: translateY(-2px); box-shadow: 0 8px 28px var(--gold-glow); }
.btn-primary svg { width: 15px; height: 15px; stroke: var(--bg); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.88rem; font-weight: 500; color: var(--text-muted);
  background: transparent; border: 1px solid var(--border);
  padding: 13px 26px; border-radius: var(--r-sm); text-decoration: none; cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-md); background: rgba(255,255,255,0.03); }
.btn-ghost svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── SECTION TAG ── */
.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}
.section-tag::before { content: ''; width: 24px; height: 1px; background: var(--gold); opacity: 0.7; }

/* ═══════════════════════════
   ANIMATIONS
═══════════════════════════ */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse  { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
@keyframes msgIn  { from{opacity:0;transform:translateY(8px) scale(0.97);} to{opacity:1;transform:translateY(0) scale(1);} }
@keyframes typingBounce { 0%,60%,100%{transform:translateY(0);opacity:0.2;} 30%{transform:translateY(-5px);opacity:1;} }
@keyframes ambientFloat { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.65;transform:scale(1.1);} }
@keyframes borderGlow { 0%,100%{opacity:0.5;} 50%{opacity:1;} }
@keyframes slideInLeft { from{opacity:0;transform:translateX(-16px);} to{opacity:1;transform:translateX(0);} }

/* ── SCROLL REVEAL ── */
.reveal { opacity:0; transform:translateY(32px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.reveal.is-visible { opacity:1; transform:translateY(0); }
.reveal-delay-1 { transition-delay:0.1s; }
.reveal-delay-2 { transition-delay:0.2s; }
.reveal-delay-3 { transition-delay:0.3s; }
.reveal-delay-4 { transition-delay:0.45s; }

/* ── RESPONSIVE ── */
@media (max-width:768px) {
  .site-header { padding: 0 18px; gap: 6px; }
  .logo-text { font-size: 0.78rem; }
  .nav-link { padding: 6px 8px; font-size: 0.72rem; }
  .nav-cta { padding: 7px 12px; font-size: 0.72rem; margin-left: 6px; }
  .header-lang { margin-left: 6px; }
}
