/* ==========================================================================
   On the Edge — O.T.E. Photography
   Palette drawn from the subject: asphalt at dusk, tire smoke, and the
   staging tree (amber, amber, green). Type: Barlow (drawn from California
   plate & racing lettering), IBM Plex Mono for run-slip data.
   ========================================================================== */

:root {
  --asphalt: #131110;
  --asphalt-2: #1b1815;
  --smoke: #ede9e3;
  --steel: #9a9088;
  --amber: #ffa400;
  --green: #33d164;
  --hairline: rgba(237, 233, 227, 0.16);

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", monospace;

  --pad: clamp(20px, 5vw, 72px);
  --gap: clamp(14px, 2.5vw, 36px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--asphalt);
  color: var(--smoke);
  font-family: var(--body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--amber); color: var(--asphalt); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--pad); top: -60px;
  z-index: 60;
  background: var(--amber); color: var(--asphalt);
  font-family: var(--mono); font-size: 0.8rem;
  padding: 10px 16px; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px var(--pad);
  transition: background 0.35s, box-shadow 0.35s;
}
.nav.scrolled {
  background: rgba(19, 17, 16, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--hairline);
}

.mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--smoke);
  text-decoration: none;
}
.mark-dot { color: var(--green); }

.nav nav { display: flex; gap: clamp(14px, 3vw, 34px); }
.nav nav a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--smoke);
  text-decoration: none;
  opacity: 0.85;
}
.nav nav a:hover { color: var(--amber); opacity: 1; }

/* ---------- hero ---------- */

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

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

.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(19,17,16,0.92) 0%, rgba(19,17,16,0.25) 45%, rgba(19,17,16,0.15) 100%);
}

.hero-content {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: clamp(18px, 3vw, 40px);
  padding: 0 var(--pad) clamp(56px, 10vh, 120px);
  width: 100%;
}

.hero-text { max-width: 60ch; }

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(4.5rem, 15vw, 12rem);
  line-height: 0.86;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0.08em 0 0.12em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: clamp(0.7rem, 0.65rem + 0.2vw, 0.82rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
}

.hero-sub {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  color: var(--smoke);
  max-width: 44ch;
}

.hero-caption {
  position: absolute;
  right: var(--pad); bottom: 18px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--steel);
}

/* ---------- staging tree ---------- */

.tree {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 0.6em;
  flex-shrink: 0;
}

.lamp {
  width: clamp(16px, 2vw, 24px);
  height: clamp(16px, 2vw, 24px);
  border-radius: 50%;
  background: rgba(237, 233, 227, 0.12);
  box-shadow: inset 0 0 0 1px rgba(237, 233, 227, 0.18);
}

.lamp.amber.lit, .hero .lamp.a1, .hero .lamp.a2 {
  background: var(--amber);
  box-shadow: 0 0 18px 2px rgba(255, 164, 0, 0.55);
}
.lamp.green.lit, .hero .lamp.g1 {
  background: var(--green);
  box-shadow: 0 0 18px 2px rgba(51, 209, 100, 0.55);
}

.tree.small .lamp { width: 14px; height: 14px; }

/* hero launch sequence */
@media (prefers-reduced-motion: no-preference) {
  .hero .lamp.a1 { animation: lamp-on 0.01s linear 0.35s both; }
  .hero .lamp.a2 { animation: lamp-on 0.01s linear 0.75s both; }
  .hero .lamp.g1 { animation: lamp-on 0.01s linear 1.15s both; }

  .launch-1 { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s both; }
  .launch-2 { animation: launch 0.45s cubic-bezier(0.16, 0.84, 0.3, 1) 1.18s both; }
  .launch-3 { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 1.4s both; }

  @keyframes lamp-on {
    from { background: rgba(237,233,227,0.12); box-shadow: inset 0 0 0 1px rgba(237,233,227,0.18); }
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
  }
  @keyframes launch {
    from { opacity: 0; transform: translateX(-60px); }
  }
}

/* ---------- sections ---------- */

.section {
  padding: clamp(72px, 12vh, 150px) var(--pad) 0;
  max-width: 1600px;
  margin: 0 auto;
}

.section-head { margin-bottom: clamp(32px, 5vh, 60px); max-width: 70ch; }

h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  margin: 0.15em 0 0.2em;
}

.section-sub { color: var(--steel); max-width: 52ch; }

.intro { padding-bottom: 0; }
.intro-line {
  font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.4rem);
  font-weight: 400;
  line-height: 1.35;
  max-width: 34ch;
}
.intro-line strong { color: var(--amber); font-weight: 500; }

/* ---------- gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.gallery figure { position: relative; }
.gallery .full { grid-column: 1 / -1; }

.gallery img {
  width: 100%;
  cursor: zoom-in;
  transition: opacity 0.25s;
}
.gallery img:hover { opacity: 0.92; }

.gallery figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}
.gallery figcaption .frame { color: rgba(154, 144, 136, 0.55); }

/* ---------- breakers ---------- */

.breaker {
  position: relative;
  margin-top: clamp(72px, 12vh, 150px);
  overflow: hidden;
}
.breaker img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.breaker { min-height: 72vh; display: flex; align-items: flex-end; }
.breaker.tall { min-height: 92vh; }

.breaker-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(19,17,16,0.9) 0%, rgba(19,17,16,0.15) 55%);
}

.breaker-line {
  position: relative;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 1.2rem + 2.4vw, 3.2rem);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0 var(--pad) clamp(48px, 8vh, 90px);
  max-width: 24ch;
}

.breaker-text {
  position: relative;
  padding: 0 var(--pad) clamp(48px, 8vh, 90px);
  max-width: 75ch;
}
.breaker-sub { color: var(--smoke); max-width: 48ch; opacity: 0.9; }

.breaker-frame {
  position: absolute;
  right: var(--pad); bottom: 18px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: rgba(237, 233, 227, 0.45);
}

/* ---------- team / two lanes ---------- */

.lanes {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.lane { padding: clamp(20px, 3vw, 48px); }
.lane:first-child { padding-left: 0; }
.lane + .lane { border-left: 2px dashed rgba(237, 233, 227, 0.25); }

.lane-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}

h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.8rem);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.4em;
}

.lane p:last-child { color: var(--steel); }

.lanes-tagline {
  margin-top: clamp(28px, 4vh, 48px);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.3rem, 1rem + 1.4vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--smoke);
}

/* ---------- contact ---------- */

.contact { padding-bottom: clamp(90px, 14vh, 170px); }

.contact-inner {
  border-top: 1px solid var(--hairline);
  padding-top: clamp(48px, 8vh, 90px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.contact .tree { flex-direction: row; padding: 0 0 14px; }

.contact-sub { color: var(--steel); }

.contact-cta {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: clamp(1rem, 0.9rem + 0.7vw, 1.5rem);
  letter-spacing: 0.04em;
  color: var(--asphalt);
  background: var(--green);
  text-decoration: none;
  padding: 16px 28px;
  transition: background 0.2s, transform 0.15s;
}
.contact-cta:hover { background: var(--amber); }
.contact-cta:active { transform: translateY(1px); }

/* ---------- footer ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 26px var(--pad);
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ---------- scroll reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed; inset: 0;
  z-index: 100;
  background: rgba(10, 9, 8, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 60px);
}
.lightbox[hidden] { display: none; }

.lightbox figure {
  max-width: 92vw; max-height: 88vh;
  display: flex; flex-direction: column; gap: 12px;
}
.lightbox img {
  max-width: 92vw; max-height: 82vh;
  width: auto; height: auto;
  object-fit: contain;
}
.lightbox figcaption {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  display: flex; justify-content: space-between; gap: 16px;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--smoke);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 14px;
  opacity: 0.7;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; color: var(--amber); }
.lb-close { top: 14px; right: 18px; font-size: 1.4rem; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr; }

  .hero-content { flex-direction: column; align-items: flex-start; }
  .tree { flex-direction: row; padding-bottom: 0; }

  .lanes { grid-template-columns: 1fr; }
  .lane { padding-left: 0; padding-right: 0; }
  .lane + .lane {
    border-left: none;
    border-top: 2px dashed rgba(237, 233, 227, 0.25);
  }

  .nav nav { gap: 12px; }
  .nav nav a { font-size: 0.68rem; }

  .hero-caption { display: none; }
}
