/* ==========================================================================
   Essence World — base.css
   Design tokens, reset, typography, layout helpers, motion utilities
   ========================================================================== */

:root {
  /* Surfaces */
  --ivory: #FCFAF6;
  --cream: #F6F0E6;
  --sand: #EADFCB;
  --white: #FFFFFF;

  /* Ink */
  --ink: #1C1814;
  --ink-2: #4A4238;
  --muted: #857A6B;
  --line: rgba(28, 24, 20, .1);

  /* Gold system */
  --gold: #B8903F;
  --gold-2: #D9B76A;
  --gold-3: #F1DDA8;
  --gold-deep: #8A6A22;
  --gold-grad: linear-gradient(135deg, #9C7428 0%, #D9B76A 45%, #F3E2B0 60%, #B8903F 100%);

  /* Colour accents (used sparingly for a lively, colourful feel) */
  --rose: #D4768A;
  --emerald: #2E7D68;
  --violet: #7157B5;
  --sapphire: #3A6FC4;
  --coral: #E8845A;

  /* Type */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Layout */
  --container: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 78px;
  --radius: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Elevation & motion */
  --shadow-sm: 0 2px 10px rgba(60, 40, 10, .06);
  --shadow: 0 12px 40px rgba(60, 40, 10, .10);
  --shadow-lg: 0 30px 80px rgba(60, 40, 10, .16);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---- Reset ---------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--gold-3); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* Slim scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--gold-2); border-radius: 10px; border: 2px solid var(--ivory); }
::-webkit-scrollbar-track { background: var(--cream); }

/* ---- Typography ----------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -.01em; }
h1 { font-size: clamp(44px, 7vw, 92px); }
h2 { font-size: clamp(34px, 4.6vw, 62px); }
h3 { font-size: clamp(22px, 2vw, 28px); }
em, .italic { font-style: italic; font-weight: 400; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11px; font-weight: 400; letter-spacing: .34em; text-transform: uppercase; color: var(--gold-deep);
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--gold); }
.lead { font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-2); max-width: 56ch; }

/* ---- Layout --------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 128px); position: relative; }
.section--tight { padding-block: clamp(40px, 6vw, 80px); }
.section--cream { background: var(--cream); }
.section--dark { background: var(--ink); color: var(--cream); }
.grid { display: grid; gap: clamp(16px, 2vw, 28px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-center { text-align: center; }
.hide-mobile { display: initial; }

/* ---- Icons ---------------------------------------------------------------- */
.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon--fill { fill: currentColor; stroke: none; }
.icon--sm { width: 1em; height: 1em; }
.icon--lg { width: 1.6em; height: 1.6em; }

/* ---- Scroll reveal -------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--delay, 0s); }
.reveal--left { transform: translateX(-40px); }
.reveal--right { transform: translateX(40px); }
.reveal--zoom { transform: scale(.94); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---- Preloader ------------------------------------------------------------ */
.preloader { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; background: var(--ivory); transition: opacity .7s var(--ease), visibility .7s; }
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__logo { font-family: var(--font-display); font-size: 44px; letter-spacing: .08em; text-align: center; }
.preloader__logo span { display: block; margin-top: 16px; height: 2px; width: 0; background: var(--gold-grad); animation: preload 1s var(--ease) forwards; margin-inline: auto; }
@keyframes preload { to { width: 100%; } }

/* ---- Keyframes ------------------------------------------------------------ */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .45); } 100% { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
  :root { --header-h: 66px; }
  body { font-size: 15px; }
  .hide-mobile { display: none !important; }
}
