/* ===========================================================================
   Bisoux - marketing site styles.
   Composes ON TOP of the Bisoux design-system tokens (colors/type/spacing).
   The site is the same warm world as the app: one neutral family, one red accent
   used sparingly, Fraunces display, Inter body, lots of quiet air.
   =========================================================================== */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  transition: background 600ms var(--motion-ease), color 600ms var(--motion-ease);
}

/* The whole site sits on faint paper grain for love-letter warmth. */
#bx-site { position: relative; }

::selection { background: var(--accent-soft); color: var(--text); }

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

/* ---- Layout primitives ---------------------------------------------------- */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap, .wrap-narrow { padding: 0 22px; } }

.section { position: relative; }

/* A quiet uppercase eyebrow label */
.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
  opacity: 0.6;
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::after {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

/* Display headings */
.display {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  color: var(--text);
}
.emotive {
  font-family: var(--font-emotive);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}
.lede {
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 46ch;
  text-wrap: pretty;
}

/* ---- Top navigation ------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  transition: padding 400ms var(--motion-ease), background 400ms var(--motion-ease),
              box-shadow 400ms var(--motion-ease), border-color 400ms var(--motion-ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 12px 32px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 640px) { .nav, .nav.scrolled { padding-left: 20px; padding-right: 20px; } }

.brand { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; }
.brand .word {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  letter-spacing: 0.01em;
  color: var(--text);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-link {
  font-size: 15px; color: var(--text-secondary); cursor: pointer;
  background: none; border: none; padding: 0; font-family: var(--font-body);
  transition: color 200ms var(--motion-ease);
  position: relative;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 320ms var(--motion-ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }
@media (max-width: 860px) { .nav-link.hideable { display: none; } }

.theme-toggle {
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text);
  transition: background 200ms var(--motion-ease), transform 200ms var(--motion-ease);
}
.theme-toggle:hover { background: var(--accent-soft); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle svg { width: 20px; height: 20px; }

/* ---- Buttons (site-level, complements DS Button) -------------------------- */
.btn-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---- Reveal-on-scroll (choreographed variants) ---------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1000ms var(--motion-ease), transform 1100ms var(--motion-ease),
              filter 1000ms var(--motion-ease), clip-path 1100ms var(--motion-ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* directional + textural variants. Scoped with :not(.in) so the start-state
   stops matching once the element is revealed - otherwise these (equal
   specificity, later in source) would override .reveal.in and stay stuck. */
.reveal:not(.in).r-scale  { transform: scale(0.92); }
.reveal:not(.in).r-blur   { filter: blur(14px); transform: translateY(20px); }
.reveal:not(.in).r-left   { transform: translateX(-44px); }
.reveal:not(.in).r-right  { transform: translateX(44px); }
.reveal:not(.in).r-rise-lg{ transform: translateY(64px); }

/* stagger via delay steps */
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }
.reveal[data-delay="5"] { transition-delay: 400ms; }
.reveal[data-delay="6"] { transition-delay: 480ms; }
.reveal[data-delay="7"] { transition-delay: 560ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; transition: none !important; }
}

/* Static-but-visible fallback: applied by motion.jsx when CSS transitions are
   detected as frozen (capture harness / throttled tab) or under reduced-motion.
   Forces every animated element to its visible end-state with no transition,
   so content is never stuck hidden. Real browsers never get this class. */
.motion-off .reveal {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  clip-path: none !important;
  transition: none !important;
}
.motion-off [data-parallax],
.motion-off [data-scroll-scale],
.motion-off [data-scroll-rise],
.motion-off [data-tilt],
.motion-off [data-magnetic] { transform: none !important; }

/* ---- Scroll progress bar -------------------------------------------------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200;
  pointer-events: none;
}
.scroll-progress > span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #d98a7e));
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 90ms linear;
}

/* ---- Magnetic / spotlight ------------------------------------------------- */
[data-magnetic] { transition: transform 360ms var(--motion-ease); }
[data-spotlight] { position: relative; }
[data-spotlight]::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity 500ms var(--motion-ease);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%),
    color-mix(in srgb, var(--accent) 26%, transparent), transparent 60%);
}
[data-spotlight].spot-on::before { opacity: 1; }
[data-spotlight] > * { position: relative; z-index: 1; }

/* ---- DEVICE FRAMES -------------------------------------------------------- */
/* Cohesive, minimal, premium product mockups. A consuming screen is placed
   inside .device-screen; the bezel + shadow + glare are the chrome. */

.device-screen {
  position: relative; overflow: hidden;
  background: var(--bg);
}
/* a faint top glare on every glass surface */
.device-glare {
  position: absolute; inset: 0; pointer-events: none; z-index: 6;
  background: linear-gradient(135deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 38%);
  mix-blend-mode: screen;
}
.dark .device-glare { opacity: 0.5; }

/* Phone */
.phone {
  position: relative;
  width: 300px;
  aspect-ratio: 300 / 620;
  border-radius: 44px;
  background: #0e0c0b;
  padding: 11px;
  box-shadow:
    0 2px 0 0 #2c2724 inset,
    0 40px 90px -28px rgba(26,22,19,0.55),
    0 12px 30px -12px rgba(26,22,19,0.35),
    0 0 0 1px rgba(0,0,0,0.4);
}
.phone .device-screen { width: 100%; height: 100%; border-radius: 34px; }
.phone .notch {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 116px; height: 26px; background: #0e0c0b; border-radius: 0 0 16px 16px;
  z-index: 7;
}
.phone .statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: 40px; z-index: 7;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; font-size: 13px; font-weight: 600; color: var(--text);
  font-family: var(--font-body);
}
.phone .statusbar .sb-dots { display: flex; gap: 5px; align-items: center; }
.phone .statusbar svg { width: 16px; height: 16px; }

/* Tablet (portrait) */
.tablet {
  position: relative;
  width: 440px;
  aspect-ratio: 440 / 580;
  border-radius: 30px;
  background: #0e0c0b;
  padding: 16px;
  box-shadow:
    0 2px 0 0 #2c2724 inset,
    0 50px 110px -34px rgba(26,22,19,0.5),
    0 14px 34px -14px rgba(26,22,19,0.3),
    0 0 0 1px rgba(0,0,0,0.4);
}
.tablet .device-screen { width: 100%; height: 100%; border-radius: 16px; }

/* Laptop */
.laptop { position: relative; width: 720px; }
.laptop .lid {
  position: relative;
  border-radius: 16px 16px 0 0;
  background: #0e0c0b;
  padding: 14px 14px 0;
  box-shadow:
    0 2px 0 0 #2c2724 inset,
    0 40px 90px -30px rgba(26,22,19,0.5),
    0 0 0 1px rgba(0,0,0,0.4);
}
.laptop .device-screen { width: 100%; aspect-ratio: 16 / 10; border-radius: 6px 6px 0 0; }
.laptop .camera {
  position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: #2c2724; box-shadow: 0 0 0 2px #161210;
  z-index: 7;
}
.laptop .base {
  height: 16px; width: 104%; margin-left: -2%;
  background: linear-gradient(#cdc6ba, #b3aa9c);
  border-radius: 0 0 12px 12px;
  position: relative;
  box-shadow: 0 18px 40px -16px rgba(26,22,19,0.45);
}
.laptop .base::after {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 130px; height: 7px; background: #9b9284; border-radius: 0 0 9px 9px;
}
.dark .laptop .base { background: linear-gradient(#3a342f, #211d1a); }
.dark .laptop .base::after { background: #15110f; }

/* ---- App-screen interior styles (shared by all device screens) ------------ */
.appscreen {
  position: absolute; inset: 0; overflow: hidden;
  background: var(--bg);
  font-family: var(--font-body);
  color: var(--text);
}
.appscreen .app-label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-secondary); margin: 0;
}
.appscreen .app-title {
  font-family: var(--font-display); font-weight: 300; letter-spacing: -0.01em;
  color: var(--text); margin: 0; line-height: 1.1;
}
.app-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px;
  /* soft, warm, low elevation - a little volume without going glossy */
  box-shadow: 0 1px 2px rgba(26,22,19,0.04), 0 10px 24px -12px rgba(26,22,19,0.18);
}
.dark .app-card,
.band-night .app-card {
  box-shadow: 0 1px 2px rgba(0,0,0,0.30), 0 12px 28px -14px rgba(0,0,0,0.55);
}
.app-tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 64px;
  display: flex; align-items: center; justify-content: space-around;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(8px);
}
.app-tabbar .tab { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-secondary); font-size: 10px; }
.app-tabbar .tab.active { color: var(--accent); }
.app-tabbar .tab svg { width: 22px; height: 22px; }

/* avatar bubble */
.ava {
  border-radius: 999px; background: var(--surface-sunken);
  border: 2px solid var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); color: var(--text-secondary);
  overflow: hidden;
}
.ava.ring { box-shadow: 0 0 0 2px var(--accent); }

/* ---- Pinned scrollytelling stage ----------------------------------------- */
.scrolly { position: relative; }
.scrolly-sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  /* center BELOW the fixed nav so the phone's top never hides behind it */
  padding-top: 64px; box-sizing: border-box;
}
/* the pinned phone keeps its true 300px width (internal app UI is laid out for
   that) and is SCALED to fit short viewports by JS - scaling the whole device
   so nothing inside (tab bar, badges) ever clips. */
.scrolly-sticky .phone { transform-origin: center center; will-change: transform; }
.scrolly-screen { position: absolute; inset: 0; opacity: 0; transition: opacity 600ms var(--motion-ease); }
.scrolly-screen.show { opacity: 1; }

/* ---- Feature grid cards --------------------------------------------------- */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  transition: transform 400ms var(--motion-ease), box-shadow 400ms var(--motion-ease);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg { width: 24px; height: 24px; }

/* ---- Step (pairing) ------------------------------------------------------- */
.step-num {
  font-family: var(--font-display); font-weight: 300; font-size: 15px;
  width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--accent); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}

/* ---- Waitlist form -------------------------------------------------------- */
.waitlist-form { display: flex; gap: 12px; flex-wrap: wrap; }
.waitlist-form .field { flex: 1; min-width: 240px; }

/* ---- Floating decorative kiss --------------------------------------------- */
.float-kiss { position: absolute; pointer-events: none; opacity: 0.0; }

/* night drama band */
.band-night {
  background: #131110;
  color: #E9E1D3;
  --text: #E9E1D3;
  --text-secondary: #8F8980;
  --surface: #1E1A18;
  --border: #2C2724;
  --bg: #131110;
  --accent: #A8403A;
  --accent-soft: rgba(168,64,58,0.14);
  --surface-sunken: #181513;
}

/* ---- Footer --------------------------------------------------------------- */
.foot-link { color: var(--text-secondary); font-size: 15px; cursor: pointer; transition: color 200ms; display: block; padding: 5px 0; }
.foot-link:hover { color: var(--text); }
.social-btn {
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); cursor: pointer;
  transition: background 200ms var(--motion-ease), transform 200ms var(--motion-ease);
}
.social-btn:hover { background: var(--accent-soft); transform: translateY(-2px); }
.social-btn svg { width: 20px; height: 20px; }

/* store badge */
.store-badge {
  display: inline-flex; align-items: center; gap: 11px;
  height: 54px; padding: 0 20px; border-radius: 14px;
  background: var(--text); color: var(--bg);
  cursor: pointer; transition: transform 200ms var(--motion-ease), opacity 200ms;
}
.store-badge:hover { transform: translateY(-2px); }
.store-badge svg { width: 24px; height: 24px; }
.store-badge .sb-top { font-size: 10px; letter-spacing: 0.04em; opacity: 0.8; line-height: 1; }
.store-badge .sb-bot { font-family: var(--font-display); font-size: 17px; line-height: 1.1; }

/* ---- Feature 3D carousel -------------------------------------------------- */
.feat-carousel-stage {
  position: relative;
  height: 340px;
  max-width: 760px;
  margin: 52px auto 8px;
  perspective: 1100px;
  cursor: grab;
  touch-action: pan-y;       /* vertical page scroll still works on touch */
}
.feat-carousel-stage.grabbing { cursor: grabbing; }
.feat-orbit { position: absolute; inset: 0; }
.feat-orb {
  position: absolute; left: 50%; top: 46%;
  transform-origin: center center;
  will-change: transform, opacity, filter;
}
.feat-disc {
  display: flex; align-items: center; justify-content: center;
  width: 104px; height: 104px; border-radius: 30px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--accent);
  box-shadow: 0 18px 40px -16px rgba(26,22,19,0.30), 0 2px 6px rgba(26,22,19,0.06);
  transition: background 420ms var(--motion-ease), color 420ms var(--motion-ease),
              box-shadow 420ms var(--motion-ease);
  -webkit-user-select: none; user-select: none;
}
.feat-orb.is-front .feat-disc {
  background: var(--accent); color: #F4EFE5;
  box-shadow: 0 26px 60px -20px var(--accent), 0 4px 12px rgba(26,22,19,0.10);
}
.dark .feat-orb.is-front .feat-disc { color: #1E1A18; }
.feat-caption {
  max-width: 460px; margin: 16px auto 0; text-align: center;
  transition: opacity 260ms var(--motion-ease);
  min-height: 132px;
}
@media (max-width: 640px) {
  .feat-carousel-stage { height: 280px; margin-top: 40px; }
  .feat-disc { width: 86px; height: 86px; border-radius: 26px; }
}

/* image-slot styling hook */
image-slot { border-radius: 18px; }

/* ---- Interactive bisou (hero) -------------------------------------------- */
.bisou-tap {
  position: relative; cursor: pointer; border: none; background: transparent;
  -webkit-tap-highlight-color: transparent; outline: none; padding: 0;
  border-radius: 999px;            /* any UA focus ring follows a circle, never a square */
  -webkit-appearance: none; appearance: none;
  user-select: none; -webkit-user-select: none;
  transition: transform 220ms var(--motion-ease);
}
.bisou-tap:focus,
.bisou-tap:active,
.bisou-tap:focus-visible { outline: none !important; box-shadow: none; }
/* keep an accessible ring for keyboard users only - round, on the disc */
.bisou-tap:focus-visible .bisou-disc { box-shadow: var(--shadow-accent), 0 0 0 3px var(--accent-soft); }
/* clicks always land on the button, so focus is predictable */
.bisou-tap .bisou-disc, .bisou-tap .bisou-ring, .bisou-tap .bisou-fly { pointer-events: none; }
.bisou-tap .bisou-disc {
  width: 100%; height: 100%; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-accent);
  display: flex; align-items: center; justify-content: center;
  transition: transform 220ms var(--motion-ease), box-shadow 320ms var(--motion-ease);
}
.bisou-tap:hover .bisou-disc { transform: scale(1.04); box-shadow: 0 18px 50px -18px var(--accent); }
.bisou-tap:active .bisou-disc { transform: scale(0.95); }
/* the signature press-in-and-bloom on send */
.bisou-tap.sent .bisou-disc { animation: bisou-bloom 640ms var(--motion-ease); }
@keyframes bisou-bloom {
  0% { transform: scale(1); }
  28% { transform: scale(0.86); }
  62% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
/* ripple ring that blooms outward */
.bisou-ring {
  position: absolute; inset: 0; border-radius: 999px; pointer-events: none;
  border: 1.5px solid var(--accent); opacity: 0; transform: scale(0.7);
}
.bisou-tap.sent .bisou-ring { animation: bisou-ripple 720ms var(--motion-ease) forwards; }
@keyframes bisou-ripple {
  0% { opacity: 0.55; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(1.9); }
}
/* a kiss that floats up and fades after a send */
.bisou-fly {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%, 0); pointer-events: none;
  opacity: 0;
}
.bisou-tap.sent .bisou-fly { animation: bisou-fly 900ms var(--motion-ease) forwards; }
@keyframes bisou-fly {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.6); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -120px) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .bisou-tap.sent .bisou-disc,
  .bisou-tap.sent .bisou-ring,
  .bisou-tap.sent .bisou-fly { animation: none; }
}

/* ---- Editorial section index --------------------------------------------- */
.sec-index {
  font-family: var(--font-display); font-weight: 300;
  font-size: 13px; letter-spacing: 0.18em; color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
}
.sec-index::before { content: ""; width: 28px; height: 1px; background: var(--accent); opacity: 0.5; }

/* device lift on hover (premium tactility) */
.phone, .tablet, .laptop { transition: transform 500ms var(--motion-ease), box-shadow 500ms var(--motion-ease); }

/* ===========================================================================
   FILMIC POLISH - grain + vignette for an expensive, photographed feel
   =========================================================================== */
.film-grain {
  position: fixed; inset: 0; z-index: 190; pointer-events: none;
  opacity: 0.5; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
.film-vignette {
  position: fixed; inset: 0; z-index: 189; pointer-events: none;
  box-shadow: inset 0 0 220px 40px color-mix(in srgb, var(--ink) 14%, transparent);
}
@media (prefers-reduced-motion: reduce) { .film-grain { display: none; } }

/* ---- Animated draw-underline (hero accent word) --------------------------- */
.draw-underline { position: relative; white-space: nowrap; }
.draw-underline svg {
  position: absolute; left: -2%; bottom: -0.16em; width: 104%; height: 0.34em;
  overflow: visible; pointer-events: none;
}
.draw-underline svg path {
  fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1100ms var(--motion-ease) 600ms;
}
.draw-underline.in svg path { stroke-dashoffset: 0; }
.motion-off .draw-underline svg path { stroke-dashoffset: 0; transition: none; }

/* ---- Kiss-trail cursor (hero) -------------------------------------------- */
.kiss-trail-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: visible; }
.kiss-spark {
  position: absolute; width: 30px; height: 30px; pointer-events: none;
  transform: translate(-50%, -50%) scale(0.4) rotate(var(--r, 0deg));
  opacity: 0; will-change: transform, opacity;
  animation: kiss-spark 1100ms var(--motion-ease) forwards;
}
@keyframes kiss-spark {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(var(--r,0deg)); }
  18% { opacity: 0.85; }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(1) rotate(var(--r,0deg)); }
}

/* ===========================================================================
   LAYOUT GRIDS (as classes so breakpoints can restyle them)
   =========================================================================== */
.hero-grid    { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.scrolly-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 64px; align-items: start; }
.scrolly-step { min-height: 74vh; display: flex; flex-direction: column; justify-content: center; max-width: 460px; }
.pair-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.privacy-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
.foot-grid    { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }

/* device frames shrink to fit narrow viewports by default */
.tablet { width: min(440px, 84vw); }
.laptop { width: min(720px, 92vw); }

/* ===========================================================================
   RESPONSIVE - Laptop → Tablet → Mobile
   =========================================================================== */

/* Tablet & below: single-column everything, unpin the scrollytelling stage */
@media (max-width: 1040px) {
  .hero-grid, .pair-grid, .privacy-grid { grid-template-columns: 1fr; gap: 44px; }
  /* keep the device beside-text on pairing reading order: text, then device */
  .hero-grid > div:last-child { min-height: 0 !important; }

  .scrolly-grid { grid-template-columns: 1fr; gap: 4px; }
  .scrolly-sticky { position: static; height: auto !important; padding: 8px 0 0; }
  .scrolly-step { min-height: auto; padding: 30px 0; max-width: 520px; }
  /* stacked → no pin to drive the cross-fade, so show the home screen statically */
  .scrolly-screen { opacity: 0; }
  .scrolly-screen[data-step="0"] { opacity: 1; }

  .section { padding-left: 0; padding-right: 0; }
}

/* Tablet portrait niceties */
@media (max-width: 860px) {
  .nav-link.hideable { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px 28px; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}

/* Mobile */
@media (max-width: 640px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
  .nav, .nav.scrolled { padding-left: 18px; padding-right: 18px; }
  .brand .word { font-size: 21px; }

  .phone { width: 266px; }
  .feature-card { padding: 26px; }

  /* hide the small overlapping phone in the trio showcase; the laptop carries it */
  .devices-overlay-phone { display: none; }

  .foot-grid { grid-template-columns: 1fr 1fr; }
}

/* Very small phones */
@media (max-width: 380px) {
  .phone { width: 240px; }
  .nav .bx-button { display: none; } /* leave just the theme toggle to save room */
}

