/* Site chrome: nav pill and mobile menu (header.js), footer, seller contact modal, tour overlay. */

body.nav-scroll-lock,
body.seller-contact-scroll-lock { position: fixed; overflow: hidden; width: 100%; }
body.tour-open { overflow: hidden; }

/* ================= nav ================= */
:root { --nav-h: 60px; }
@media (min-width: 941px) { :root { --nav-h: 85px; } }

.nav {
  /* Clear glass: a light frost keeps what is behind recognisable. A heavy blur or darkening read as opaque. */
  --nav-fill: var(--glass-05);
  --nav-fill-solid: color-mix(in srgb, var(--night) 58%, transparent);
  --nav-frost: 6px;
  --nav-vibrancy: saturate(1.8);
  --nav-border: rgb(255 255 255 / .06);
  --nav-text: rgb(255 255 255 / .82);
  --nav-text-hi: #fff;
  --nav-current: rgb(255 255 255 / .08);
  --nav-cta-bg: var(--glass-08);
  --nav-cta-bg-hi: rgb(255 255 255 / .14);
  --nav-cta-text: #fff;
  --focus-ring: #fff;
  --nav-rim: inset 0 1px 0 rgb(255 255 255 / .3), inset 1.5px 1.5px 1px -1px rgb(255 255 255 / .34), inset 0 -12px 22px -14px rgb(0 0 0 / .4), inset 0 0 18px rgb(255 255 255 / .05);
  --nav-cta-rim: var(--glass-rim);
  position: fixed;
  z-index: 10001;
  top: max(12px, calc(env(safe-area-inset-top, 0px) + 8px));
  left: 0;
  right: 0;
  width: calc(100% - var(--pad-l) - var(--pad-r));
  height: var(--nav-h);
  margin-inline: auto;
  border-radius: 30px;
  color: var(--nav-text);
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  line-height: 1;
  letter-spacing: 0;
  /* Expo-out jumped most of the 16px in the first frames, so condensing read as a snap. */
  transition: transform 700ms var(--ease-in-out);
}
.nav[data-theme="light"] {
  --nav-fill: rgb(255 255 255 / .3);
  --nav-fill-solid: rgb(255 255 255 / .42);
  --nav-vibrancy: saturate(1.8) brightness(1.1);
  --nav-border: var(--line);
  --nav-text: rgb(17 23 44 / .82);
  --nav-text-hi: var(--ink);
  --nav-current: rgb(17 23 44 / .06);
  --nav-cta-bg: var(--btn-dark);
  --nav-cta-bg-hi: #3a3a3c;
  --focus-ring: var(--ink);
  --nav-cta-rim: none;
  --nav-rim: inset 0 1px 0 #fff, inset 1.5px 1.5px 1px -1px #fff, inset 0 -12px 22px -14px rgb(17 23 44 / .14), inset 0 0 18px rgb(255 255 255 / .5);
}
/* Fill and blur sit on a pseudo-element: a backdrop-filter or transform on .nav itself
   would become the containing block of the fixed mobile menu and trap it inside the bar. */
.nav::before,
.nav::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.nav::before {
  z-index: 0;
  background-color: var(--nav-fill);
  border: 1px solid var(--nav-border);
  -webkit-backdrop-filter: blur(var(--nav-frost)) var(--nav-vibrancy);
  backdrop-filter: blur(var(--nav-frost)) var(--nav-vibrancy);
  transition: background-color 700ms var(--ease-in-out), border-color 700ms var(--ease-in-out);
}
.nav::after {
  z-index: -1;
  box-shadow: 0 18px 40px -18px rgb(10 9 12 / .45);
  opacity: 0;
  transition: opacity 700ms var(--ease-in-out);
}
.nav[data-theme="light"]::after { box-shadow: 0 18px 40px -20px rgb(17 23 44 / .22); }
/* Condensed sits over busy content, so it needs enough frost to hold link contrast at 4.5:1. */
.nav.is-condensed { --nav-frost: 10px; }
.nav.is-condensed::before { background-color: var(--nav-fill-solid); }
.nav.is-condensed::after { opacity: 1; }

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 8px 0 20px;
}
/* glass rim, dark theme only */
.nav-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 30px;
  padding: 1px;
  background: linear-gradient(135deg, rgb(255 255 255 / .28), rgb(255 255 255 / .06) 30%, rgb(255 255 255 / .02) 60%, rgb(255 255 255 / .16));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: opacity 700ms var(--ease-in-out);
}
.nav[data-theme="light"] .nav-inner::before { opacity: 0; }
/* Thick-glass edge matching the hero card lens: specular top left, a fainter catch bottom right, soft inner light. */
.nav-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 30px;
  box-shadow: var(--nav-rim);
  pointer-events: none;
  transition: box-shadow var(--dur-mid) var(--ease-in-out), opacity var(--dur-mid) var(--ease-in-out);
}
/* header.js sets .has-lens in Chromium only: WebKit accepts url() here but paints an empty backdrop. */
.nav.has-lens::before { backdrop-filter: url(#nav-lens) var(--nav-vibrancy); }

.nav-logo {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100px;
  min-height: 44px;
  align-items: center;
  transition: translate var(--dur-close) var(--ease-in);
}
.nav-logo-img { grid-area: 1 / 1; width: 100%; height: auto; transition: opacity var(--dur-mid) var(--ease-in-out); }
.nav-logo-img--dark { opacity: 0; }
.nav[data-theme="light"] .nav-logo-img--light { opacity: 0; }
.nav[data-theme="light"] .nav-logo-img--dark { opacity: 1; }

.nav-links { margin: 0; padding: 0; list-style: none; }
.nav-links > li { display: flex; align-items: center; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out-quart), background-color var(--dur-fast) var(--ease-out-quart);
}
/* A transparent border keeps the pill outline in forced colours. */
.nav-auth--solid { border: 1px solid transparent; }

.nav-mobile-toggle {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--nav-text-hi);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-base) var(--ease-out-quart);
}
.nav-mobile-toggle:active { transform: scale(.97); transition-duration: var(--dur-press); }
.nav-mobile-toggle-icon { position: relative; display: block; width: 20px; height: 14px; }
.nav-mobile-toggle-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 260ms var(--ease-out-quart), opacity 200ms var(--ease-out-quart), top 260ms var(--ease-out-quart);
}
.nav-mobile-toggle-icon span:nth-child(1) { top: 1px; }
.nav-mobile-toggle-icon span:nth-child(2) { top: 6.25px; }
.nav-mobile-toggle-icon span:nth-child(3) { top: 11.5px; }
.nav.menu-open .nav-mobile-toggle-icon span:nth-child(1) { top: 6.25px; transform: rotate(45deg); }
.nav.menu-open .nav-mobile-toggle-icon span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav-mobile-toggle-icon span:nth-child(3) { top: 6.25px; transform: rotate(-45deg); }

/* ---- mobile menu (under 941, paired with header.js) ---- */
@media (max-width: 940px) {
  .nav.menu-open {
    --nav-text-hi: #fff;
    --focus-ring: #fff;
  }
  .nav.menu-open::before { background-color: transparent; border-color: transparent; }
  .nav.menu-open::after, .nav.menu-open .nav-inner::before, .nav.menu-open .nav-inner::after { opacity: 0; }
  .nav.menu-open .nav-logo-img--light { opacity: 1; }
  /* The links sit on the gutter, so the logo drops the bar's inner padding to share their edge. */
  .nav.menu-open .nav-logo { translate: -20px 0; transition: translate 360ms var(--ease-out-expo); }
  .nav.menu-open .nav-logo-img--dark { opacity: 0; }
  /* The panel lands in 360ms, so a 400ms crossfade would leave neither logo readable midway. */
  .nav:is(.menu-open, :has(.nav-links.closing)) .nav-logo-img { transition-duration: 120ms; }

  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: none;
    flex-direction: column;
    padding:
      calc(max(12px, env(safe-area-inset-top, 0px) + 8px) + var(--nav-h) + 28px)
      var(--pad-r)
      calc(24px + env(safe-area-inset-bottom, 0px))
      var(--pad-l);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: color-mix(in srgb, var(--night) 97%, transparent);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    backdrop-filter: blur(24px) saturate(1.2);
    transform-origin: top center;
  }
  .nav-links.show { display: flex; animation: menu-in 360ms var(--ease-out-expo) both; }
  .nav-links.closing { animation: menu-out var(--dur-close) var(--ease-in) forwards; pointer-events: none; }
  .nav-links > li:not(.nav-auth-group) { border-bottom: 1px solid rgb(255 255 255 / .07); }
  .nav-links > li:not(.nav-auth-group) > a {
    width: 100%;
    min-height: 56px;
    font-family: var(--font-display);
    font-size: clamp(28px, 7.4vw, 32px);
    font-weight: 452;
    letter-spacing: var(--track-display);
    color: #fff;
  }
  .nav-links.show > li { animation: menu-link-in 400ms var(--ease-out-expo) backwards; animation-delay: calc(80ms + var(--li, 0) * 40ms); }
  .nav-links.closing > li { animation: none; }
  .nav-links > li:nth-child(2) { --li: 1; }
  .nav-links > li:nth-child(3) { --li: 2; }
  .nav-links > li:nth-child(4) { --li: 3; }
  .nav-links > li:nth-child(5) { --li: 4; }
  .nav-links > li:nth-child(6) { --li: 5; }
  .nav-auth-group {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
    margin-top: auto;
    padding-top: 32px;
  }
  .nav-auth {
    justify-content: center;
    height: 52px;
    border-radius: var(--r-pill);
    font-size: var(--fs-small);
    font-weight: 500;
  }
  .nav-auth--outline { color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22); }
  .nav-auth--solid { background: #fff; color: var(--ink); }
}
/* Landscape phones: tighter rows and the two auth buttons side by side keep Log in and Sign up on screen. */
@media (max-width: 940px) and (max-height: 500px) {
  .nav-links { padding-top: calc(max(12px, env(safe-area-inset-top, 0px) + 8px) + var(--nav-h) + 8px); }
  .nav-links > li:not(.nav-auth-group) > a { min-height: 48px; font-size: 24px; }
  .nav-auth-group { flex-direction: row; padding-top: 12px; }
  .nav-auth { flex: 1; height: 48px; }
}
/* The shortest phones (667x375) still need the 44px touch floor to fit the whole list. */
@media (max-width: 940px) and (max-height: 400px) {
  .nav-links { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .nav-links > li:not(.nav-auth-group) > a { min-height: 44px; }
  .nav-auth { height: 44px; }
}
@keyframes menu-in { from { opacity: 0; transform: translate3d(0, -8px, 0) scale(.98); } }
@keyframes menu-out { to { opacity: 0; transform: translate3d(0, -6px, 0); } }
@keyframes menu-link-in { from { opacity: 0; transform: translate3d(0, 10px, 0); } }

/* ---- pill nav (941 and up) ---- */
@media (min-width: 941px) {
  .nav {
    top: 32px;
    width: min(1040px, 100% - 2 * var(--gutter));
    border-radius: var(--r-pill);
  }
  .nav-inner { padding: 14px 20px 14px 35px; }
  .nav-inner::before, .nav-inner::after { border-radius: var(--r-pill); }
  .nav-logo { width: 120px; }
  .nav-mobile-toggle { display: none; }
  .nav-links { flex: 1; display: flex; align-items: center; gap: 0; }
  .nav-links > li:first-child { margin-left: auto; }
  .nav-links > li:not(.nav-auth-group) > a {
    justify-content: center;
    min-width: 44px;
    padding-inline: 10px;
    border-radius: var(--r-pill);
    color: var(--nav-text);
  }
  .nav-links > li + li:not(.nav-auth-group) { margin-left: 4px; }
  .nav-links > li:not(.nav-auth-group) > a.is-current { color: var(--nav-text-hi); background: var(--nav-current); }
  .nav-auth-group { margin-left: auto; gap: 20px; }
  .nav-auth--outline {
    padding-inline: 4px;
    font-size: 16px;
    color: var(--nav-text-hi);
  }
  .nav-auth--solid {
    justify-content: center;
    min-width: 127px;
    height: 57px;
    padding-inline: 20px;
    border-radius: var(--r-pill);
    background: var(--nav-cta-bg);
    box-shadow: var(--nav-cta-rim);
    color: var(--nav-cta-text);
    transition: background-color var(--dur-fast) var(--ease-out-quart), transform var(--dur-base) var(--ease-out-quart);
  }
  .nav-auth--solid:active { transform: scale(.97); transition-duration: var(--dur-press); }
}
@media (min-width: 941px) and (max-width: 1023px) {
  .nav-links > li:not(.nav-auth-group) > a { padding-inline: 8px; }
}
@media (min-width: 1280px) {
  .nav-links > li + li:not(.nav-auth-group) { margin-left: 8px; }
}
@media (hover: hover) and (pointer: fine) {
  .nav-links > li:not(.nav-auth-group) > a:hover { color: var(--nav-text-hi); }
  .nav-auth--outline:hover { color: var(--nav-text-hi); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
}
@media (hover: hover) and (pointer: fine) and (min-width: 941px) {
  .nav-auth--solid:hover { background: var(--nav-cta-bg-hi); }
}

/* Entrance on html.hero-go. The fallback reveals the nav if motion.js never runs. */
html.js:not(.hero-go) .nav { opacity: 0; }
html.js:not(.motion) .nav { animation: show-fallback 1ms 2.5s forwards; }
html.hero-go .nav { animation: nav-in 600ms var(--ease-out-expo) backwards; }
@keyframes nav-in { from { opacity: 0; translate: 0 -12px; } }
html.js .nav.is-held { opacity: 1; animation: none; }
html.js.back .nav { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .nav, .nav.is-condensed { transform: none; }
  .nav::before, .nav::after, .nav-logo-img { transition-duration: 150ms; }
  .nav-logo, .nav.menu-open .nav-logo { transition: none; }
  html.hero-go .nav { animation: fade-in 400ms var(--ease-in-out) backwards; }
  .nav-links.show { animation: fade-in 150ms linear both; }
  .nav-links.closing { animation: fade-out 150ms linear forwards; }
  .nav-links.show > li { animation: none; }
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* ================= footer ================= */
.site-footer {
  position: relative;
  /* The lip glow is wider than a phone screen. */
  overflow-x: clip;
  background: var(--night);
  color: var(--on-night-60);
  color-scheme: dark;
  --focus-ring: #fff;
  padding-top: clamp(56px, 6vw, 88px);
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  font-size: var(--fs-small);
  line-height: 1.5;
  isolation: isolate;
}
/* After a final CTA its aurora bleeds over this padding (components.css --bleed), so the content starts below it. */
main:has(> .final-cta:last-child) + .site-footer { padding-top: clamp(120px, 11vw, 180px); }
/* The aurora hands over at the footer top onto matching colours, which then fade to night along the aurora's bowl.
   The fade starts where the aurora ends, since a flat shelf between them reads as a line. Eased stops avoid Mach bands. */
main:has(> .final-cta:last-child) + .site-footer {
  background:
    radial-gradient(ellipse 90% 110% at 50% -10%, color-mix(in srgb, var(--night) 0%, transparent) 30%, color-mix(in srgb, var(--night) 4.3%, transparent) 38.75%,
      color-mix(in srgb, var(--night) 15.6%, transparent) 47.5%, color-mix(in srgb, var(--night) 31.6%, transparent) 56.25%, color-mix(in srgb, var(--night) 50%, transparent) 65%, color-mix(in srgb, var(--night) 68.4%, transparent) 73.75%,
      color-mix(in srgb, var(--night) 84.4%, transparent) 82.5%, color-mix(in srgb, var(--night) 95.7%, transparent) 91.25%, var(--night)),
    linear-gradient(90deg, rgb(30 92 94), rgb(38 66 92) 50%, rgb(74 62 136));
}
/* After a light page end, a short lip of the lower aurora carries white into night. The final CTA is already night. */
main:not(:has(> .final-cta:last-child)) + .site-footer { padding-top: calc(clamp(56px, 6vw, 88px) + var(--lip-h)); }
main:not(:has(> .final-cta:last-child)) + .site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: var(--lip-h);
  background:
    linear-gradient(transparent 55%, var(--night)),
    var(--aurora-lower, url("../assets/aurora-lower.webp")) 50% 0 / var(--lip-w) calc(var(--lip-h) / .44) no-repeat;
  pointer-events: none;
}
.site-footer__lip {
  position: absolute; top: 0; left: 50%; z-index: -2;
  width: var(--lip-w); max-width: none; height: var(--lip-h); translate: -50% 0; pointer-events: none;
}
.site-footer:has(> .site-footer__lip)::before { background: linear-gradient(transparent 55%, var(--night)); }
.site-footer__grid { display: grid; gap: 40px; }
.site-footer__brand { display: grid; gap: 32px; align-content: start; }
.site-footer__logo { display: inline-flex; align-items: center; min-height: 44px; width: 120px; }
.site-footer__logo img { width: 100%; }
.site-footer__title { margin-bottom: 6px; font-size: var(--fs-micro); letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-night-60); }
.site-footer__links, .site-footer__nav { margin: 0; padding: 0; list-style: none; }
.site-footer__links a, .site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-night-74);
  transition: color var(--dur-fast) var(--ease-out-quart);
}
.site-footer__legal { display: grid; align-content: start; gap: 14px; max-width: 62ch; font-size: clamp(12px, 0.73rem + 0.1vw, 14px); line-height: 1.6; }
.site-footer__bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / .08);
}
.site-footer__nav { display: flex; flex-wrap: wrap; column-gap: 24px; }
.site-footer__copy { color: var(--on-night-60); font-size: var(--fs-micro); }
@media (hover: hover) and (pointer: fine) {
  .site-footer__links a:hover, .site-footer__nav a:hover { color: #fff; }
}
@media (min-width: 768px) {
  .site-footer__brand { grid-template-columns: 1fr 1fr; }
  .site-footer__bar { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
}
@media (min-width: 1024px) {
  .site-footer__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; row-gap: 56px; }
  .site-footer__brand { grid-column: 1 / 5; grid-template-columns: 1fr; }
  .site-footer__legal { grid-column: 5 / -1; }
  .site-footer__bar { grid-column: 1 / -1; }
}

/* ================= seller contact modal =================
   The overlay itself scrolls and the dialog grows to its content. Nested scroll and vh maths
   clipped the form on phones with the keyboard open, so keep this model. */
.seller-contact-modal {
  --text-dim: var(--on-night-55);
  --focus-ring: #fff;
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding:
    calc(max(16px, env(safe-area-inset-top, 0px)) + 24px)
    var(--pad-r)
    calc(6rem + env(safe-area-inset-bottom, 0px))
    var(--pad-l);
  color: #fff;
  color-scheme: dark;
  font-family: var(--font-sans);
  /* Fading this container would make it the backdrop root and switch every blur inside off until
     opacity reached 1. It only holds display through the close, and its children fade themselves. */
  transition: display var(--dur-base) allow-discrete;
}
.seller-contact-modal__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgb(10 9 12 / .6);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-in);
}
.seller-contact-modal--open .seller-contact-modal__backdrop { opacity: 1; transition: opacity var(--dur-base) var(--ease-in-out); }
.seller-contact-modal__dialog {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: min(520px, 100%);
  /* A fixed top, not centring, so the dialog keeps its top edge when the form gives way to the shorter success card. */
  margin-block: clamp(0px, 8vh, 96px) auto;
  padding: calc(var(--card-pad) + 12px) var(--card-pad) var(--card-pad);
  border-radius: var(--r-card);
  background: rgb(38 36 39 / .86);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: 0 40px 80px -24px rgb(0 0 0 / .6);
  isolation: isolate;
  opacity: 0;
  transform: translate3d(0, 8px, 0) scale(.98);
  transition: opacity var(--dur-fast) var(--ease-in), transform var(--dur-close) var(--ease-in);
}
.seller-contact-modal--open .seller-contact-modal__dialog {
  opacity: 1;
  transform: none;
  transition: opacity 360ms var(--ease-out-expo), transform 360ms var(--ease-out-expo);
}
/* After the open rules: same specificity, so source order decides the starting style. */
@starting-style {
  .seller-contact-modal--open :is(.seller-contact-modal__backdrop, .seller-contact-modal__dialog) { opacity: 0; }
  .seller-contact-modal--open .seller-contact-modal__dialog { transform: translate3d(0, 16px, 0) scale(.98); }
}
.seller-contact-modal__dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgb(255 255 255 / .3), rgb(255 255 255 / .06) 30%, rgb(255 255 255 / .03) 60%, rgb(255 255 255 / .18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
/* Sticky so the only visible exit stays in reach while the overlay scrolls on short screens. Its top is
   measured from the overlay's top padding (safe area + 24px). The margins keep it 14px inside the corner
   and give its height back, so the title does not move. */
.seller-contact-modal__close {
  position: sticky;
  top: -24px;
  z-index: 2;
  margin: calc(2px - var(--card-pad)) calc(14px - var(--card-pad)) calc(var(--card-pad) - 46px) auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  /* Opaque, as the form scrolls under it. The mixes match the --glass-08 and --glass-16 tints on the dialog surface. */
  background: color-mix(in srgb, #fff 8%, var(--night-card-2));
  box-shadow: inset 0 0 0 1px var(--glass-10);
  color: #fff;
  font-size: 18px;
  transition: background-color var(--dur-fast) var(--ease-out-quart);
}
.seller-contact-modal__title {
  max-width: calc(100% - 48px);
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 452;
  line-height: 1.02;
  letter-spacing: var(--track-display);
}
.seller-contact-modal__lede { max-width: 40ch; margin-bottom: 24px; font-size: var(--fs-small); line-height: 1.5; color: var(--on-night-60); }
.seller-contact-modal__form-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--r-card-sm);
  background: rgb(255 107 157 / .12);
  color: #ffb3cb;
  font-size: var(--fs-small);
  line-height: 1.45;
  /* Clears the stuck close button (overlay top inset plus its 44px) when a failed send scrolls up to it. */
  scroll-margin-top: calc(max(16px, env(safe-area-inset-top, 0px)) + 56px);
}
.contact-field { margin-bottom: 16px; }
.contact-field label {
  display: block;
  margin-bottom: 8px;
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.2;
  color: var(--on-night-74);
}
.contact-field label .req { margin-left: 2px; color: var(--brand-teal); }
.contact-field input,
.contact-field textarea {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid rgb(255 255 255 / .12);
  border-radius: var(--r-card-sm);
  background: var(--glass-05);
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
  transition: border-color var(--dur-fast) var(--ease-out-quart), background-color var(--dur-fast) var(--ease-out-quart);
}
.contact-field textarea { height: auto; min-height: 112px; padding-block: 14px; resize: vertical; }
.contact-field input::placeholder,
.contact-field textarea::placeholder { color: rgb(255 255 255 / .38); }
.contact-field input:focus,
.contact-field textarea:focus { border-color: rgb(255 255 255 / .5); background: var(--glass-08); }
.seller-contact-modal--light .contact-field:has(#contact-website),
.seller-contact-modal--light .contact-field:has(#contact-message),
.seller-contact-modal--light .seller-contact-modal__success-sub { display: none; }

.seller-contact-modal .btn--primary {
  display: flex;
  width: 100%;
  height: 56px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 500;
  --focus-ring: #fff;
  transition: background-color var(--dur-fast) var(--ease-out-quart), color var(--dur-fast) var(--ease-out-quart), transform var(--dur-base) var(--ease-out-quart);
}
.seller-contact-modal .btn--primary:active { transform: scale(.97); transition-duration: var(--dur-press); }
.seller-contact-modal .contact-submit:disabled { background: rgb(255 255 255 / .12); color: rgb(255 255 255 / .45); cursor: not-allowed; transform: none; }
.contact-consent, .contact-form-foot {
  margin-top: 16px;
  font-size: var(--fs-micro);
  line-height: 1.55;
  text-align: center;
  text-wrap: balance;
  color: var(--on-night-55);
}
.contact-form-foot { margin-top: 12px; font-size: var(--fs-small); }
.contact-consent a, .contact-form-foot a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.seller-contact-modal__success-flow { text-align: center; }
/* Reveals the card's bottom edge too when Done is scrolled into view on short screens. */
.seller-contact-modal__done-btn { scroll-margin-bottom: var(--card-pad); }
.seller-contact-modal__success-flow:not([hidden]) { display: flex; flex-direction: column; gap: 24px; padding-top: 8px; animation: success-in 360ms var(--ease-out-expo) both; }
@keyframes success-in { from { opacity: 0; translate: 0 8px; } }
.seller-contact-modal__success { padding: 32px 20px; border-radius: var(--r-card-sm); background: var(--glass-05); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }
.seller-contact-modal__success-icon { display: flex; justify-content: center; margin-bottom: 20px; }
.seller-contact-modal__success-icon svg { width: 72px; height: 72px; overflow: visible; }
.seller-contact-modal__success-icon .success-ring { fill: none; stroke: var(--brand-teal); stroke-width: 2.25; stroke-linecap: round; transform-origin: center; stroke-dasharray: 175.93; stroke-dashoffset: 175.93; }
.seller-contact-modal__success-icon .success-tick { fill: none; stroke: var(--brand-teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; }
.seller-contact-modal__success-icon--animating .success-ring { animation: sellerContactSuccessRing .58s cubic-bezier(.4, 0, .2, 1) forwards; }
.seller-contact-modal__success-icon--animating .success-tick { animation: sellerContactSuccessTick .42s cubic-bezier(.4, 0, .2, 1) .52s forwards; }
@keyframes sellerContactSuccessRing { to { stroke-dashoffset: 0; } }
@keyframes sellerContactSuccessTick { to { stroke-dashoffset: 0; } }
.seller-contact-modal__success-line { margin-bottom: 8px; font-family: var(--font-display); font-size: var(--fs-sub); line-height: 1.3; letter-spacing: var(--track-lead); color: #fff; }
.seller-contact-modal__success-sub { font-size: var(--fs-small); color: var(--on-night-60); }
@media (hover: hover) and (pointer: fine) {
  .seller-contact-modal__close:hover { background: color-mix(in srgb, #f8f8f8 16%, var(--night-card-2)); }
  .seller-contact-modal .btn--primary:not(:disabled):hover { background: #ececee; }
}
@media (prefers-reduced-motion: reduce) {
  .seller-contact-modal__dialog,
  .seller-contact-modal--open .seller-contact-modal__dialog { transform: none; transition: opacity 200ms linear; }
  @starting-style { .seller-contact-modal--open .seller-contact-modal__dialog { transform: none; } }
  .seller-contact-modal__success-icon .success-ring,
  .seller-contact-modal__success-icon .success-tick { animation: none; stroke-dashoffset: 0; }
  .seller-contact-modal__success-flow:not([hidden]) { animation: fade-in 200ms linear both; }
}

/* ================= tour overlay ================= */
.tour-overlay {
  --focus-ring: #fff;
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding:
    max(16px, env(safe-area-inset-top, 0px)) max(clamp(16px, 3vw, 40px), env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px)) max(clamp(16px, 3vw, 40px), env(safe-area-inset-left, 0px));
  color: #fff;
  color-scheme: dark;
  font-family: var(--font-sans);
  /* As with the contact modal: fading this container would switch the backdrop blur off for the whole fade.
     It only holds display through the close, and its children fade themselves. */
  transition: display var(--dur-base) allow-discrete;
}
.tour-overlay > * { transition: opacity var(--dur-base) var(--ease-in-out); }
.tour-overlay[hidden] > * { opacity: 0; transition-timing-function: var(--ease-in); }
@starting-style { .tour-overlay:not([hidden]) > * { opacity: 0; } }
.tour-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(10 9 12 / .78);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.tour-overlay__bar,
.tour-overlay__dialog {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%, calc((100vh - 9rem) * 16 / 10));
}
.tour-overlay__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tour-overlay__tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--glass-08);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1), var(--glass-rim);
}
.tour-overlay__tab {
  height: 44px;
  padding-inline: 20px;
  border-radius: var(--r-pill);
  color: var(--on-night-74);
  font-size: var(--fs-small);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out-quart), color var(--dur-fast) var(--ease-out-quart);
}
.tour-overlay__tab[aria-pressed="true"] { background: #fff; color: var(--ink); --focus-ring: #fff; }
.tour-overlay__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-10);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14), var(--glass-rim);
  color: #fff;
  font-size: 18px;
  transition: background-color var(--dur-fast) var(--ease-out-quart);
}
.tour-overlay__dialog {
  aspect-ratio: 16 / 10;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--night);
  box-shadow: 0 40px 80px -20px rgb(0 0 0 / .55), 0 0 0 1px rgb(255 255 255 / .08);
}
.tour-overlay__dialog iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px) {
  .tour-overlay__bar,
  .tour-overlay__dialog { width: min(100%, calc((100vh - 9rem) * 3 / 4)); }
  .tour-overlay__dialog { aspect-ratio: 3 / 4; }
}
@media (hover: hover) and (pointer: fine) {
  .tour-overlay__tab[aria-pressed="false"]:hover { color: #fff; background: var(--glass-08); }
  .tour-overlay__close:hover { background: var(--glass-17); }
}

/* Forced colours repaint the nav in Canvas, so the logo follows the forced scheme, not the section theme. */
@media (forced-colors: active) {
  .nav .nav-logo .nav-logo-img--light { opacity: 0; }
  .nav .nav-logo .nav-logo-img--dark { opacity: 1; }
}
@media (forced-colors: active) and (prefers-color-scheme: dark) {
  .nav .nav-logo .nav-logo-img--light { opacity: 1; }
  .nav .nav-logo .nav-logo-img--dark { opacity: 0; }
}
