/* ==========================================================================
   Bei Studios — base.css
   Reset, design tokens, typography, utilities
   ========================================================================== */

:root {
  /* Palette — warm oil-painting gallery: cream, warm charcoal, rust accent */
  --ink:        #1c1814;
  --ink-soft:   #2e2822;
  --ink-muted:  #6b6157;
  --ink-faint:  #a59a8d;
  --paper:      #f6efe2;
  --paper-2:    #ede2cc;
  --paper-warm: #e0cfad;
  --line:       rgba(28, 24, 20, 0.14);
  --line-soft:  rgba(28, 24, 20, 0.07);

  --accent:        #b5431e;   /* rust / terracotta — echoes Ignition */
  --accent-hover:  #8f3315;
  --accent-soft:   #f3d5b7;
  --terracotta:    #b5431e;
  --gold:          #b5893d;   /* honey */

  /* Typography */
  --font-serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Layout */
  --container: 1200px;
  --container-narrow: 860px;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-2: 0 4px 12px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.08);
  --shadow-3: 0 20px 60px rgba(0,0,0,0.2);

  --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:  180ms;
  --dur:       320ms;
  --dur-slow:  600ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

input, textarea, select {
  font: inherit;
  color: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.display {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6.5vw, 5.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.display-xl {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
h4 { font-size: 1.25rem; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 62ch;
}

.muted { color: var(--ink-muted); }
.small { font-size: 0.875rem; }
.tiny  { font-size: 0.75rem; letter-spacing: 0.05em; }

blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-style: italic;
  line-height: 1.4;
  color: var(--ink);
  max-width: 40ch;
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}
.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

section { padding-block: clamp(4rem, 9vw, 8rem); }

/* Utilities */
.flow > * + * { margin-top: var(--space-4); }
.stack-sm > * + * { margin-top: var(--space-3); }
.stack > * + * { margin-top: var(--space-5); }
.stack-lg > * + * { margin-top: var(--space-7); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

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

.divider {
  width: 60px;
  height: 1px;
  background: var(--ink);
  margin-block: var(--space-5);
}
.divider.center { margin-inline: auto; }

/* Reveal animation (progressive enhancement) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Selection */
::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-muted); }
