:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #f1f4fb;
  --text: #10131a;
  --muted: #5f6780;
  --border: #e1e7f3;
  --brand: #5f46ff;
  --brand-2: #825bff;
}

[data-theme="dark"] {
  --bg: #0b0e15;
  --surface: #12182a;
  --surface-2: #1a2238;
  --text: #eef2ff;
  --muted: #a3b0d0;
  --border: #2a3552;
  --brand: #8e7bff;
  --brand-2: #5f46ff;
}

* { box-sizing: border-box; }
html {
  scroll-padding-top: 92px;
}
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: radial-gradient(circle at 0% -20%, rgba(95, 70, 255, .2), transparent 40%), var(--bg);
  color: var(--text);
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.nav {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.nav-inner { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Ecommerce-style brand lockup */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.brand-logo:hover {
  opacity: 0.92;
}
.brand-logo:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
  border-radius: 8px;
}
.brand-logo__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 22%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border));
  color: var(--brand);
}
.brand-logo__mark svg {
  display: block;
  width: 26px;
  height: 26px;
}
.brand-logo__type {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.05;
}
.brand-logo__wordmark {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.04em;
  color: var(--text);
}
.brand-logo__wordmark span:last-child {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.brand-logo__tagline {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.links { display: flex; gap: 16px; color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }

/* Header cart (always visible — not buried under Mac / Safari chrome) */
.cart-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 14px;
  position: relative;
}
.cart-nav__icon {
  display: flex;
  color: var(--text);
}
.cart-nav__icon svg {
  display: block;
}
.cart-nav__text {
  color: var(--text);
}
.cart-nav__count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}
.cart-nav[data-count="0"] .cart-nav__count {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.cart-nav[aria-current="page"] {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}
.cart-nav--pop {
  animation: cart-nav-pop 0.45s ease;
}
@keyframes cart-nav-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
@media (max-width: 520px) {
  .cart-nav__text {
    display: none;
  }
  .cart-nav {
    padding: 8px 10px;
  }
}
.btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 12px; padding: 9px 13px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn-primary { border: 0; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }

.hero { padding: 46px 0 16px; }
.hero-box { border: 1px solid var(--border); border-radius: 20px; background: var(--surface); padding: 28px; }
h1 { margin: 0; font-size: 44px; line-height: 1.05; letter-spacing: -.03em; }
h2 { margin: 0 0 12px; letter-spacing: -.02em; }
h3 { margin: 10px 0 8px; letter-spacing: -.02em; }
p { color: var(--muted); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.section { padding: 18px 0; }
.section[id] {
  scroll-margin-top: 92px;
}
.grid { display: grid; gap: 12px; }
.grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-1 { grid-template-columns: 1fr; }

.card, .cat {
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 14px;
}
.cat-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.cat-link .cat {
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.cat-link:hover .cat {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 38%, var(--border));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 14%, transparent);
}
.chip {
  display: inline-block; font-size: 11px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2); color: var(--muted); padding: 4px 8px;
}
.chip .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  vertical-align: -2px;
}
.icon-notion {
  background: #111;
  color: #fff;
  border: 1px solid #111;
}
[data-theme="dark"] .icon-notion {
  background: #fff;
  color: #111;
  border-color: #fff;
}
.icon-ai {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #d8b4fe;
}
.icon-creator {
  background: #fce7f3;
  color: #9d174d;
  border: 1px solid #f9a8d4;
}
.icon-business {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fdba74;
}
.icon-wellness {
  background: #dcfce7;
  color: #065f46;
  border: 1px solid #86efac;
}
.chip.ai-workflow {
  background: color-mix(in srgb, #7c3aed 16%, var(--surface));
  border-color: color-mix(in srgb, #7c3aed 36%, var(--border));
  color: color-mix(in srgb, #4c1d95 82%, var(--text));
}
.chip.notion-ai {
  background: color-mix(in srgb, #2563eb 16%, var(--surface));
  border-color: color-mix(in srgb, #2563eb 36%, var(--border));
  color: color-mix(in srgb, #1e40af 82%, var(--text));
}
.chip.creator-automation {
  background: color-mix(in srgb, #db2777 14%, var(--surface));
  border-color: color-mix(in srgb, #db2777 36%, var(--border));
  color: color-mix(in srgb, #9d174d 82%, var(--text));
}
.chip.business-ops {
  background: color-mix(in srgb, #d97706 14%, var(--surface));
  border-color: color-mix(in srgb, #d97706 36%, var(--border));
  color: color-mix(in srgb, #92400e 82%, var(--text));
}
.chip.wellness-productivity {
  background: color-mix(in srgb, #059669 14%, var(--surface));
  border-color: color-mix(in srgb, #059669 36%, var(--border));
  color: color-mix(in srgb, #065f46 82%, var(--text));
}
.category-block {
  margin-bottom: 16px;
  scroll-margin-top: 92px;
}
.category-title {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -.02em;
}
.category-sub {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}
.price { font-weight: 800; margin-top: 8px; font-size: 20px; }
.meta { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; margin-top: 6px; }
.short { margin: 0 0 8px; color: var(--text); font-weight: 600; }
.cta-row { display: flex; gap: 8px; margin-top: 10px; }
.cta-row--wrap { flex-wrap: wrap; align-items: center; }

.btn-add-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid color-mix(in srgb, var(--brand) 45%, var(--border));
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  color: var(--text);
  transition:
    transform 0.15s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.btn-add-cart:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 65%, var(--border));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 18%, transparent);
}
.btn-add-cart:active {
  transform: translateY(0);
}
.btn-add-cart__hint {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  opacity: 0.9;
}
.btn-add-cart--secondary {
  background: var(--surface);
  border-style: dashed;
}
.btn-add-cart--pulse {
  animation: cart-btn-pop 0.45s ease;
}
.btn-add-cart--success {
  border-color: #16a34a !important;
  background: color-mix(in srgb, #16a34a 12%, var(--surface)) !important;
}
.btn-add-cart--success .btn-add-cart__label::after {
  content: " ✓";
  font-weight: 800;
}
@keyframes cart-btn-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

.cart-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(20px, calc(16px + env(safe-area-inset-bottom, 0px)));
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: none;
  box-shadow:
    0 4px 14px color-mix(in srgb, var(--brand) 40%, transparent),
    0 0 0 1px color-mix(in srgb, #fff 22%, transparent) inset;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cart-fab:hover {
  transform: scale(1.06);
  box-shadow:
    0 8px 24px color-mix(in srgb, var(--brand) 45%, transparent),
    0 0 0 1px color-mix(in srgb, #fff 28%, transparent) inset;
  color: #fff;
}
.cart-fab:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.cart-fab__svg {
  display: block;
}
.cart-fab__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.cart-fab--pop {
  animation: cart-fab-bounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cart-fab-bounce {
  0% {
    transform: scale(1) rotate(0deg);
  }
  30% {
    transform: scale(1.12) rotate(-6deg);
  }
  55% {
    transform: scale(1.08) rotate(4deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}
[data-theme="dark"] .cart-fab__badge {
  background: #f87171;
  color: #1a1025;
}
.cart-fab[data-count="0"] .cart-fab__badge {
  background: color-mix(in srgb, var(--muted) 85%, var(--surface));
  color: var(--surface);
  font-weight: 700;
}

.btn-ghost {
  background: transparent;
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  color: var(--muted);
  font-size: 13px;
}
.btn-tiny {
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 8px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.cart-table th,
.cart-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.cart-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 700;
}
.cart-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.cart-title {
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}
.cart-price {
  font-weight: 700;
  white-space: nowrap;
}
.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cart-footer {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.cart-subtotal-line {
  font-size: 18px;
  color: var(--text);
}
.cart-note {
  font-size: 13px;
  margin: 10px 0 14px;
}
.cart-checkout-btn {
  padding: 12px 22px;
  font-size: 16px;
}
.cart-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, #059669 18%, var(--surface));
  border: 1px solid color-mix(in srgb, #059669 40%, var(--border));
  color: var(--text);
  font-size: 14px;
}

.cart-toast {
  position: fixed;
  bottom: max(96px, calc(88px + env(safe-area-inset-bottom, 0px)));
  right: max(16px, env(safe-area-inset-right, 0px));
  z-index: 2147483647;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--text) 25%, transparent);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cart-toast--show {
  opacity: 1;
  transform: translateY(0);
}
[data-theme="dark"] .cart-toast {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.bundle {
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 16px;
}
.bundle .save { color: #1da67a; font-weight: 700; }

.product-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
}
.product-main, .buy-box {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 16px;
}
.buy-box {
  position: sticky;
  top: 88px;
  height: fit-content;
}
.proof-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.proof-item {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 10px;
  font-size: 13px;
  color: var(--muted);
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
  background: var(--surface-2);
}
.strike {
  text-decoration: line-through;
  color: var(--muted);
}
.buy-price {
  font-size: 30px;
  font-weight: 800;
  margin: 8px 0;
}
.buy-box-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.buy-box-cta .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}
.buy-box-cta .btn-ghost {
  display: block;
}
.buy-box-bundle-note {
  margin-top: 10px;
  font-size: 13px;
}

.foot { margin-top: 28px; border-top: 1px solid var(--border); padding: 20px 0 30px; color: var(--muted); font-size: 13px; }

@media (max-width: 1020px) {
  .brand-logo__tagline { display: none; }
  .brand-logo__wordmark { font-size: 1.05rem; }
  .brand-logo__mark { width: 38px; height: 38px; }
  .links { display: none; }
  .grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .product-layout { grid-template-columns: 1fr; }
  .proof-row { grid-template-columns: 1fr; }
  h1 { font-size: 34px; }
}
