/* =====================================================================
   marketing.css — layout/section/typography utilities + shared component
   primitives for the public marketing surface. Builds on theme.css tokens
   (load order: theme.css → marketing.css). Imports nothing from app.css.
   Mobile-first: base rules target phones; scale up with min-width queries.
   Component-specific styling (header, hero, pricing, …) is added by its task.
   ===================================================================== */

/* ===================== Layout primitives ===================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.container-wide {
  max-width: var(--container-wide);
}

.section {
  padding-block: var(--section-y);
}

.section-alt {
  background: var(--surface-2);
}

/* ===================== Typography helpers ===================== */
.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  font-size: var(--fs-lead);
  color: var(--text-muted);
  max-width: 52ch;
}

.muted {
  color: var(--text-muted);
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.prose {
  max-width: 68ch;
}

/* Screen-reader-only (visually hidden but announced). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: .7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--fs-body);
  line-height: 1;
  text-decoration: none;
  transition: transform var(--dur) var(--ease-spring),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out);
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: var(--on-accent);
  box-shadow: var(--shadow-1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-lg {
  min-height: 52px;
  padding: .9rem 1.6rem;
  font-size: var(--fs-lead);
}

/* ===================== Cards ===================== */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

/* Hover lift + accent glow for interactive cards (DESIGN_SYSTEM §1A). */
.card-hover {
  transition: transform var(--dur) var(--ease-spring),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}

/* Glowing accent border on hover (OpenClaw FeaturedCard, reskinned to green):
   the border lights up + a soft accent halo, plus a small lift. */
.card-hover:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent),
    0 14px 40px color-mix(in srgb, var(--accent) 16%, transparent),
    var(--shadow-2);
}

/* ===================== Scroll-reveal ===================== */
/* Entrance animation. Pure-CSS load animation with animation-fill-mode: both, so
   it ALWAYS ends visible (opacity:1). This is deliberately not a JS-toggled class:
   under Blazor's ServerPrerendered reconnect the circuit reconciles the DOM and
   resets each element's class to its declared value — which would strip a
   JS-added `.is-visible` and leave `.fade-up` content stuck at opacity:0.
   Gated on `.js` (set synchronously in the host head) so no-JS visitors still see
   content immediately; the global reduced-motion block disables the animation. */
.js .fade-up {
  animation: hgr-fade-up var(--dur-slow) var(--ease-out) both;
}

@keyframes hgr-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ===================== Atmospheric background ===================== */
/* Fixed canvas behind all content: radial brand glow at top-center over a faint
   particle field. Decorative only (the component is aria-hidden). */
.atmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.atmos-glow {
  position: absolute;
  inset: 0;
  background: var(--glow);
}

.atmos-particles {
  position: absolute;
  inset: 0;
  opacity: .6;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(230, 237, 243, .55), transparent),
    radial-gradient(1.5px 1.5px at 28% 42%, rgba(230, 237, 243, .35), transparent),
    radial-gradient(1px 1px at 47% 12%, rgba(92, 203, 255, .55), transparent),
    radial-gradient(1.5px 1.5px at 63% 33%, rgba(230, 237, 243, .40), transparent),
    radial-gradient(1px 1px at 78% 16%, rgba(0, 230, 118, .45), transparent),
    radial-gradient(1.5px 1.5px at 85% 48%, rgba(230, 237, 243, .30), transparent),
    radial-gradient(1px 1px at 35% 66%, rgba(230, 237, 243, .22), transparent),
    radial-gradient(1.5px 1.5px at 92% 72%, rgba(92, 203, 255, .28), transparent);
}

/* Particles read as noise on a light canvas — drop them in light theme. */
[data-theme="light"] .atmos-particles {
  display: none;
}

/* ===================== Marketing shell ===================== */
.marketing-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.marketing-main {
  flex: 1 0 auto;
}

/* Brand lockup (reused by the real header in T2). */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--gradient);
  color: var(--on-accent);
  font-size: .8rem;
  line-height: 1;
}

.brand-text {
  font-size: 1.05rem;
}

/* ===================== Footer ===================== */
.m-footer {
  margin-top: var(--space-10);
  padding-block: var(--space-6) var(--space-5);
  border-top: 1px solid var(--border);
}

/* Brand on one side, a single wrapped row of links on the other. Stacks on phones. */
.m-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .m-footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
  }
}

.m-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: 0;
}

.m-footer-link {
  color: var(--text);
  font-size: var(--fs-sm);
  text-decoration: none;
}

.m-footer-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.m-footer-bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ===================== Header / navigation ===================== */
.m-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: transform var(--dur) var(--ease-out),
              opacity var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}

/* Solid + hairline once scrolled past the hero top (toggled by site.js). */
.m-header.is-scrolled {
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-1);
}

/* Slide/fade the header away while scrolling down (site.js); back-to-top returns. */
.m-header.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.m-header-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
  min-height: 64px;
}

/* Center nav — hidden on phones, shown from tablet up. */
.m-nav {
  display: none;
  justify-content: center;
  gap: var(--space-1);
}

@media (min-width: 768px) {
  .m-nav {
    display: flex;
  }
}

/* Subtle, understated nav "buttons" (OpenClaw): muted text, a faint pill on
   hover, and the active route in --accent (our reskin of their red). */
.m-nav-link {
  padding: var(--space-2) var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}

.m-nav-link:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 7%, transparent);
  text-decoration: none;
}

/* Active route = subtle accent-outlined pill (OpenClaw "Product", reskinned to
   our green). Transparent border on all links keeps sizing identical. */
.m-nav-link.active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.m-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-self: end;
}

/* Desktop CTAs live in the overlay on phones. */
.m-cta-desktop {
  display: none;
}

@media (min-width: 768px) {
  .m-cta-desktop {
    display: inline-flex;
  }
}

/* Icon button shared by ThemeToggle + hamburger + mobile close. */
.theme-toggle,
.m-hamburger,
.m-mobile-close {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.theme-toggle:hover,
.m-hamburger:hover,
.m-mobile-close:hover {
  border-color: var(--accent);
}

/* Circular toggle, matching the OpenClaw reference. */
.theme-toggle {
  border-radius: var(--radius-pill);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Moon in dark, sun in light. */
.theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

.m-hamburger {
  grid-auto-flow: row;
  gap: 5px;
  padding: 0 11px;
}

.m-hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

@media (min-width: 768px) {
  .m-hamburger {
    display: none;
  }
}

/* ---- Mobile overlay menu ---- */
.m-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--surface);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  overflow-y: auto;
  transition: opacity var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out),
              visibility var(--dur);
}

.m-mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

@media (min-width: 768px) {
  .m-mobile-menu {
    display: none;
  }
}

.m-mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}

.m-mobile-close {
  font-size: 1.1rem;
}

.m-mobile-nav {
  display: flex;
  flex-direction: column;
  padding-top: var(--space-2);
  padding-bottom: var(--space-8);
}

.m-mobile-link {
  padding: var(--space-4) 0;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.m-mobile-link:hover,
.m-mobile-link.active {
  color: var(--accent);
  text-decoration: none;
}

.m-mobile-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.m-mobile-cta .btn {
  width: 100%;
}

/* ===================== Section helpers ===================== */
.section-sm {
  padding-block: var(--space-8);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--link);
  font-weight: 500;
  font-size: var(--fs-sm);
  text-decoration: none;
}

.link-arrow:hover {
  text-decoration: none;
}

.link-arrow span {
  transition: transform var(--dur) var(--ease-out);
}

.link-arrow:hover span {
  transform: translateX(3px);
}

/* Framed visual / placeholder (swapped for real screenshots in T14). */
.visual-frame {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.placeholder-visual {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: var(--space-4);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  background:
    radial-gradient(70% 90% at 50% 0%, rgba(0, 230, 118, .10), rgba(20, 184, 255, .05) 45%, transparent 72%),
    var(--surface-card);
}

/* ===================== Hero ===================== */
.hero {
  padding-block: var(--space-12) var(--space-10);
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  margin-bottom: var(--space-5);
  max-width: 18ch;
  font-size: var(--fs-display);
  line-height: 1.06;
}

.hero-sub {
  margin: 0 auto var(--space-6);
  text-align: center;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}

.hero-visual {
  width: 100%;
  margin-inline: auto;
}

.hero-frame {
  aspect-ratio: 16 / 9;
}

/* ===================== Value strip ===================== */
.value-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (min-width: 768px) {
  /* Spread the four items edge-to-edge with EQUAL gaps: first flush-left, last
     flush-right, evenly divided between (matches the showcase's width above). */
  .value-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}

.value-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 500;
  font-size: var(--fs-sm);
  color: var(--text);
}

.value-item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* ===================== Section heading (⟩) ===================== */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.section-heading-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  font-size: var(--fs-h2);
}

/* Brand-gradient accent bar (replaces OpenClaw's ⟩ chevron). */
.section-heading-marker {
  flex-shrink: 0;
  width: 5px;
  height: 1.05em;
  border-radius: var(--radius-pill);
  background: var(--gradient);
}

.section-heading-link {
  white-space: nowrap;
}

/* ===================== How it works ===================== */
.how-grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .how-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

.how-step {
  padding: var(--space-6);
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.how-num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--gradient);
  color: var(--on-accent);
  font-weight: 800;
}

.how-step-title {
  margin-bottom: var(--space-2);
  font-size: var(--fs-h3);
}

/* ===================== Feature rows ===================== */
.feature-row {
  display: grid;
  gap: var(--space-6);
  align-items: center;
  margin-bottom: var(--space-10);
}

.feature-row:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .feature-row {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }

  /* Put the text on the right for reversed rows (visual stays first in DOM). */
  .feature-row.reverse .feature-row-text {
    order: 2;
  }
}

.feature-row-title {
  margin-bottom: var(--space-3);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
}

/* ===================== Feature grid ===================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
}

.feature-card {
  padding: var(--space-6);
}

.feature-card-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.feature-card-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card-title {
  margin-bottom: var(--space-2);
  font-size: var(--fs-h3);
}

/* ===================== Thumbnail cards ===================== */
.thumb-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.thumb-card-media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(80% 100% at 50% 0%, rgba(0, 230, 118, .14), rgba(20, 184, 255, .08) 50%, transparent 75%),
    var(--surface-2);
}

.thumb-card-glyph {
  color: var(--accent);
}

.thumb-card-glyph svg {
  width: 48px;
  height: 48px;
}

.thumb-card-body {
  padding: var(--space-5);
}

.thumb-card-title {
  margin-bottom: var(--space-2);
  font-size: var(--fs-h3);
}

/* ===================== CTA band ===================== */
.cta-band {
  padding: var(--space-10) var(--gutter);
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 130% at 50% 0%, rgba(0, 230, 118, .12), rgba(20, 184, 255, .06) 45%, transparent 75%),
    var(--surface-2);
}

.cta-band-title {
  margin-bottom: var(--space-6);
  font-size: var(--fs-h2);
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

/* ===================== Dummy in-product mocks (DemoMock) ===================== */
.mock-app {
  padding: var(--space-4) var(--space-4) var(--space-5);
}

.mock-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
}

.mock-dots {
  display: inline-flex;
  gap: 5px;
}

.mock-dots i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.mock-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: var(--space-2);
}

.mock-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.mock-stat {
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.mock-stat b {
  display: block;
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--text);
}

.mock-stat span {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.mock-sport {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text);
}

.mock-meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.mock-dot-accent {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
}

.mock-panel {
  padding: var(--space-5);
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.mock-plan-h {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
}

.mock-plan-h::before {
  content: "";
  width: 4px;
  height: 1em;
  border-radius: 2px;
  background: var(--gradient);
}

.mock-bullet {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.mock-bullet::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}

.mock-sync {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
}

.mock-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.mock-chip {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ===================== Testimonials (example/placeholder) ===================== */
.social-proof-note {
  margin: calc(var(--space-6) * -1) 0 var(--space-6);
  font-size: var(--fs-sm);
}

.testimonial {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
  padding: var(--space-6);
}

.placeholder-pill {
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  border: 1px dashed var(--border-strong);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.testimonial-quote {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--text);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient);
}

.testimonial-name {
  display: block;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--text);
}

.testimonial-role {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ===================== Back-to-top button ===================== */
.back-to-top {
  position: fixed;
  right: clamp(16px, 4vw, 32px);
  bottom: clamp(16px, 4vw, 32px);
  z-index: 60;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--gradient);
  color: var(--on-accent);
  box-shadow: var(--shadow-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-spring),
              visibility var(--dur);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2), 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
}

/* ===================== Step + card mini-previews ===================== */
.mock-mini {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.mock-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
}

.mock-mini-note {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.mock-field {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: var(--fs-sm);
  color: var(--text);
}

.mock-week {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.mock-week b {
  color: var(--text);
}

.feature-card-preview {
  margin-top: var(--space-4);
}

.mock-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 44px;
}

.mock-bars i {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--gradient);
  opacity: .85;
}

/* ===================== Pricing ===================== */
.pricing-head {
  margin-bottom: var(--space-10);
  text-align: center;
}

.pricing-sub {
  margin: var(--space-4) auto var(--space-6);
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
}

.segmented-option {
  min-height: 40px;
  padding: var(--space-2) var(--space-5);
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out);
}

.segmented-option.is-active {
  background: var(--surface-card);
  color: var(--text);
  box-shadow: var(--shadow-1);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  max-width: 1040px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pricing-col {
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
}

/* Highlighted tier: gradient border (padding/border-box trick) + the badge. */
.pricing-col-featured {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface-card), var(--surface-card)) padding-box,
    var(--gradient) border-box;
  box-shadow: var(--shadow-2);
}

.pricing-badge {
  align-self: flex-start;
  margin-bottom: var(--space-3);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--gradient);
  color: var(--on-accent);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.pricing-tag {
  margin-left: var(--space-2);
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  border: 1px dashed var(--border-strong);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-muted);
  vertical-align: middle;
}

.pricing-name {
  margin-bottom: var(--space-2);
  font-size: var(--fs-h3);
}

.pricing-price {
  margin-bottom: var(--space-3);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}

.pricing-price-text {
  font-size: 1.4rem;
}

.pricing-period {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-desc {
  margin-bottom: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.pricing-features {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
}

.pricing-features li {
  display: flex;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text);
}

.pricing-features li::before {
  content: "✓";
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 700;
}

.pricing-col .btn {
  width: 100%;
  margin-top: auto;
}

.pricing-footnote {
  margin-top: var(--space-6);
  text-align: center;
  font-size: var(--fs-sm);
}

/* Show only the active billing period's price. */
.pricing[data-billing="monthly"] .price-yearly,
.pricing[data-billing="yearly"] .price-monthly {
  display: none;
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-strong);
}

/* ===================== FAQ accordion ===================== */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-card);
}

.faq-question {
  margin: 0;
  font-size: inherit;
  letter-spacing: normal;
}

.faq-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: transparent;
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: color var(--dur) var(--ease-out);
}

.faq-trigger:hover {
  color: var(--accent);
}

.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
}

.faq-trigger[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-panel {
  padding: 0 var(--space-5) var(--space-5);
}

.faq-answer {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Inline links in body text carry an underline (not colour alone — WCAG 1.4.1). */
.faq-answer a,
.prose a,
.contact-email {
  color: var(--link);
  text-decoration: underline;
}

/* ===================== Contact ===================== */
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-8);
  text-align: center;
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-2);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.contact-icon svg {
  width: 28px;
  height: 28px;
}

.contact-email {
  font-weight: 600;
}

.contact-note {
  margin: 0;
  font-size: var(--fs-sm);
}

/* ===================== Prose (legal/long-form) ===================== */
.prose h2 {
  margin-top: var(--space-6);
  font-size: var(--fs-h3);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose a {
  color: var(--link);
}

/* ===================== Misc ===================== */
/* Blazor circuit-error banner — hidden until the framework shows it (inline
   display) on a real circuit error. Without this rule it renders permanently. */
#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-3) var(--gutter);
  background: var(--surface-card);
  color: var(--text);
  border-top: 1px solid var(--danger);
  box-shadow: var(--shadow-2);
}

#blazor-error-ui .reload {
  color: var(--link);
}

#blazor-error-ui .dismiss {
  float: right;
  cursor: pointer;
}

/* Lock background scroll while the mobile overlay menu is open (toggled by site.js). */
html.menu-open,
html.menu-open body {
  overflow: hidden;
}
