:root {
  --ink: #1e1a13;
  --ink-2: #4a4234;
  --muted: #857a63;
  --paper: #f4ecd9;
  --paper-2: #eadfc3;
  --paper-3: #dccfae;
  --bog: #121a15;
  --bog-2: #1b2620;
  --bog-3: #26352b;
  --moss: #5b6d3f;
  --moss-2: #8a9a5b;
  --ochre: #c9a04a;
  --rust: #b8612b;
  --cran: #c8102e;
  --cran-2: #e5384f;
  --cran-glow: rgba(229, 56, 79, .55);
  --line: rgba(30, 26, 19, .14);
  --radius: 18px;
  --shadow: 0 18px 50px -20px rgba(18, 26, 21, .45);
  --serif: 'Cormorant Garamond', 'PT Serif', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Comic Sans MS', cursive;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.05; margin: 0 0 .4em; letter-spacing: -.01em; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
p { margin: 0 0 1em; }
.hand { font-family: var(--hand); }
.eyebrow { font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; color: var(--cran); }
.container { width: min(1240px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* paper grain */
.grain::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .55; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .25 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 4vw, 48px);
  color: #f6efdd; transition: background .4s, backdrop-filter .4s, box-shadow .4s, color .4s;
}
.nav.solid, .nav.light-page { background: rgba(18, 26, 21, .82); backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 6px 30px -12px rgba(0,0,0,.5); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.7rem; font-weight: 700; letter-spacing: .01em; }
.logo svg { width: 34px; height: 34px; filter: drop-shadow(0 0 10px var(--cran-glow)); transition: transform .6s cubic-bezier(.2,1.6,.4,1); }
.logo:hover svg { transform: rotate(-20deg) scale(1.1); }
.nav-links { display: flex; align-items: center; gap: clamp(8px, 2vw, 28px); }
.nav-links a { text-decoration: none; font-weight: 600; font-size: .95rem; opacity: .85; position: relative; padding: 6px 2px; transition: opacity .2s; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--cran-2); transform: scaleX(0); transform-origin: left; transition: transform .35s; border-radius: 2px; }
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.burger { display: none; background: none; border: 0; color: inherit; width: 42px; height: 42px; padding: 8px; }
.burger span { display: block; height: 2px; background: currentColor; margin: 6px 0; border-radius: 2px; transition: .3s; }

@media (max-width: 860px) {
  .burger { display: block; }
  .nav-links { position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column; background: rgba(18,26,21,.97); padding: 24px; gap: 18px; transform: translateY(-120%); transition: transform .45s cubic-bezier(.7,0,.2,1); }
  .nav.open .nav-links { transform: none; }
  .nav.open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav.open .burger span:nth-child(2) { opacity: 0; }
  .nav.open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .nav-cta .btn-ghost { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--cran);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 0; text-decoration: none;
  background: var(--b); color: #fff; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 10px 30px -10px var(--cran-glow), inset 0 -2px 0 rgba(0,0,0,.18);
  transition: transform .25s, box-shadow .25s, background .25s; position: relative; overflow: hidden; isolation: isolate;
}
.btn::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.35), transparent 55%); opacity: 0; transition: opacity .3s; z-index: -1; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px var(--cran-glow); }
.btn:hover::before { opacity: 1; }
.btn:active { transform: translateY(0) scale(.98); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px currentColor, 0 10px 30px -14px rgba(0,0,0,.4); }
.btn-dark { --b: var(--bog-2); box-shadow: 0 10px 30px -14px rgba(0,0,0,.6); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-bg { position: absolute; inset: 0; background: rgba(10, 14, 11, .6); backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s; }
.modal.open .modal-bg { opacity: 1; }
.modal-card {
  position: relative; width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--paper); border-radius: 24px; padding: 34px 30px 28px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
  transform: translateY(30px) scale(.96); opacity: 0; transition: transform .45s cubic-bezier(.2,1.2,.3,1), opacity .3s;
}
.modal.open .modal-card { transform: none; opacity: 1; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--paper-2); font-size: 20px; line-height: 1; }
.modal-card h3 { font-size: 2rem; }
.tabs { display: flex; gap: 4px; background: var(--paper-2); padding: 4px; border-radius: 999px; margin-bottom: 20px; }
.tabs button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 999px; font-weight: 700; color: var(--ink-2); transition: .25s; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 4px 14px -6px rgba(0,0,0,.25); }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; letter-spacing: .02em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1.5px solid var(--paper-3); background: #fffdf7;
  font: inherit; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cran-2); box-shadow: 0 0 0 4px rgba(229,56,79,.15); }
.form-error { color: var(--cran); font-weight: 600; font-size: .9rem; min-height: 1.4em; margin: 4px 0 10px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 200; transform: translate(-50%, 140%); background: var(--bog-2); color: #f6efdd; padding: 14px 22px; border-radius: 14px; box-shadow: var(--shadow); transition: transform .5s cubic-bezier(.2,1.3,.3,1); font-weight: 600; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }

/* ---------- footer ---------- */
.footer { background: var(--bog); color: #cfc6b0; padding: 70px 0 40px; position: relative; overflow: hidden; }
.footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; position: relative; z-index: 1; }
.footer h4 { color: #f6efdd; font-size: 1.3rem; }
.footer a { color: #cfc6b0; text-decoration: none; display: block; padding: 3px 0; }
.footer a:hover { color: var(--cran-2); }
.footer small { display: block; margin-top: 40px; opacity: .6; grid-column: 1 / -1; }
.footer .linklike { background: none; border: 0; color: #cfc6b0; padding: 3px 0; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) { .footer .container { grid-template-columns: 1fr; } }

.credits-list { font-size: .82rem; max-height: 60vh; overflow: auto; }
.credits-list li { margin-bottom: 6px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
