/*
 * Phil Neil Theme V2 - Premium Dark Edition
 * Inspired by A16Z aesthetic
 * GT-Alpina Typography
 */

/* ========================================
   FONT FACES - GT ALPINA
   ======================================== */

@font-face {
  font-family: 'GT Alpina';
  src: url('../fonts/GT-Alpina-Standard-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GT Alpina';
  src: url('../fonts/GT-Alpina-Standard-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GT Alpina';
  src: url('../fonts/GT-Alpina-Standard-Regular-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'GT Alpina';
  src: url('../fonts/GT-Alpina-Standard-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GT Alpina';
  src: url('../fonts/GT-Alpina-Standard-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ========================================
   CSS CUSTOM PROPERTIES - PREMIUM PALETTE
   ======================================== */

:root {
  /* Premium Warm Palette - Lewis Howes Inspired */
  --color-navy-darkest: #0D0D0D;
  --color-navy-dark: #1A1A1A;
  --color-navy: #252525;
  --color-navy-light: #333333;

  --color-orange-dark: #C44B1A;
  --color-orange: #F15A23;
  --color-orange-light: #FF7A47;

  --color-coral: #E85D4C;
  --color-coral-light: #FF8576;

  --color-cream: #FAF7F2;
  --color-white: #FFFFFF;
  --color-gray-light: #F5F2ED;
  --color-gray: #9A9A9A;
  --color-gray-dark: #666666;

  /* Semantic Colors */
  --color-primary: var(--color-orange);
  --color-secondary: var(--color-coral);
  --color-accent: var(--color-orange);
  --color-background: var(--color-cream);
  --color-surface: var(--color-white);
  --color-surface-elevated: var(--color-gray-light);
  --color-text: var(--color-navy-darkest);
  --color-text-muted: var(--color-gray-dark);
  --color-border: rgba(0, 0, 0, 0.08);

  /* Typography */
  --font-heading: 'GT Alpina', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Font Sizes (Fluid) - Lewis Howes Scale */
  --text-xs: clamp(0.875rem, 0.875rem + 0.15vw, 1rem);
  --text-sm: clamp(1rem, 1rem + 0.185vw, 1.125rem);
  --text-md: clamp(1.125rem, 1.125rem + 0.37vw, 1.375rem);
  --text-lg: clamp(1.25rem, 1.25rem + 1.11vw, 2rem);
  --text-xl: clamp(1.5rem, 1.5rem + 1.67vw, 2.625rem);
  --text-2xl: clamp(2rem, 2rem + 2.96vw, 4rem);
  --text-3xl: clamp(2.75rem, 2.75rem + 3.33vw, 5rem);
  --text-4xl: clamp(3.5rem, 3.5rem + 4vw, 6rem);
  --text-5xl: clamp(4rem, 4rem + 6.3vw, 7.75rem);

  /* Line Heights */
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;
  --leading-loose: 1.75;

  /* Spacing (8px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 6rem;
  --space-16: 8rem;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 720px;
  --container-padding: clamp(1rem, 4vw, 2rem);
  --section-spacing: clamp(3.5rem, 6vw, 5rem);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(238, 224, 203, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Z-Index */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
}

/* Dark Mode Override (if toggled) */
[data-theme="dark"] {
  --color-background: var(--color-navy-darkest);
  --color-surface: var(--color-navy-dark);
  --color-surface-elevated: var(--color-navy);
  --color-text: var(--color-cream);
  --color-text-muted: var(--color-gray);
  --color-border: rgba(255, 255, 255, 0.1);
}

/* ========================================
   BASE RESET & DEFAULTS
   ======================================== */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background-color: var(--color-background);
  min-height: 100vh;
  transition: background-color var(--transition-base), color var(--transition-base);
}

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

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.5em;
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 300;
  line-height: var(--leading-tight);
}

h2 {
  font-size: var(--text-3xl);
  font-weight: 400;
  line-height: var(--leading-snug);
}

h3 {
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: var(--leading-snug);
}

h4 {
  font-size: var(--text-xl);
  font-weight: 500;
}

h5 {
  font-size: var(--text-lg);
  font-weight: 500;
}

h6 {
  font-size: var(--text-md);
  font-weight: 500;
}

p {
  margin-bottom: 1.5em;
  max-width: 65ch;
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--color-text-muted);
}

.text-small {
  font-size: var(--text-sm);
}

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

/* Accent text */
.text-gold,
.text-accent {
  color: var(--color-orange);
}

.text-coral {
  color: var(--color-coral);
}

/* ========================================
   LINKS
   ======================================== */

a {
  color: var(--color-orange);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--color-orange-light);
}

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

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-top: var(--section-spacing);
  padding-bottom: var(--section-spacing);
}

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

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

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Flexbox */
.flex { display: flex; }
.flex--center { align-items: center; justify-content: center; }
.flex--between { justify-content: space-between; align-items: center; }
.flex--column { flex-direction: column; }
.flex--gap { gap: var(--space-5); }

/* ========================================
   BUTTONS - PREMIUM STYLE
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: 52px;
}

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

/* Primary - Orange */
.btn--primary {
  background-color: var(--color-orange);
  color: var(--color-white);
  border-color: var(--color-orange);
  box-shadow: 0 4px 14px rgba(241, 90, 35, 0.25);
}

.btn--primary:hover {
  background-color: var(--color-orange-dark);
  border-color: var(--color-orange-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(241, 90, 35, 0.35);
}

/* Secondary - Outline */
.btn--secondary {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}

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

/* Ghost */
.btn--ghost {
  background-color: transparent;
  color: var(--color-orange);
  border-color: transparent;
  padding: var(--space-2) 0;
  min-height: auto;
}

.btn--ghost:hover {
  color: var(--color-orange-dark);
}

/* Button Sizes */
.btn--sm {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-xs);
  min-height: 44px;
}

.btn--lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-md);
  min-height: 60px;
}

/* Dark/Black button (Lewis Howes style) */
.btn--dark {
  background-color: var(--color-navy-darkest);
  color: var(--color-white);
  border-color: var(--color-navy-darkest);
}

.btn--dark:hover {
  background-color: var(--color-navy-dark);
  border-color: var(--color-navy-dark);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* ========================================
   CARDS - PREMIUM GLASS EFFECT
   ======================================== */

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 400;
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.card__description {
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

/* ========================================
   IMAGES
   ======================================== */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.img--rounded {
  border-radius: var(--radius-lg);
}

.img--circle {
  border-radius: var(--radius-full);
}

/* Premium Placeholder */
.placeholder-img {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray);
  font-size: var(--text-sm);
  text-align: center;
  padding: var(--space-4);
}

/* ========================================
   FORMS
   ======================================== */

input,
textarea,
select {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.5;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  color: var(--color-text);
  width: 100%;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-cream);
  box-shadow: 0 0 0 3px rgba(238, 224, 203, 0.15);
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
   DECORATIVE ELEMENTS
   ======================================== */

/* Accent line */
.accent-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-orange), var(--color-coral));
  margin-bottom: var(--space-5);
  border-radius: 2px;
}

.accent-line--center {
  margin-left: auto;
  margin-right: auto;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-coral) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow effect */
.glow {
  box-shadow: var(--shadow-glow);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

[data-animate-stagger].is-visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
[data-animate-stagger].is-visible > *:nth-child(2) { transition-delay: 100ms; opacity: 1; transform: translateY(0); }
[data-animate-stagger].is-visible > *:nth-child(3) { transition-delay: 200ms; opacity: 1; transform: translateY(0); }
[data-animate-stagger].is-visible > *:nth-child(4) { transition-delay: 300ms; opacity: 1; transform: translateY(0); }
[data-animate-stagger].is-visible > *:nth-child(5) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }
[data-animate-stagger].is-visible > *:nth-child(6) { transition-delay: 500ms; opacity: 1; transform: translateY(0); }

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

  [data-animate] {
    opacity: 1;
    transform: none;
  }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 480px) {
  :root {
    --container-padding: 1.25rem;
    --section-spacing: 4rem;
  }
}

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

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