@import "tailwindcss";

@theme {
  /* Noir Palette (doruk.ch system) */
  --color-noir-950: #0C0A09;
  --color-noir-900: #1C1917;
  --color-noir-800: #292524;
  --color-noir-700: #44403C;
  --color-noir-600: #57534E;
  --color-noir-500: #78716C;
  --color-noir-400: #A8A29E;
  --color-noir-300: #D6D3D1;
  --color-noir-200: #E7E5E4;
  --color-noir-100: #F5F5F4;
  --color-noir-50: #FAFAF9;

  /* Legacy aliases for existing markup */
  --color-night: #0C0A09;
  --color-night-light: #1C1917;
  --color-night-lighter: #292524;
  --color-smoke: #D6D3D1;
  --color-ash: #78716C;
  --color-cream: #FAFAF9;

  /* Accents */
  --color-fox: #d97706;
  --color-fox-dark: #92400e;
  --color-fox-light: #f59e0b;
  --color-sage: #059669;
  --color-sage-light: #10B981;

  /* Typography */
  --font-heading: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-mono: 'Martian Mono', ui-monospace, monospace;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Shadows */
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.16);
  --shadow-dramatic: 0 20px 60px rgba(0, 0, 0, 0.25);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--color-noir-950);
  color: var(--color-noir-300);
  overflow-x: hidden;
}

a {
  color: var(--color-fox-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-noir-50);
  font-weight: 600;
  letter-spacing: -0.02em;
}

p {
  color: var(--color-noir-400);
}

code {
  font-family: var(--font-mono);
}

::selection {
  background: var(--color-fox);
  color: var(--color-noir-950);
}

::-moz-selection {
  background: var(--color-fox);
  color: var(--color-noir-950);
}

:focus-visible {
  outline: 2px solid var(--color-fox);
  outline-offset: 2px;
  border-radius: 4px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================
   LAYOUT
   ============================================ */

.site-shell {
  position: relative;
  isolation: isolate;
}

/* Subtle noise texture */
.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E");
}

/* Ambient glows - barely visible */
.ambient-orb {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.03;
  pointer-events: none;
  z-index: -2;
}

.ambient-orb-fox {
  background: var(--color-fox);
  top: -200px;
  right: -200px;
}

.ambient-orb-slate {
  background: var(--color-sage);
  bottom: -200px;
  left: -200px;
}

/* ============================================
   COMPONENTS
   ============================================ */

.editorial-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  background: rgba(41, 37, 36, 0.96);
  color: var(--color-noir-400);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}


.hero-frame,
.panel-editorial {
  background: var(--color-noir-900);
  border: 1px solid var(--color-noir-800);
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-frame:hover,
.panel-editorial:hover {
  border-color: var(--color-noir-700);
}

.metric-pill {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--color-noir-800);
  background: var(--color-noir-950);
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-noir-500);
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-noir-50);
}

.section-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-noir-700) 20%,
    var(--color-noir-700) 80%,
    transparent
  );
}

.framework-card {
  border-radius: 12px;
  border: 1px solid var(--color-noir-800);
  background: var(--color-noir-900);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.framework-card:hover {
  border-color: var(--color-noir-700);
  box-shadow: var(--shadow-elevated);
  transform: translateY(-4px);
}

.framework-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
  background: rgba(41, 37, 36, 0.96);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-noir-500);
}

.benchmark-note {
  color: var(--color-noir-500);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px;
  background: var(--color-fox);
  color: var(--color-noir-950);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--color-fox-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(217, 119, 6, 0.2);
  text-decoration: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px;
  background: rgba(41, 37, 36, 0.92);
  color: var(--color-noir-300);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  text-decoration: none;
}

.btn-ghost:hover {
  background: rgba(68, 64, 60, 0.92);
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--color-noir-50);
  text-decoration: none;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fade-up-delay-1 { animation-delay: 0.1s; }
.fade-up-delay-2 { animation-delay: 0.2s; }
.fade-up-delay-3 { animation-delay: 0.3s; }
.fade-up-delay-4 { animation-delay: 0.4s; }
.fade-up-delay-5 { animation-delay: 0.5s; }

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-noir-900);
}

::-webkit-scrollbar-thumb {
  background: var(--color-noir-700);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-noir-600);
}

/* ============================================
   REDUCED MOTION
   ============================================ */

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