/* Lightship-style mosaic: center hero shrinks; app tiles enter the frame */

:root {
  --ink: #0a0e12;
  --frame: #d9d4cb;
  --frame-deep: #cfc8bc;
  --sand: #efe6d8;
  --sand-mute: rgba(239, 230, 216, 0.78);
  --accent: #c9a46a;
  --accent-strong: #e0ba78;
  --line: rgba(239, 230, 216, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.25rem;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Sora", "Avenir Next", system-ui, sans-serif;
  --radius: 1.1rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--frame);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

.exp-banner {
  position: fixed;
  top: 0.7rem;
  right: clamp(1rem, 3vw, 2rem);
  z-index: 120;
  margin: 0;
  max-width: 9.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--accent-strong);
  background: rgba(10, 14, 18, 0.72);
  border: 1px solid var(--line);
  pointer-events: none;
}

/* —— Header stays —— */
/* Dark scrim so logo + sand nav match the main page on every product hero */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 2.75rem);
  color: var(--sand);
  mix-blend-mode: normal;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 18, 0.88) 0%,
    rgba(10, 14, 18, 0.55) 62%,
    rgba(10, 14, 18, 0) 100%
  );
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-light {
  color: var(--ink);
  background: rgba(217, 212, 203, 0.92);
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(10, 14, 18, 0.08);
}

.site-header.is-light .nav-cta {
  border-color: rgba(10, 14, 18, 0.2);
  color: var(--ink);
}

.site-header .nav-cta {
  color: var(--sand);
  border-color: rgba(239, 230, 216, 0.35);
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.brand-logo {
  height: 3.2rem; /* +25% */
  width: auto;
  max-width: min(58vw, 16.9rem);
  object-fit: contain;
}

@media (min-width: 820px) {
  .brand-logo {
    height: 3.55rem;
    max-width: 18.75rem;
  }
}

.nav-links {
  display: none;
  gap: 1.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

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

.nav-cta {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(239, 230, 216, 0.35);
}

@media (min-width: 820px) {
  .nav-links {
    display: flex;
  }
}

/* —— Mosaic stage —— */
.mosaic-stage {
  /* Scroll runway for progress 0 → 1 */
  height: 280vh;
  position: relative;
  background: var(--frame);
}

.mosaic-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--frame);
}

.mosaic-canvas {
  position: absolute;
  inset: 0;
}

/* Center hero — JS sets left/top/width/height/radius from scroll */
.hero-core {
  position: absolute;
  z-index: 5;
  overflow: hidden;
  background: var(--ink);
  will-change: left, top, width, height, border-radius;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 40%;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 18, 0.78) 0%, rgba(10, 14, 18, 0.35) 48%, rgba(10, 14, 18, 0.2) 100%),
    linear-gradient(180deg, rgba(10, 14, 18, 0.25) 0%, transparent 30%, rgba(10, 14, 18, 0.72) 100%);
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1rem, 3vh, 2rem) clamp(1.1rem, 3vw, 2.4rem) clamp(1.4rem, 4vh, 2.8rem);
  color: var(--sand);
  max-width: 36rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow.static {
  color: #8a6b35;
}

.hero-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.55rem, 4.2vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-title em {
  font-style: italic;
  font-weight: 420;
  color: var(--accent-strong);
}

.hero-lede {
  margin: 0 0 1.1rem;
  font-size: clamp(0.78rem, 1.25vw, 1.02rem);
  color: var(--sand-mute);
  max-width: 30rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.1rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.25s ease;
}

.btn-primary {
  background: var(--sand);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid rgba(239, 230, 216, 0.35);
  color: var(--sand);
}

.btn-ghost:hover {
  border-color: var(--sand-mute);
}

.cta-row.static .btn-primary {
  background: var(--ink);
  color: var(--sand);
}

.cta-row.static .btn-ghost {
  border-color: rgba(10, 14, 18, 0.25);
  color: var(--ink);
}

/* App tiles — JS positions; start off-canvas */
.app-tile {
  position: absolute;
  z-index: 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: #1a1f26;
  color: var(--sand);
  box-shadow: 0 18px 40px rgba(10, 14, 18, 0.18);
  will-change: transform, opacity, left, top, width, height;
  opacity: 0;
}

.app-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.app-tile:hover img {
  transform: scale(1.04);
}

.tile-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem 0.9rem 0.85rem;
  background: linear-gradient(transparent, rgba(10, 14, 18, 0.88) 55%);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tile-foot strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
}

.tile-foot span {
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-transform: none;
  color: var(--sand-mute);
  max-width: 18rem;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.2rem;
  z-index: 8;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(239, 230, 216, 0.55);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.scroll-cue.is-hidden {
  opacity: 0;
}

/* Outro */
.outro {
  position: relative;
  z-index: 2;
  padding: clamp(3.5rem, 10vh, 6rem) clamp(1.25rem, 5vw, 4rem);
  background: #ebe6dc;
  border-top: 1px solid rgba(10, 14, 18, 0.08);
}

/* Original left column unchanged; promo sits in the empty space to its right */
.outro-frame {
  position: relative;
}

.outro-inner {
  max-width: 40rem;
}

.outro-promo {
  display: block;
  position: absolute;
  top: 0;
  /* Halfway between the text column and the right edge */
  left: calc(40rem + max(0rem, (100% - 40rem - 27.83rem) / 2));
  right: auto;
  width: min(27.83rem, calc(100% - 40rem - 2rem));
  max-width: 27.83rem;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(10, 14, 18, 0.12);
  box-shadow: 0 14px 32px rgba(10, 14, 18, 0.12);
  background: #0a0e12;
  color: var(--sand);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.outro-promo:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(10, 14, 18, 0.16);
}

.outro-promo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.outro-promo-label {
  position: absolute;
  left: 0.65rem;
  bottom: 0.65rem;
  margin: 0;
  padding: 0.28rem 0.5rem;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  background: rgba(239, 230, 216, 0.92);
  border-radius: 0.3rem;
}

.outro h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.12;
}

.outro p {
  margin: 0 0 1.5rem;
  color: rgba(10, 14, 18, 0.72);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem clamp(1.25rem, 5vw, 4rem) 1.75rem;
  font-size: 0.75rem;
  color: rgba(10, 14, 18, 0.5);
  background: var(--frame-deep);
}

.site-footer a:hover {
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
}

.footer-links a {
  color: rgba(10, 14, 18, 0.62);
}

.outro .site-map {
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(10, 14, 18, 0.1);
}

.outro .site-map-list {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.outro .site-map-list a {
  color: rgba(10, 14, 18, 0.78);
  border-bottom: 1px solid transparent;
}

.outro .site-map-list a:hover {
  border-bottom-color: rgba(10, 14, 18, 0.35);
  color: var(--ink);
}

@media (max-width: 980px) {
  .outro-promo {
    position: static;
    width: min(27.83rem, 100%);
    max-width: 27.83rem;
    margin-top: 1.5rem;
  }
}

@media (max-width: 760px) {
  .hero-lede {
    display: none;
  }

  .exp-banner {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .app-tile,
  .hero-core {
    transition: none !important;
  }
}
