/* ============================================================
   DR. KIZA SUNGURA — DESIGN SYSTEM
   Foundation: CSS Custom Properties, Reset, Typography, Utilities
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Custom Properties ── */
:root {

  /* COLOR — Black Surfaces */
  --color-black:          #080808;
  --color-black-2:        #111111;
  --color-black-3:        #1A1A1A;
  --color-black-4:        #242424;

  /* COLOR — Emerald */
  --color-emerald:        #10B981;
  --color-emerald-dark:   #059669;
  --color-emerald-light:  #34D399;
  --color-emerald-muted:  rgba(16, 185, 129, 0.12);

  /* COLOR — Copper */
  --color-copper:         #B87333;
  --color-copper-light:   #D4956A;
  --color-copper-dark:    #8B5A20;
  --color-copper-muted:   rgba(184, 115, 51, 0.12);

  /* COLOR — Text */
  --color-text:           #F0EDE8;
  --color-text-muted:     #A09890;
  --color-text-subtle:    #605850;
  --color-text-inverse:   #080808;

  /* COLOR — Status */
  --color-success:        #22C55E;
  --color-warning:        #F59E0B;
  --color-danger:         #EF4444;

  /* TYPOGRAPHY — Families */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* TYPOGRAPHY — Fluid Scale */
  --text-xs:    clamp(0.75rem,  1.5vw, 0.875rem);
  --text-sm:    clamp(0.875rem, 1.8vw, 1rem);
  --text-base:  clamp(1rem,     2vw,   1.125rem);
  --text-lg:    clamp(1.125rem, 2.5vw, 1.375rem);
  --text-xl:    clamp(1.375rem, 3vw,   1.75rem);
  --text-2xl:   clamp(1.75rem,  4vw,   2.5rem);
  --text-3xl:   clamp(2.5rem,   5.5vw, 3.75rem);
  --text-4xl:   clamp(3.5rem,   7vw,   5.5rem);
  --text-hero:  clamp(2.75rem,  10vw,  8rem);

  /* TYPOGRAPHY — Line Heights */
  --leading-tight:  1.1;
  --leading-snug:   1.35;
  --leading-normal: 1.6;
  --leading-loose:  1.8;

  /* TYPOGRAPHY — Letter Spacing */
  --tracking-tight:   -0.02em;
  --tracking-normal:   0;
  --tracking-wide:     0.05em;
  --tracking-wider:    0.12em;
  --tracking-widest:   0.2em;

  /* SPACING */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;
  --space-40:  10rem;

  /* LAYOUT */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;

  /* RADII */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 9999px;

  /* MOTION — Easing */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-standard:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in-expo:   cubic-bezier(0.7, 0, 0.84, 0);

  /* MOTION — Duration */
  --duration-fast:   150ms;
  --duration-base:   280ms;
  --duration-slow:   500ms;
  --duration-slower: 800ms;

  /* SHADOWS */
  --shadow-emerald-glow: 0 0 20px rgba(16, 185, 129, 0.25);
  --shadow-copper-glow:  0 0 20px rgba(184, 115, 51, 0.25);
  --shadow-card:         0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-elevated:     0 8px 40px rgba(0, 0, 0, 0.6);
}

/* ── Modern CSS Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--color-black);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

p {
  line-height: var(--leading-normal);
}

/* ── Text Selection ── */
::selection {
  background-color: var(--color-emerald);
  color: var(--color-text-inverse);
}

/* ── Focus Styles (WCAG 2.2 AA) ── */
:focus-visible {
  outline: 2px solid var(--color-emerald);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--space-8);
  }
}

/* ── Section Spacing ── */
.section {
  padding-block: var(--space-20);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-32);
  }
}

/* ── Typography Utilities ── */
.font-display {
  font-family: var(--font-display);
}

.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-base  { font-size: var(--text-base); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-2xl   { font-size: var(--text-2xl); }
.text-3xl   { font-size: var(--text-3xl); }
.text-4xl   { font-size: var(--text-4xl); }

.text-muted   { color: var(--color-text-muted); }
.text-subtle  { color: var(--color-text-subtle); }
.text-emerald { color: var(--color-emerald); }
.text-copper  { color: var(--color-copper); }

/* ── Gradient Text — Copper ── */
.gradient-text-copper {
  background: linear-gradient(135deg, var(--color-copper), var(--color-copper-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Gradient Text — Emerald ── */
.gradient-text-emerald {
  background: linear-gradient(135deg, var(--color-emerald), var(--color-emerald-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Eyebrow Label ── */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-copper);
}

/* ── Copper Divider ── */
.divider-copper {
  border: none;
  border-top: 1px solid rgba(184, 115, 51, 0.3);
  margin-block: var(--space-8);
}

/* ── Section Heading Group ── */
.section-heading {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-heading .eyebrow {
  display: block;
  margin-bottom: var(--space-3);
}

.section-heading h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.section-heading p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-inline: auto;
}

/* ── Tracking Utilities ── */
.tracking-tight   { letter-spacing: var(--tracking-tight); }
.tracking-wide    { letter-spacing: var(--tracking-wide); }
.tracking-wider   { letter-spacing: var(--tracking-wider); }
.tracking-widest  { letter-spacing: var(--tracking-widest); }

/* ── Leading Utilities ── */
.leading-tight  { line-height: var(--leading-tight); }
.leading-snug   { line-height: var(--leading-snug); }
.leading-normal { line-height: var(--leading-normal); }
.leading-loose  { line-height: var(--leading-loose); }

/* ── Display Utilities ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Noise Texture Filter ── */
.noise-overlay {
  position: relative;
}

.noise-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  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");
  background-size: 200px 200px;
  opacity: 0.06;
  mix-blend-mode: overlay;
  z-index: 1;
}

/* ── Copper Corner Frame ── */
.copper-frame {
  position: relative;
}

.copper-frame::before,
.copper-frame::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--color-copper);
  border-style: solid;
  opacity: 0.6;
}

.copper-frame::before {
  top: -8px;
  left: -8px;
  border-width: 2px 0 0 2px;
}

.copper-frame::after {
  bottom: -8px;
  right: -8px;
  border-width: 0 2px 2px 0;
}

/* ── Background Surfaces ── */
.bg-black    { background-color: var(--color-black); }
.bg-black-2  { background-color: var(--color-black-2); }
.bg-black-3  { background-color: var(--color-black-3); }

/* ── Copper Border Utility ── */
.border-copper {
  border: 1px solid rgba(184, 115, 51, 0.3);
}

/* ── Emerald Dot Pattern (decorative) ── */
.emerald-dot-pattern {
  background-image: radial-gradient(circle, var(--color-emerald) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.15;
}

/* ══════════════════════════════════════════
   RESPONSIVE — GLOBAL OVERRIDES
   ══════════════════════════════════════════ */

/* Tighter vertical padding on phones */
@media (max-width: 639px) {
  .section {
    padding-block: var(--space-12);
  }

  .section-heading {
    margin-bottom: var(--space-8);
  }

  .section-heading h2 {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
  }
}
