/* ==========================================================================
   Jason — shared styles
   ========================================================================== */

:root {
  --accent: #2997ff;
  --accent-hover: #5cb0ff;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-on-light: #0066cc;
  --black: #000;
  --ink: #1d1d1f;
  --white: #f5f5f7;
  --card: #1d1d1f;
  --card-2: #2c2c2e;
  --muted: #a1a1a6;
  --muted-light: #6e6e73;
  --subtle: #86868b;
  --line: #262628;
  --nav-h: 48px;
  --gutter: 22px;
  --radius-lg: 28px;
  --radius-md: 24px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

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

html {
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--white);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
}
.skip-link:focus { top: 12px; }

h1, h2, h3 { font-weight: 700; margin: 0; }
p { margin: 0; }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(22, 22, 23, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  color: var(--white);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.nav-logo:hover { color: #fff; text-decoration: none; }

.nav-links {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.nav-links a {
  color: #d2d2d7;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--white); font-weight: 500; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s ease, top 0.3s ease;
}
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 25px; }

.nav.is-open .nav-toggle span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.nav.is-open .nav-toggle span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }

@media (max-width: 640px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: rgba(22, 22, 23, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  }

  .nav.is-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
  }
}

/* ---------- Buttons ---------- */

.btn-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: 980px;
  font-size: 17px;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); color: #fff; }

.btn-outline { color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }

.section-light .btn-outline { color: var(--blue-on-light); border-color: var(--blue-on-light); }
.section-light .btn-outline:hover { background: var(--blue-on-light); color: #fff; }

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section-light {
  background: var(--white);
  color: var(--ink);
}

.center { text-align: center; }

.eyebrow {
  font-size: 21px;
  font-weight: 600;
  color: var(--accent);
}

.eyebrow-sm {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}
.section-light .eyebrow-sm { color: var(--blue-on-light); }

.display {
  font-size: clamp(48px, 7vw, 88px);
  letter-spacing: -0.04em;
  line-height: 1;
}

.headline {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.lede {
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.45;
  color: var(--muted);
}
.section-light .lede { color: var(--muted-light); }

.dim { color: var(--subtle); }

sup.fn {
  font-size: 0.6em;
  font-weight: 400;
  vertical-align: super;
  line-height: 0;
  margin-left: 1px;
}

/* ---------- Landing: hero ---------- */

.hero {
  text-align: center;
  padding: clamp(64px, 10vw, 96px) var(--gutter) 0;
}

.hero h1 {
  margin-top: 8px;
  font-size: clamp(56px, 9vw, 112px);
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero-tagline {
  margin: 16px auto 0;
  max-width: 640px;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.hero .btn-row { margin-top: 28px; }

.hero-stage { position: relative; }

.hero-photo {
  position: sticky;
  top: var(--nav-h);
  z-index: 0;
  max-width: 1100px;
  height: min(760px, 75svh);
  margin: clamp(40px, 6vw, 64px) auto 0;
  overflow: hidden;
  background: var(--black);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.slide-over {
  position: relative;
  z-index: 1;
  padding: clamp(80px, 12vw, 120px) var(--gutter);
  text-align: center;
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.6);
}

.slide-over h2 {
  margin: 0 auto;
  max-width: 900px;
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.slide-over p {
  margin: 24px auto 0;
  max-width: 680px;
}

/* ---------- Landing: feature cards ---------- */

.features {
  padding-top: clamp(80px, 12vw, 120px);
  padding-bottom: clamp(80px, 12vw, 120px);
}

.features > h2 {
  margin-bottom: 48px;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-align: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.card:hover { transform: translateY(-4px); background: #232325; }

.card h3 { font-size: 19px; font-weight: 600; }
.card p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 20px;
  padding-bottom: clamp(80px, 12vw, 120px);
}

.promo {
  border-radius: var(--radius-lg);
  background: var(--card);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(32px, 4vw, 48px) clamp(24px, 3.5vw, 40px);
}

.promo h3 {
  font-size: clamp(32px, 3.5vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.promo p {
  margin-top: 12px;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.5;
}

.promo.section-light { background: var(--white); }
.promo.section-light p { color: var(--muted-light); }

.promo-media {
  height: 380px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card-2);
}
.promo.section-light .promo-media { background: #fff; }

.promo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.promo:hover .promo-media img { transform: scale(1.03); }

.promo-media.inset img {
  padding-top: 28px;
  object-position: center top;
}

/* ---------- Closing CTA ---------- */

.closer {
  padding: clamp(96px, 14vw, 140px) var(--gutter);
  text-align: center;
}
.closer h2 { margin: 0 auto; max-width: 900px; }
.closer p { margin: 28px auto 0; max-width: 620px; }
.closer .btn-row { margin-top: 36px; }

.closer-dark {
  border-top: 1px solid var(--line);
}
.closer-dark .btn-row { margin-top: 32px; }

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

.footer {
  max-width: 1024px;
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  font-size: 12px;
  color: var(--subtle);
  line-height: 1.6;
}

.footer p + p { margin-top: 8px; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 16px;
  padding: 0 0 16px;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.footer-nav a { color: #d2d2d7; }
.footer-nav a:hover { color: #fff; }

.footnotes {
  margin: 0 0 16px;
  padding: 0 0 16px 16px;
  border-bottom: 1px solid var(--line);
}
.footnotes li + li { margin-top: 8px; }

/* ---------- Page headers (Gallery / How He Works) ---------- */

.page-header {
  text-align: center;
  padding: clamp(64px, 10vw, 96px) var(--gutter) clamp(48px, 7vw, 80px);
}
.page-header h1 { margin: 8px auto 0; max-width: 900px; }
.page-header .lede { margin: 20px auto 0; max-width: 600px; }

/* ---------- Gallery ---------- */

.gallery-page { padding-bottom: clamp(80px, 12vw, 120px); }

.gallery-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 320px;
  gap: 16px;
}

.tile {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--card);
  overflow: hidden;
  cursor: zoom-in;
  color: inherit;
  font: inherit;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.3s ease;
}

.tile::after {
  content: attr(data-caption);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 20px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  font-size: 14px;
  text-align: left;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tile:hover img, .tile:focus-visible img { transform: scale(1.04); }
.tile:hover::after, .tile:focus-visible::after { opacity: 1; transform: none; }
.tile:focus-visible { outline-offset: 4px; border-radius: var(--radius-md); }

.tile-xl { grid-column: span 2; grid-row: span 2; }
.tile-tall { grid-row: span 2; }

.gallery-outro {
  text-align: center;
  margin: 80px var(--gutter) 0;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

@media (max-width: 999px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: clamp(220px, 36vw, 320px);
  }
}

@media (max-width: 599px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 12px;
  }
  .tile, .tile-xl, .tile-tall {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 4 / 5;
  }
  .tile::after { opacity: 1; transform: none; }
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 72px 24px;
  background: rgba(0, 0, 0, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease;
}

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 100%;
  max-height: 100%;
}

.lightbox-img {
  max-width: min(100%, 1000px);
  max-height: calc(100svh - 160px);
  width: auto;
  height: auto;
  border-radius: 18px;
  object-fit: contain;
  transform: scale(0.97);
  transition: transform 0.3s ease, opacity 0.2s ease;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox.is-open .lightbox-img { transform: none; }
.lightbox-img.is-swapping { opacity: 0; }

.lightbox-caption {
  text-align: center;
  font-size: 15px;
  color: #d2d2d7;
  max-width: 640px;
}

.lightbox-count {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
}

.lb-btn {
  position: absolute;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(66, 66, 69, 0.72);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
}
.lb-btn:hover { background: rgba(99, 99, 104, 0.9); }
.lb-btn:active { transform: scale(0.94); }
.lb-btn svg { width: 18px; height: 18px; }

.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; margin-top: -22px; }
.lb-next { right: 16px; top: 50%; margin-top: -22px; }

@media (max-width: 640px) {
  .lightbox { padding: 64px 12px 96px; }
  .lightbox-img { max-height: calc(100svh - 240px); }
  .lb-prev, .lb-next { top: auto; bottom: 24px; margin-top: 0; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
}

/* ---------- How He Works: feature rows ---------- */

.feature-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 48px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
}

.feature-row.pad-top { padding-top: clamp(64px, 12vw, 120px); }
.feature-row.pad-bottom { padding-bottom: clamp(64px, 12vw, 120px); }

.feature-copy { padding: 24px 8px; }

.feature-copy h2 {
  margin-top: 8px;
  font-size: clamp(36px, 4.4vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.feature-copy p:not(.eyebrow-sm) {
  margin-top: 16px;
  font-size: clamp(17px, 1.8vw, 19px);
  color: var(--muted);
  line-height: 1.5;
}

.media {
  height: 460px;
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotlight {
  margin-top: clamp(48px, 10vw, 96px);
  padding: clamp(80px, 12vw, 120px) var(--gutter);
  text-align: center;
}
.spotlight.flush { margin-top: 0; }
.spotlight h2 { margin: 8px auto 0; max-width: 900px; }
.spotlight .lede { margin: 20px auto 0; max-width: 640px; font-size: clamp(17px, 1.8vw, 19px); line-height: 1.5; }
.spotlight .media {
  max-width: 900px;
  height: clamp(280px, 45vw, 420px);
  margin: 48px auto 0;
  background: #e8e8ed;
}

@media (max-width: 760px) {
  .feature-row { grid-template-columns: 1fr; gap: 8px; }
  /* Image always above the copy on small screens */
  .feature-row .media { order: -1; height: clamp(320px, 100vw, 460px); }
  .feature-copy { padding: 16px 4px 8px; }
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .promo { min-height: 0; }
  .promo-media { height: clamp(300px, 95vw, 380px); }
  .card { padding: 32px 24px; }
  .slide-over { border-radius: 24px 24px 0 0; }
}

/* ---------- Scroll reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
