/* =============================================
   CardQuest — Design System (index.css)
   Apple Inspired Aesthetic (Minimal & Glassmorphic)
   ============================================= */

/* --- Google Fonts --- */
/* Inter is used as a stand-in for Apple's San Francisco */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colors — Apple Neutrals */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f5f5f7; /* Classic Apple light gray */
  --color-bg-tertiary: #ebebeb;
  
  --color-text-primary: #1d1d1f;
  --color-text-secondary: #86868b;
  --color-text-muted: #a1a1a6;
  
  --color-border: #d2d2d7;
  --color-border-hover: #c7c7cc;
  
  /* Brand Accents */
  --color-blue: #0066cc; /* Apple System Blue */
  --color-blue-hover: #0055b3;
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-blur: blur(20px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Refined, but slightly larger typography scale for better presence */
  --fs-hero: clamp(3rem, 6vw, 5.5rem);
  --fs-h1: clamp(2.5rem, 5vw, 4rem);
  --fs-h2: clamp(2rem, 4vw, 3rem);
  --fs-h3: clamp(1.5rem, 2.5vw, 2.25rem);
  --fs-h4: 1.25rem;
  --fs-body-lg: 1.125rem; /* 18px */
  --fs-body: 1rem;       /* 16px */
  --fs-body-sm: 0.875rem;
  --fs-caption: 0.75rem;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --lh-tight: 1.1;
  --lh-snug: 1.3;
  --lh-normal: 1.5;

  /* Spacing */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;
  --space-section: clamp(5rem, 10vw, 8rem);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 100px;
  --radius-circle: 50%;

  /* Shadows - Extremely subtle */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);

  /* Transitions */
  --ease-apple: cubic-bezier(0.25, 0.1, 0.25, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.3s;
  --duration-slow: 0.5s;

  /* Layout */
  --max-width: 1200px;
  --header-height: 60px; /* Slightly taller header for bigger logo */
  --container-padding: clamp(1rem, 3vw, 2rem);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  background-color: var(--color-bg-primary);
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-text-primary);
  /* Premium Aura Background */
  background-color: var(--color-bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 102, 204, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(204, 0, 102, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 204, 153, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--duration-fast);
}

a:hover {
  opacity: 0.7;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

input, select, textarea {
  font: inherit;
  color: inherit;
  background: transparent;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Scroll Reveal Animations (Subtle Glide) --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-apple),
              transform var(--duration-slow) var(--ease-apple);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

/* Selection */
::selection {
  background: rgba(0, 102, 204, 0.2);
  color: var(--color-text-primary);
}
