/* ============================================
   base.css — Reset, Custom Properties, Typography, Global
   ============================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colours */
  --saffron: #E8772E;
  --saffron-light: #f0944f;
  --ochre: #C4712E;
  --cream: #FDF6EC;
  --earth: #3B2F2F;
  --leaf: #3A7D44;
  --leaf-dark: #2d6235;
  --sky: #1B4965;
  --sky-dark: #132f42;
  --slate: #6B7280;
  --white: #FFFFFF;
  --black: #000000;

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;

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

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --max-width-wide: 1400px;

  /* Borders & Shadows */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.7s;

  /* Nav height */
  --nav-height: 72px;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--earth);
  background-color: var(--white);
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font: inherit;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--sky);
  color: var(--white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-size: 0.875rem;
}

.skip-link:focus {
  top: var(--space-sm);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 400;
}

.display {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1, .h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.01em;
}

h2, .h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 400;
}

h3, .h3 {
  font-family: var(--font-sans);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
}

h4, .h4 {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
}

.body-lg {
  font-size: 1.25rem;
  line-height: 1.8;
}

.caption {
  font-size: 0.875rem;
  color: var(--slate);
}

.overline {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--saffron);
}

blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--sky);
  border-left: 3px solid var(--saffron);
  padding-left: var(--space-md);
  margin: var(--space-md) 0;
}

/* --- Links & Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.875rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--saffron);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--ochre);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: transparent;
  color: var(--earth);
  border: 1.5px solid var(--earth);
}

.btn--secondary:hover {
  background: var(--earth);
  color: var(--white);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.btn--ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.text-link {
  color: var(--saffron);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.text-link:hover {
  border-bottom-color: var(--saffron);
}

/* --- Scroll Reveal --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="fade"] {
  transform: none;
}

[data-reveal="slide-left"] {
  transform: translateX(-40px);
}

[data-reveal="slide-left"].is-visible {
  transform: translateX(0);
}

[data-reveal="slide-right"] {
  transform: translateX(40px);
}

[data-reveal="slide-right"].is-visible {
  transform: translateX(0);
}

[data-reveal="scale"] {
  transform: scale(0.95);
}

[data-reveal="scale"].is-visible {
  transform: scale(1);
}

/* Stagger delays for children */
[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }
[data-reveal-delay="5"] { transition-delay: 0.5s; }

/* --- Eye Motif Pulse --- */
@keyframes eye-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.eye-pulse {
  animation: eye-pulse 4s ease-in-out infinite;
}

/* --- Float Animation --- */
@keyframes gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.float {
  animation: gentle-float 6s ease-in-out infinite;
}

/* --- Dot Pulse (for world map) --- */
@keyframes dot-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

/* --- Selection --- */
::selection {
  background: var(--saffron);
  color: var(--white);
}

/* --- Focus --- */
:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
}

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

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

.color-saffron { color: var(--saffron); }
.color-sky { color: var(--sky); }
.color-leaf { color: var(--leaf); }
.color-white { color: var(--white); }
.color-slate { color: var(--slate); }
