/* Bit Hustler — aerial photography
   Dark canvas, quiet Swiss type, facts over adjectives. */

:root {
  --bg: #0e0e0e;
  --bg-raised: #161616;
  --text: #ededed;
  --text-dim: #9a9a9a;
  --text-faint: #5c5c5c;
  --line: rgba(237, 237, 237, 0.14);
  --accent: #e8e4d8;
  --sans: 'Archivo', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 72px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

::selection { background: var(--text); color: var(--bg); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 0.35s ease, border-color 0.35s ease, padding 0.35s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(14, 14, 14, 0.82);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
  padding: 12px var(--gutter);
}

.nav-brand {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav-links { display: flex; gap: 32px; }

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(14, 14, 14, 0.25) 0%,
    rgba(14, 14, 14, 0) 40%,
    rgba(14, 14, 14, 0.55) 100%
  );
}

.hero-text {
  position: relative;
  z-index: 2;
  padding: 0 var(--gutter) clamp(48px, 9vh, 96px);
  max-width: 900px;
}

.hero-text h1 {
  font-size: clamp(28px, 4.6vw, 56px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 18ch;
  text-wrap: balance;
}

.hero-sub {
  margin-top: 14px;
  color: rgba(237, 237, 237, 0.82);
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 400;
}

.hero-coords {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(48px, 9vh, 96px);
  z-index: 2;
  color: rgba(237, 237, 237, 0.55);
  display: none;
}

@media (min-width: 900px) { .hero-coords { display: block; } }

/* ---------- Sections ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-note { color: var(--text-faint); }

.work { padding: clamp(72px, 12vh, 140px) 0; }

/* ---------- Stills grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: dense;
  gap: 12px;
  padding: 0 var(--gutter);
}

.tile {
  position: relative;
  overflow: hidden;
  background: var(--bg-raised);
  cursor: zoom-in;
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
  grid-column: span 4;
  aspect-ratio: 4 / 3;
}

/* editorial rhythm: every 5th tile goes wide */
.tile:nth-child(5n + 1) { grid-column: span 8; aspect-ratio: 16 / 9; }

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.4s ease;
}

.tile:hover img,
.tile:focus-visible img { transform: scale(1.035); }

.tile-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 16px 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(to top, rgba(14, 14, 14, 0.75), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 13px;
  text-align: left;
}

.tile:hover .tile-caption,
.tile:focus-visible .tile-caption { opacity: 1; }

.tile-caption .mono { color: rgba(237, 237, 237, 0.7); }

@media (max-width: 860px) {
  .tile, .tile:nth-child(5n + 1) { grid-column: span 6; aspect-ratio: 4 / 3; }
}

@media (max-width: 560px) {
  .tile, .tile:nth-child(5n + 1) { grid-column: span 12; aspect-ratio: 4 / 3; }
  .tile-caption { opacity: 1; }
}

/* ---------- About ---------- */

.about {
  padding: clamp(72px, 12vh, 140px) 0;
  border-top: 1px solid var(--line);
}

.about-body {
  padding: 0 var(--gutter);
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.65;
  color: var(--text);
}

.about-facts {
  padding: 36px var(--gutter) 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  color: var(--text-dim);
}

.about-facts span::before {
  content: '— ';
  color: var(--text-faint);
}

/* ---------- Contact ---------- */

.contact {
  padding: clamp(72px, 12vh, 140px) 0;
  border-top: 1px solid var(--line);
}

.contact-form {
  padding: 0 var(--gutter);
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  outline: none;
  resize: vertical;
  transition: border-color 0.25s ease;
}

.field input:focus,
.field textarea:focus { border-bottom-color: var(--text); }

.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }

.submit {
  align-self: flex-start;
  background: var(--text);
  color: var(--bg);
  border: 0;
  padding: 13px 44px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.15s ease;
}

.submit:hover { opacity: 0.85; }
.submit:active { transform: scale(0.98); }
.submit:disabled { opacity: 0.5; cursor: wait; }

.form-status { min-height: 18px; color: var(--text-dim); }
.form-status.ok { color: #9ec49a; }
.form-status.err { color: #d08a7e; }

/* ---------- Footer ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 13px;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open { opacity: 1; pointer-events: auto; }

.lb-figure {
  max-width: min(1200px, 88vw);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lb-figure img {
  max-width: 100%;
  max-height: calc(84vh - 40px);
  object-fit: contain;
  display: block;
}

.lb-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text);
  font-size: 14px;
}

.lb-caption .mono { color: var(--text-dim); }

.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: none;
  border: 0;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s ease;
  font-family: var(--sans);
}

.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--text); }

.lb-close { top: 18px; right: 24px; font-size: 32px; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 44px; padding: 20px; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }

@media (max-width: 640px) {
  .lb-prev, .lb-next { font-size: 30px; padding: 12px; }
  .lb-figure { max-width: 94vw; }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile img, .nav, .lightbox { transition: none; }
  .hero-video { display: none; }
  .hero { background: url('./images/grid-1.jpg') center / cover no-repeat; }
}
