/* ============================================================
   DigiSwiss — Design System
   Palette inspired by "Chip War": deep navy, circuit teal/cyan,
   warm champagne gold, on a precise, technical canvas.
   ============================================================ */

:root {
  /* Core surfaces */
  --navy-950: #060a16;
  --navy-900: #0a0f1e;
  --navy-850: #0d1426;
  --navy-800: #111a30;
  --navy-700: #1a2540;
  --line: rgba(148, 163, 184, 0.12);

  /* Accents */
  --teal: #2dd4bf;
  --cyan: #38bdf8;
  --gold: #e5c97b;
  --gold-soft: #d9c089;

  /* Text */
  --text: #e6ecf7;
  --muted: #93a1bd;
  --faint: #64748b;

  /* Effects */
  --glow-teal: 0 0 40px rgba(45, 212, 191, 0.25);
  --ring: rgba(45, 212, 191, 0.35);
  --grad-accent: linear-gradient(135deg, #2dd4bf 0%, #38bdf8 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background-color: var(--navy-900);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0;
}

a { text-decoration: none; color: inherit; }

/* ---------- Circuit / grid background ---------- */
.bg-circuit {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- Gradient text ---------- */
.text-gradient {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-gold {
  background: linear-gradient(135deg, #e5c97b 0%, #f2dca0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-accent);
  color: #03121b;
  box-shadow: 0 8px 24px rgba(45, 212, 191, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(45, 212, 191, 0.4); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--ring); background: rgba(45, 212, 191, 0.06); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(26, 37, 64, 0.5) 0%, rgba(13, 20, 38, 0.5) 100%);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.4), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4); }
.card:hover::before { opacity: 1; }

.icon-box {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 0.75rem;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.2);
  color: var(--teal);
  margin-bottom: 1.25rem;
}

/* ---------- Section primitives ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--teal);
}

.divider-glow {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.4), transparent);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(8, 12, 24, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-link { position: relative; color: var(--muted); font-size: 0.92rem; font-weight: 500; transition: color 0.2s ease; }
.nav-link:hover { color: var(--text); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--grad-accent);
  transition: width 0.25s ease;
}
.nav-link:hover::after { width: 100%; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Logo mark animation ---------- */
.logo-pulse { animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ---------- Stat counters ---------- */
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
}

/* ---------- Mobile menu ---------- */
#mobileMenu { transition: max-height 0.35s ease, opacity 0.3s ease; max-height: 0; opacity: 0; overflow: hidden; }
#mobileMenu.open { max-height: 420px; opacity: 1; }

/* ---------- Forms ---------- */
.field {
  width: 100%;
  background: rgba(8, 12, 24, 0.6);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.8rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field::placeholder { color: var(--faint); }
.field:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12); }

/* ---------- Marquee (logos) ---------- */
.marquee { display: flex; gap: 4rem; animation: scroll-x 28s linear infinite; }
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Utility ---------- */
.container-x { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
