/* ═══════════════════════════════════════════════════════
   KRIDHA PRODUCTIONS — Base Styles
   Reset, Design Tokens, Typography, Utilities
   ═══════════════════════════════════════════════════════ */

/* --- Google Fonts loaded in HTML <head> --- */

/* ── Design Tokens ── */
:root {
  --green: #00A693;
  --green-light: #00C4AE;
  --green-glow: rgba(0, 166, 147, 0.3);
  --gold: #C9A84C;
  --gold-light: #E5C56A;
  --gold-glow: rgba(201, 168, 76, 0.3);
  --white: #FFFFFF;
  --black: #050A09;
  --surface: #0A1A18;
  --surface-2: #0F2420;
  --text-primary: #E8F0EF;
  --text-secondary: #8AAFAB;
  --border: rgba(0, 166, 147, 0.15);
  --font-display: 'Cinzel', serif;
  --font-editorial: 'Cormorant Garamond', serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --radius: 8px;
  --nav-height: 80px;
}

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

html {
  font-size: 16px;
  scroll-behavior: auto; /* Lenis handles smooth scroll */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--black);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
  cursor: none;
}

ul, ol {
  list-style: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

.font-editorial {
  font-family: var(--font-editorial);
}

.font-display {
  font-family: var(--font-display);
}

p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1rem;
}

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.section-header .section-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  margin: 0 auto;
  border-radius: 2px;
}

.section-header p {
  margin-top: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

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

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--gold-light);
  box-shadow: 0 0 30px var(--gold-glow);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1.5px solid var(--green);
  color: var(--green);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--green);
  color: var(--black);
  box-shadow: 0 0 30px var(--green-glow);
  transform: translateY(-2px);
}

.btn-gold-outline {
  border: 1.5px solid var(--gold);
  color: var(--gold);
}

.btn-gold-outline:hover,
.btn-gold-outline:focus-visible {
  background: var(--gold);
  color: var(--black);
  box-shadow: 0 0 30px var(--gold-glow);
  transform: translateY(-2px);
}

/* ── Image Placeholders ── */
.img-placeholder {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 2rem;
  position: relative;
  overflow: hidden;
}

.img-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,166,147,0.08), transparent 50%, rgba(201,168,76,0.08));
  pointer-events: none;
}

.img-placeholder i {
  opacity: 0.3;
  font-size: 3rem;
}

/* ── Frosted Glass ── */
.glass-card {
  background: rgba(10, 26, 24, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── Grain Texture Overlay ── */
.grain-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  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='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* ── Scanline Overlay ── */
.scanline-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 166, 147, 0.015) 2px,
    rgba(0, 166, 147, 0.015) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ── Custom Cursor ── */
.cursor-dot {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--green);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background 0.3s;
  mix-blend-mode: difference;
}

.cursor-ring {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s, background 0.3s;
}

.cursor-hover .cursor-dot {
  width: 16px;
  height: 16px;
}

.cursor-hover .cursor-ring {
  width: 50px;
  height: 50px;
  background: var(--green-glow);
  border-color: var(--green);
}

/* ── Page Transition Curtain ── */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--green);
  z-index: 99999;
  transform: translateY(100%);
  pointer-events: none;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--green);
  transition: color var(--transition);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--gold);
}

.breadcrumb .separator {
  color: var(--text-secondary);
  opacity: 0.5;
}

/* ── Page Hero ── */
.page-hero {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding-top: var(--nav-height);
}

.page-hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.page-hero .hero-line {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--green));
  margin: 0 auto;
}

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

/* ── Selection ── */
::selection {
  background: var(--green);
  color: var(--black);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: 4px;
}

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

/* ── Responsive ── */
@media (max-width: 1024px) {
  .section {
    padding: 80px 0;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  body {
    cursor: auto;
  }

  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }

  a, button, input, select, textarea {
    cursor: auto;
  }
}

/* ── Three.js Canvas ── */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
