/* ============================================
   NICOLÁS SYLVESTER — Design tokens
   ============================================ */
:root {
  --bg: #0a0a0a;
  --bg-footer: #16302b;
  --cream: #f2ede3;
  --cream-dim: #cfc9bd;
  --mint: #b9d8d1;
  --line: rgba(242, 237, 227, 0.14);

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --container: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-2);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.97);
  border-bottom: 1px solid var(--line);
  /* Note: intentionally no backdrop-filter here. That property makes an
     element the containing block for any position:fixed descendant
     (same rule as `transform`), which was collapsing .main-nav's height
     to 0 since it sat inside this 64px-tall header. */
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding-top: var(--space-1);
  padding-bottom: var(--space-1);
}

.brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-check {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after { display: none; }
.nav-toggle svg { width: 18px; height: 18px; stroke: var(--cream); }

.main-nav {
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--bg);
  transform: translateY(-110%);
  transition: transform 0.28s ease;
  overflow-y: auto;
}
/* Pure-CSS toggle: no JavaScript required for the menu to open */
.nav-check:checked ~ .main-nav { transform: translateY(0); }

.main-nav ul {
  list-style: none;
  padding: var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.main-nav a {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.main-nav a[aria-current="page"] { color: var(--mint); text-decoration: underline; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-check { display: none; }
  .main-nav {
    position: static;
    inset: auto;
    transform: none;
    background: none;
    overflow: visible;
  }
  .main-nav ul {
    flex-direction: row;
    padding: 0;
    gap: var(--space-3);
  }
  .main-nav a { font-size: 0.95rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-2) var(--space-5);
  background: linear-gradient(180deg, rgba(10,10,10,0.15), rgba(10,10,10,0.75)),
              repeating-linear-gradient(135deg, #1a1a1a 0 40px, #141414 40px 80px);
  overflow: hidden;
  text-align: center;
}
.hero-content { position: relative; z-index: 2; max-width: 100%; }
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.35), rgba(10,10,10,0.75));
  z-index: 1;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 8vw, 5rem);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero-role {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: clamp(0.85rem, 2.4vw, 1.2rem);
  color: var(--mint);
  margin-top: var(--space-2);
}

/* ---------- Section titles (the part that used to overlap) ---------- */
.section {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--line);
}
.section-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(2.2rem, 10vw, 4.5rem);
  line-height: 1;
  margin-bottom: var(--space-3);
}
.section-lede {
  max-width: 46ch;
  color: var(--cream-dim);
  margin-bottom: var(--space-4);
}
/* Key fix vs. the Squarespace bug: title and lede are stacked in normal
   document flow, never absolutely positioned on top of one another, so
   there is nothing to recalculate at narrower widths. */

/* ---------- Grids ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  overflow: hidden;
  background: repeating-linear-gradient(135deg, #202020 0 30px, #171717 30px 60px);
  display: flex;
  align-items: flex-end;
}
.card-label {
  position: relative;
  z-index: 2;
  padding: var(--space-2);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
  width: 100%;
}

/* ---------- Video placeholder ---------- */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: repeating-linear-gradient(135deg, #202020 0 30px, #171717 30px 60px);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-btn {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(10,10,10,0.55);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.play-btn svg { width: 22px; height: 22px; fill: var(--cream); margin-left: 3px; }

/* ---------- Photo carousel ---------- */
.photo-carousel {
  position: relative;
}
.photo-track {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-2);
  scrollbar-width: none;
}
.photo-track::-webkit-scrollbar { display: none; }
.photo-track .card {
  flex: 0 0 calc((100% - 2 * var(--space-3)) / 3);
  aspect-ratio: 3 / 4;
  scroll-snap-align: start;
}
@media (max-width: 700px) {
  .photo-track .card {
    flex: 0 0 calc((100% - 1 * var(--space-3)) / 2);
  }
}
.carousel-arrow {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--cream);
  z-index: 5;
}
.carousel-arrow svg { width: 20px; height: 20px; }
.carousel-arrow.prev { left: -8px; }
.carousel-arrow.next { right: -8px; }
@media (min-width: 700px) {
  .carousel-arrow.prev { left: -22px; }
  .carousel-arrow.next { right: -22px; }
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: var(--space-2) 0;
}
.marquee-track {
  display: flex;
  gap: var(--space-4);
  white-space: nowrap;
  width: max-content;
  animation: scroll-left 22s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.4rem, 6vw, 2.5rem);
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- Services chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: 1px solid var(--cream);
  border-radius: 999px;
  padding: 0.9rem 1.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  cursor: pointer;
  background: none;
  color: var(--cream);
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--cream); color: var(--bg); }

/* ---------- Forms ---------- */
.field { margin-bottom: var(--space-3); }
.field label {
  display: block;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  color: var(--cream-dim);
}
.field input,
.field textarea {
  width: 100%;
  background: #10201c;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.8rem;
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.field textarea { min-height: 140px; resize: vertical; }
.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
@media (min-width: 640px) {
  .field-row.two { grid-template-columns: 1fr 1fr; }
}
.checks { display: flex; flex-direction: column; gap: 0.5rem; }
.checks label { display: flex; align-items: center; gap: 0.6rem; text-transform: none; font-size: 0.95rem; }
.checks input[type="checkbox"],
.checks input[type="radio"] {
  width: auto;
  flex: none;
  accent-color: var(--mint);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-footer);
  color: var(--mint);
  padding: var(--space-5) 0 var(--space-4);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
.footer-grid h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.3rem;
  margin-bottom: var(--space-2);
  color: var(--cream);
}
.footer-grid p, .footer-grid a { color: var(--mint); font-size: 0.95rem; }
.footer-grid a { text-decoration: underline; }
.footer-bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(185, 216, 209, 0.2);
  font-size: 0.8rem;
  color: rgba(185, 216, 209, 0.6);
}

/* ---------- Lightbox ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: var(--space-3);
}
.lightbox-overlay.open { display: flex; }
.lightbox-full {
  max-width: 92vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
}
.lightbox-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  color: var(--cream);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Utility ---------- */
.stack { display: flex; flex-direction: column; gap: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.text-dim { color: var(--cream-dim); }
