/* ── DESIGN TOKENS ── */
:root {
  --bg: #0e0e0c;
  --ink: #f4f1ea;
  --muted: #8a857b;
  --accent: #4a7549;
  --line: rgba(244, 241, 234, 0.08);
  --line-solid: rgba(244, 241, 234, 0.12);
}

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

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  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' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* video background */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.45;
  pointer-events: none;
}
.bg-video::-webkit-media-controls,
.bg-video::-webkit-media-controls-enclosure,
.bg-video::-webkit-media-controls-panel,
.bg-video::-webkit-media-controls-play-button,
.bg-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  opacity: 0 !important;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(14,14,12,0.5) 0%, rgba(14,14,12,0.75) 100%),
    radial-gradient(circle at center, transparent 30%, rgba(14,14,12,0.6) 100%);
  pointer-events: none;
}

/* site wrapper — display set per-page */
.site {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

/* ── NAV ── */
nav {
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  opacity: 0;
  animation: fadeDown 0.8s ease-out 0.1s forwards;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  list-style: none;
}

.nav-links > li {
  display: flex;
  align-items: center;
}

.nav-links > li > a,
.dropdown-toggle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  -webkit-appearance: none;
  appearance: none;
}

.nav-links > li > a:hover,
.nav-links > li > a.active,
.dropdown-toggle:hover { color: var(--ink); }

.dropdown { position: relative; }

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.arrow {
  font-size: 0.5rem;
  transition: transform 0.3s ease;
  display: inline-block;
}

.dropdown:hover .arrow { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: rgba(14, 14, 12, 0.95);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  padding: 0.6rem 0;
  min-width: 110px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 100;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.45rem 1.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.63rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a.active { color: var(--ink); }

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 300;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  transition: all 0.3s ease;
}

/* mobile full-screen menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 12, 0.97);
  z-index: 200;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
  padding-top: 0;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-family: 'Fraunces', serif;
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

.mobile-menu a:hover { color: var(--ink); }
.mobile-menu a.active { color: #ffffff !important; }

.mobile-sub { display: none; }

.mobile-close {
  position: absolute;
  top: calc(2rem + 4px);
  right: calc(clamp(1.5rem, 5vw, 4rem) + 4px);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* ── FOOTER ── */
footer {
  padding: 1.75rem clamp(1.5rem, 5vw, 4rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.63rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover { color: var(--ink); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes expandLine {
  from { opacity: 0; width: 0; }
  to   { opacity: 1; width: 40px; }
}

/* ── MOBILE — shared nav rules ── */
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  nav { padding-top: 1rem; }
  footer { font-size: 0.55rem; }
}
