:root {
  --bg: #070b09;
  --panel: #0e1813;
  --panel-2: #13221a;
  --line: #1d3127;
  --em: #1f6b47;
  --em2: #3fae7a;
  --em3: #8fdcb4;
  --txt: #e9f1ec;
  --mut: #9fb3a8;
  --red: #d62828;
  --radius: 14px;
  --nav-h: 3.5rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

@view-transition { navigation: auto; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font: 1.0625rem/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--em2); text-underline-offset: .2em; }
a:hover { color: var(--em3); }
:focus-visible { outline: 2px solid var(--em3); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.1; text-wrap: balance; letter-spacing: -.02em; }
p { text-wrap: pretty; }

.wrap { width: min(1160px, 100% - 2rem); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--em2); color: var(--bg); padding: .6rem 1rem; border-radius: 8px; font-weight: 700;
  &:focus { top: 1rem; }
}

.eyebrow {
  margin: 0 0 .5rem;
  color: var(--red);
  font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}

/* Hero */
.hero {
  position: relative;
  min-height: 78svh;
  display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate;

  & > img {
    position: absolute; inset: 0; z-index: -2;
    width: 100%; height: 100%; object-fit: cover;
    animation: settle 1.6s var(--ease) both;
  }
  &::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
      linear-gradient(180deg, rgb(7 11 9 / 0) 30%, rgb(7 11 9 / .7) 70%, var(--bg)),
      linear-gradient(90deg, rgb(7 11 9 / .55), transparent 60%);
  }
}
.hero-text { padding-block: 3rem 2.5rem;
  & .eyebrow { color: var(--em3); }
  animation: rise .9s .15s var(--ease) both; }

h1 {
  margin: 0;
  font-size: clamp(3rem, 11vw, 7rem);
  font-weight: 900; line-height: .92; letter-spacing: -.035em;
  & span {
    display: block;
    background: linear-gradient(100deg, var(--em2), var(--em3) 45%, var(--em2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
}

.chips {
  list-style: none; padding: 0; margin: 1.25rem 0 0;
  display: flex; flex-wrap: wrap; gap: .5rem;
  & li {
    padding: .3rem .8rem; border-radius: 999px;
    background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .14);
    backdrop-filter: blur(8px);
    font-size: .875rem; font-weight: 600;
  }
}

/* Buttons */
.social { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1.5rem 0 0; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.3rem; border-radius: 999px;
  background: var(--red); color: #fff;
  font-weight: 700; text-decoration: none;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s;
  & svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; }
  &:hover { color: #fff; background: color-mix(in oklab, var(--red), #fff 12%); transform: translateY(-1px); }
  &.ghost {
    background: rgb(255 255 255 / .04); border-color: var(--em2); color: var(--txt);
    &:hover { background: color-mix(in oklab, var(--em) 35%, transparent); }
  }
}

/* Nav */
.site-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgb(7 11 9 / .72);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);

  & .wrap {
    display: flex; align-items: center; gap: .25rem;
    min-height: var(--nav-h);
    overflow-x: auto; scrollbar-width: none;
  }
  & a {
    padding: .4rem .75rem; border-radius: 999px;
    color: var(--mut); text-decoration: none; white-space: nowrap; font-weight: 600; font-size: .95rem;
    transition: color .2s, background-color .2s;
    &:hover, &[aria-current] { color: var(--txt); background: var(--panel-2); }
  }
  & .brand {
    margin-right: auto; padding-left: 0;
    color: var(--txt); font-weight: 900; letter-spacing: -.02em; font-size: 1.1rem;
    & span { color: var(--em2); }
    &:hover { background: none; }
  }
}

/* Sections */
main > section { padding-block: clamp(3.5rem, 8vw, 6rem); }
main > section + section { border-top: 1px solid var(--line); }
h2 { margin: 0 0 1.5rem; font-size: clamp(1.9rem, 4.5vw, 2.9rem); font-weight: 800; }

.story {
  display: grid; gap: 2rem; align-items: center;
  & p { color: color-mix(in oklab, var(--txt) 85%, var(--mut)); max-width: 62ch; }
  & h2 { max-width: 18ch; }
}
blockquote.pull {
  margin: 0; padding: 2rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-left: 4px solid var(--em2);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem); font-style: italic; line-height: 1.45;
  & p { margin: 0; color: var(--txt); }
}

/* Timeline */
.timeline {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1.25rem;
  & li {
    position: relative;
    display: grid;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .25s, transform .25s var(--ease);
    &:hover { border-color: var(--em); transform: translateY(-2px); }
  }
  & a { display: block; overflow: hidden; }
  & img { width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .5s var(--ease); }
  & li:hover img { transform: scale(1.04); }
  & div { padding: 1.1rem 1.25rem 1.3rem; }
  & h3 { margin: .25rem 0 .4rem; font-size: 1.25rem; }
  & p { margin: 0; color: var(--mut); }
}
.yr { color: var(--red); font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }

/* Specs */
.specs {
  margin: 0; display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  & > div { background: var(--panel); padding: 1.4rem 1.5rem; }
  & dt { color: var(--mut); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
  & dd { margin: .35rem 0 0; font-size: 1.3rem; font-weight: 800; line-height: 1.2; }
  & .note { font-size: .9rem; font-weight: 500; color: var(--mut); }
  & .accent { background: linear-gradient(145deg, color-mix(in oklab, var(--em) 40%, var(--panel)), var(--panel)); }
}

/* Gallery */
.grid {
  display: grid; gap: .6rem;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: dense;
  & a { display: block; overflow: hidden; border-radius: 10px; background: var(--panel); }
  /* Two feature tiles keep the 2- and 4-column grids gap-free (4 + 4 + 12 cells). */
  & a:is(:first-child, :nth-child(8)) { grid-column: span 2; grid-row: span 2; }
  & img { width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .5s var(--ease), filter .3s; }
  & a:hover img { transform: scale(1.05); filter: brightness(1.08); }
}

/* Shows CTA */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: clamp(1.75rem, 5vw, 3rem);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in oklab, var(--em) 55%, transparent), transparent 60%),
    var(--panel);
  border: 1px solid var(--line);
  & h2 { margin-bottom: .5rem; }
  & p:not(.eyebrow, .social) { margin: 0; color: var(--mut); }
}

/* Footer */
.site-footer {
  text-align: center; color: var(--mut);
  padding: 2.5rem 1rem calc(2.5rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: .9rem;
  & .social { justify-content: center; margin: 0 0 1rem; }
}

/* Show page */
.page-head { padding-block: clamp(3rem, 8vw, 5rem) 0; }
.page-head h1 { font-size: clamp(2.6rem, 8vw, 5rem); }
.page-head + section { border-top: 0; padding-top: 2rem; }

/* Lightbox */
#lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgb(0 0 0 / .94); color: var(--txt);
  &::backdrop { background: transparent; }
  &[open] { display: grid; place-items: center; animation: fade .2s ease-out; }
  & figure { margin: 0; display: grid; justify-items: center; gap: .75rem; }
  & img { max-width: 94vw; max-height: 84dvh; object-fit: contain; border-radius: 6px; cursor: zoom-out; }
  & figcaption { color: var(--mut); font-size: .95rem; padding-inline: 1rem; text-align: center; }
  & button {
    position: absolute;
    display: grid; place-items: center;
    width: 3rem; height: 3rem; border-radius: 999px;
    border: 1px solid rgb(255 255 255 / .2); background: rgb(255 255 255 / .08); color: #fff;
    font-size: 2rem; line-height: 1; cursor: pointer;
    &:hover { background: rgb(255 255 255 / .18); }
  }
  & .lb-close { top: max(1rem, env(safe-area-inset-top)); right: 1rem; }
  & .lb-prev { left: 1rem; top: 50%; translate: 0 -50%; }
  & .lb-next { right: 1rem; top: 50%; translate: 0 -50%; }
  & [hidden] { display: none; }
}
#lightbox:not([open]) { display: none; }
body:has(#lightbox[open]) { overflow: hidden; }

@keyframes rise { from { opacity: 0; translate: 0 1.5rem; } }
@keyframes settle { from { scale: 1.08; opacity: .4; } }
@keyframes fade { from { opacity: 0; } }

/* Reveal on scroll where supported */
@supports (animation-timeline: view()) {
  .timeline li, .grid a, .specs > div {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

@media (min-width: 700px) {
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid a:nth-child(8) { grid-column: auto; grid-row: auto; }
  .hero { min-height: 92svh; }
}
@media (min-width: 1000px) {
  .story { grid-template-columns: 1.2fr 1fr; gap: 4rem; }
  .timeline { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .grid a:nth-child(8) { grid-column: span 2; grid-row: span 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
