/* Ceylon Circuit — Editorial Travel */
:root {
  --paper: #FAF6F1;
  --paper-2: #F2ECE2;
  --ink: #1A1713;
  --ink-2: #3D362E;
  --muted: #7A6F63;
  --line: #E4DCCF;
  --accent: oklch(0.62 0.14 40);        /* terracotta */
  --accent-ink: oklch(0.42 0.11 38);
  --accent-soft: oklch(0.93 0.04 50);
  --serif: "Libre Caslon Text", "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --maxw: 1280px;
  --pad: clamp(20px, 4vw, 48px);
  --radius: 2px;
}

html[data-theme="dark"] {
  --paper: #14110E;
  --paper-2: #1D1915;
  --ink: #F5EFE5;
  --ink-2: #D8CFC1;
  --muted: #9A8F80;
  --line: #2A241D;
  --accent-soft: oklch(0.28 0.06 45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* Headings */
h1, h2, h3, h4, .display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(44px, 7vw, 96px); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -0.02em; }
h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; }
h4 { font-size: 20px; line-height: 1.3; }

p { margin: 0; color: var(--ink-2); }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px; background: var(--accent);
}
.eyebrow.center { justify-content: center; }

.lede { font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, padding .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px var(--pad);
  max-width: var(--maxw); margin: 0 auto;
  transition: padding .2s ease;
}
.nav.scrolled .nav-inner { padding-top: 4px; padding-bottom: 4px; }

.logo {
  display: inline-flex; align-items: center;
}
.logo-img {
  height: 72px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav-links {
  display: flex; align-items: center; gap: 32px;
  font-size: 14px; font-weight: 500;
  color: var(--ink-2);
}
.nav-links a { position: relative; padding: 6px 0; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
}

.menu-btn {
  display: none;
  background: transparent; border: 0; cursor: pointer;
  width: 40px; height: 40px; padding: 0;
  color: var(--ink);
}
.menu-btn svg { width: 22px; height: 22px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px;
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--paper-2); }
.btn-link {
  padding: 0; background: transparent; color: var(--ink);
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding-bottom: 2px;
}
.btn-link:hover { color: var(--accent-ink); border-bottom-color: var(--accent); }
.btn-sm { padding: 10px 16px; font-size: 13px; }

.arrow { display: inline-block; transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Footer */
.footer {
  background: var(--ink); color: var(--paper);
  padding: 80px var(--pad) 32px;
  margin-top: 120px;
}
.cta-banner + .footer { margin-top: 0; }
.footer .inner { max-width: var(--maxw); margin: 0 auto; }
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer h4 {
  color: var(--paper);
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: 20px;
  opacity: .6;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.footer a:hover { color: var(--accent); }
.footer-cta {
  font-family: var(--serif); font-size: 32px; line-height: 1.1;
  max-width: 18ch;
  margin-bottom: 24px;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; font-size: 12px;
  color: rgba(255,255,255,.5);
}

/* Section wrapper */
section { padding: clamp(72px, 10vw, 140px) 0; }
.section-head { display: grid; gap: 16px; margin-bottom: 56px; max-width: 720px; }
.section-head.center { justify-items: center; text-align: center; margin-inline: auto; }

/* CTA Banner */
.cta-banner {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(80px, 10vw, 140px) var(--pad);
  position: relative;
  overflow: hidden;
}
.cta-banner .inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: end;
}
.cta-banner h2 { color: var(--paper); }
.cta-banner p { color: rgba(255,255,255,.7); }
.cta-banner .actions { display: flex; gap: 12px; justify-self: end; }

/* Utility */
.placeholder-img {
  background:
    repeating-linear-gradient(-45deg, rgba(0,0,0,.04) 0 10px, transparent 10px 20px),
    var(--paper-2);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: .05em;
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: color-mix(in oklab, var(--accent) 12%, var(--paper));
  color: var(--accent-ink);
  border-radius: 999px;
}

/* Mobile */
@media (max-width: 880px) {
  .nav-links { display: none; position: fixed; inset: 64px 0 0; flex-direction: column; gap: 0; background: var(--paper); padding: 24px var(--pad); align-items: stretch; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 20px; font-family: var(--serif); }
  .nav-links .btn { margin-top: 20px; align-self: flex-start; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cta-banner .inner { grid-template-columns: 1fr; align-items: start; }
  .cta-banner .actions { justify-self: start; }
}

/* Density tweak */
html[data-density="compact"] { --pad: clamp(16px, 3vw, 32px); }
html[data-density="compact"] section { padding: clamp(56px, 7vw, 96px) 0; }
html[data-density="compact"] h1 { font-size: clamp(36px, 5.5vw, 72px); }
html[data-density="compact"] h2 { font-size: clamp(26px, 3.4vw, 42px); }

/* Hero layout variants */
[data-hero="split"] .hero-overlay { display: none !important; }
[data-hero="split"] .hero-split { display: grid !important; }

/* Focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Tweaks panel */
.tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  width: 280px;
  font-family: var(--sans);
  box-shadow: 0 20px 50px rgba(0,0,0,.15);
  display: none;
}
.tweaks.open { display: block; }
.tweaks h5 { font-family: var(--serif); font-size: 18px; margin: 0 0 14px; }
.tweak-row { display: grid; gap: 6px; margin-bottom: 14px; }
.tweak-row label { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tweak-row select, .tweak-row input[type="range"] { width: 100%; font-family: inherit; padding: 6px 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 4px; }
.swatches { display: flex; gap: 8px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch.active { border-color: var(--ink); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; }
.toggle-row label { margin: 0; }

/* Grain on hero */
.grain::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.35'/></svg>");
  opacity: .18;
  mix-blend-mode: overlay;
  pointer-events: none;
}
