/* ==========================================================================
   Design tokens — matched against the Adcker reference site
   Display font: Kumbh Sans (same as original, free via Google Fonts)
   Serif accent: Newsreader (stand-in for original's proprietary "psl/psr")
   Body font: Inter (stand-in for original's proprietary "nhm")
   ========================================================================== */

:root {
  --bg: #EFEDEA;
  --fg: #191919;
  --footer-bg: #121212;
  --footer-fg: #F5F3EF;

  --placeholder-bg: #D9D2C4;
  --placeholder-border: #B7AD98;
  --hairline: rgba(25, 25, 25, 0.1);

  --section-gap: clamp(80px, 14vw, 200px);
  --page-margin: clamp(20px, 2.6vw, 40px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* Adcker's own curves: media fades and text-link underlines */
  --ease-media: cubic-bezier(0.82, 0, 0.18, 1);
  --ease-link: cubic-bezier(0.9, 0, 0.1, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

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

:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* ==========================================================================
   Typography scale
   ========================================================================== */

.h1 {
  font-family: 'Kumbh Sans', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 1.1rem + 5.7vw, 9rem);
  line-height: 0.82;
  letter-spacing: -0.045em;
  text-align: center;
  margin: 0;
  overflow-wrap: break-word;
}

.h2 {
  font-family: 'Newsreader', serif;
  font-weight: 500;
  font-size: clamp(2rem, 1.4rem + 3vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
}

.h3 {
  font-family: 'Newsreader', serif;
  font-weight: 500;
  font-size: clamp(1.4rem, 1rem + 1.5vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}

.note {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.45;
  margin: 0;
}

.caption-title {
  font-family: 'Newsreader', serif;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.005em;
  margin: 0;
}

.body-text {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.75;
}

/* ==========================================================================
   Nav — fixed, mix-blend-mode gives automatic contrast without any JS
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--page-margin);
  mix-blend-mode: difference;
  color: white;
  font-family: 'Inter', sans-serif;
}

.nav-logo {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  opacity: 0.85;
  transition: opacity 0.3s var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-link);
}

.nav-links a:hover { opacity: 1; }

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links a.is-active { opacity: 1; }

.nav-links a.is-active::after { transform: scaleX(1); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  padding: 100px var(--page-margin) 60px;
}

.hero-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.4vw, 20px);
}

.hero-bracket {
  font-family: 'Kumbh Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 1.1rem + 5.7vw, 9rem);
  line-height: 0.82;
}

.hero-circle {
  aspect-ratio: 1 / 1;
  height: clamp(1.4rem, 0.9rem + 3.7vw, 5.3rem);
  overflow: hidden;
  position: relative;
  background: var(--placeholder-bg);
  /* The brackets' visual "middle" (where their ink actually sits) is
     lower than their line box's geometric center, so a box-centered
     square reads as sitting slightly too high between them. */
  transform: translateY(7%);
}

.hero-cycle-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-note-row {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: clamp(20px, 4vw, 48px);
}

@media (min-width: 900px) {
  .hero .h1,
  .hero-bracket {
    font-size: clamp(6.5rem, 1.5rem + 10vw, 18rem);
  }

  .hero-circle {
    height: clamp(4rem, 1rem + 6.5vw, 9.5rem);
  }
}

.hero-note {
  position: absolute;
  left: 50%;
  transform: translateX(calc(-50% + 6.5em));
  white-space: nowrap;
  top: 50%;
  translate: 0 -50%;
}

/* Entrance — a quiet staggered rise on load. Held back (paused) while the
   preloader still covers the page so it plays as the preloader fades. */
@media (prefers-reduced-motion: no-preference) {
  .hero-line,
  .hero-note-row,
  .page-header {
    animation: rise 1s var(--ease) both;
  }

  .hero-line:nth-child(2) { animation-delay: 0.08s; }
  .hero-line:nth-child(3) { animation-delay: 0.16s; }
  .hero-note-row { animation-delay: 0.32s; }

  body.preloading .hero-line,
  body.preloading .hero-note-row {
    animation-play-state: paused;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Section wrapper
   ========================================================================== */

.section {
  padding-bottom: var(--section-gap);
}

.section-intro {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--page-margin) 60px;
  text-align: center;
}

/* A few sentences, not one headline-scale line — its own smaller,
   softer serif register so it reads as a quiet personal note under
   the hero rather than competing with it. */
.intro-text {
  font-family: 'Newsreader', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem);
  line-height: 1.65;
  letter-spacing: -0.005em;
  color: var(--fg);
  opacity: 0.82;
  margin: 0;
}

.page-header {
  padding: clamp(150px, 24vh, 220px) var(--page-margin) clamp(64px, 9vw, 100px);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

/* ==========================================================================
   Story / journey flow page
   ========================================================================== */

.flow {
  display: flex;
  flex-direction: column;
  gap: clamp(50px, 8vw, 110px);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--page-margin) clamp(60px, 10vw, 140px);
}

.flow-stop {
  width: 100%;
}

/* Caption sits inside its flow-stop (nested, not a sibling) so its spacing
   is fully decoupled from the big gap between moments — tight to its own
   photos, never ambiguous about which group it belongs to. */
.flow-stop-caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 22px;
  text-align: center;
}

/* Real photos keep their native aspect ratio — never cropped or stretched.
   Consistency comes from a shared height (small/big rows) or a shared
   max-width (solo), not from forcing every photo into the same box shape. */
.flow-photo {
  display: block;
  border: 1px solid var(--hairline);
  background: var(--placeholder-bg);
}

.flow-photos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
}

/* One shared height for every photo row — small/big only differ in how
   many photos they hold, not in visual weight, so nothing looks
   arbitrarily shrunken next to its neighbours. */
.flow-stop.small .flow-photo,
.flow-stop.big .flow-photo {
  height: 360px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Text-heavy photos (screenshots) need width, not a fixed height, to stay
   legible — used for moments like the opening Tinder conversation. */
.flow-stop.big.readable .flow-photo {
  height: auto;
  width: auto;
  max-width: 340px;
}

/* Solo photos are capped in both directions instead of being scaled by
   width alone — otherwise tall portraits towered over everything while
   landscapes shrank. Ratios always stay untouched. */
.flow-stop.solo {
  margin: 0 auto;
}

.flow-stop.solo .flow-photo {
  /* Same principle as the rows: one fixed height, width follows the
     photo's own ratio (derived from the width/height attributes even
     before the file loads). Solos sit a step above row height so a
     featured moment still reads as featured. */
  height: 480px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto;
}

/* ==========================================================================
   Together page — live counter
   ========================================================================== */

.counter {
  padding: 40px var(--page-margin) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(40px, 7vw, 80px);
}

/* A quieter second stat below the main "years together" hero — same
   family of numbers, deliberately smaller so the hierarchy stays clear:
   the big count is the headline, this is a supporting note. */
.reunion {
  margin-top: clamp(56px, 9vw, 112px);
  padding: clamp(48px, 8vw, 96px) var(--page-margin) var(--section-gap);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.reunion-label {
  opacity: 0.55;
}

.reunion-units {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(20px, 4vw, 48px);
}

.reunion-value {
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem);
}

.reunion-reached {
  display: none;
  font-family: 'Newsreader', serif;
  font-weight: 500;
  font-size: clamp(1.4rem, 1rem + 1.5vw, 2rem);
  margin: 0;
}

.reunion-date {
  opacity: 0.4;
}

.counter-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.counter-hero .h1 {
  font-size: clamp(6rem, 3rem + 20vw, 22rem);
  line-height: 0.82;
}

.counter-units {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(28px, 6vw, 72px);
}

.counter-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 64px;
}

.counter-unit-value {
  font-family: 'Newsreader', serif;
  font-weight: 500;
  font-size: clamp(2rem, 1.4rem + 3vw, 3.75rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

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

.footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  padding: var(--section-gap) var(--page-margin) 32px;
  display: flex;
  flex-direction: column;
}

.footer-statement {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.footer-statement .h2 { color: var(--footer-fg); }

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 48px;
  width: 100%;
  max-width: 620px;
  margin: clamp(56px, 8vw, 104px) auto 0;
  text-align: left;
}

.footer-col-label {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.45;
  margin-bottom: 16px;
}

.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col-links a,
.footer-col-links span {
  font-size: 0.95rem;
  opacity: 0.85;
}

.footer-col-links a {
  position: relative;
  display: inline-block;
  transition: opacity 0.3s var(--ease);
}

.footer-col-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-link);
}

.footer-col-links a:hover { opacity: 1; }

.footer-col-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  margin-top: clamp(56px, 8vw, 104px);
}

.footer-mark {
  font-family: 'Newsreader', serif;
  font-size: 1.3rem;
  opacity: 0.6;
  transition: opacity 0.3s var(--ease);
}

.footer-mark:hover { opacity: 1; }

.footer-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  opacity: 0.4;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.68rem; }
  .flow-photos { flex-direction: column; align-items: center; max-width: 340px; margin: 0 auto; }
  .flow-stop.small .flow-photo,
  .flow-stop.big .flow-photo { height: auto; width: 100%; max-width: 320px; }
  .flow-stop.solo .flow-photo { max-height: none; width: 100%; max-width: 320px; }
  .footer-columns { gap: 48px; }
  .hero-note { display: none; }
}

/* ==========================================================================
   Preloader — asterisk / (square photo) / percent, cycling on page load
   ========================================================================== */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-media);
}

.preloader.is-done {
  opacity: 0;
  pointer-events: none;
}

body.preloading {
  overflow: hidden;
}

.preloader-inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
}

.preloader-asterisk {
  width: clamp(1.6rem, 1.2rem + 2vw, 3rem);
  height: auto;
  color: var(--fg);
  flex-shrink: 0;
}

.preloader-bracket {
  font-family: 'Kumbh Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 1.5rem + 4vw, 4.5rem);
  line-height: 1;
}

.preloader-image-wrap {
  width: clamp(3.4rem, 2.8rem + 5vw, 7rem);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--placeholder-bg);
  flex-shrink: 0;
}

.preloader-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preloader-percent {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(0.85rem, 0.7rem + 1vw, 1.15rem);
  letter-spacing: 0.02em;
  color: var(--fg);
  min-width: 3.4em;
  font-variant-numeric: tabular-nums;
}
