/* ============================================================
   Fourier — Revolut canvas, editorial photography
   ------------------------------------------------------------
   Two-mode canvas: #000000 storytelling, #ffffff catalogue.
   Display: Inter Tight (with Inter fallback).
   Body: Inter.
   Accent: cobalt violet #494fdf (used scarcely).
   Buttons: pill (rounded-full). Cards: 20px (rounded-lg).
============================================================ */

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

:root {
  /* Canvas — softened from pure black to lift photos out of "void" feel */
  --canvas-dark: #0e1013;
  --canvas-light: #ffffff;
  --surface-soft: #f4f4f4;
  --surface-elevated: #1d2025;
  --surface-deep: #14171a;

  /* Ink (light mode) */
  --ink: #191c1f;
  --body: #1f2226;
  --charcoal: #3a3d40;
  --mute: #505a63;
  --stone: #8d969e;
  --faint: #c9c9cd;

  /* Ink (dark mode) */
  --on-dark: #ffffff;
  --on-dark-mute: rgba(255, 255, 255, 0.72);
  --on-dark-faint: rgba(255, 255, 255, 0.48);

  /* Brand */
  --primary: #494fdf;
  --primary-bright: #4f55f1;
  --on-primary: #ffffff;

  /* Hairlines */
  --hairline-light: #e2e2e7;
  --hairline-dark: rgba(255, 255, 255, 0.12);
  --hairline-strong: #191c1f;
  --divider-soft: rgba(255, 255, 255, 0.06);

  /* Type families */
  --display: 'Inter Tight', 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --body-font: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Shape */
  --rounded-sm: 8px;
  --rounded-md: 12px;
  --rounded-lg: 20px;
  --rounded-xl: 28px;
  --rounded-full: 9999px;

  /* Spacing */
  --xxs: 4px;
  --xs: 6px;
  --sm: 8px;
  --md: 14px;
  --lg: 16px;
  --xl: 24px;
  --xxl: 32px;
  --xxxl: 48px;
  --block: 80px;
  --section: 88px;
  --band: 120px;

  /* Layout */
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1200px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  background: var(--canvas-dark);
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--canvas-dark);
  color: var(--on-dark);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.015em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

::selection {
  background: var(--primary);
  color: var(--on-primary);
}

/* ============================================================
   Typography scale (Revolut hierarchy)
============================================================ */

.display-xxl,
.hero-headline {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(56px, 9vw, 136px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.display-xl,
.section-headline {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(48px, 6vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.display-lg {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(36px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.display-md {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 3.2vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.heading-lg {
  font-family: var(--display);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.19;
  letter-spacing: -0.005em;
}

.heading-md {
  font-family: var(--display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.33;
}

.body-lg {
  font-size: 18px;
  line-height: 1.56;
  letter-spacing: -0.005em;
}

.body-md {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.015em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--body-font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-mute);
  margin-bottom: 24px;
}

.eyebrow.on-light {
  color: var(--mute);
}

/* ============================================================
   Buttons (pill, Revolut)
============================================================ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: var(--rounded-full);
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.015em;
  cursor: pointer;
  transition: transform 200ms var(--ease), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--canvas-light);
  color: var(--canvas-dark);
}

.button-primary:hover {
  background: var(--faint);
}

.button-dark {
  background: var(--canvas-dark);
  color: var(--on-dark);
}

.button-dark:hover {
  background: #1a1a1a;
}

.button-outline-dark {
  background: transparent;
  border-color: var(--on-dark);
  color: var(--on-dark);
}

.button-outline-dark:hover {
  background: rgba(255, 255, 255, 0.08);
}

.button-soft {
  background: var(--surface-soft);
  color: var(--ink);
}

.button-soft:hover {
  background: #e8e8e8;
}

.pill-sm {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--rounded-full);
  background: var(--surface-elevated);
  color: var(--on-dark);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.015em;
}

/* ============================================================
   Navigation
============================================================ */

.nav-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 64px;
  padding: 0 var(--gutter);
  background: var(--canvas-dark);
  border-bottom: 1px solid var(--divider-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--on-dark);
}

.brand-logo {
  display: block;
  width: clamp(148px, 15vw, 196px);
  height: auto;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  font-family: var(--body-font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--on-dark-mute);
}

.nav-links a {
  transition: color 180ms ease;
}

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

.nav-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-cta .login {
  font-family: var(--body-font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--on-dark-mute);
}

.nav-cta .login:hover {
  color: var(--on-dark);
}

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-bar { grid-template-columns: auto 1fr auto; }
}

/* ============================================================
   Bands — the fundamental layout primitive
============================================================ */

.band {
  width: 100%;
}

.band-dark {
  background: var(--canvas-dark);
  color: var(--on-dark);
}

.band-light {
  background: var(--canvas-light);
  color: var(--ink);
}

.band-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section) var(--gutter);
}

@media (max-width: 768px) {
  .band-inner {
    padding: var(--block) var(--gutter);
  }
}

/* ============================================================
   Hero photo bands (full-bleed photography)
============================================================ */

.photo-band {
  position: relative;
  width: 100%;
  background: var(--canvas-dark);
  color: var(--on-dark);
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: center;
}

.photo-band img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.photo-band-21x9 {
  aspect-ratio: 21 / 9;
  min-height: 460px;
}

.photo-band-21x9.hero {
  aspect-ratio: auto;
  min-height: clamp(560px, 92svh, 980px);
}

.photo-band-16x9 {
  aspect-ratio: 16 / 9;
  min-height: 480px;
}

.photo-band-4x3 {
  aspect-ratio: 4 / 3;
  min-height: 540px;
}

.photo-band .overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--band) var(--gutter);
}

/* Per-shot type-overlay zone classes. These match the type-safe
   regions designed into each photograph in Step 3 of the brief. */

.overlay-upper-left {
  align-self: start;
  text-align: left;
}

.overlay-right-third {
  align-self: center;
  margin-left: auto;
  margin-right: 0;
  max-width: 540px;
  text-align: left;
  padding-right: var(--gutter);
}

.overlay-top-right {
  align-self: start;
  margin-left: auto;
  margin-right: 0;
  max-width: 480px;
  text-align: left;
  padding-right: var(--gutter);
}

.overlay-top-band {
  align-self: start;
  text-align: left;
  max-width: 880px;
}

.overlay-right-two-thirds {
  align-self: center;
  margin-left: auto;
  margin-right: 0;
  max-width: 720px;
  text-align: left;
  padding-right: var(--gutter);
}

.overlay-top-left {
  align-self: start;
  text-align: left;
  max-width: 640px;
}

.photo-band .body-lg {
  max-width: 580px;
  margin-top: 24px;
  color: var(--on-dark-mute);
}

.photo-band .button {
  margin-top: 40px;
}

@media (max-width: 768px) {
  .photo-band-21x9.hero {
    aspect-ratio: 4 / 5;
    min-height: 92svh;
  }
  .photo-band-21x9 {
    aspect-ratio: 4 / 5;
    min-height: 540px;
  }
  .photo-band-16x9,
  .photo-band-4x3 {
    aspect-ratio: 4 / 5;
  }
  .photo-band .overlay {
    padding: var(--block) var(--gutter);
  }
  .overlay-right-third,
  .overlay-top-right,
  .overlay-right-two-thirds {
    margin-left: 0;
    max-width: none;
    padding-right: 0;
  }
}

/* ============================================================
   White catalogue bands — feature card grids
============================================================ */

.catalogue-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: end;
  margin-bottom: 64px;
}

.catalogue-intro p {
  color: var(--mute);
  font-size: 18px;
  line-height: 1.56;
  max-width: 520px;
}

@media (max-width: 900px) {
  .catalogue-intro {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }
}

.card-grid {
  display: grid;
  gap: 24px;
}

.card-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid-6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .card-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .card-grid-6,
  .card-grid-3 {
    grid-template-columns: 1fr;
  }
}

.feature-card-light {
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: var(--canvas-light);
  border: 1px solid var(--hairline-light);
  border-radius: var(--rounded-lg);
  min-height: 240px;
  transition: transform 240ms var(--ease), border-color 240ms ease;
}

.feature-card-light:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

.feature-card-light h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 12px;
}

.feature-card-light p {
  color: var(--mute);
  font-size: 16px;
  line-height: 1.55;
}

.feature-card-light .meta {
  margin-top: auto;
  padding-top: 32px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}

/* Feature cards on dark — used inside photo-band sections */

.feature-card-dark {
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: var(--surface-elevated);
  border-radius: var(--rounded-lg);
  min-height: 200px;
}

.feature-card-dark h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  color: var(--on-dark);
  margin-bottom: 12px;
}

.feature-card-dark p {
  color: var(--on-dark-mute);
  font-size: 15px;
  line-height: 1.55;
}

/* ============================================================
   Infrastructure section — photo band + dark cards stacked
============================================================ */

.infra-band {
  position: relative;
  background: var(--canvas-dark);
  color: var(--on-dark);
}

.infra-band .photo-band {
  aspect-ratio: 16 / 9;
  min-height: 460px;
}

.infra-cards {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px var(--gutter) var(--section);
}

.infra-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 768px) {
  .infra-cards-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Hero overlay gradient — for daylight photos that don't have
   a crushed-black corner. Gives the headline a readable backing
   without darkening the whole photo.
============================================================ */

/* The hero photo bakes a left-to-right fade-to-pure-black into the
   asset itself (postprod_hero_v3.py). The headline sits in that dark
   zone with no CSS overlay needed. */

.hero-split {
  display: grid;
  align-items: center;
}

.hero-split .overlay {
  align-self: center;
  max-width: 560px;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  margin-left: 0;
  margin-right: auto;
}

.hero-split .overlay .body-lg {
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 768px) {
  /* On mobile: stack a dark text band above a 4:5 photo crop of
     the right (photo) portion of the hero. */
  .hero-split {
    aspect-ratio: auto;
    min-height: 0;
    grid-template-rows: auto auto;
    align-items: stretch;
  }
  .hero-split img.bg {
    position: relative;
    height: auto;
    aspect-ratio: 4 / 5;
    order: 2;
    z-index: 0;
  }
  .hero-split .overlay {
    order: 1;
    background: var(--canvas-dark);
    padding-top: var(--block);
    padding-bottom: var(--block);
    max-width: none;
    margin-right: 0;
  }
}

.photo-band .overlay {
  z-index: 1;
}

/* ============================================================
   Where Fourier runs — gallery (reuses .band / .band-inner pattern)
============================================================ */

.catalogue-intro.on-dark p {
  color: var(--on-dark-mute);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.gallery-card figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--rounded-lg);
  background: var(--surface-elevated);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}

.gallery-card:hover img {
  transform: scale(1.025);
}

.gallery-card .label {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--on-dark);
  letter-spacing: -0.005em;
  padding-left: 4px;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .gallery-card .label {
    font-size: 20px;
  }
}

/* ============================================================
   Type-only band — for mid-page sections with no photo
   (Operating Model). Sits on soft-dark canvas, no image cost.
============================================================ */

.type-band {
  background: var(--canvas-dark);
  color: var(--on-dark);
  padding: clamp(96px, 12vw, 160px) var(--gutter);
}

.type-band-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: end;
}

.type-band-inner > .lede {
  max-width: 580px;
}

.type-band-inner .body-lg {
  color: var(--on-dark-mute);
  margin-top: 24px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .type-band-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }
}

/* ============================================================
   Final CTA — type-only on soft-dark canvas
============================================================ */

.final-cta {
  background: var(--canvas-dark);
  text-align: center;
  padding: clamp(120px, 16vw, 200px) var(--gutter);
}

.final-cta .display-xxl {
  max-width: 16ch;
  margin: 0 auto 48px;
}

.final-cta .button {
  margin: 0 auto;
}

/* ============================================================
   Footer
============================================================ */

.site-footer {
  background: var(--canvas-dark);
  color: var(--on-dark-mute);
  padding: 64px var(--gutter) 32px;
  border-top: 1px solid var(--divider-soft);
}

.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}

.site-footer .brand {
  color: var(--on-dark);
}

.site-footer .brand-logo {
  width: 148px;
}

.site-footer p {
  font-size: 14px;
  text-align: center;
  color: var(--on-dark-faint);
}

.site-footer a {
  font-size: 14px;
  color: var(--on-dark-mute);
}

@media (max-width: 768px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .site-footer p {
    text-align: left;
  }
}

/* ============================================================
   Reveal animation
============================================================ */

.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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