/* ═══════════════════════════════════════════════════════════
   BASE.CSS — Design Tokens, Reset, Typography, Grain
   Rotaract Club of Coimbatore
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=DM+Serif+Display:ital@0;1&family=Inter:wght@300;400;500&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Colors */
  --color-bg-deep:       #020B2D;
  --color-bg-dark:       #040F3A;
  --color-bg-mid:        #071847;
  --color-surface:       rgba(255, 255, 255, 0.04);
  --color-surface-hover: rgba(255, 255, 255, 0.08);
  --color-border:        rgba(255, 255, 255, 0.12);
  --color-border-bright: rgba(255, 255, 255, 0.25);

  /* Text */
  --color-text-primary:  #FFF8E7;
  --color-text-muted:    rgba(255, 248, 231, 0.55);
  --color-text-faded:    rgba(255, 248, 231, 0.28);

  /* Accent */
  --color-gold:          #F5A623;
  --color-gold-light:    #FFD080;
  --color-gold-glow:     rgba(245, 166, 35, 0.35);
  --color-cyan:          #00D4FF;
  --color-cyan-glow:     rgba(0, 212, 255, 0.2);
  --color-blue:          #3B82F6;
  --color-blue-glow:     rgba(59, 130, 246, 0.2);

  /* Rotaract Brand */
  --color-rotaract-blue:  #0062A3;
  --color-rotaract-gold:  #F7A81B;

  /* Glass */
  --glass-bg:            rgba(255, 255, 255, 0.05);
  --glass-bg-strong:     rgba(255, 255, 255, 0.09);
  --glass-blur:          blur(24px) saturate(180%);
  --glass-blur-heavy:    blur(40px) saturate(200%);
  --glass-border:        rgba(255, 255, 255, 0.14);
  --glass-shadow:        0 8px 32px rgba(0, 0, 0, 0.45),
                         inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --glass-shadow-gold:   0 8px 40px rgba(245, 166, 35, 0.15),
                         0 0 80px rgba(245, 166, 35, 0.05),
                         inset 0 1px 0 rgba(255, 255, 255, 0.15);

  /* Spacing */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   40px;
  --space-2xl:  64px;
  --space-3xl:  96px;
  --space-4xl:  128px;

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-serif:   'DM Serif Display', serif;
  --font-body:    'Inter', sans-serif;

  /* Transitions */
  --ease-out:    cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:    0.2s;
  --dur-med:     0.5s;
  --dur-slow:    0.9s;
  --dur-xslow:   1.4s;

  /* Z-index layers */
  --z-canvas:    0;
  --z-grain:     1;
  --z-content:   10;
  --z-nav:       100;
  --z-overlay:   200;
  --z-cursor:    9999;
}

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

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

body {
  background-color: var(--color-bg-deep);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: none;
  border: none;
  background: none;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ── Grain Texture Overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.028;
  mix-blend-mode: overlay;
}

/* ── Typography Scale ── */
.text-display-xl {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 8rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.text-display-lg {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.025em;
}

.text-display-md {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.text-heading {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.text-serif {
  font-family: var(--font-serif);
  font-style: italic;
}

.text-body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
}

.text-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 40%, var(--color-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-blue {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-blue) 60%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Utility Classes ── */
.text-muted  { color: var(--color-text-muted); }
.text-faded  { color: var(--color-text-faded); }
.text-gold   { color: var(--color-gold); }
.text-cyan   { color: var(--color-cyan); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Selection ── */
::selection {
  background: var(--color-gold-glow);
  color: var(--color-gold-light);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--color-bg-deep); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-gold), var(--color-cyan));
  border-radius: 2px;
}
