/* ═══════════════════════════════════════════════════════════════════════════
 * COMPONENT PRIMITIVES — DO NOT OVERWRITE
 *
 * Base styles, animations, layout utilities, and component classes.
 * Theme tokens live in tokens.css (overwritten by generate_theme).
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
 * DEFENSIVE ALIASES
 * Safety net — resolved by tokens.css if it defines the canonical names.
 * These ensure components work regardless of which naming convention
 * tokens.css uses (template placeholders vs generateTheme output).
 * ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Color aliases (component names → canonical names) */
  --color-text: var(--color-foreground);
  --color-text-secondary: var(--color-muted-foreground);
  --color-surface-elevated: color-mix(in oklch, var(--color-surface, oklch(0.97 0 0)), white 5%);
  --color-accent: var(--color-primary);
  --color-accent-foreground: var(--color-primary-foreground);
  --color-warning: var(--color-cta);
  --color-primary-light: color-mix(in oklch, var(--color-primary) 60%, white);
  --color-primary-dark: color-mix(in oklch, var(--color-primary) 80%, black);

  /* Static tokens (theme-independent) */
  --shadow-xl: 0 20px 25px -5px oklch(0.2 0 0 / 0.1), 0 8px 10px -6px oklch(0.2 0 0 / 0.05);
  --duration-slower: 1s;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
 * BASE STYLES
 * ═══════════════════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
 * ANIMATION KEYFRAMES
 * ═══════════════════════════════════════════════════════════════════════════ */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * ANIMATION UTILITIES
 * Use these classes on elements for entrance animations
 * ═══════════════════════════════════════════════════════════════════════════ */

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp var(--duration-slow) var(--ease-out) forwards;
}

.fade-in {
  opacity: 0;
  animation: fadeIn var(--duration-slow) var(--ease-out) forwards;
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-40px);
  animation: slideInLeft var(--duration-slow) var(--ease-out) forwards;
}

.slide-in-right {
  opacity: 0;
  transform: translateX(40px);
  animation: slideInRight var(--duration-slow) var(--ease-out) forwards;
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  animation: scaleIn var(--duration-slow) var(--ease-spring) forwards;
}

/* Animation Delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* Hover Effects */
.hover-lift {
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.hover-scale {
  transition: transform var(--duration-normal) var(--ease-spring);
}
.hover-scale:hover {
  transform: scale(1.02);
}

/* ═══════════════════════════════════════════════════════════════════════════
 * LAYOUT UTILITIES
 * ═══════════════════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 4rem; }
}

.section {
  padding: 5rem 0;
}

.section-sm {
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .section { padding: 8rem 0; }
  .section-sm { padding: 4rem 0; }
}

.section-accent {
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
}

.section-accent h1,
.section-accent h2,
.section-accent h3,
.section-accent h4 {
  color: var(--color-accent-text);
}

.section-overlay {
  color: white;
}

.section-overlay h1,
.section-overlay h2,
.section-overlay h3,
.section-overlay h4 {
  color: white;
}

.section-alt {
  background: var(--color-surface);
}

/* ═══════════════════════════════════════════════════════════════════════════
 * COMPONENT BASES
 * Minimal styles for common elements - extend as needed
 * ═══════════════════════════════════════════════════════════════════════════ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-primary {
  background: var(--color-cta);
  color: var(--color-cta-foreground);
  box-shadow: var(--shadow-cta-glow);
}

.btn-primary:hover {
  background: var(--color-cta-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-lg {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

/* Inputs */
.input {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface-elevated);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--color-primary) 10%, transparent);
}

.input::placeholder {
  color: var(--color-muted-foreground);
}

.input-accent {
  background: var(--color-accent-surface);
  border-color: var(--color-accent-border);
  color: var(--color-accent-text);
}

.input-accent:focus {
  border-color: var(--color-primary);
}

/* Cards */
.card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-accent {
  background: var(--color-accent-surface);
  border-color: var(--color-accent-border);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

/* ═══════════════════════════════════════════════════════════════════════════
 * SPECIAL EFFECTS
 * ═══════════════════════════════════════════════════════════════════════════ */

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary), var(--color-cta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
 * RESPONSIVE UTILITIES
 * ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * LANDING PAGE TEMPLATE - Design System
 *
 * This file contains design tokens and utilities. The LLM will generate
 * component-specific styles as needed. Do not add component styles here.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* PLACEHOLDER — replaced by generate_theme */


:root {
  /* ─────────────────────────────────────────────────────────────────────────
   * COLOR TOKENS (OKLCH)
   * Adjust these values to change the entire color scheme
   * ───────────────────────────────────────────────────────────────────────── */

  /* Primary Brand — Royal Plum */
  --color-primary: oklch(0.4 0.2 310);
  --color-primary-light: oklch(0.6 0.18 310);
  --color-primary-dark: oklch(0.28 0.2 310);

  /* CTA Color — Warm Coral (high contrast on dark plum) */
  --color-cta: oklch(0.72 0.18 35);
  --color-cta-hover: oklch(0.66 0.2 35);
  --color-cta-foreground: oklch(0.99 0 0);
  --color-primary-foreground: oklch(0.99 0 0);

  /* Semantic Colors */
  --color-success: oklch(0.65 0.18 145);
  --color-warning: oklch(0.76 0.16 70);
  --color-error: oklch(0.55 0.22 25);

  /* Light Mode (default) — warm near-white */
  --color-background: oklch(0.99 0.004 40);
  --color-surface: oklch(0.97 0.005 310);
  --color-surface-elevated: oklch(1 0 0);
  --color-text: oklch(0.15 0.04 310);
  --color-text-secondary: oklch(0.45 0.04 310);
  --color-muted: oklch(0.96 0.005 310);
  --color-muted-foreground: oklch(0.45 0.04 310);
  --color-border: oklch(0.9 0.01 310);

  /* Accent Section — deep plum for dark branded sections */
  --color-accent-bg: oklch(0.4 0.2 310);
  --color-accent-text: oklch(0.99 0 0);
  --color-accent-muted: oklch(0.7 0.08 310);
  --color-accent-surface: oklch(0.34 0.2 310);
  --color-accent-border: oklch(0.3 0.18 310);

  /* ─────────────────────────────────────────────────────────────────────────
   * TYPOGRAPHY
   * ───────────────────────────────────────────────────────────────────────── */
  /* PLACEHOLDER — replaced by generate_theme */
  --font-heading: "DM Serif Display", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;

  /* ─────────────────────────────────────────────────────────────────────────
   * ANIMATION TIMING
   * ───────────────────────────────────────────────────────────────────────── */
  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
  --duration-slow: 0.6s;
  --duration-slower: 1s;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ─────────────────────────────────────────────────────────────────────────
   * SPACING & SIZING
   * ───────────────────────────────────────────────────────────────────────── */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* ─────────────────────────────────────────────────────────────────────────
   * SHADOWS
   * ───────────────────────────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px oklch(0.2 0 0 / 0.05);
  --shadow-md:
    0 4px 6px -1px oklch(0.2 0 0 / 0.07), 0 2px 4px -2px oklch(0.2 0 0 / 0.05);
  --shadow-lg:
    0 10px 15px -3px oklch(0.2 0 0 / 0.1), 0 4px 6px -4px oklch(0.2 0 0 / 0.05);
  --shadow-xl:
    0 20px 25px -5px oklch(0.2 0 0 / 0.1), 0 8px 10px -6px oklch(0.2 0 0 / 0.05);
  --shadow-glow: 0 0 40px
    color-mix(in oklch, var(--color-primary) 30%, transparent);
  --shadow-cta-glow: 0 0 30px
    color-mix(in oklch, var(--color-cta) 40%, transparent);
}

