/* ═══════════════════════════════════════
   ratnakala — GLOBAL STYLES
   Design System, Reset & Typography
═══════════════════════════════════════ */

/* ── Google font──────────────── */
@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=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Custom Properties ────────── */
:root {
  /* Colors */
  --clr-bg: #0D0D0D;
  --clr-surface: #161616;
  --clr-surface-2: #1E1E1E;
  --clr-border: rgba(201, 169, 110, 0.15);
  --clr-gold: #C9A96E;
  --clr-gold-light: #E8D5B5;
  --clr-gold-dark: #A07840;
  --clr-text: #F5F5F0;
  --clr-text-muted: #9A9A90;
  --clr-text-dim: #6A6A62;
  --clr-white: #FFFFFF;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.7);
  --shadow-gold: 0 0 40px rgba(201, 169, 110, 0.12);

  /* Transitions */
  --ease-default: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-md: 400ms;
  --duration-slow: 700ms;

  /* Layout */
  --container-max: 1280px;
  --nav-height: 88px;
}

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

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

body {
  background-color: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  /* place behind content so it doesn't overlap elements */
  z-index: -1;
  opacity: 0.5;
}

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

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

ul,
ol {
  list-style: none;
}

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

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* ── Typography ───────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--clr-text);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

h4 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 0.95rem;
}

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

/* ── Layout Utilities ─────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

.section-padding {
  padding: var(--space-xl) 0;
}

@media (min-width: 1024px) {
  .section-padding {
    padding: var(--space-3xl) 0;
  }
}

/* ── Section Header ───────────────── */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-gold);
  margin-bottom: var(--space-sm);
}

.section-eyebrow::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--clr-gold);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  max-width: 540px;
  margin-bottom: var(--space-lg);
}

.section-header {
  margin-bottom: var(--space-xl);
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.section-header.centered .section-eyebrow {
  justify-content: center;
}

/* ── Text Utilities ───────────────── */
.text-gold {
  color: var(--clr-gold);
}

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

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

/* ── Display Utilities ────────────── */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

/* ── Grid ─────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--clr-gold-dark);
  border-radius: 3px;
}

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

/* ── Selection ────────────────────── */
::selection {
  background: rgba(201, 169, 110, 0.25);
  color: var(--clr-gold-light);
}

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

/* Divider */
.divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--clr-gold), transparent);
  margin: var(--space-md) 0;
}

.divider.center {
  margin: var(--space-md) auto;
}