/* ============================================================
   Truxcor — ported design system (from Next.js globals.css)
   Tailwind utilities are provided at runtime via the Tailwind
   CDN; this file holds the custom component classes, variables,
   fonts, animations and the navbar state styles.
   ============================================================ */

:root {
  /* Base */
  --background: #020617;
  --foreground: #ffffff;

  /* Brand */
  --primary: #ffb800;
  --primary-light: #ffd24d;

  /* Surfaces */
  --surface: #111827;
  --surface-light: #1f2937;
  --glass: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);

  /* Text */
  --muted: #94a3b8;

  /* Accents */
  --blue: #0056b3;
  --cyan: #09e6ff;
  --teal: #138a92;
  --mint: #2bffb9;
  --magenta: #c71585;
  --neon-pink: #ff51ff;

  --container: 1280px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--background);
  color: var(--foreground);
  overflow-x: hidden;
  font-family: Montserrat, system-ui, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.heading-xl, .heading-lg, .heading-md {
  font-family: "Open Sans", system-ui, sans-serif;
  font-weight: 700;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection { background: var(--primary); color: #000; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #020617; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffb800, #ffd24d);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: #ffd24d; }

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; }
section { position: relative; }

/* ---------------- Layout ---------------- */
.container-custom {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
@media (min-width: 768px) {
  .container-custom { padding-inline: 2rem; }
}
@media (min-width: 1024px) {
  .container-custom { padding-inline: 3rem; }
}

/* ---------------- Typography ---------------- */
.heading-xl {
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.heading-lg {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.heading-md {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.section-label::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary));
}

.text-muted { color: var(--muted); line-height: 1.7; }

/* ---------------- Gold / Cyan text ---------------- */
.gold-text { color: var(--primary); }
.gold-gradient {
  background: linear-gradient(135deg, #ffb800, #ffd24d, #fff0a6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cyan-gradient {
  background: linear-gradient(135deg, #09e6ff, #2bffb9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------------- Buttons ---------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  background: linear-gradient(135deg, #ffb800, #ffd24d);
  color: #020617;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1;
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(255, 184, 0, 0.18);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 184, 0, 0.28);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  border-color: rgba(255, 184, 0, 0.4);
  color: var(--primary);
  background: rgba(255, 184, 0, 0.08);
  transform: translateY(-2px);
}

/* ---------------- Glass cards ---------------- */
.glass-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  border-color: rgba(255, 184, 0, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(255, 184, 0, 0.1);
}

/* ---------------- Inputs ---------------- */
.input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  padding: 0.875rem 1.125rem;
  border-radius: 0.75rem;
  outline: none;
  transition: all 0.3s ease;
  font-size: 0.9375rem;
  line-height: 1.5;
  font-family: inherit;
}
.input::placeholder { color: rgba(255, 255, 255, 0.35); }
.input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.15);
}
/* Native dropdown list needs an explicit dark surface, otherwise the
   option text renders white-on-white and disappears in dark mode. */
.input option { background: #0a0f1f; color: #ffffff; }
/* Render the native select control itself with the dark UA palette so
   the selected value and arrow stay visible. */
select.input { color-scheme: dark; }

/* ---------------- Grid helpers ---------------- */
.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
}
.grid-equal-cols { display: grid; gap: 2rem; }
@media (min-width: 768px) {
  .grid-equal-cols { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- Divider ---------------- */
.divider {
  width: 4rem;
  height: 2px;
  background: linear-gradient(90deg, #ffb800, #ffd24d);
  border-radius: 1px;
}

/* ---------------- Section spacing ---------------- */
.section-padding { padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 768px) {
  .section-padding { padding-top: 6rem; padding-bottom: 6rem; }
}
@media (min-width: 1024px) {
  .section-padding { padding-top: 8rem; padding-bottom: 8rem; }
}

/* ---------------- Lucide icon sizing ---------------- */
.lucide { stroke-width: 2; }
.icon-12 { width: 12px; height: 12px; }
.icon-14 { width: 14px; height: 14px; }
.icon-15 { width: 15px; height: 15px; }
.icon-16 { width: 16px; height: 16px; }
.icon-18 { width: 18px; height: 18px; }
.icon-22 { width: 22px; height: 22px; }
.icon-24 { width: 24px; height: 24px; }
.icon-25 { width: 25px; height: 25px; }

/* ============================================================
   Hero animations
   ============================================================ */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-fade-up { opacity: 0; animation: heroFadeUp 0.85s cubic-bezier(0.22,1,0.36,1) forwards; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
.anim-float { animation: heroFloat 6s ease-in-out infinite; }
.anim-float-slow { animation: heroFloat 8s ease-in-out infinite; }
.anim-float-fast { animation: heroFloat 4.5s ease-in-out infinite; }

@keyframes gradientPan { to { background-position: 200% center; } }
.text-gradient-animate {
  background: linear-gradient(90deg, #ffb800, #ffd24d, #09e6ff, #2bffb9, #ffb800);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientPan 6s linear infinite;
}

@keyframes spinSlow { to { transform: rotate(360deg); } }
.anim-spin-slow { animation: spinSlow 28s linear infinite; }

@keyframes barGrow { from { width: 0; } }
.anim-bar { animation: barGrow 1.6s cubic-bezier(0.22,1,0.36,1) 0.6s forwards; }

@keyframes pulseRing {
  0% { transform: scale(0.95); opacity: 0.6; }
  70%, 100% { transform: scale(1.6); opacity: 0; }
}
.anim-pulse-ring { animation: pulseRing 2.4s cubic-bezier(0,0,0.2,1) infinite; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.anim-marquee { animation: marquee 24s linear infinite; }

/* GSAP-driven reveal: start hidden so there is no flash before JS runs */
.reveal { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .anim-fade-up, .anim-float, .anim-float-slow, .anim-float-fast,
  .text-gradient-animate, .anim-spin-slow, .anim-bar, .anim-pulse-ring,
  .anim-marquee, .reveal {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* ============================================================
   Navbar state styles (replaces React state class swaps)
   ============================================================ */
.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; }

.nav-progress {
  position: absolute;
  top: 0; left: 0;
  height: 2px; width: 100%;
}
.nav-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ffb800, #ffd24d, #09e6ff);
  transition: width 0.15s ease-out;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-radius: 1rem;
  padding: 0 1rem;
  height: 4rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
@media (min-width: 768px) {
  .nav-bar { height: 5rem; padding-left: 1.5rem; padding-right: 0.75rem; }
}
.nav-bar.is-scrolled {
  background: rgba(10, 15, 31, 0.8);
  backdrop-filter: blur(20px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav-link {
  position: relative;
  border-radius: 999px;
  padding: 0.625rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s ease;
}
.nav-link:hover { color: #fff; }
.nav-link .nav-pill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb800, #ffd24d);
  box-shadow: 0 4px 14px rgba(255, 184, 0, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-link span.label { position: relative; z-index: 1; }
.nav-link.is-active { color: #020617; }
.nav-link.is-active .nav-pill { opacity: 1; }

/* Mobile menu */
.mobile-menu {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.3s ease;
}
.mobile-menu.is-open { max-height: 32rem; opacity: 1; margin-top: 0.75rem; }

.mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s ease;
}
.mobile-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.mobile-link.is-active { background: rgba(255, 184, 0, 0.1); color: #ffd24d; }

/* ============================================================
   Light mode
   Activated by  <html data-theme="light">.
   Overrides the design tokens plus the hardcoded dark utilities
   used throughout the markup so the whole page reads on light.
   ============================================================ */
[data-theme="light"] {
  --background: #eef2f8;
  --foreground: #09091a;

  --surface: #ffffff;
  --surface-light: #f1f5f9;
  --glass: rgba(15, 23, 42, 0.04);
  --border: rgba(15, 23, 42, 0.1);

  --muted: #1e293b;
}

/* Page + scrollbar surfaces */
[data-theme="light"] body { background: var(--background); color: var(--foreground); }
[data-theme="light"] ::-webkit-scrollbar-track { background: #dde4ef; }

/* Hardcoded section backgrounds (main + footer) */
[data-theme="light"] .bg-\[\#020617\] { background-color: var(--background) !important; }

/* Default white text → dark foreground */
[data-theme="light"] .text-white { color: var(--foreground); }

/* Muted / sub text. Tailwind's `muted` color is a fixed light gray
   (#94a3b8) and the opacity variants make it fainter still, so on a
   light background it nearly disappears. Force dark, readable tones. */
[data-theme="light"] .text-muted { color: #1e293b; }
[data-theme="light"] .text-muted\/80,
[data-theme="light"] .text-muted\/70,
[data-theme="light"] .text-muted\/60 { color: #334155; }
[data-theme="light"] .text-muted\/50 { color: #475569; }

/* White translucent surfaces → subtle dark-tinted panels */
[data-theme="light"] .bg-white\/5,
[data-theme="light"] .bg-white\/\[0\.02\],
[data-theme="light"] .bg-white\/\[0\.03\] {
  background-color: rgba(15, 23, 42, 0.04);
}

/* White translucent borders → subtle dark borders */
[data-theme="light"] .border-white\/5,
[data-theme="light"] .border-white\/8,
[data-theme="light"] .border-white\/10,
[data-theme="light"] .border-white\/12 {
  border-color: rgba(15, 23, 42, 0.12);
}

/* Mobile menu panel */
[data-theme="light"] .bg-\[\#0a0f1f\]\/90 {
  background-color: rgba(255, 255, 255, 0.92) !important;
}

/* ---- Component classes that use literal dark-on-light rgba ---- */
[data-theme="light"] .glass-card {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.015));
  border-color: rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .glass-card:hover {
  border-color: rgba(255, 184, 0, 0.45);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .input {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--foreground);
}
[data-theme="light"] .input::placeholder { color: rgba(15, 23, 42, 0.4); }
[data-theme="light"] .input:focus { background: rgba(15, 23, 42, 0.05); }
[data-theme="light"] .input option { background: #ffffff; color: var(--foreground); }
[data-theme="light"] select.input { color-scheme: light; }

[data-theme="light"] .btn-secondary {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--foreground);
}
[data-theme="light"] .btn-secondary:hover {
  border-color: rgba(255, 184, 0, 0.5);
  color: #b27c00;
  background: rgba(255, 184, 0, 0.1);
}

/* Navbar */
[data-theme="light"] .nav-bar {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .nav-bar.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}
[data-theme="light"] .nav-link:hover { color: var(--foreground); }
[data-theme="light"] .mobile-link:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--foreground);
}

/* Keep selection legible */
[data-theme="light"] ::selection { background: var(--primary); color: #000; }
