/* ============================================================
   GLOBAL DESIGN TOKENS — suryachowdary.in
   Cinematic Dark Aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Colors */
  --color-bg:           #0a0a0a;
  --color-bg-secondary: #111111;
  --color-bg-tertiary:  #1a1a1a;
  --color-surface:      #141414;
  --color-surface-hover:#1e1e1e;
  --color-border:       rgba(201, 169, 110, 0.15);
  --color-border-hover: rgba(201, 169, 110, 0.40);

  /* Gold accent spectrum */
  --color-gold:         #c9a96e;
  --color-gold-light:   #e2c99a;
  --color-gold-dark:    #a07840;
  --color-gold-muted:   rgba(201, 169, 110, 0.12);
  --color-gold-glow:    rgba(201, 169, 110, 0.25);

  /* Text */
  --color-text-primary:   #f5f0e8;
  --color-text-secondary: #a89880;
  --color-text-muted:     #5a5248;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  /* Font sizes (fluid) */
  --text-xs:   clamp(0.70rem, 1vw,   0.75rem);
  --text-sm:   clamp(0.85rem, 1.2vw, 0.875rem);
  --text-base: clamp(1rem,    1.5vw, 1.0625rem);
  --text-lg:   clamp(1.1rem,  1.8vw, 1.25rem);
  --text-xl:   clamp(1.25rem, 2vw,   1.5rem);
  --text-2xl:  clamp(1.5rem,  2.5vw, 2rem);
  --text-3xl:  clamp(2rem,    4vw,   3rem);
  --text-4xl:  clamp(2.5rem,  6vw,   4.5rem);
  --text-hero: clamp(3.5rem,  10vw,  8rem);

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

  /* Borders & Radii */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-gold-sm: 0 0 12px rgba(201, 169, 110, 0.20);
  --shadow-gold-md: 0 0 30px rgba(201, 169, 110, 0.25);
  --shadow-gold-lg: 0 0 60px rgba(201, 169, 110, 0.20);
  --shadow-card:    0 4px 24px rgba(0, 0, 0, 0.50);
  --shadow-card-hover: 0 8px 40px rgba(0, 0, 0, 0.70);

  /* Motion */
  --ease-cinematic:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce:     cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   150ms;
  --duration-base:   300ms;
  --duration-slow:   600ms;
  --duration-slower: 1000ms;

  /* Z-index scale */
  --z-base:     0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-nav:      500;
  --z-toast:    600;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

p {
  color: var(--color-text-secondary);
  line-height: 1.75;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-smooth);
}

a:hover {
  color: var(--color-gold);
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-gold-dark);
  border-radius: var(--radius-full);
}

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

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

/* ── Focus Visible ── */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Utility: Section Wrapper ── */
.section-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--section-padding) clamp(1.25rem, 5vw, 3rem);
}

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

/* ── Utility: Section Label ── */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-md);
}

/* ── Utility: Divider ── */
.gold-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--color-gold), transparent);
  margin: var(--space-lg) 0;
}

/* ── Utility: Card Base ── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition:
    transform var(--duration-base) var(--ease-cinematic),
    border-color var(--duration-base) var(--ease-smooth),
    box-shadow var(--duration-base) var(--ease-smooth);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-card-hover), var(--shadow-gold-sm);
}

/* ── Utility: Button Base ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition:
    background-color var(--duration-base) var(--ease-smooth),
    color var(--duration-base) var(--ease-smooth),
    border-color var(--duration-base) var(--ease-smooth),
    transform var(--duration-fast) var(--ease-smooth),
    box-shadow var(--duration-base) var(--ease-smooth);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--color-gold);
  color: var(--color-bg);
  border-color: var(--color-gold);
}

.btn-primary:hover {
  background-color: var(--color-gold-light);
  border-color: var(--color-gold-light);
  box-shadow: var(--shadow-gold-md);
  color: var(--color-bg);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-gold);
  border-color: var(--color-border-hover);
}

.btn-secondary:hover {
  border-color: var(--color-gold);
  background-color: var(--color-gold-muted);
  color: var(--color-gold-light);
}

/* ── Utility: Tag / Badge ── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--color-gold-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-gold);
  letter-spacing: 0.03em;
  transition:
    background-color var(--duration-base) var(--ease-smooth),
    border-color var(--duration-base) var(--ease-smooth),
    box-shadow var(--duration-base) var(--ease-smooth);
}

.tag:hover {
  background-color: rgba(201, 169, 110, 0.20);
  border-color: var(--color-gold);
  box-shadow: var(--shadow-gold-sm);
}

/* ── Background Radial Glow ── */
.bg-radial-gold {
  background: radial-gradient(
    ellipse 60% 40% at 50% 0%,
    rgba(201, 169, 110, 0.06) 0%,
    transparent 70%
  );
}

/* ── Horizontal Rule ── */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-2xl) 0;
}

/* ── Images ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── 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;
  }
}
