@import "tailwindcss" source(none);
@source "../src";
@plugin "tailwindcss-animate";

@custom-variant dark (&:is(.dark *));

@theme inline {
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);
  --radius-4xl: calc(var(--radius) + 16px);
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-nav: var(--nav-bg);
  --color-nav-foreground: var(--nav-foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-ring-offset-background: var(--background);

  --color-neon-cyan: var(--neon-cyan);
  --color-neon-lime: var(--neon-lime);
  --color-gold: var(--gold);
  --color-silver: var(--silver);
  --color-surface: var(--surface);
  --color-surface-strong: var(--surface-strong);
  --color-hairline: var(--hairline);
  --color-ink: var(--ink);
  --color-wash: var(--wash);

  --font-display: var(--font-display-family);
  --font-sans: var(--font-body-family);
}

/* ---------- Unique Luxury Matte Obsidian ---------- */
:root {
  --radius: 0.75rem;
  --section-space: 8rem;

  --font-display-family: "Barlow Condensed", "Syne", sans-serif;
  --font-body-family: "Plus Jakarta Sans", sans-serif;
  --display-tracking: -0.01em;

  --background: #000000;
  --foreground: #f8fafc;
  --card: #0a0a0a;
  --card-foreground: #f8fafc;
  --popover: #0f1118;
  --popover-foreground: #f8fafc;
  --primary: #dc2626;
  --primary-foreground: #ffffff;
  --ink: #0f172a;
  --wash: #111827;
  --secondary: #1a1c24;
  --secondary-foreground: #f8fafc;
  --muted: #1a1c24;
  --muted-foreground: #94a3b8;
  --accent: #ef4444;
  --accent-foreground: #ffffff;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: rgb(255 255 255 / 10%);
  --input: rgb(255 255 255 / 12%);
  --ring: #d31a23;

  --neon-cyan: #d31a23;
  --neon-lime: #ef4444;
  --gold: #d31a23;
  --silver: #f1f5f9;

  --surface: rgb(255 255 255 / 5%);
  --surface-strong: rgb(255 255 255 / 8%);
  --hairline: rgb(255 255 255 / 12%);

  --elevation: 0 40px 100px -40px rgb(0 0 0 / 80%);
  --glow: 0 0 40px rgb(211 26 35 / 15%);
}

/* ---------- Premium White Studio (default) ---------- */
.light {
  --background: #ffffff;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --popover: #ffffff;
  --popover-foreground: #0f172a;
  --primary: #dc2626;
  --primary-foreground: #ffffff;
  --ink: #0f172a;
  --wash: #f8fafc;
  --secondary: #f1f5f9;
  --secondary-foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #0f172a;
  --accent-foreground: #ffffff;
  --border: #e2e8f0;
  --input: #cbd5e1;

  --ring: #dc2626;

  --neon-cyan: #dc2626;
  --neon-lime: #0f172a;
  --gold: #dc2626;
  --silver: #0f172a;

  --surface: #f8fafc;
  --surface-strong: #f1f5f9;
  --hairline: #e2e8f0;

  --elevation: 0 10px 30px -18px rgb(15 23 42 / 25%);
  --glow: 0 0 24px rgb(220 38 38 / 18%);
}

/* ---------- Consistent heading scale ---------- */
@utility page-title {
  font-size: clamp(1.75rem, 6.2vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: none;
}

@utility section-title {
  font-size: clamp(1.75rem, 5vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: none;
}

@utility subsection-title {
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: none;
}

@layer base {
  * {
    border-color: var(--color-border);
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-family: var(--font-body-family);
    overflow-x: hidden;
  }

  h1, h2, h3, h4, .font-display {
    font-family: var(--font-display-family);
    letter-spacing: var(--display-tracking);
  }
}

/* ---------- Premium surfaces & motion ---------- */
@utility glass {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--hairline);
  box-shadow: var(--elevation);
}

@utility glass-strong {
  background: var(--surface-strong);
  backdrop-filter: blur(26px);
  border: 1px solid var(--hairline);
  box-shadow: var(--elevation);
}

@utility gold-text {
  background: linear-gradient(100deg, var(--gold), var(--silver) 55%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@utility hairline {
  border-color: var(--hairline);
}

@utility ambient-glow {
  box-shadow: var(--glow);
}

@utility magnetic {
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
  will-change: transform;
  &:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--glow);
  }
}

@utility noise {
  position: relative;
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.05;
    background-image: radial-gradient(currentColor 0.5px, transparent 0.6px);
    background-size: 4px 4px;
  }
}

@utility shimmer {
  position: relative;
  overflow: hidden;
  background: var(--surface-strong);
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, var(--surface-strong), transparent);
    animation: shimmer-sweep 1.6s ease-in-out 3;
  }
}

@keyframes shimmer-sweep {
  100% { transform: translateX(100%); }
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@utility ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 32s linear infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.35); }
}

@utility live-dot {
  animation: live-pulse 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Native form controls stay readable in both themes */
select,
option,
select option {
  background-color: var(--color-background, #0b0d13);
  color: var(--color-foreground, #f8fafc);
}

/* Forms: deep red outline so every input box reads as a form field */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea,
select {
  border-width: 1px;
  border-style: solid;
  border-color: color-mix(in oklab, var(--color-primary) 55%, transparent); /* form-red-border */
}
input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
  border-color: var(--color-primary);
  outline: none;
}
