/* ============================================================================
   Hotspot Studio — marketing site
   BEM naming: .block, .block__element, .block--modifier
   Theming: CSS custom properties. Light is the default; dark overrides live
   under [data-theme="dark"]. With no explicit choice, prefers-color-scheme
   drives it via the same variables (see the @media block below).
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------------------ */
:root {
  /* Brand */
  --c-accent: #4b3fff;
  --c-accent-2: #8b5cf6;
  --c-accent-soft: rgba(75, 63, 255, 0.09);
  --gradient-brand: linear-gradient(92deg, var(--c-accent), var(--c-accent-2));

  /* Light theme (default) */
  --c-bg: #fbfbfd;
  --c-bg-raised: #ffffff;
  --c-bg-sunken: #f2f3f7;
  --c-ink: #15161c;
  --c-ink-soft: #5b5e6b;
  --c-ink-faint: #9295a1;
  --c-line: #e7e8ee;
  --c-line-soft: #f0f1f5;
  --shadow-card: 0 14px 40px rgba(21, 22, 28, 0.08);
  --shadow-pop: 0 24px 70px rgba(21, 22, 28, 0.16);
  --header-veil: rgba(251, 251, 253, 0.78);

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
    "Helvetica Neue", sans-serif;

  /* Rhythm */
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --section-pad: clamp(52px, 6.5vw, 84px);
  --wrap: 1120px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --reveal-duration: 0.7s;

  color-scheme: light;
}

[data-theme="dark"] {
  --c-bg: #0b0c11;
  --c-bg-raised: #14151d;
  --c-bg-sunken: #090a0e;
  --c-ink: #ecedf2;
  --c-ink-soft: #a2a5b3;
  --c-ink-faint: #6d707e;
  --c-line: #23242e;
  --c-line-soft: #1a1b23;
  --c-accent: #7a70ff;
  --c-accent-soft: rgba(122, 112, 255, 0.14);
  --shadow-card: 0 14px 40px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 24px 70px rgba(0, 0, 0, 0.6);
  --header-veil: rgba(11, 12, 17, 0.72);
  color-scheme: dark;
}

/* System preference applies only until the visitor picks a theme
   (the toggle stamps data-theme on <html> and persists it). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --c-bg: #0b0c11;
    --c-bg-raised: #14151d;
    --c-bg-sunken: #090a0e;
    --c-ink: #ecedf2;
    --c-ink-soft: #a2a5b3;
    --c-ink-faint: #6d707e;
    --c-line: #23242e;
    --c-line-soft: #1a1b23;
    --c-accent: #7a70ff;
    --c-accent-soft: rgba(122, 112, 255, 0.14);
    --shadow-card: 0 14px 40px rgba(0, 0, 0, 0.45);
    --shadow-pop: 0 24px 70px rgba(0, 0, 0, 0.6);
    --header-veil: rgba(11, 12, 17, 0.72);
    color-scheme: dark;
  }

  /* Mirror the [data-theme="dark"] component overrides for system-dark. */
  :root:not([data-theme]) .cta-band,
  :root:not([data-theme]) .teaser-dark { background: #191a24; }
}

/* ---------------------------------------------------------------------------
   2. Base
   ------------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px; /* sticky header + air (subnav pages add scroll-margin) */
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

img,
svg {
  max-width: 100%;
  height: auto; /* keep the intrinsic ratio when width/height attrs are set */
  display: block;
}

/* Keyboard focus — visible on every interactive element, invisible for mouse */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* Screen-reader-only helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------------------
   3. Buttons (shared)
   ------------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 12px;
  border: 0;
  font: 600 15px/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out),
    border-color 0.15s ease, background 0.15s ease;
}

.btn--primary {
  color: #fff;
  background: var(--gradient-brand);
  box-shadow: 0 10px 28px rgba(75, 63, 255, 0.32);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(75, 63, 255, 0.4);
}

.btn--ghost {
  color: var(--c-ink);
  background: transparent;
  border: 1px solid var(--c-line);
}

.btn--ghost:hover {
  border-color: var(--c-ink-faint);
  transform: translateY(-2px);
}

.btn--small {
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 10px;
}

/* ---------------------------------------------------------------------------
   4. Header
   ------------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-veil);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-line-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap; /* never wrap "Hotspot Studio" onto two lines */
}

/* The brand mark — the Viewfinder icon (same artwork as the favicon). */
.site-header__logo {
  width: 30px;
  height: 30px;
  background: url("../img/favicon.svg") center / contain no-repeat;
  flex: 0 0 auto;
}

.site-header__nav {
  display: flex;
  gap: 24px;
}

.site-header__link {
  font-size: 14.5px;
  color: var(--c-ink-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-header__link:hover {
  color: var(--c-ink);
}

.site-header__cta {
  white-space: nowrap;
}

/* Theme toggle — a pill with sun/moon glyphs; JS swaps aria-pressed. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--c-line);
  background: var(--c-bg-raised);
  color: var(--c-ink-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.theme-toggle:hover {
  color: var(--c-ink);
  border-color: var(--c-ink-faint);
  transform: rotate(12deg);
}

.theme-toggle__icon {
  width: 17px;
  height: 17px;
}

/* Show the moon in light mode ("switch to dark") and the sun in dark mode. */
.theme-toggle__icon--sun { display: none; }
[data-theme="dark"] .theme-toggle__icon--sun { display: block; }
[data-theme="dark"] .theme-toggle__icon--moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle__icon--sun { display: block; }
  :root:not([data-theme]) .theme-toggle__icon--moon { display: none; }
}

/* Burger — hidden on desktop, toggles the dropdown menu on mobile. */
.site-header__burger {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--c-line);
  background: var(--c-bg-raised);
  color: var(--c-ink-soft);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.site-header__burger svg { width: 18px; height: 18px; }
.site-header__burger .ic-close { display: none; }
.site-header.is-menu-open .site-header__burger .ic-open { display: none; }
.site-header.is-menu-open .site-header__burger .ic-close { display: block; }

/* Menu-only CTA (the header CTA hides on narrow screens; this replaces it). */
.site-header__menu-cta { display: none; }

/* Mobile: nav becomes a dropdown sheet under the header, opened by the burger. */
@media (max-width: 820px) {
  .site-header__inner { gap: 12px; }

  .site-header__burger { display: inline-flex; }

  .site-header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 10px 24px 18px;
    background: var(--c-bg-raised);
    border-bottom: 1px solid var(--c-line);
    box-shadow: 0 24px 40px rgba(21, 22, 28, 0.12);
  }

  .site-header.is-menu-open .site-header__nav { display: flex; }

  .site-header__link {
    padding: 13px 2px;
    font-size: 15.5px;
    border-bottom: 1px solid var(--c-line-soft);
  }

  .site-header__link:last-of-type { border-bottom: 0; }

  .site-header__menu-cta {
    display: inline-flex;
    margin-top: 10px;
    justify-content: center;
  }
}

/* Very narrow: the header CTA moves into the menu entirely. */
@media (max-width: 560px) {
  .site-header__cta { display: none; }
}

/* ---------------------------------------------------------------------------
   5. Hero
   ------------------------------------------------------------------------ */
.hero {
  position: relative;
  padding: clamp(56px, 8vw, 104px) 0 var(--section-pad);
  overflow: hidden;
}

/* Aurora behind the hero — two blurred blobs drifting very slowly. */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  pointer-events: none;
  z-index: -1;
}

.hero::before {
  top: -180px;
  left: 12%;
  width: 560px;
  height: 460px;
  background: radial-gradient(circle, rgba(75, 63, 255, 0.18), transparent 68%);
  animation: aurora-a 16s ease-in-out infinite alternate;
}

.hero::after {
  top: -120px;
  right: 6%;
  width: 520px;
  height: 430px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16), transparent 68%);
  animation: aurora-b 19s ease-in-out infinite alternate;
}

@keyframes aurora-a {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(70px, 40px) scale(1.12); }
}

@keyframes aurora-b {
  from { transform: translate(0, 0) scale(1.08); }
  to { transform: translate(-60px, 30px) scale(0.96); }
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: var(--c-bg-raised);
  font-size: 13px;
  color: var(--c-ink-soft);
  margin-bottom: 22px;
}

.hero__pill b {
  color: var(--c-accent);
  font-weight: 650;
}

.hero__title {
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero__title em {
  font-style: normal;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  margin-top: 20px;
  font-size: 17.5px;
  color: var(--c-ink-soft);
  max-width: 46ch;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero__note {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--c-ink-faint);
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
}

/* --- Hero demo: a CSS "product shot" with live hotspots + cycling popup --- */
.demo {
  position: relative;
  border-radius: var(--radius-l);
  padding: 16px;
  background: var(--c-bg-raised);
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-pop);
}

.demo__shot {
  position: relative;
  height: clamp(300px, 38vw, 400px);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: radial-gradient(120% 90% at 18% 12%, #ffe3cf 0%, transparent 55%),
    radial-gradient(110% 100% at 85% 12%, #d5e3ff 0%, transparent 52%),
    linear-gradient(158deg, #f0dcd0 0%, #e5d2f0 48%, #ccd6f4 100%);
}

.demo__shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(255, 255, 255, 0.3) 46%,
    transparent 54%
  );
}

/* Hotspot marker */
.demo__dot {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #15161c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s var(--ease-out);
  z-index: 1;
}

.demo__dot::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(21, 22, 28, 0.35);
  animation: demo-pulse 2.4s ease-out infinite;
}

.demo__dot:hover { transform: scale(1.15); }
.demo__dot.is-active { background: var(--c-accent); }

@keyframes demo-pulse {
  0% { transform: scale(0.55); opacity: 1; }
  70% { transform: scale(1.12); opacity: 0; }
  100% { opacity: 0; }
}

/* Quick-buy popup — styled like the REAL storefront popup card (white card,
   full-bleed image, title/price, solid + outline buttons, close ×) and
   ANCHORED next to the active dot with a pointer arrow, exactly like the
   app's anchored placement. JS sets left/top and data-side. */
.demo__popup {
  position: absolute;
  width: 216px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(21, 22, 28, 0.28);
  transition: left 0.35s var(--ease-out), top 0.35s var(--ease-out),
    opacity 0.25s ease, transform 0.25s var(--ease-out);
  z-index: 2;
}

.demo__popup.is-swapping { opacity: 0; }

/* Closed via the × — dots bring it back. */
.demo__popup.is-closed {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}

/* Pointer arrow: a real triangle on the side that faces the dot (like the app). */
.demo__popup-arrow {
  position: absolute;
  top: 28px;
  width: 10px;
  height: 18px;
  background: #ffffff;
  left: -9px;
  clip-path: polygon(100% 0, 100% 100%, 0 50%); /* default = right side */
}

.demo__popup[data-side="right"] .demo__popup-arrow {
  left: -9px;
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
}

.demo__popup[data-side="left"] .demo__popup-arrow {
  left: auto;
  right: -9px;
  clip-path: polygon(0 0, 0 100%, 100% 50%);
}

.demo__popup-img {
  height: 92px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(135deg, #e5d2f0, #ccd6f4);
}

.demo__popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(21, 22, 28, 0.18);
  color: #5b5e6b;
  font: 500 12px/1 var(--font-sans);
  cursor: pointer;
}

.demo__popup-close:hover { color: #15161c; }

.demo__popup-body { padding: 12px 14px 14px; }
.demo__popup-title { font-size: 13.5px; font-weight: 650; color: #15161c; }
.demo__popup-price { font-size: 13px; font-weight: 700; color: var(--c-accent); margin-top: 3px; }

/* Stacked full-width buttons — solid then outline, like the real popup. */
.demo__popup-btns { display: grid; gap: 7px; margin-top: 11px; }

.demo__popup-btn {
  border-radius: 9px;
  background: #15161c;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 9px 0;
}

.demo__popup-btn--ghost {
  background: #ffffff;
  color: #3f4149;
  border: 1px solid #dcdee6;
}

.demo__caption {
  margin-top: 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--c-ink-faint);
}

/* Floating proof chips around the demo (home hero) */
.demo__chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--c-bg-raised);
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-card);
  font-size: 12.5px;
  font-weight: 600;
  z-index: 3;
  animation: chip-float 5.5s ease-in-out infinite;
}

.demo__chip--tl { top: -14px; left: -18px; }
.demo__chip--br { bottom: 34px; right: -16px; animation-delay: 2.2s; }

/* Phones: keep the floating chips inside the card so nothing overflows,
   and slim the popup card down — at 216px it would sit on top of the very
   dot it points at (the shot itself is only ~270px wide there). */
@media (max-width: 700px) {
  .demo__chip--tl { left: 8px; }
  .demo__chip--br { right: 8px; }
  .demo__popup { width: 168px; }
  .demo__popup-img { height: 64px; }
  .demo__popup-body { padding: 10px 11px 11px; }
  .demo__popup-title { font-size: 12.5px; }
  .demo__popup-price { font-size: 12px; }
  .demo__popup-btns { gap: 6px; margin-top: 9px; }
  .demo__popup-btn { font-size: 11px; padding: 7px 0; }
  .demo__popup-close { width: 20px; height: 20px; }
  .demo__popup-arrow { top: 22px; }
}

.demo__chip-ic {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--c-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.demo__chip small { display: block; font-weight: 500; color: var(--c-ink-faint); font-size: 11px; }

@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ---------------------------------------------------------------------------
   5b. Stats strip (home, under the hero)
   ------------------------------------------------------------------------ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--c-line-soft);
  border-bottom: 1px solid var(--c-line-soft);
}

.stats__item { text-align: center; }

.stats__value {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stats__label { margin-top: 3px; font-size: 13px; color: var(--c-ink-soft); }

@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------------------
   5c. Page hero (sub-pages: features / pricing / faq)
   ------------------------------------------------------------------------ */
.page-hero {
  position: relative;
  padding: clamp(48px, 6vw, 80px) 0 clamp(28px, 4vw, 48px);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  width: 760px;
  height: 420px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(75, 63, 255, 0.13), transparent 68%);
  filter: blur(46px);
  pointer-events: none;
  z-index: -1;
}

/* ---------------------------------------------------------------------------
   5d. Sticky section sub-nav (features page)
   ------------------------------------------------------------------------ */
.subnav {
  position: sticky;
  top: 68px;
  z-index: 40;
  background: var(--header-veil);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-line-soft);
}

.subnav__inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 24px;
  max-width: var(--wrap);
  margin: 0 auto;
  scrollbar-width: none;
}

.subnav__inner::-webkit-scrollbar { display: none; }

.subnav__link {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-ink-soft);
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.subnav__link:hover { color: var(--c-ink); background: var(--c-accent-soft); }

/* ---------------------------------------------------------------------------
   5e. Interactive layout demo (home): tab pills crossfade six mini-diagrams,
   each mirroring the REAL app arrangement (see GalleryPreview/liquid).
   ------------------------------------------------------------------------ */
.laydemo { margin-top: 40px; }

.laydemo__tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.laydemo__tab {
  border: 1px solid var(--c-line);
  background: var(--c-bg-raised);
  color: var(--c-ink-soft);
  font: 600 13.5px/1 var(--font-sans);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.laydemo__tab.is-active {
  background: var(--c-ink);
  border-color: var(--c-ink);
  color: var(--c-bg);
}

.laydemo__stage {
  position: relative;
  margin: 26px auto 0;
  max-width: 640px;
  height: 340px;
}

.laydemo__pane {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 10px;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out);
  pointer-events: none;
}

.laydemo__pane.is-active { opacity: 1; transform: none; }

/* A tile = a mini "product photo": tint gradient + a soft light sweep. */
.laydemo__tile {
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tile-a, #e5d2f0), var(--tile-b, #ccd6f4));
}

.laydemo__tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 70% at 22% 14%, rgba(255, 255, 255, 0.42), transparent 58%);
}

/* Hotspot markers — placed per tile via inline --dx/--dy, like real dots. */
.laydemo__dot {
  position: absolute;
  left: var(--dx, 50%);
  top: var(--dy, 50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #15161c;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
}

.laydemo__dot--accent { background: var(--c-accent); }

/* A tiny popup card pinned next to the accent dot (Single pane only). */
.laydemo__mini {
  position: absolute;
  left: var(--dx, 50%);
  top: var(--dy, 50%);
  transform: translate(14px, -24px);
  width: 128px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(21, 22, 28, 0.22);
  padding: 8px 9px;
}

.laydemo__mini i,
.laydemo__mini b,
.laydemo__mini s {
  display: block;
  border-radius: 4px;
}

.laydemo__mini i { height: 34px; border-radius: 6px; background: linear-gradient(135deg, #e5d2f0, #ccd6f4); }
.laydemo__mini b { height: 7px; width: 70%; margin-top: 7px; background: #d6d8e2; }
.laydemo__mini s { height: 16px; margin-top: 7px; background: #15161c; }

/* --- Pane arrangements (mirroring the app) ------------------------------ */
/* Single: one hero canvas — richer, layered "photo" light like the hero demo. */
.laydemo__pane--single { grid-template-columns: 1fr; }

.laydemo__pane--single .laydemo__tile {
  background:
    radial-gradient(120% 90% at 18% 12%, #ffe3cf 0%, transparent 55%),
    radial-gradient(110% 100% at 85% 12%, #d5e3ff 0%, transparent 52%),
    linear-gradient(158deg, #f0dcd0 0%, #e5d2f0 48%, #ccd6f4 100%);
}

/* Grid: uniform columns. */
.laydemo__pane--grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; }

/* Masonry: 3 columns, offset breaks and RAGGED bottoms — the honest masonry
   silhouette (collage below is the even magazine grid; they must differ). */
.laydemo__pane--masonry { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(12, 1fr); }
.laydemo__pane--masonry .laydemo__tile:nth-child(1) { grid-column: 1; grid-row: 1 / 8; }
.laydemo__pane--masonry .laydemo__tile:nth-child(2) { grid-column: 1; grid-row: 8 / 12; }
.laydemo__pane--masonry .laydemo__tile:nth-child(3) { grid-column: 2; grid-row: 1 / 5; }
.laydemo__pane--masonry .laydemo__tile:nth-child(4) { grid-column: 2; grid-row: 5 / 13; }
.laydemo__pane--masonry .laydemo__tile:nth-child(5) { grid-column: 3; grid-row: 1 / 7; }
.laydemo__pane--masonry .laydemo__tile:nth-child(6) { grid-column: 3; grid-row: 7 / 11; }

/* Editorial: featured left + two stacked (the app's default 1.6fr ratio). */
.laydemo__pane--editorial { grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; }
.laydemo__pane--editorial .laydemo__tile:nth-child(1) { grid-row: span 2; }

/* Collage: the app's 3-col / 12-row magazine grid (exact storefront mapping). */
.laydemo__pane--collage { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(12, 1fr); }
.laydemo__pane--collage .laydemo__tile:nth-child(1) { grid-column: 1; grid-row: 1 / 7; }
.laydemo__pane--collage .laydemo__tile:nth-child(2) { grid-column: 1; grid-row: 7 / 13; }
.laydemo__pane--collage .laydemo__tile:nth-child(3) { grid-column: 2; grid-row: 1 / 9; }
.laydemo__pane--collage .laydemo__tile:nth-child(4) { grid-column: 2; grid-row: 9 / 13; }
.laydemo__pane--collage .laydemo__tile:nth-child(5) { grid-column: 3; grid-row: 1 / 5; }
.laydemo__pane--collage .laydemo__tile:nth-child(6) { grid-column: 3; grid-row: 5 / 13; }

/* Carousel: a real slider — 3 slides per view, arrows, dots, auto-advance
   (the storefront look: scroll-snap track + round arrow buttons + dots). */
.laydemo__pane--carousel { display: block; }

.laydemo__car {
  position: relative;
  height: calc(100% - 26px);
  border-radius: 12px;
  overflow: hidden;
  container-type: inline-size;
}

.laydemo__car-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  gap: 10px;
  animation: laydemo-car 14s ease-in-out infinite;
}

.laydemo__car-track .laydemo__tile {
  width: calc((100cqw - 20px) / 3);
  flex: 0 0 auto;
}

/* Slide one full step (slide width + gap) at a time, then rewind. */
@keyframes laydemo-car {
  0%, 21% { left: 0; }
  28%, 46% { left: calc(-1 * (100cqw + 10px) / 3); }
  53%, 71% { left: calc(-2 * (100cqw + 10px) / 3); }
  78%, 92% { left: calc(-3 * (100cqw + 10px) / 3); }
  100% { left: 0; }
}

/* Round arrow chrome, like .hs-car-btn on the storefront (decorative here). */
.laydemo__car-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(21, 22, 28, 0.22);
  pointer-events: none;
}

.laydemo__car-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #15161c;
  border-bottom: 2px solid #15161c;
}

.laydemo__car-btn--prev { left: 10px; }
.laydemo__car-btn--prev::before { transform: translate(-30%, -50%) rotate(135deg); }
.laydemo__car-btn--next { right: 10px; }
.laydemo__car-btn--next::before { transform: translate(-70%, -50%) rotate(-45deg); }

/* Dots under the track — active dot follows the auto-advance. */
.laydemo__car-dots {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 7px;
  justify-content: center;
}

.laydemo__car-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--c-line);
  animation: laydemo-car-dot 14s ease-in-out infinite;
}

.laydemo__car-dot:nth-child(2) { animation-delay: 3.5s; }
.laydemo__car-dot:nth-child(3) { animation-delay: 7s; }
.laydemo__car-dot:nth-child(4) { animation-delay: 10.5s; }

@keyframes laydemo-car-dot {
  0%, 24% { background: var(--c-accent); width: 18px; }
  27%, 100% { background: var(--c-line); width: 8px; }
}

@media (max-width: 620px) {
  .laydemo__stage { height: 250px; }
  .laydemo__mini { width: 106px; }
}

/* ---------------------------------------------------------------------------
   5f. Per-product placement diagram (home): product pill → its own section.
   ------------------------------------------------------------------------ */
.assign {
  border: 1px solid var(--c-line);
  border-radius: var(--radius-l);
  background: var(--c-bg-raised);
  box-shadow: var(--shadow-card);
  padding: clamp(18px, 3vw, 28px);
  display: grid;
  gap: 14px;
}

/* Same min-width:auto trap one level down: each row is a grid item, and its
   nowrap pill text would floor the implicit track past the card on phones. */
.assign > * { min-width: 0; }

.assign__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.assign__pill {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--c-line);
  background: var(--c-bg);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
}

.assign__pill > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign__pill i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--tile-a, #e5d2f0), var(--tile-b, #ccd6f4));
}

.assign__pill small {
  display: block;
  font-weight: 500;
  color: var(--c-ink-faint);
  font-size: 11.5px;
  /* The parent span's ellipsis doesn't reach into this block — clip politely. */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Connector: a line with a chevron head. */
.assign__arrow {
  flex: 0 0 auto;
  width: 26px;
  height: 2px;
  background: var(--c-line);
  position: relative;
}

.assign__arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--c-line);
  border-right: 2px solid var(--c-line);
  transform: rotate(45deg);
}

/* Mini section thumbnails — tiny layout diagrams with a marker dot. */
.assign__mini {
  flex: 0 0 auto;
  width: 88px;
  height: 60px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  background: var(--c-bg);
  padding: 5px;
  display: grid;
  gap: 4px;
  position: relative;
}

.assign__mini i {
  border-radius: 5px;
  background: linear-gradient(135deg, var(--tile-a, #e5d2f0), var(--tile-b, #ccd6f4));
}

.assign__mini::after {
  content: "";
  position: absolute;
  top: 42%;
  left: 46%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.assign__mini--single { grid-template-columns: 1fr; }
.assign__mini--editorial { grid-template-columns: 1.5fr 1fr; grid-template-rows: 1fr 1fr; }
.assign__mini--editorial i:first-child { grid-row: span 2; }
.assign__mini--grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; }

/* Tiny phones: slim the fixed-width thumb/arrow and drop the pill icon so the
   product names keep enough room to actually read. */
@media (max-width: 420px) {
  .assign__mini { width: 72px; height: 52px; }
  .assign__arrow { width: 18px; }
  .assign__pill i { display: none; }
}

.assign__note {
  text-align: center;
  font-size: 12.5px;
  color: var(--c-ink-faint);
  margin-top: 2px;
}

/* ---------------------------------------------------------------------------
   6. Sections & headings
   ------------------------------------------------------------------------ */
.section {
  padding: var(--section-pad) 0 0;
}

.section--tinted {
  background: var(--c-bg-sunken);
  padding-bottom: var(--section-pad);
  margin-top: clamp(32px, 4vw, 48px); /* small page-bg gap before the band */
}

/* Pages with a sticky subnav under the header (features): anchored blocks
   must land below the header+subnav stack (~130px at typical zoom) with real
   air. NOTE: html's scroll-padding-top (92px) and this scroll-margin ADD UP —
   the sum (~156px) = chrome + breathing room. */
.feature[id],
.section[id] {
  scroll-margin-top: 64px;
}

.section__head {
  max-width: 720px;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 780;
}

.section__lead {
  margin-top: 14px;
  font-size: 16.5px;
  color: var(--c-ink-soft);
}

/* ---------------------------------------------------------------------------
   7. Feature rows (alternating text + visual)
   ------------------------------------------------------------------------ */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  margin-top: clamp(48px, 6vw, 76px);
}

/* Grid items default to min-width:auto, so one nowrap child (the assign pills)
   floors the 1fr track at its min-content and pushes the whole section past
   narrow viewports. Let tracks shrink; the inner ellipses take it from there. */
.feature > * { min-width: 0; }

/* The first feature already gets the section's top padding — don't double it. */
.wrap > .feature:first-child { margin-top: 0; }

.feature--flip .feature__media { order: -1; }

.feature__kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.feature__title {
  margin-top: 10px;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.02em;
  font-weight: 740;
  line-height: 1.15;
}

.feature__text {
  margin-top: 12px;
  color: var(--c-ink-soft);
  font-size: 15.5px;
}

.feature__list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.feature__list li {
  position: relative;
  padding-left: 28px;
  font-size: 14.5px;
  color: var(--c-ink-soft);
}

.feature__list li b { color: var(--c-ink); font-weight: 640; }

.feature__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--c-accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m5.5 10.5 3 3 6-7' stroke='%234b3fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

.feature__media {
  border-radius: var(--radius-l);
  border: 1px solid var(--c-line);
  background: var(--c-bg-raised);
  box-shadow: var(--shadow-card);
  padding: 14px;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.feature__media:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-pop);
}

.feature__media img {
  border-radius: var(--radius-m);
  width: 100%;
}

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature--flip .feature__media { order: 0; }
}

/* ---------------------------------------------------------------------------
   8. Card grid (compact features)
   ------------------------------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}

.card {
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  background: var(--c-bg-raised);
  padding: 24px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--c-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: 14px;
}

.card__title {
  font-size: 16px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.card__text {
  margin-top: 8px;
  font-size: 14px;
  color: var(--c-ink-soft);
}

@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   9. Pricing
   ------------------------------------------------------------------------ */
.pricing {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 44px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  background: var(--c-bg-raised);
  padding: 26px 24px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.plan:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.plan--popular {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--c-accent), var(--shadow-card);
}

.plan__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-brand);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.plan__name { font-size: 15px; font-weight: 700; }

.plan__price {
  margin-top: 10px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.plan__price small {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--c-ink-faint);
}

.plan__tagline {
  margin-top: 6px;
  font-size: 13px;
  color: var(--c-ink-soft);
  min-height: 38px;
}

.plan__list {
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--c-line-soft);
  list-style: none;
  display: grid;
  gap: 9px;
  flex: 1;
}

.plan__list li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  color: var(--c-ink-soft);
}

.plan__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--c-accent);
  font-weight: 700;
}

.plan__inherit {
  font-size: 12px;
  color: var(--c-ink-faint);
  margin-top: 14px;
}

@media (max-width: 1000px) {
  .pricing { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .pricing { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   10. FAQ
   ------------------------------------------------------------------------ */
.faq {
  max-width: 760px;
  margin: 40px auto 0;
  display: grid;
  gap: 10px;
}

.faq__item {
  border: 1px solid var(--c-line);
  border-radius: var(--radius-s);
  background: var(--c-bg-raised);
  overflow: hidden;
}

.faq__q {
  list-style: none;
  cursor: pointer;
  padding: 16px 48px 16px 18px;
  font-size: 15px;
  font-weight: 620;
  position: relative;
}

.faq__q::-webkit-details-marker { display: none; }

.faq__q::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  color: var(--c-ink-faint);
  transition: transform 0.2s var(--ease-out);
}

.faq__item[open] .faq__q::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq__a {
  padding: 0 18px 16px;
  font-size: 14.5px;
  color: var(--c-ink-soft);
}

/* ---------------------------------------------------------------------------
   11. Final CTA band + footer
   ------------------------------------------------------------------------ */
.cta-band {
  /* No own margin — the wrapping .section's padding is the whole gap. */
  border-radius: var(--radius-l);
  padding: clamp(36px, 5vw, 60px);
  background: #15161c;
  color: #f4f4f8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .cta-band { background: #191a24; }

.cta-band::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(122, 112, 255, 0.35), transparent 70%);
  pointer-events: none;
}

.cta-band__title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 760;
  letter-spacing: -0.02em;
}

.cta-band__text {
  margin-top: 10px;
  color: #b7bac6;
  max-width: 52ch;
  font-size: 15px;
}

/* Analytics teaser band (home) — dark, with a mini stat row inside. */
.teaser-dark {
  border-radius: var(--radius-l);
  background: #15161c;
  color: #f4f4f8;
  padding: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .teaser-dark { background: #191a24; }

.teaser-dark::before {
  content: "";
  position: absolute;
  left: -140px;
  bottom: -140px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(122, 112, 255, 0.3), transparent 70%);
  pointer-events: none;
}

.teaser-dark__kicker { font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #a99fff; }
.teaser-dark__title { margin-top: 10px; font-size: clamp(22px, 2.8vw, 30px); font-weight: 750; letter-spacing: -0.02em; }
.teaser-dark__text { margin-top: 12px; color: #b7bac6; font-size: 15px; }
.teaser-dark__cta { margin-top: 22px; }

.teaser-dark__stats {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.teaser-dark__stat {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
}

.teaser-dark__stat b { display: block; font-size: 22px; font-weight: 750; letter-spacing: -0.02em; }
.teaser-dark__stat span { font-size: 12.5px; color: #9ea1ae; }

@media (max-width: 860px) {
  .teaser-dark { grid-template-columns: 1fr; }
}

/* Footer v2 — brand + link columns */
.site-footer {
  margin-top: clamp(48px, 6vw, 72px);
  border-top: 1px solid var(--c-line-soft);
  padding: 40px 0 46px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 16px;
}

.site-footer__tag { margin-top: 10px; font-size: 13.5px; color: var(--c-ink-faint); max-width: 34ch; }

.site-footer__col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
  margin-bottom: 12px;
}

.site-footer__col a {
  display: block;
  font-size: 14px;
  color: var(--c-ink-soft);
  text-decoration: none;
  padding: 4px 0;
}

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

.site-footer__legal {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--c-line-soft);
  font-size: 13px;
  color: var(--c-ink-faint);
}

@media (max-width: 720px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* Active state for the header nav (aria-current="page") */
.site-header__link[aria-current="page"] { color: var(--c-accent); font-weight: 650; }

/* ---------------------------------------------------------------------------
   11b. Contact page — the same "Message support" form merchants get in-app.
   ------------------------------------------------------------------------ */
.contact {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  margin-top: 36px;
}

.contact__card {
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  background: var(--c-bg-raised);
  box-shadow: var(--shadow-card);
  padding: clamp(22px, 3vw, 32px);
}

.field { display: grid; gap: 6px; margin-top: 16px; }
.field:first-child { margin-top: 0; }

.field__label {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--c-ink);
}

.field__hint { font-size: 12.5px; color: var(--c-ink-faint); }

.field__input,
.field__select,
.field__textarea {
  width: 100%;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  background: var(--c-bg);
  color: var(--c-ink);
  font: 400 14.5px/1.5 var(--font-sans);
  padding: 11px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__textarea { min-height: 140px; resize: vertical; }

.field__input:focus,
.field__select:focus,
.field__textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}

/* Honeypot — visually gone, still in the form for bots to fill. */
.field--trap {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.contact__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.contact__status { font-size: 13.5px; color: var(--c-ink-soft); }
.contact__status.is-error { color: #c43d3d; }

/* Success panel replaces the form after a delivered submission. */
.contact__done {
  display: none;
  text-align: center;
  padding: 28px 10px;
}

.contact__card.is-done form { display: none; }
.contact__card.is-done .contact__done { display: block; }

.contact__done-ic {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-size: 24px;
  line-height: 52px;
  margin: 0 auto 14px;
}

.contact__aside { display: grid; gap: 14px; }

.contact__fact {
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  background: var(--c-bg-raised);
  padding: 18px 20px;
}

.contact__fact h3 { font-size: 14.5px; font-weight: 680; }
.contact__fact p { margin-top: 6px; font-size: 13.5px; color: var(--c-ink-soft); }
.contact__fact a { color: var(--c-accent); text-decoration: none; }
.contact__fact a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   11b2. Legal prose (privacy policy)
   ------------------------------------------------------------------------ */
.prose {
  max-width: 720px;
  margin: 0 auto;
}

.prose h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 34px 0 10px;
}

.prose p {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--c-ink-soft);
}

.prose ul {
  margin: 0 0 12px;
  padding-left: 22px;
  color: var(--c-ink-soft);
  font-size: 15px;
  display: grid;
  gap: 8px;
}

.prose b { color: var(--c-ink); }

.prose code {
  font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  padding: 1px 6px;
  border-radius: 5px;
}

.prose a { color: var(--c-accent); }

.prose__updated { font-size: 13.5px; color: var(--c-ink-faint); }

/* ---------------------------------------------------------------------------
   11c. Developers page — code blocks, API tables, inline code
   ------------------------------------------------------------------------ */
/* Code panel: fixed-dark in both themes (code looks best on dark). */
.code {
  border-radius: var(--radius-m);
  background: #15161c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 18px;
}

[data-theme="dark"] .code { background: #101118; }

.code__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ea1ae;
  font-size: 12px;
  font-weight: 600;
}

.code__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font: 12.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #e6e7ee;
}

.code .tok-c { color: #8a8fa3; }      /* comments   */
.code .tok-s { color: #b8e0c0; }      /* strings    */
.code .tok-k { color: #b3a6ff; }      /* keywords   */

/* Inline code chip (event names, keys) — usable in prose and tables. */
.icode {
  font: 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

/* API reference table, wrapped so wide payloads scroll instead of breaking. */
.api-wrap {
  margin-top: 18px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  background: var(--c-bg-raised);
  overflow-x: auto;
}

.api {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}

.api th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-line);
}

.api td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-line-soft);
  vertical-align: top;
  color: var(--c-ink-soft);
  line-height: 1.55;
}

.api tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------------------------
   12. Scroll-reveal animation
   JS adds .reveal to candidates and .is-visible when they enter the viewport.
   ------------------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--reveal-duration) var(--ease-out),
    transform var(--reveal-duration) var(--ease-out);
}

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

/* Stagger helpers for grids (JS assigns --reveal-i per child) */
.reveal { transition-delay: calc(var(--reveal-i, 0) * 70ms); }

/* ---------------------------------------------------------------------------
   13. Reduced motion — kill every non-essential animation
   ------------------------------------------------------------------------ */
/* ---------------------------------------------------------------------------
   Analytics consent banner (injected by main.js; GA loads only after Allow).
   ------------------------------------------------------------------------ */
.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  max-width: 460px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-m);
  background: var(--c-bg-raised);
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.3s var(--ease-out);
}

.consent.is-in {
  opacity: 1;
  transform: none;
}

.consent__text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--c-ink-soft);
}

.consent__text a { color: var(--c-accent); }

.consent__btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}

.consent__btn {
  border: 1px solid var(--c-line);
  background: var(--c-bg-raised);
  color: var(--c-ink);
  border-radius: 9px;
  padding: 7px 16px;
  font: 600 12.5px/1 var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
}

.consent__btn--primary {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}

.consent__btn:hover { filter: brightness(1.06); }

@media (max-width: 480px) {
  .consent { flex-direction: column; align-items: stretch; text-align: center; }
  .consent__btns { flex-direction: row; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .consent { transition: none; }
  .demo__dot::before { animation: none; opacity: 0; }
  .demo__dot,
  .demo__popup { transition: none; }
  .demo__dot:hover { transform: none; }
  .demo__chip { animation: none; }
  .hero::before,
  .hero::after { animation: none; }
  .laydemo__pane { transition: none; }
  .laydemo__car-track,
  .laydemo__car-dot { animation: none; }
  .theme-toggle { transition: none; }
  .theme-toggle:hover { transform: none; }
  .faq__q::after { transition: none; }
  .btn,
  .card,
  .plan,
  .feature__media { transition: none; }
  .btn:hover,
  .card:hover,
  .plan:hover,
  .feature__media:hover { transform: none; }
}
