/* ═══════════════════════════════════════════
   MERIDIAN — base.css
   Variables, reset, typography, utilities
═══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: #c8a96e; color: #1e2b1a; }

:root {
  --ink:      #0e0d0b;
  --paper:    #f5f2ec;
  --warm:     #c8a96e;
  --warm-l:   #e8d9bc;
  --warm-dim: rgba(200,169,110,.13);
  --sage:     #7a8c6e;
  --deep:     #1e2b1a;
  --muted:    #8a867e;
  --div:      rgba(14,13,11,.1);
  --surf:     #ede9e0;
  --locked:   #b0ac9e;
  --info-bg:  rgba(122,140,110,.12);
  --info-c:   #3d5232;
  --radius:   2px;
  --nav-h:    64px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

/* ── Typography ── */
.font-serif { font-family: 'Cormorant Garamond', serif; }
h1, h2, h3 { font-family: 'Cormorant Garamond', serif; font-weight: 300; }

/* ── Icon helper ── */
.ico { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── Pages system ── */
.page { display: none; }
.page.active { display: block; }

/* ── Fade-in animations ── */
.fi { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.fi.vis { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }
.d4 { transition-delay: .4s; }

/* ── Buttons ── */
.btn-p {
  background: var(--ink); color: var(--paper);
  padding: 15px 34px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; letter-spacing: .06em;
  border: none; cursor: pointer; transition: all .25s;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none; display: inline-block;
}
.btn-p:hover { background: var(--deep); transform: translateY(-1px); }

.btn-g {
  color: var(--ink); font-size: 14px; background: none; border: none;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 15px 0; transition: gap .2s; font-family: 'DM Sans', sans-serif;
}
.btn-g:hover { gap: 14px; }

.btn-gold { background: var(--warm); color: var(--deep); }
.btn-gold:hover { background: #b8954e; }

.btn-dark {
  background: var(--deep); color: var(--paper);
  padding: 18px 42px; border-radius: var(--radius);
  border: none; font-size: 14px; font-weight: 500; letter-spacing: .06em;
  cursor: pointer; white-space: nowrap; transition: opacity .2s;
  font-family: 'DM Sans', sans-serif; text-decoration: none; display: inline-block;
}
.btn-dark:hover { opacity: .82; }

.btn-outline {
  background: transparent; border: 1px solid var(--div);
  color: var(--ink); padding: 13px 24px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: border-color .2s;
  text-decoration: none; display: inline-block;
}
.btn-outline:hover { border-color: var(--ink); }

/* ── Section labels ── */
.sec-label {
  font-size: 11px; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--sage);
  margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
}
.sec-label::before { content: ''; display: block; width: 24px; height: 1px; background: var(--sage); }

.sec-t {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 3.5vw, 56px); font-weight: 300;
  line-height: 1.13; color: var(--ink); margin-bottom: 16px;
}
.sec-t em { font-style: italic; color: var(--warm); }

.sec-s { font-size: 15px; color: var(--muted); line-height: 1.75; font-weight: 300; max-width: 520px; }

section { padding: 96px 80px; }

.dark-sec .sec-label { color: rgba(200,169,110,.7); }
.dark-sec .sec-label::before { background: rgba(200,169,110,.4); }
.dark-sec .sec-t { color: var(--paper); }
.dark-sec .sec-s { color: rgba(245,242,236,.45); }

/* ── Forms ── */
.inp {
  width: 100%; padding: 13px 16px;
  border: 1px solid var(--div); border-radius: var(--radius);
  font-size: 14px; font-family: 'DM Sans', sans-serif;
  background: white; color: var(--ink);
  outline: none; transition: border-color .2s;
}
.inp:focus { border-color: var(--warm); }
.inp::placeholder { color: var(--muted); }

.inp-dark {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--paper);
}
.inp-dark::placeholder { color: rgba(245,242,236,.35); }

/* ── Modals ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(14,13,11,.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--paper); border-radius: 6px;
  padding: 40px; max-width: 480px; width: 92%;
  transform: translateY(20px); transition: transform .25s;
  position: relative;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 20px; line-height: 1;
}
.modal-close:hover { color: var(--ink); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--deep); color: var(--paper);
  padding: 12px 24px; border-radius: 4px; font-size: 14px;
  z-index: 9999; transition: transform .3s ease;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── Loading spinner ── */
.spinner {
  width: 24px; height: 24px; border: 2px solid var(--div);
  border-top-color: var(--warm); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 900px) {
  section { padding: 60px 24px; }
  nav { padding: 0 20px; }
}
