/* ==========================================================================
   Marketplace — single-page master–detail styles.
   Built on the shared design tokens (design-tokens.css).
   ========================================================================== */

html { scroll-behavior: smooth; }

body {
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
}

/* Offset anchor targets so they land below the sticky header */
.hero, .section { scroll-margin-top: 76px; }

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap.narrow { max-width: 760px; }

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

/* ---- Buttons (extends token .btn) --------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-lg { padding: 12px 22px; font-size: 14px; border-radius: var(--radius-lg); }

.btn-on-gradient {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.btn-on-gradient:hover { background: rgba(255, 255, 255, 0.28); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.btn-primary:hover { filter: brightness(1.05); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: var(--weight-bold); }
.brand-mark { font-size: 18px; opacity: 0.9; }
.brand-name { font-size: 16px; letter-spacing: 0.01em; }
.nav-links { display: flex; justify-self: center; gap: 26px; font-size: 14px; font-weight: var(--weight-semibold); }
.nav-links a { color: rgba(255, 255, 255, 0.85); }
.nav-links a:hover { color: #fff; }

/* ---- Auth widget (header) ---------------------------------------------- */
/* Always pinned to the right of the header. */
.auth-area { display: inline-flex; align-items: center; gap: 10px; justify-self: end; }

/* Sign in / Sign up are hidden for now — kept in the DOM (auth.js still renders
   them), just not shown. Log out (signed-in state) is unaffected. */
.auth-btn-signin,
.auth-btn-signup { display: none; }

/* All auth buttons share one consistent look (Sign in / Sign up / Log out). */
.auth-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: var(--weight-semibold);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-md, 8px);
}
.auth-btn:hover { background: rgba(255, 255, 255, 0.28); }

/* Highlight Sign in / Sign up so they stand out on the header (Log out stays subtle). */
.auth-btn-signin {
  background: rgba(255, 255, 255, 0.28);
  border-color: #fff;
  font-weight: var(--weight-bold);
}
.auth-btn-signin:hover { background: rgba(255, 255, 255, 0.42); }
/* Sign up is the primary call to action: solid white pill, brand-colored text. */
.auth-btn-signup {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
  font-weight: var(--weight-bold);
  box-shadow: var(--shadow-sm);
}
.auth-btn-signup:hover { background: #fff; color: var(--color-primary-accent); box-shadow: var(--shadow-md); }
.auth-email {
  color: #fff;
  font-size: 13px;
  font-weight: var(--weight-semibold);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-error {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: #3a1d1d;
  color: #f6a3a3;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 1000;
  max-width: 90vw;
  box-shadow: var(--shadow-md);
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  color: #fff;
  padding: 40px 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2e9e5b 0%, #1f7a48 100%);
  min-height: calc(100vh - 64px);   /* fill viewport below the sticky header */
  display: flex;
  align-items: center;
}
/* Animated, shifting gradient wash on top of the base */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #2e9e5b, #1f7a48, #35b06a, #17693d);
  background-size: 300% 300%;
  opacity: 0.9;
  animation: heroGradient 16s ease infinite;
}
@keyframes heroGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating translucent blobs for depth/movement */
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  will-change: transform;
}
.blob-1 {
  width: 280px; height: 280px;
  top: -80px; left: -40px;
  background: rgba(255, 255, 255, 0.35);
  animation: float1 18s ease-in-out infinite;
}
.blob-2 {
  width: 240px; height: 240px;
  top: -60px; right: 8%;
  background: rgba(150, 120, 230, 0.55);
  animation: float2 22s ease-in-out infinite;
}
.blob-3 {
  width: 200px; height: 200px;
  bottom: -90px; left: 45%;
  background: rgba(120, 200, 255, 0.30);
  animation: float3 20s ease-in-out infinite;
}
@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 30px); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-50px, 40px); }
}
@keyframes float3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -35px); }
}

/* Floating app icons drifting across the hero background */
.hero-icons {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-icon {
  position: absolute;
  border-radius: 24%;
  opacity: 0.22;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transform: rotate(var(--rot, 0deg));
  will-change: transform;
}
@keyframes drift-a {
  0%   { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
  50%  { transform: translate(36px, -28px) rotate(calc(var(--rot, 0deg) + 8deg)); }
  100% { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
}
@keyframes drift-b {
  0%   { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
  50%  { transform: translate(-30px, 30px) rotate(calc(var(--rot, 0deg) - 8deg)); }
  100% { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
}

.hero-inner { position: relative; z-index: 2; text-align: center; }
/* Soft scrim so the headline stays readable over the drifting icons */
.hero-inner::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(920px, 108%);
  height: 128%;
  background: radial-gradient(ellipse at center,
    rgba(40, 30, 90, 0.30) 0%,
    rgba(40, 30, 90, 0.16) 45%,
    rgba(40, 30, 90, 0) 72%);
  z-index: -1;
  pointer-events: none;
}

/* Scroll cue — invites the visitor to scroll to the products */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.scroll-cue:hover { color: #fff; }
.scroll-cue-arrow {
  width: 22px;
  height: 22px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: cueBounce 1.8s ease-in-out infinite;
}
@keyframes cueBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.6; }
  50%      { transform: rotate(45deg) translate(6px, 6px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue-arrow { animation: none; }
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.38);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}
.hero-title {
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.06;
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
}
.hero-sub {
  max-width: 660px;
  margin: 0 auto 34px;
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.5;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-lg { padding: 15px 30px; font-size: 16px; }

/* Trust strip — removes cost/privacy doubts before they're voiced */
.hero ul, .detail-pane ul, .detail-pane ol { list-style: none; }
.trust-strip {
  list-style: none;
  display: flex;
  gap: 10px 26px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}
.trust-strip li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: var(--weight-semibold);
  color: rgba(255, 255, 255, 0.92);
}
.trust-strip li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 11px;
  border-radius: var(--radius-circle);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .blob,
  .hero-icon { animation: none !important; }
}

/* ---- Sections ----------------------------------------------------------- */
.section { padding: 72px 0; }
.section-tint { background: var(--surface-tint); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: 30px; font-weight: var(--weight-bold); }
.section-head p { color: var(--color-text-muted); font-size: 16px; margin-top: 8px; }

/* ---- Shared pills / badges ---------------------------------------------- */
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-size: 10px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent, var(--color-primary));
  background: color-mix(in srgb, var(--accent, var(--color-primary)) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent, var(--color-primary)) 25%, #fff);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Master–detail workspace (product list + detail pane)
   ========================================================================== */
.workspace {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
}

/* ---- Left: product list ------------------------------------------------- */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 84px;
}
.project-item {
  --accent: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-left: 3px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.project-item:hover { background: var(--surface-muted); transform: translateX(2px); }
.project-item.active {
  border-color: var(--border-default);
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, #fff);
}
.project-item-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  padding: 5px;
}
.project-item-text { display: flex; flex-direction: column; min-width: 0; }
.project-item-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: var(--weight-bold);
  color: var(--color-text);
}
/* Title truncates if long so the tag always stays on the same line. */
.project-item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-tag {
  flex: none;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-success-text);
  background: color-mix(in srgb, var(--color-success-text) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--color-success-text) 28%, #fff);
  border-radius: var(--radius-pill);
}
/* "Coming soon" reads as pending, not available — amber instead of green. */
.price-tag-soon {
  color: var(--color-warning-alt);
  background: color-mix(in srgb, var(--color-warning-alt) 12%, #fff);
  border-color: color-mix(in srgb, var(--color-warning-alt) 30%, #fff);
}
.project-item-tagline {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Right: detail pane ------------------------------------------------- */
.detail-pane {
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.detail-hero {
  --accent: var(--color-primary);
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 32px;
  color: #fff;
  background:
    linear-gradient(135deg,
      var(--accent) 0%,
      color-mix(in srgb, var(--accent) 55%, #1f7a48 45%) 100%);
}
.detail-hero-icon {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.16);
  padding: 10px;
  box-shadow: var(--shadow-sm);
}
.detail-hero .card-badges { margin-bottom: 8px; }
.detail-hero .pill {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}
.detail-hero h2 { font-size: 30px; line-height: 1.12; font-weight: var(--weight-bold); }
.detail-hero-tagline { font-size: 16px; color: rgba(255, 255, 255, 0.92); margin-top: 8px; }
.detail-hero-meta { font-size: 12px; color: rgba(255, 255, 255, 0.75); margin-top: 8px; }
.detail-hero-actions { margin-top: 18px; }

/* ---- Highlight strip (key points, right under the hero) ----------------- */
.highlight-strip {
  --accent: var(--color-primary);
  padding: 20px 32px 22px;
  background: color-mix(in srgb, var(--accent) 7%, #fff);
  border-bottom: 1px solid var(--border-default);
}
.hl-title {
  display: block;
  font-size: 10.5px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.hl-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px 22px;
}
.hl-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  line-height: 1.45;
}
.hl-check {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  border-radius: var(--radius-circle);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: var(--weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- "At a glance" spec strip ------------------------------------------- */
.spec-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border-default);
  border-bottom: 1px solid var(--border-default);
}
.spec-item {
  background: var(--surface);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.spec-label {
  font-size: 10.5px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.spec-value {
  font-size: 14px;
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

.detail-body { padding: 28px 32px 32px; display: flex; flex-direction: column; }
.detail-body > * + * { margin-top: 24px; }

/* ---- Tabbed deep-dive --------------------------------------------------- */
/* Only one panel is visible at a time, so the full sales story stays
   available without making the page enormous. */
.detail-tabs { --accent: var(--color-primary); }
.tab-bar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 22px;
}
.tab-btn {
  position: relative;
  border: none;
  background: none;
  padding: 10px 14px 12px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--color-text); background: var(--surface-muted); }
.tab-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tab-btn.active { color: var(--accent); }
/* Active underline sits on top of the bar's border */
.tab-btn.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}
.tab-panel[hidden] { display: none; }
.tab-panel.active { animation: tabFade 0.22s ease; }
@keyframes tabFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tab-panel.active { animation: none; }
}

/* Pitch: a bold pull-quote so the core promise stands out */
.detail-pitch {
  position: relative;
  background: var(--surface-tint);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 24px 26px 24px 58px;
}
.detail-pitch p {
  font-size: 19px;
  line-height: 1.45;
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}
.pitch-mark {
  position: absolute;
  left: 20px;
  top: 6px;
  font-size: 48px;
  line-height: 1;
  color: color-mix(in srgb, var(--color-primary) 45%, #fff);
  font-family: Georgia, serif;
}

/* ---- Problem → solution infographic ------------------------------------- */
.ps-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 14px;
}
.ps-side {
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
}
.ps-caption {
  font-size: 15.5px;
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: 16px;
  line-height: 1.35;
}
.ps-items { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.ps-items li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13.5px;
  line-height: 1.4;
}
/* Shared line-icon glyph */
.ic { width: 100%; height: 100%; display: block; }
/* Inline variant for icons sitting next to text */
.ic-inline { width: 16px; height: 16px; flex-shrink: 0; }

.ps-item-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}
.ps-problem .ps-item-icon { color: var(--color-danger); }
.ps-solution .ps-item-icon { color: var(--color-success-text); }
.ps-problem .ps-item-icon {
  background: color-mix(in srgb, var(--color-danger) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--color-danger) 20%, #fff);
}
.ps-solution .ps-item-icon {
  background: color-mix(in srgb, var(--color-success-text) 11%, #fff);
  border: 1px solid color-mix(in srgb, var(--color-success-text) 22%, #fff);
}
.ps-problem .ps-item-label { color: var(--color-text-secondary); }
.ps-solution .ps-item-label { color: var(--color-text); font-weight: var(--weight-semibold); }

/* Arrow between the two sides */
.ps-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}
.ps-arrow span {
  width: 42px;
  height: 42px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-circle);
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* Punchy numbers under the comparison */
.ps-stats {
  --accent: var(--color-primary);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.ps-stat {
  text-align: center;
  padding: 18px 12px;
  background: color-mix(in srgb, var(--accent) 7%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, #fff);
  border-radius: var(--radius-lg);
}
.ps-stat strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  font-weight: var(--weight-bold);
  color: var(--accent);
  letter-spacing: -0.02em;
}
.ps-stat span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: var(--weight-semibold);
}

.ps-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}
.ps-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-circle);
  background: currentColor;
}
.ps-side.ps-problem { border-top: 3px solid var(--color-danger); }
.ps-problem .ps-label { color: var(--color-danger); background: color-mix(in srgb, var(--color-danger) 10%, #fff); }
.ps-side.ps-solution { border-top: 3px solid var(--color-success-text); }
.ps-solution .ps-label { color: var(--color-success-text); background: color-mix(in srgb, var(--color-success-text) 12%, #fff); }

/* ---- Benefits carousel -------------------------------------------------- */
.carousel {
  --accent: var(--color-primary);
  position: relative;
}
/* Edge fades hint that there's more to scroll */
.carousel::before,
.carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 58px;                 /* stop above the footer row */
  width: 56px;
  pointer-events: none;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.carousel::before {
  left: 0;
  background: linear-gradient(to right, var(--surface) 10%, rgba(255, 255, 255, 0));
}
.carousel::after {
  right: 0;
  background: linear-gradient(to left, var(--surface) 10%, rgba(255, 255, 255, 0));
}
.carousel.at-start::before { opacity: 0; }
.carousel.at-end::after { opacity: 0; }

.carousel-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;               /* Firefox */
  -ms-overflow-style: none;            /* IE/Edge */
}
.carousel-viewport::-webkit-scrollbar { display: none; }
.carousel-track {
  display: flex;
  gap: 18px;
  padding: 4px 4px 6px;
}
.carousel-track .benefit-card {
  scroll-snap-align: start;
  flex: 0 0 clamp(240px, 46%, 310px);
}

/* Benefit card: accent bar on top, colored icon tile, lift on hover */
.benefit-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.benefit-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent),
              color-mix(in srgb, var(--accent) 40%, #fff));
  opacity: 0;
  transition: opacity 0.22s ease;
}
.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--accent) 35%, #fff);
}
.benefit-card:hover::before { opacity: 1; }

.benefit-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.benefit-num {
  font-size: 22px;
  font-weight: var(--weight-bold);
  line-height: 1;
  color: color-mix(in srgb, var(--accent) 22%, #fff);
  letter-spacing: -0.02em;
}

/* ---- Carousel footer: dots + arrows ------------------------------------- */
.carousel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}
.carousel-dots { display: flex; align-items: center; gap: 7px; }
.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.carousel-dot:hover { background: color-mix(in srgb, var(--accent) 55%, #fff); }
.carousel-dot.active {
  width: 26px;
  background: var(--accent);
}

.carousel-nav { display: flex; gap: 8px; }
.carousel-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-circle);
  border: 1px solid var(--border-default);
  background: var(--surface);
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}
.carousel-btn:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: scale(1.06);
}
.carousel-btn:disabled { opacity: 0.3; cursor: default; }
.carousel.no-overflow .carousel-footer { display: none; }
.carousel.no-overflow::before,
.carousel.no-overflow::after { display: none; }

@media (prefers-reduced-motion: reduce) {
  .benefit-card, .carousel-btn, .carousel-dot { transition: none; }
  .benefit-card:hover { transform: none; }
}
.benefit-icon {
  width: 46px;
  height: 46px;
  padding: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, var(--color-primary));
  background: color-mix(in srgb, var(--accent, var(--color-primary)) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent, var(--color-primary)) 22%, #fff);
  border-radius: var(--radius-md);
}
.benefit-card h4 {
  font-size: 16.5px;
  font-weight: var(--weight-bold);
  margin-bottom: 8px;
  line-height: 1.3;
}
.benefit-card p { font-size: 13.5px; color: var(--color-text-secondary); line-height: 1.6; }

/* ---- Feature deep-dive -------------------------------------------------- */
/* Cards, not bare columns: each group is a scannable unit with its own icon
   tile, so a long feature list reads as a set of capabilities. */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
/* An odd number of groups would leave a half-empty last row, so the final
   card runs the full width instead. */
.feature-group:last-child:nth-child(odd) { grid-column: 1 / -1; }

.feature-group {
  --accent: var(--color-primary);
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 18px 20px 20px;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}
.feature-group:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, #fff);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 14%, transparent);
}

.feature-group-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 13px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}
.feature-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, #fff);
  border-radius: var(--radius-md);
}
.feature-group h4 {
  flex: 1;
  font-size: 13px;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--accent);
}
/* Small count chip: shows the depth of each group at a glance. */
.feature-count {
  flex-shrink: 0;
  min-width: 20px;
  font-size: 11px;
  font-weight: var(--weight-bold);
  text-align: center;
  color: var(--color-text-muted);
  background: var(--surface-muted);
  border-radius: var(--radius-pill);
  padding: 2px 7px;
}

.feature-group ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.feature-group li {
  position: relative;
  padding-left: 23px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}
.feature-group li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  top: 0;
  font-size: 11px;
  font-weight: var(--weight-bold);
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .feature-group { transition: none; }
}

/* ---- Use cases ---------------------------------------------------------- */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.usecase-card {
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.usecase-card h4 { font-size: 15.5px; font-weight: var(--weight-bold); margin-bottom: 6px; }
.usecase-card p { font-size: 13.5px; color: var(--color-text-secondary); line-height: 1.55; }

/* ---- Install steps ------------------------------------------------------ */
.install-steps {
  padding-left: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.install-steps li {
  counter-increment: step;
  position: relative;
  padding: 15px 18px 15px 58px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  font-size: 14.5px;
  color: var(--color-text);
}
.install-steps li::before {
  content: counter(step);
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: var(--weight-bold);
  border-radius: var(--radius-circle);
  font-size: 13px;
}

/* ---- Closing CTA (inside detail pane) ----------------------------------- */
.detail-cta {
  --accent: var(--color-primary);
  background: var(--gradient-brand);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 32px;
  text-align: center;
}
.detail-cta h3 {
  font-size: 20px;
  line-height: 1.35;
  font-weight: var(--weight-bold);
  max-width: 620px;
  margin: 0 auto;
  color: #fff;
}
.detail-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ---- How it works (steps) ----------------------------------------------- */
.steps-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  counter-reset: none;
}
.step-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 30px 24px 26px;
}
.step-num {
  position: absolute;
  top: -16px;
  left: 24px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 15px;
  font-weight: var(--weight-bold);
  border-radius: var(--radius-circle);
  box-shadow: var(--shadow-sm);
}
.step-card h3 { font-size: 17px; font-weight: var(--weight-bold); margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--color-text-secondary); line-height: 1.6; }

/* ---- About the maker ---------------------------------------------------- */
.about-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 34px;
}
.about-intro { display: flex; flex-direction: column; gap: 16px; }
.about-avatar {
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 28px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  border-radius: var(--radius-circle);
  box-shadow: var(--shadow-sm);
}
.about-name { font-size: 21px; font-weight: var(--weight-bold); }
.about-role { font-size: 14px; color: var(--color-text-muted); margin-top: 3px; }

.about-body > p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}
.about-body > p + p { margin-top: 12px; }

.about-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.about-facts li {
  flex: 1 1 130px;
  background: var(--surface-tint);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}
.about-facts strong {
  display: block;
  font-size: 17px;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
}
.about-facts span {
  display: block;
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Sits in the left identity column, directly under the name and role.
   The parent's column gap handles the spacing. */
.about-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* ---- Consent banner ----------------------------------------------------- */
/* Sits at the bottom without covering content, and only ever appears when
   analytics is configured (see analytics.js). */
.consent-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 200;
  width: min(760px, calc(100% - 32px));
  transform: translate(-50%, calc(100% + 28px));
  opacity: 0;
  transition: transform 0.32s var(--easing-standard), opacity 0.32s ease;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.consent-banner.visible { transform: translate(-50%, 0); opacity: 1; }

.consent-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 22px;
}
.consent-text strong {
  display: block;
  font-size: 15px;
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: 3px;
}
.consent-text p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-secondary);
}
.consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.consent-actions .btn { padding: 9px 18px; font-size: 13.5px; }

/* Link to the full privacy page (opens in a new tab) */
.consent-link {
  color: var(--color-primary);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}
.consent-link:hover { text-decoration: underline; }
.consent-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  .consent-banner { transition: none; }
}

@media (max-width: 620px) {
  .consent-inner { flex-direction: column; align-items: stretch; gap: 14px; }
  .consent-actions { justify-content: stretch; }
  .consent-actions .btn { flex: 1; }
}

/* ---- Final CTA band ----------------------------------------------------- */
/* Uses the standard .section padding so the vertical rhythm matches the
   sections above it — no special-casing. */
.final-cta {
  background: var(--gradient-brand);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 52px 40px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.final-cta h2 { max-width: 680px; margin-inline: auto; }
.final-cta h2 { font-size: 28px; font-weight: var(--weight-bold); }
.final-cta > p {
  max-width: 520px;
  margin: 10px auto 0;
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.92);
}
.final-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}
.final-cta-note {
  margin-top: 18px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
}

/* ---- Document pages (privacy, etc.) ------------------------------------- */
.doc-head { margin-bottom: 30px; }
.doc-head h1 {
  font-size: 32px;
  font-weight: var(--weight-bold);
  line-height: 1.15;
}
.doc-meta {
  margin-top: 8px;
  font-size: var(--text-body);
  color: var(--color-text-muted);
}

.doc {
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 34px;
}
.doc-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  font-weight: var(--weight-medium);
  padding: 16px 18px;
  background: var(--surface-tint);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  margin-bottom: 30px;
}
.doc h2 {
  font-size: 21px;
  font-weight: var(--weight-bold);
  margin-top: 34px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-default);
}
.doc h2:first-of-type { margin-top: 0; }
.doc h3 {
  font-size: 15.5px;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin-top: 22px;
  margin-bottom: 8px;
}
.doc p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}
.doc p + p { margin-top: 12px; }
.doc strong { color: var(--color-text); font-weight: var(--weight-semibold); }
.doc a { color: var(--color-primary); font-weight: var(--weight-medium); }
.doc a:hover { text-decoration: underline; }
.doc code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--surface-code);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
}
.doc-list {
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.doc-list li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}
.doc-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-circle);
  background: var(--color-primary);
}
.doc-note {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--border-default);
  font-size: var(--text-body);
  color: var(--color-text-muted);
}
.doc-back {
  margin-top: 26px;
  text-align: center;
  font-size: 14px;
}
.doc-back a { color: var(--color-primary); font-weight: var(--weight-semibold); }
.doc-back a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .doc { padding: 22px; }
  .doc-head h1 { font-size: 26px; }
}

/* ---- Footer email ------------------------------------------------------- */
.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: var(--weight-semibold);
  font-size: 14px;
  transition: opacity 0.2s ease;
}
.footer-email:hover { opacity: 0.8; text-decoration: underline; }

/* "Cookie settings" — a button, but reads as one of the footer links */
.footer-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: var(--weight-semibold);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: color 0.2s ease;
}
.footer-link-btn:hover { color: #fff; text-decoration: underline; }
.footer-link-btn[hidden] { display: none; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--color-text);
  color: #fff;
  padding: 30px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-inner .brand-mark,
.footer-inner .brand-name { color: #fff; }
.footer-inner .brand-name { margin-left: 8px; font-weight: var(--weight-bold); }
.site-footer .muted { color: rgba(255, 255, 255, 0.6); font-size: 13px; }

/* ---- Responsive --------------------------------------------------------- */
/* The detail pane is narrower than the viewport (sidebar takes 300px), so the
   comparison stacks earlier than other content. */
@media (max-width: 1040px) {
  .ps-compare { grid-template-columns: 1fr; }
  .ps-arrow span { transform: rotate(90deg); }
}

@media (max-width: 860px) {
  .workspace { grid-template-columns: 1fr; }
  .project-list {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .project-item { flex: 1 1 240px; }
  .about-card { grid-template-columns: 1fr; gap: 24px; }
  /* Avatar and name sit side by side; the button drops onto its own row
     instead of being squeezed in next to them. */
  .about-intro { flex-direction: row; align-items: center; gap: 18px; flex-wrap: wrap; }
  .about-intro .about-actions { flex: 1 1 100%; margin-top: 0; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero-actions .btn-lg { padding: 13px 24px; font-size: 15px; }
  .detail-hero { flex-direction: column; padding: 24px; }
  .detail-hero h2 { font-size: 24px; }
  .detail-body { padding: 22px; }
  .highlight-strip { padding: 18px 22px; }
  .detail-pitch { padding: 20px 20px 20px 50px; }
  .detail-pitch p { font-size: 17px; }
  /* Tabs scroll horizontally instead of wrapping into several rows */
  .tab-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab-btn { padding: 9px 12px 11px; font-size: 13.5px; }
  .trust-strip { gap: 8px 18px; }
  .trust-strip li { font-size: 12.5px; }
  .about-card { padding: 24px; }
  .about-actions .btn-lg { width: 100%; }
  .final-cta { padding: 34px 22px; }
  .final-cta h2 { font-size: 23px; }
  .final-cta-actions .btn-lg { width: 100%; }

}
