/* ============================================================
   base.css — reset, typography, layout, utilities
   Organic Gradient Resort Editorial: warm cream, soft grain,
   organic masks, gentle gradient drift.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}
/* Soft warm gradient wash + paper grain over the cream ground */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 12% -8%, rgba(198, 106, 61, 0.10), transparent 55%),
    radial-gradient(110% 70% at 92% 6%, rgba(123, 174, 157, 0.12), transparent 55%),
    radial-gradient(120% 60% at 50% 120%, rgba(123, 174, 157, 0.08), transparent 60%);
  animation: drift var(--drift) ease-in-out infinite alternate;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.42;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.15  0 0 0 0 0.19  0 0 0 0 0.16  0 0 0 0.045 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
body > * { position: relative; z-index: 1; }

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-1.5%, 1%, 0) scale(1.04); }
}

img, svg, video { display: block; max-width: 100%; height: auto; }
img { font-style: italic; background: var(--surface-sunk); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: var(--focus); outline-offset: var(--focus-offset); border-radius: 3px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 12px; top: 12px; z-index: 200;
  background: var(--accent); color: var(--on-accent);
  padding: 8px 14px; border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 600;
  transform: translateY(-160%); transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
  font-weight: 600;
}
h1 { font-size: var(--fs-h1); font-weight: 600; }
h2 { font-size: var(--fs-h2); line-height: var(--lh-snug); }
h3 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 600; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--accent-ink); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.lead { font-size: 1.22rem; color: var(--text-muted); line-height: 1.6; font-family: var(--font-body); }
.prose p { margin-bottom: 1.15em; }
.prose { max-width: 66ch; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-cap);
  text-transform: uppercase;
  letter-spacing: var(--track-cap);
  color: var(--accent-ink);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 10px;
}
/* Organic eyebrow — a soft wave dash before the label */
.eyebrow::before {
  content: ""; display: inline-block; width: 26px; height: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 10'><path d='M1 5 C 6 1, 9 9, 13 5 S 20 1, 25 5' fill='none' stroke='%23C66A3D' stroke-width='1.6' stroke-linecap='round'/></svg>") center/contain no-repeat;
}
.eyebrow.bare::before { display: none; }
.eyebrow.sea { color: var(--sea-ink); }
.eyebrow.sea::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 10'><path d='M1 5 C 6 1, 9 9, 13 5 S 20 1, 25 5' fill='none' stroke='%237BAE9D' stroke-width='1.6' stroke-linecap='round'/></svg>"); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.ink { color: var(--ink); }

a.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  transition: color var(--dur) var(--ease);
}
a.link:hover { color: var(--accent-ink); }

/* ---------- Layout ---------- */
.container { width: var(--maxw); margin-inline: auto; padding-inline: 16px; }
.container.narrow { width: var(--maxw-narrow); }
.section { padding-block: var(--s-9); position: relative; }
.section.tight { padding-block: var(--s-7); }
.section + .section { padding-top: 0; }
.section-head { max-width: 62ch; margin-bottom: var(--s-6); }
.section-head .eyebrow { display: inline-flex; margin-bottom: 14px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--text-muted); font-size: 1.06rem; }

/* Organic double rule under section heads */
.section-head.organic h2 { padding-bottom: 16px; position: relative; }
.section-head.organic h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 120px;
  border-radius: var(--r-pill);
  background: linear-gradient(to right, var(--accent), var(--sea));
}

/* ---------- Editorial grid ---------- */
.page-grid {
  width: min(100% - clamp(32px, 5vw, 96px), var(--maxw));
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.page-grid > * { grid-column: 1 / -1; }
.split { display: grid; grid-template-columns: 1fr; gap: var(--s-6); align-items: center; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
  .split.reverse > .split-text { order: 2; }
}

/* ---------- Card base ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card.sunk { background: var(--surface-sunk); }
.card.tint { background: var(--surface-2); }
.card.flat { box-shadow: none; }
.card.raised:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--accent-line); }
.card.pad-6 { padding: var(--s-6); }
.card.pad-4 { padding: var(--s-4); }

/* ---------- Pills / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink);
  font-family: var(--font-sans);
}
.pill.accent { border-color: var(--accent-line); background: var(--accent-tint); color: var(--accent-ink); }
.pill.sea { border-color: var(--sea-line); background: var(--sea-tint); color: var(--sea-ink); }
.pill.ghost { background: transparent; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pill.sea .dot { background: var(--sea); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--r-pill);
  font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; line-height: 1;
  border: 1px solid transparent;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-warm); }
.btn-primary:hover { background: var(--accent-bright); }
.btn-sea { background: var(--sea); color: var(--on-accent); box-shadow: var(--shadow-sea); }
.btn-sea:hover { background: var(--sea-soft); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: #1A2420; }
.btn-block { display: flex; width: 100%; }

/* ---------- Helpers ---------- */
.stack > * + * { margin-top: var(--s-4); }
.stack-3 > * + * { margin-top: var(--s-3); }
.stack-6 > * + * { margin-top: var(--s-6); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--s-4); }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--s-4); }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.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; }
.divider { height: 1px; background: var(--rule); border: 0; margin-block: var(--s-6); }

/* Organic divider — wave ray */
.wave-rule { display: flex; align-items: center; gap: 14px; margin-block: var(--s-6); }
.wave-rule::before, .wave-rule::after { content: ""; height: 2px; flex: 1; border-radius: var(--r-pill); background: linear-gradient(to right, transparent, var(--accent-line), transparent); }
.wave-rule .wave { width: 30px; height: 12px; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 12'><path d='M1 6 C 6 1, 10 11, 15 6 S 24 1, 29 6' fill='none' stroke='%23C66A3D' stroke-width='1.8' stroke-linecap='round'/></svg>") center/contain no-repeat; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease-soft), transform 700ms var(--ease-soft); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Organic blob mask (for feature images) ---------- */
.organic-mask { border-radius: var(--r-blob); overflow: hidden; }
.organic-mask-2 { border-radius: 58% 42% 44% 56% / 52% 48% 52% 48%; overflow: hidden; }

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