/* ==========================================================================
   QuevaTech Design System — Colors & Type
   Source of truth for brand tokens. Mirrors tailwind.config in landing page.
   ========================================================================== */

/* ---------- Inter (self-hosted from /fonts) ---------- */
/* Variable font covers 100–900; static fallbacks listed for older browsers. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/InterVariable.woff2') format('woff2-variations'),
       url('fonts/InterVariable.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/InterVariable-Italic.woff2') format('woff2-variations'),
       url('fonts/InterVariable-Italic.woff2') format('woff2');
}
/* Static fallbacks (only used by browsers that ignore woff2-variations) */
@font-face { font-family: 'Inter Static'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/Inter-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter Static'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/Inter-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Inter Static'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/Inter-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Inter Static'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/Inter-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Inter Static'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/Inter-ExtraBold.woff2') format('woff2'); }

:root {
  /* ---------- Brand Colors (logo palette) ---------- */
  --queva-gold:      #d4b038;   /* Primary — the tree mark */
  --queva-ember:     #d87e37;   /* Burnt orange accent */
  --queva-signal:    #ff1e3c;   /* Alert / hot highlight */
  --queva-midnight:  #1b1f3b;   /* Deep navy — surface dark */
  --queva-parchment: #eee6d8;   /* Warm cream — surface light */

  /* Legacy aliases — kept so older preview/components still resolve */
  --queva-indigo: var(--queva-midnight);
  --queva-purple: var(--queva-ember);
  --queva-sky:    var(--queva-gold);
  --queva-dark:   var(--queva-midnight);
  --queva-light:  var(--queva-parchment);

  /* Lighter brand tints for badges / chip backgrounds */
  --queva-gold-tint:    rgba(212, 176, 56, 0.14);
  --queva-ember-tint:   rgba(216, 126, 55, 0.12);
  --queva-signal-tint:  rgba(255, 30, 60, 0.10);
  --queva-indigo-tint:  rgba(27, 31, 59, 0.10);
  --queva-purple-tint:  rgba(216, 126, 55, 0.12);
  --queva-sky-tint:     rgba(212, 176, 56, 0.14);

  /* Glow shadows for hero text + buttons */
  --glow-gold:   rgba(212, 176, 56, 0.45);
  --glow-ember:  rgba(216, 126, 55, 0.35);
  --glow-signal: rgba(255, 30, 60, 0.25);
  --glow-blue:   rgba(212, 176, 56, 0.4);
  --glow-purple: rgba(216, 126, 55, 0.3);
  --glow-indigo: rgba(27, 31, 59, 0.3);

  /* ---------- Semantic Colors ---------- */
  --bg:        var(--queva-parchment);  /* Page bg, light */
  --surface:   #ffffff;                  /* Card surface, light */
  --fg1:       var(--queva-midnight);    /* Primary text */
  --fg2:       #4a4f6b;                  /* Body / secondary text */
  --fg3:       #8a8fa6;                  /* Muted / tertiary text */
  --border:    rgba(27, 31, 59, 0.10);
  --primary:   var(--queva-gold);
  --secondary: var(--queva-ember);
  --accent:    var(--queva-signal);
  --success:   #16a34a;            /* green-600 */
  --warning:   #f59e0b;
  --danger:    #dc2626;

  /* Glass surface tokens (light) */
  --glass-bg:     rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-blur:   25px;
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15),
                  inset 0 1px 0 rgba(255, 255, 255, 0.3);

  /* ---------- Type ---------- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', ui-monospace, 'Menlo', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;

  /* Type scale — used 1:1 by Tailwind text-* classes in source */
  --fs-xs:   0.75rem;   /* 12px */
  --fs-sm:   0.875rem;  /* 14px */
  --fs-base: 1rem;      /* 16px */
  --fs-lg:   1.125rem;  /* 18px */
  --fs-xl:   1.25rem;   /* 20px */
  --fs-2xl:  1.5rem;    /* 24px */
  --fs-3xl:  1.875rem;  /* 30px */
  --fs-4xl:  2.25rem;   /* 36px */
  --fs-5xl:  3rem;      /* 48px */
  --fs-6xl:  3.75rem;   /* 60px */

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  --lh-tight: 1.15;
  --lh-snug:  1.3;
  --lh-base:  1.5;
  --lh-loose: 1.75;

  /* ---------- Spacing (4px base) ---------- */
  --sp-1: 0.25rem;  /* 4 */
  --sp-2: 0.5rem;   /* 8 */
  --sp-3: 0.75rem;  /* 12 */
  --sp-4: 1rem;     /* 16 */
  --sp-6: 1.5rem;   /* 24 */
  --sp-8: 2rem;     /* 32 */
  --sp-12: 3rem;    /* 48 */
  --sp-16: 4rem;    /* 64 */
  --sp-24: 6rem;    /* 96 */

  /* ---------- Radii ---------- */
  --r-sm:   0.375rem;  /* 6  — chips / inputs */
  --r-md:   0.5rem;    /* 8  — small cards */
  --r-lg:   0.75rem;   /* 12 — cards */
  --r-xl:   1rem;      /* 16 — glass cards */
  --r-2xl:  1.5rem;    /* 24 — feature cards */
  --r-full: 9999px;    /* CTA buttons + chips */

  /* ---------- Shadow / Elevation ---------- */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(31, 38, 135, 0.15);
  --shadow-xl: 0 20px 40px rgba(31, 38, 135, 0.2),
               0 15px 25px rgba(107, 33, 168, 0.15);

  /* Neon CTA shadow — signature look */
  --shadow-neon: 0 0 25px rgba(212, 176, 56, 0.55),
                 0 0 45px rgba(216, 126, 55, 0.35),
                 inset 0 1px 0 rgba(255, 255, 255, 0.2);
  --shadow-neon-hover: 0 0 30px rgba(212, 176, 56, 0.7),
                       0 0 60px rgba(216, 126, 55, 0.5),
                       0 0 80px rgba(255, 30, 60, 0.25),
                       inset 0 1px 0 rgba(255, 255, 255, 0.3);

  /* ---------- Motion ---------- */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce:  cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --dur-fast: 200ms;
  --dur-base: 300ms;
  --dur-slow: 400ms;
  --dur-amb:  3000ms;  /* ambient anims (shimmer/gradient flow) */
}

/* ---------- Dark mode ---------- */
:root.dark, .dark {
  --bg:      var(--queva-midnight);
  --surface: #232847;
  --fg1:     #f4ecdb;
  --fg2:     #c9c4b8;
  --fg3:     #8e8a7e;
  --border:  rgba(212, 176, 56, 0.18);

  --glass-bg:     rgba(35, 40, 71, 0.65);
  --glass-border: rgba(212, 176, 56, 0.25);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45),
                  inset 0 1px 0 rgba(212, 176, 56, 0.18);
}

/* ==========================================================================
   Semantic typography classes
   Use these instead of raw Tailwind for consistency in design-system files.
   ========================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--fg1);
  background: var(--bg);
}

.h-display {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: clamp(2.25rem, 5vw, 3.75rem);  /* 4xl → 6xl */
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

.h1 {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
}

.h2 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
}

.h3 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
}

.h4 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
}

.body-lg { font-size: var(--fs-lg); line-height: var(--lh-base); color: var(--fg2); }
.body    { font-size: var(--fs-base); line-height: var(--lh-base); color: var(--fg2); }
.body-sm { font-size: var(--fs-sm); line-height: var(--lh-base); color: var(--fg2); }
.caption { font-size: var(--fs-xs); line-height: var(--lh-base); color: var(--fg3); }

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--queva-ember);
}
.dark .eyebrow { color: var(--queva-gold); }

.code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--queva-midnight);
  color: var(--queva-gold);
  padding: 0.1em 0.35em;
  border-radius: var(--r-sm);
}

/* Signature gradient text — gold → ember → signal */
.gradient-text {
  background: linear-gradient(90deg, var(--queva-gold), var(--queva-ember), var(--queva-signal), var(--queva-ember), var(--queva-gold));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: queva-gradient-shift 8s ease infinite;
}
.dark .gradient-text {
  background: linear-gradient(90deg, var(--queva-gold), var(--queva-ember), var(--queva-signal), var(--queva-ember), var(--queva-gold));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes queva-gradient-shift {
  0%   { background-position: 0% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0% center; }
}

/* Hero glow text — gold/ember warmth on midnight */
.glow-text {
  text-shadow: 0 0 10px var(--glow-gold),
               0 0 20px var(--glow-ember),
               0 0 40px var(--glow-signal);
  animation: queva-space-glow 4s ease-in-out infinite;
}
@keyframes queva-space-glow {
  0%, 100% {
    text-shadow: 0 0 10px var(--glow-gold), 0 0 20px var(--glow-ember);
    color: #fff5dc;
  }
  50% {
    text-shadow: 0 0 20px rgba(212, 176, 56, 0.7),
                 0 0 40px rgba(216, 126, 55, 0.5),
                 0 0 60px var(--glow-signal);
    color: #ffe9b8;
  }
}
