/* ═══════════════════════════════════════════
   MARBERD.COM — Shared Styles
   Palette: Warm white · Near-black · Amber gold
═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600&family=Outfit:wght@200;300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --white:   #FAFAF8;
  --paper:   #F4F0E8;
  --black:   #111118;
  --text:    #1E1E2A;
  --mid:     #5A5A6E;
  --muted:   #909099;
  --border:  #E2DED6;
  --gold:    #B8946A;
  --gold-dk: #8A6A42;
  --gold-lt: #D4B896;
  --serif:   'Cormorant Garamond', Georgia, serif;
  --sans:    'Outfit', system-ui, sans-serif;
  --mono:    'Space Mono', monospace;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  cursor: auto;
}
a, button { cursor: pointer; touch-action: manipulation; }

/* ── NAVIGATION ─────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10001;
  height: 68px; display: flex; align-items: center;
  padding: 0 52px; background: rgba(250,250,248,0.0);
  transition: background .4s, border-bottom .4s, transform .28s cubic-bezier(.16,1,.3,1);
}
nav.scrolled {
  background: rgba(250,250,248,0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}
nav.nav-hidden {
  transform: translateY(-110%);
}
#nav-logo {
  display: flex; align-items: center; text-decoration: none;
  cursor: pointer; flex-shrink: 0;
}
#nav-logo svg { width: 48px; height: 48px; }
.logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 38px;
}
.site-logo {
  height: 38px;
  width: auto;
  transition: opacity 0.36s ease, transform 0.36s ease;
  display: block;
}
.site-logo--color {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
}
#nav-logo:hover .site-logo--gold { opacity: 0; }
#nav-logo:hover .site-logo--color {
  opacity: 1;
  transform: scale(1.04);
}
.nav-links {
  display: flex; gap: 40px; list-style: none;
  margin: 0 auto;
}
.nav-links a {
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--mid); text-decoration: none; cursor: pointer;
  position: relative; padding-bottom: 2px;
  transition: color .2s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--gold);
  transition: width .28s ease;
}
.nav-links a:hover { color: var(--black); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--gold-dk); }
.nav-links a.active::after { width: 100%; background: var(--gold-dk); }
.nav-right { display: flex; gap: 14px; margin-right: -40px; }
.nav-icon {
  width: 32px; height: 32px; border: 1px solid var(--border);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s; color: var(--muted);
}
.nav-icon:hover { border-color: var(--gold); color: var(--gold-dk); }
.nav-icon svg { width: 13px; height: 13px; }

/* ── MUSIC NAV BUTTON ───────────────────── */
#music-nav-btn { background: transparent; -webkit-appearance: none; appearance: none; }
#music-nav-btn .ic-mpause { display: none; }
#music-nav-btn.mb-playing .ic-mplay  { display: none; }
#music-nav-btn.mb-playing .ic-mpause { display: block; }
#music-nav-btn.mb-playing { border-color: var(--gold); color: var(--gold); }

/* ── FOOTER ─────────────────────────────── */
footer {
  background: var(--black);
  padding: 48px 60px 36px;
}
.foot-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 32px;
}
.foot-logo { display: flex; align-items: center; gap: 16px; }
.foot-logo svg { width: 36px; height: 36px; }
.foot-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  opacity: 0.78;
}
.foot-copy {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 1px; color: rgba(255,255,255,0.25); text-transform: uppercase;
}
.foot-links { display: flex; gap: 24px; }
.foot-link {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px;
  text-transform: uppercase; color: rgba(255,255,255,0.28);
  text-decoration: none; cursor: pointer; transition: color .2s;
}
.foot-link:hover { color: var(--gold); }

/* ── PAGE HERO (inner pages) ────────────── */
.page-hero {
  padding-top: 140px; padding-bottom: 72px;
  padding-left: 60px; padding-right: 60px;
  max-width: 1200px; margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.page-eyebrow {
  font-family: var(--mono); font-size: 9px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--gold-dk);
  margin-bottom: 16px; display: flex; align-items: center; gap: 12px;
}
.page-eyebrow::before { content:''; width:24px; height:1px; background:var(--gold); }
.page-title {
  font-family: var(--serif); font-size: clamp(40px,6vw,72px);
  font-weight: 400; line-height: 1; color: var(--black); letter-spacing: -1px;
}
.page-title em { font-style: italic; color: var(--gold-dk); }

/* ── CONTENT WRAPPER ────────────────────── */
.content-wrap { max-width: 1200px; margin: 0 auto; padding: 80px 60px; }

/* ── SECTION LABELS ─────────────────────── */
.sec-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--gold-dk);
  margin-bottom: 10px; display: flex; align-items: center; gap: 10px;
}
.sec-label::after { content:''; width:28px; height:1px; background: rgba(184,148,106,0.4); }
.sec-h2 {
  font-family: var(--serif); font-size: clamp(32px,4.5vw,52px);
  font-weight: 400; line-height: 1.05; color: var(--black);
  letter-spacing: -.5px; margin-bottom: 52px;
}
.sec-h2 em { font-style: italic; color: var(--gold-dk); }

/* ── DIVIDERS ───────────────────────────── */
.rule { border: none; border-top: 1px solid var(--border); margin: 60px 0; }
.rule-gold { border: none; border-top: 1px solid rgba(184,148,106,0.3); margin: 48px 0; }

/* ── GRID UTILITIES ─────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; }
@media (max-width:900px) { .grid-2,.grid-3 { grid-template-columns:1fr; } }

/* ── CARD BASE ──────────────────────────── */
.card {
  background: var(--white); border: 1px solid var(--border);
  padding: 36px 32px; transition: all .25s;
}
.card:hover { border-color: rgba(184,148,106,0.45); background: var(--paper); }

/* ── HAMBURGER BUTTON ───────────────────── */
#nav-burger {
  display: none; /* shown only via mobile media query */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none; border: none;
  cursor: pointer; padding: 0; flex-shrink: 0;
}
#nav-burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--black);
  transition: transform .3s ease, opacity .3s ease;
  transform-origin: center;
}
#nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE NAV OVERLAY ─────────────────── */
#nav-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 10000;
  background: rgba(250,250,248,0.40);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
  pointer-events: auto;
  padding-top: 68px;
}
#nav-overlay.open {
  display: flex;
  animation: navOverlayIn 0.45s cubic-bezier(.16,1,.3,1) forwards;
}
#nav-overlay.open .overlay-nav a {
  animation: navLinkIn 0.55s cubic-bezier(.16,1,.3,1) both;
}
#nav-overlay.open .overlay-nav a:nth-child(1) { animation-delay: 0.42s; }
#nav-overlay.open .overlay-nav a:nth-child(2) { animation-delay: 0.54s; }
#nav-overlay.open .overlay-nav a:nth-child(3) { animation-delay: 0.66s; }
#nav-overlay.open .overlay-nav a:nth-child(4) { animation-delay: 0.78s; }
#nav-overlay.open .overlay-nav a:nth-child(5) { animation-delay: 0.90s; }
@keyframes navOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes navLinkIn {
  from { opacity: 0; transform: translateY(36px) scale(0.88); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ── NAV DIAMOND BURST ─────────────────── */
.nav-diamond {
  position: fixed;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  pointer-events: none;
  z-index: 10002;
  animation: diamondBurst 0.95s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes diamondBurst {
  0%   { opacity: 0;   transform: translate(0,0)                                                    scale(0)   rotate(0deg);                    }
  10%  { opacity: 0.9;                                                                                                                           }
  58%  { opacity: 0.7; transform: translate(var(--tx), var(--ty))                                   scale(1)   rotate(var(--rot));               }
  100% { opacity: 0;   transform: translate(calc(var(--tx)*1.28), calc(var(--ty)*1.28)) scale(0.25) rotate(calc(var(--rot)*2)); }
}
/* Hard-lock: overlay must never show on desktop regardless of JS state */
@media (min-width: 769px) { #nav-overlay { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  #nav-overlay.open, #nav-overlay.open .overlay-nav a { animation: none !important; opacity: 1 !important; transform: none !important; }
}
.overlay-nav {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: auto;
  pointer-events: auto;
  gap: 0;
  padding: 0 48px;
  position: relative;
}
.overlay-nav::before {
  content: '';
  display: block;
  width: 28px; height: 1px;
  background: var(--gold);
  margin-bottom: 28px;
  flex-shrink: 0;
}
.overlay-nav a {
  font-family: var(--serif);
  font-size: clamp(28px, 7.5vw, 36px);
  font-weight: 300; font-style: italic;
  color: var(--black); text-decoration: none;
  padding: 9px 32px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  transition: color .2s, letter-spacing .2s;
  pointer-events: auto;
  position: relative;
  white-space: nowrap;
}
.overlay-nav a::after {
  content: ''; position: absolute; bottom: 4px; left: 32px; right: 32px;
  height: 1px; background: var(--gold); transform: scaleX(0);
  transform-origin: center; transition: transform .28s ease;
}
.overlay-nav a:hover::after,
.overlay-nav a.active::after { transform: scaleX(1); }
.overlay-nav a:hover { color: var(--gold-dk); letter-spacing: .02em; }
.overlay-nav a.active { color: rgba(17,17,24,0.40); letter-spacing: .02em; }

/* ── MOBILE — GLOBAL ────────────────────── */
@media (max-width: 768px) {
  html { overflow-x: hidden; }

  /* Nav: hide center links and all right icons, show only burger */
  nav { padding: 0 16px 0 16px; }
  .nav-links { display: none; }
  #nav-logo { margin-right: auto; }
  .nav-right { display: none; }
  #nav-burger { display: flex; }

  /* Shared page hero padding */
  .page-hero { padding: 110px 20px 48px; }
  .content-wrap { padding: 48px 20px; }
}

/* ── SMALL PHONES (≤480px) — GLOBAL ────── */
@media (max-width: 480px) {
  nav { padding: 0 12px; }
}

/* ── SCROLL REVEAL ──────────────────────── */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s ease, transform .72s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
