/* ============================================================
   The Cunninghams, Bali 2026
   Design system v2 — modern tropical editorial.
   Photo-led, calm, premium. Page-specific CSS lives in each
   page's own <style> block, not here.
   ============================================================ */

:root {
  /* ── palette (OKLCH) — warm ivory + ocean jade ─────────── */
  --paper:    oklch(0.985 0.008 85);   /* page base, warm ivory */
  --paper-2:  oklch(0.966 0.013 80);   /* sand panel */
  --paper-3:  oklch(0.945 0.018 76);   /* deeper sand */

  --ink:      oklch(0.255 0.020 168);  /* deep warm slate-green */
  --ink-2:    oklch(0.402 0.022 170);  /* secondary text */
  --ink-soft: oklch(0.255 0.020 168 / 0.66);
  --ink-faint:oklch(0.255 0.020 168 / 0.40);
  --line:     oklch(0.255 0.020 168 / 0.13);
  --line-2:   oklch(0.255 0.020 168 / 0.26);

  --cream:      oklch(0.978 0.012 85);
  --cream-soft: oklch(0.978 0.012 85 / 0.76);
  --cream-line: oklch(0.978 0.012 85 / 0.20);

  --jade:      oklch(0.520 0.072 188);  /* primary accent, ocean */
  --jade-deep: oklch(0.420 0.066 190);
  --forest:    oklch(0.298 0.040 178);  /* deep section background */
  --forest-2:  oklch(0.250 0.036 180);
  --clay:      oklch(0.642 0.118 46);   /* warm pop, used rarely */
  --gold:      oklch(0.760 0.098 76);

  --tracking-label: 0.22em;

  --space-3xs: 4px;  --space-2xs: 8px;  --space-xs: 12px; --space-sm: 16px;
  --space-md: 24px;  --space-lg: 32px;  --space-xl: 48px; --space-2xl: 64px;
  --space-3xl: 96px; --space-4xl: 128px; --space-5xl: 168px;

  --r-sm: 6px; --r-md: 12px; --r-lg: 18px; --r-xl: 26px; --r-pill: 999px;

  --wrap: 1200px;
  --wrap-wide: 1360px;
  --reading: 68ch;
  --nav-h: 70px;

  --ease-out: cubic-bezier(.16,1,.3,1);

  --shadow-sm: 0 10px 30px -22px oklch(0.255 0.020 168 / 0.55);
  --shadow-md: 0 28px 64px -36px oklch(0.255 0.020 168 / 0.50);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.68;
  font-size: clamp(1.02rem, 0.98rem + 0.2vw, 1.12rem);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--jade); color: var(--cream); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
svg { display: block; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--ink); color: var(--cream); padding: 10px 16px;
  border-radius: 0 0 var(--r-sm) 0; font-size: 0.8rem; font-weight: 700;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2.5px solid var(--jade); outline-offset: 3px; border-radius: 3px; }

/* ── layout ─────────────────────────────────────────────── */
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: clamp(20px, 5vw, 56px); }
.wrap-wide { max-width: var(--wrap-wide); margin: 0 auto; padding-inline: clamp(20px, 4vw, 48px); }
.reading { max-width: var(--reading); }
section { position: relative; }
.pad { padding-block: clamp(64px, 9vw, 132px); }
.pad-tight { padding-block: clamp(44px, 6vw, 80px); }
.bg-2 { background: var(--paper-2); }
.bg-3 { background: var(--paper-3); }
.bg-forest { background: var(--forest); color: var(--cream); }
.bg-ink { background: var(--ink); color: var(--cream); }

.stack-xl > * + * { margin-top: clamp(28px, 4vw, 48px); }
.stack-lg > * + * { margin-top: var(--space-lg); }
.stack-md > * + * { margin-top: var(--space-md); }
.stack-sm > * + * { margin-top: var(--space-sm); }
.stack-xs > * + * { margin-top: var(--space-xs); }
.row { display: flex; gap: var(--space-md); flex-wrap: wrap; align-items: center; }
.row.tight { gap: var(--space-sm); }

/* ── typography ─────────────────────────────────────────── */
.display, .h1, .h2, .h3, .h4 {
  font-family: "Spectral", "Hanken Grotesk", Georgia, serif;
  font-weight: 500; line-height: 1.04; letter-spacing: -0.012em;
  color: var(--ink);
}
.display {
  font-size: clamp(3rem, 1.5rem + 7vw, 6.6rem);
  line-height: 0.98; letter-spacing: -0.02em; font-weight: 600;
}
.h1 { font-size: clamp(2.5rem, 1.6rem + 4vw, 4.6rem); line-height: 1.0; letter-spacing: -0.018em; font-weight: 600; }
.h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.3rem); }
.h3 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.1rem); }
.h4 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); }
.serif-it { font-family: "Spectral", serif; font-style: italic; font-weight: 500; }
.on-dark, .on-dark .display, .on-dark .h1, .on-dark .h2, .on-dark .h3, .on-dark .h4 { color: var(--cream); }

.eyebrow {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--jade); display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; flex: none; }
.eyebrow.plain::before { display: none; }
.eyebrow.center { justify-content: center; }
.eyebrow.on-dark { color: var(--gold); }

.lede {
  font-size: clamp(1.18rem, 1.05rem + 0.6vw, 1.46rem);
  line-height: 1.5; color: var(--ink-2); font-weight: 400; max-width: 56ch;
}
.lede.on-dark { color: var(--cream-soft); }
.measure { max-width: 64ch; }
.muted { color: var(--ink-soft); }
.muted.on-dark { color: var(--cream-soft); }

.section-head { display: flex; flex-direction: column; gap: var(--space-sm);
  margin-bottom: clamp(40px, 5.5vw, 72px); max-width: 60ch; }
.section-head.center { align-items: center; text-align: center; margin-inline: auto; }

/* ── buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 15px 28px; border-radius: var(--r-pill);
  background: var(--jade); color: var(--cream); border: 1.5px solid var(--jade);
  transition: transform .4s var(--ease-out), background .4s, border-color .4s, color .4s;
}
.btn:hover { transform: translateY(-2px); background: var(--jade-deep); border-color: var(--jade-deep); }
.btn .arrow { transition: transform .4s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn.on-dark { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn.on-dark:hover { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn-ghost.on-dark { background: transparent; color: var(--cream); border-color: var(--cream-line); }
.btn-ghost.on-dark:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

/* ── chips ──────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 8px 15px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); color: var(--ink-2); background: transparent;
}
.chip.solid { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.chip.jade { background: oklch(0.520 0.072 188 / 0.12); border-color: oklch(0.520 0.072 188 / 0.4); color: var(--jade-deep); }
.chip.clay { background: oklch(0.642 0.118 46 / 0.12); border-color: oklch(0.642 0.118 46 / 0.42); color: var(--clay); }
.chip.on-dark { border-color: var(--cream-line); color: var(--cream); }

/* ── figures / media ────────────────────────────────────── */
figure { margin: 0; }
.figure { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--paper-3); }
.figure img { width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 1.2s var(--ease-out); }
.figure.zoom:hover img { transform: scale(1.04); }
.figure figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: clamp(16px, 2.5vw, 26px); color: var(--cream);
  background: linear-gradient(transparent, oklch(0.20 0.02 170 / 0.78));
  font-size: 0.9rem; font-weight: 500;
}
.figure figcaption b { font-family: "Spectral", serif; font-weight: 600;
  font-size: 1.15rem; display: block; }
.ar-4-3 { aspect-ratio: 4/3; } .ar-3-2 { aspect-ratio: 3/2; }
.ar-1-1 { aspect-ratio: 1/1; } .ar-3-4 { aspect-ratio: 3/4; } .ar-16-9 { aspect-ratio: 16/9; }

/* full-bleed media band */
.media-full { position: relative; width: 100%; height: clamp(280px, 46vw, 560px); overflow: hidden; }
.media-full img { width: 100%; height: 100%; object-fit: cover; }
.media-full .cap {
  position: absolute; inset: auto 0 0 0; padding: clamp(20px,4vw,48px);
  color: var(--cream);
  background: linear-gradient(transparent, oklch(0.20 0.02 170 / 0.62));
}

/* split: image + text, alternating */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 72px); align-items: center; }
.split .figure { aspect-ratio: 4/5; }
.split.reverse > .split-media { order: 2; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: var(--space-lg); }
  .split.reverse > .split-media { order: 0; }
  .split .figure { aspect-ratio: 3/2; }
}

/* gallery grid */
.gallery { display: grid; gap: clamp(12px, 1.6vw, 18px);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ── cards (used sparingly) ─────────────────────────────── */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(22px, 3vw, 34px);
  transition: transform .4s var(--ease-out), box-shadow .4s, border-color .4s;
}
.card.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.card-grid { display: grid; gap: clamp(16px, 2vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* ── facts row ──────────────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 44px); }
@media (max-width: 720px){ .facts { grid-template-columns: repeat(2, 1fr); } }
.fact .n { font-family: "Spectral", serif; font-weight: 600;
  font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); line-height: 1; color: var(--ink); }
.fact.on-dark .n { color: var(--cream); }
.fact .l { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft); margin-top: 10px; }
.fact.on-dark .l { color: var(--cream-soft); }

/* ── pull quote ─────────────────────────────────────────── */
.pull { font-family: "Spectral", serif; font-weight: 500; font-style: italic;
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.6rem); line-height: 1.2;
  letter-spacing: -0.01em; max-width: 22ch; }

/* ── nav ────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: oklch(0.985 0.008 85 / 0.86);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { max-width: var(--wrap-wide); margin: 0 auto; height: 100%;
  padding-inline: clamp(20px, 4vw, 48px);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }
.brand { display: inline-flex; align-items: baseline; gap: 9px; }
.brand .b-name { font-family: "Spectral", serif; font-weight: 600; font-size: 1.18rem; letter-spacing: -0.01em; }
.brand .b-sub { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--jade); }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2vw, 32px); }
.nav-links a { font-size: 0.86rem; font-weight: 600; color: var(--ink-2); position: relative; padding: 6px 0; transition: color .3s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px; background: var(--jade); transition: right .35s var(--ease-out); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }

.nav-toggle { display: none; width: 42px; height: 42px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 1.6px; background: var(--ink); border-radius: 2px;
  transition: transform .3s var(--ease-out), opacity .3s; }
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: var(--space-sm) clamp(20px,5vw,48px) var(--space-lg);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .35s var(--ease-out), opacity .35s; }
  body.nav-open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { width: 100%; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-links a::after { display: none; }
}

/* ── hero (full-bleed photo + overlay) ──────────────────── */
.hero { position: relative; min-height: clamp(520px, 82vh, 820px); display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim { position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, oklch(0.14 0.02 175 / 0.92) 0%, oklch(0.14 0.02 175 / 0.62) 26%, oklch(0.14 0.02 175 / 0.32) 52%, oklch(0.14 0.02 175 / 0.36) 100%),
    linear-gradient(to right, oklch(0.14 0.02 175 / 0.62) 0%, oklch(0.14 0.02 175 / 0.18) 48%, transparent 78%); }
.hero-inner { width: 100%; padding-block: clamp(40px, 7vw, 92px); color: var(--cream);
  text-shadow: 0 2px 22px oklch(0.12 0.02 175 / 0.5); }
.hero h1, .hero .display { color: var(--cream); text-wrap: balance; }
.hero .lede { color: var(--cream-soft); }
.hero .eyebrow { color: var(--gold); }

/* ── countdown ──────────────────────────────────────────── */
.countdown { display: flex; gap: clamp(8px, 1.4vw, 18px); flex-wrap: wrap; }
.cd-cell { min-width: 78px; text-align: center; padding: 14px 12px;
  border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--paper); }
.cd-cell.on-dark { background: oklch(0.978 0.012 85 / 0.08); border-color: var(--cream-line); }
.cd-num { font-family: "Spectral", serif; font-weight: 600;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1; font-variant-numeric: tabular-nums; }
.cd-cell.on-dark .cd-num { color: var(--cream); }
.cd-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); margin-top: 7px; }
.cd-cell.on-dark .cd-label { color: var(--cream-soft); }

/* ── footer ─────────────────────────────────────────────── */
.foot { background: var(--forest); color: var(--cream); position: relative; }
.foot a { color: var(--cream-soft); transition: color .3s; }
.foot a:hover { color: var(--gold); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--space-xl);
  align-items: end; padding-block: clamp(56px, 8vw, 104px); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.foot-nav a { font-weight: 600; font-size: 0.95rem; }
.foot-base { border-top: 1px solid var(--cream-line); padding-block: 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--cream-soft); }
@media (max-width: 680px){ .foot-grid { grid-template-columns: 1fr; gap: var(--space-lg); } }

/* ── scroll reveal (safe: hidden only once JS confirms) ─── */
html:where(.reveal-on) .reveal { opacity: 0; transform: translateY(20px); }
.reveal.is-in { opacity: 1; transform: none;
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  html:where(.reveal-on) .reveal { opacity: 1 !important; transform: none !important; }
}

/* ── helpers ────────────────────────────────────────────── */
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.hr { height: 1px; background: var(--line); border: 0; }
.hr.on-dark { background: var(--cream-line); }

/* ── dark-section legibility safety net ─────────────────────
   Forces readable text on forest/ink sections. Page CSS sometimes
   sets ink (dark) colours that vanish on a dark background; this
   guarantees body copy, headings, labels and accents stay legible. */
.bg-forest p, .bg-ink p,
.bg-forest li, .bg-ink li,
.bg-forest dd, .bg-ink dd,
.bg-forest dt, .bg-ink dt { color: var(--cream-soft) !important; }
.bg-forest h3, .bg-ink h3,
.bg-forest h4, .bg-ink h4,
.bg-forest h5, .bg-ink h5,
.bg-forest .ro-name, .bg-forest .pack-cat-heading { color: var(--cream) !important; }
.bg-forest strong, .bg-ink strong { color: var(--gold) !important; }
.bg-forest .eyebrow:not(.on-dark), .bg-ink .eyebrow:not(.on-dark) { color: var(--gold) !important; }
.bg-forest .amenity, .bg-ink .amenity,
.bg-forest .ro-label, .bg-forest .ro-note, .bg-forest .booked-pill,
.bg-forest .ic-label, .bg-forest .n, .bg-forest .l { color: var(--cream-soft) !important; }

/* exception: light callout cards inside dark sections keep dark text */
.bg-forest .health-card h3, .bg-forest .health-card h4, .bg-forest .health-card .h4,
.bg-forest .car-seat-callout h3 { color: var(--ink) !important; }
.bg-forest .health-card p, .bg-forest .health-card li,
.bg-forest .car-seat-callout p { color: var(--ink-2) !important; }
.bg-forest .health-card strong, .bg-forest .car-seat-callout strong { color: var(--jade-deep) !important; }
.bg-forest .car-seat-callout .eyebrow { color: var(--jade) !important; }
