/* ============================================================
   Mallorca Wedding Stories — design tokens & base
   Warm Mediterranean × editorial minimal
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: #1a1a1a; }

img { max-width: 100%; display: block; }
button { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ---------- Theme axes: palette × mode ---------- */
.site {
  --maxw: 1280px;
  --pad: clamp(20px, 5vw, 80px);
  --radius: 2px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Jost', system-ui, sans-serif;

  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Font pairings */
.site[data-fonts="cormorant"] { --font-display: 'Cormorant Garamond', Georgia, serif; --font-sans: 'Jost', system-ui, sans-serif; --disp-weight: 500; }
.site[data-fonts="marcellus"] { --font-display: 'Marcellus', Georgia, serif; --font-sans: 'Archivo', system-ui, sans-serif; --disp-weight: 400; }
.site[data-fonts="garamond"]  { --font-display: 'EB Garamond', Georgia, serif; --font-sans: 'Hanken Grotesk', system-ui, sans-serif; --disp-weight: 500; }

/* ===== OLIVE — brand default (cream + olive green from the logo leaf) ===== */
.site[data-palette="olive"][data-mode="light"] {
  --bg: #fbf9f2;
  --bg-alt: #f2ece0;
  --surface: #e8e0cf;
  --ink: #2f312c;
  --muted: #706f61;
  --line: #e4dccb;
  --accent: #7c8456;
  --accent-soft: rgba(124,132,86,.14);
  --accent-ink: #fbf9f2;
}
.site[data-palette="olive"][data-mode="dark"] {
  --bg: #22241e;
  --bg-alt: #2a2c25;
  --surface: #33352d;
  --ink: #ece9dd;
  --muted: #a7a694;
  --line: #3c3e34;
  --accent: #9aa372;
  --accent-soft: rgba(154,163,114,.20);
  --accent-ink: #22241e;
}

/* ===== PEACH — warm apricot accent (from the peach swatch) ===== */
.site[data-palette="peach"][data-mode="light"] {
  --bg: #fcf9f3;
  --bg-alt: #f5ece0;
  --surface: #eedcc8;
  --ink: #332f2a;
  --muted: #786d60;
  --line: #ecdfcc;
  --accent: #cf8a57;
  --accent-soft: rgba(207,138,87,.15);
  --accent-ink: #fcf9f3;
}
.site[data-palette="peach"][data-mode="dark"] {
  --bg: #262019;
  --bg-alt: #2f271f;
  --surface: #3a3025;
  --ink: #efe7da;
  --muted: #b1a390;
  --line: #41362b;
  --accent: #e2a06b;
  --accent-soft: rgba(226,160,107,.20);
  --accent-ink: #262019;
}

/* ===== TAUPE — stone neutral accent (from the taupe/sand swatches) ===== */
.site[data-palette="taupe"][data-mode="light"] {
  --bg: #faf7f1;
  --bg-alt: #f0ebdf;
  --surface: #e4dccd;
  --ink: #322f2b;
  --muted: #776f64;
  --line: #e4dccb;
  --accent: #9c8a73;
  --accent-soft: rgba(156,138,115,.16);
  --accent-ink: #faf7f1;
}
.site[data-palette="taupe"][data-mode="dark"] {
  --bg: #242019;
  --bg-alt: #2c2820;
  --surface: #36312a;
  --ink: #ece7dc;
  --muted: #aaa391;
  --line: #3e382f;
  --accent: #c2ad96;
  --accent-soft: rgba(194,173,150,.20);
  --accent-ink: #242019;
}

/* ---------- Typographic system ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.eyebrow.muted { color: var(--muted); }

.display {
  font-family: var(--font-display);
  font-weight: var(--disp-weight, 500);
  line-height: 0.98;
  letter-spacing: -0.01em;
  font-feature-settings: "liga" 1, "dlig" 1;
  margin: 0;
}
.display .it { font-style: italic; }

h1.display { font-size: clamp(48px, 8.5vw, 132px); }
h2.display { font-size: clamp(34px, 5.4vw, 76px); line-height: 1.02; }
h3.display { font-size: clamp(24px, 3vw, 40px); line-height: 1.05; }

.lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.42;
  color: var(--ink);
}

.body {
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.72;
  color: var(--muted);
  font-weight: 350;
}

.section {
  position: relative;
  padding-block: clamp(72px, 11vw, 168px);
}
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: var(--font-sans);
  font-size: 12.5px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 500;
  padding: 16px 30px;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg);
  cursor: pointer; border-radius: var(--radius);
  transition: background .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.on-dark { border-color: rgba(255,255,255,.65); background: transparent; color: #fff; }
.btn.on-dark:hover { background: #fff; color: #1a1a1a; border-color: #fff; }

.link-underline {
  position: relative; display: inline-flex; align-items: center; gap: .6em;
  background: none; border: 0;
  font-family: var(--font-sans);
  font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500;
  color: var(--ink); cursor: pointer; padding: 0 0 4px; white-space: nowrap;
}
.link-underline::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: currentColor; transform-origin: right; transform: scaleX(1);
  transition: transform .5s var(--ease);
}
.link-underline:hover::after { transform-origin: left; transform: scaleX(0); }
.link-underline .arrow { transition: transform .5s var(--ease); }
.link-underline:hover .arrow { transform: translateX(5px); }

.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Reveal animation (motion-aware) ---------- */
.reveal { opacity: 1; }
.site[data-motion="gentle"] .reveal,
.site[data-motion="cinematic"] .reveal {
  opacity: 0;
  transform: translateY(var(--reveal-y, 24px));
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.site[data-motion="cinematic"] .reveal { --reveal-y: 42px; }
.site[data-motion="gentle"] .reveal.in,
.site[data-motion="cinematic"] .reveal.in {
  opacity: 1; transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .site[data-motion] .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Image placeholder ---------- */
.ph {
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg,
      color-mix(in oklab, var(--surface), var(--bg) 35%) 0 14px,
      color-mix(in oklab, var(--surface), var(--bg) 55%) 14px 28px);
  color: var(--muted);
  display: grid; place-items: center;
}
.ph::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix type='saturate' values='0'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.06; mix-blend-mode: multiply;
}
.ph .ph-label {
  position: relative; z-index: 1;
  font-family: 'Courier New', monospace;
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: color-mix(in oklab, var(--muted), var(--ink) 20%);
  background: color-mix(in oklab, var(--bg), transparent 18%);
  padding: 6px 11px; border: 1px solid var(--line);
  text-align: center; max-width: 80%;
  display: flex; align-items: center; gap: 8px;
}
.ph .play {
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--ink), transparent 40%);
  display: grid; place-items: center; position: relative; z-index: 1;
  background: color-mix(in oklab, var(--bg), transparent 35%);
  transition: transform .5s var(--ease), background .5s var(--ease);
}
.ph .play::before {
  content: ""; width: 0; height: 0; margin-left: 3px;
  border-top: 8px solid transparent; border-bottom: 8px solid transparent;
  border-left: 13px solid var(--ink);
}
a:hover > .ph .play, .ph-hover:hover .play { transform: scale(1.08); background: var(--accent); }
a:hover > .ph .play::before, .ph-hover:hover .play::before { border-left-color: var(--accent-ink); }

/* shimmer on dark hero placeholders */
.ph.cinematic {
  background:
    radial-gradient(120% 90% at 70% 10%, color-mix(in oklab, var(--accent), transparent 78%) 0%, transparent 55%),
    linear-gradient(180deg, color-mix(in oklab, var(--ink), transparent 35%) 0%, color-mix(in oklab, var(--ink), transparent 8%) 100%);
}

/* ---------- Utility ---------- */
.grain-fixed::before {
  content: ""; position: fixed; inset: 0; z-index: 9; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100' height='100' filter='url(%23n)' opacity='0.4'/></svg>");
  opacity: 0.022; mix-blend-mode: overlay;
}
