/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font: 600 15px/1 var(--font-sans);
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--motion-quick) var(--ease-out), box-shadow var(--motion-quick) var(--ease-out), background var(--motion-quick) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-matte-card);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-floating); }
.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border);
}
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-ghost {
  background: transparent;
  color: var(--color-accent);
  padding: 10px 4px;
}
.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn-primary:hover { transform: none; }
}

/* ============ Header / nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: 14px var(--space-lg);
  max-width: var(--content-width);
  margin: 0 auto;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 22px/1 var(--font-sans);
  letter-spacing: -1px;
  color: var(--color-text-primary);
}
.wordmark img { width: 28px; height: 28px; border-radius: 8px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}
.site-nav__links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  margin: 0; padding: 0;
}
.site-nav__links a {
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  padding-bottom: 4px;
}
.site-nav__links a:hover { color: var(--color-text-primary); text-decoration: none; }
.site-nav__links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transition: right var(--motion-quick) var(--ease-out);
}
.site-nav__links a:hover::after,
.site-nav__links a[aria-current="page"]::after { right: 0; }
.site-nav__links a[aria-current="page"] { color: var(--color-text-primary); }
/* Higher specificity than `.site-nav__links a` above, which would
   otherwise win and silently turn the CTA button's text gray-on-teal
   (a real contrast failure caught by an axe-core scan during
   verification — not a hypothetical). */
.site-nav__links .btn-primary,
.site-nav__links .btn-primary:hover {
  color: #fff;
  text-decoration: none;
}
.site-nav__links .btn-primary::after { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block;
  width: 20px; height: 2px;
  background: var(--color-text-primary);
  position: relative;
  transition: transform var(--motion-quick) var(--ease-out), opacity var(--motion-quick) var(--ease-out);
}
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.site-header[data-nav-open="true"] .nav-toggle span { background: transparent; }
.site-header[data-nav-open="true"] .nav-toggle span::before { transform: rotate(45deg) translate(4px, 4px); }
.site-header[data-nav-open="true"] .nav-toggle span::after { transform: rotate(-45deg) translate(4px, -4px); }

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav { position: static; }
  .site-nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) var(--space-lg) var(--space-lg);
    gap: var(--space-md);
    display: none;
  }
  .site-header[data-nav-open="true"] .site-nav__links { display: flex; }
  .site-nav__cta { display: none; }
  .site-header[data-nav-open="true"] .site-nav__cta { display: inline-flex; margin-top: var(--space-sm); }
}

.noscript-nav {
  background: var(--color-surface-raised);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) var(--space-lg);
  text-align: center;
  font-size: 14px;
}
.noscript-nav a { margin: 0 var(--space-sm); }

/* ============ Footer ============ */
.site-footer {
  background: var(--color-surface-raised);
  border-top: 1px solid var(--color-border);
  padding: var(--space-xxl) 0 var(--space-xl);
  margin-top: var(--space-section);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--space-xl);
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.site-footer__brand p { max-width: 32ch; margin-top: var(--space-sm); font-size: 14px; }
.site-footer__col-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-secondary); margin-bottom: var(--space-md); font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-sm); }
.site-footer a { color: var(--color-text-secondary); font-size: 14px; }
.site-footer a:hover { color: var(--color-accent); }
.site-footer__bottom {
  max-width: var(--content-width);
  margin: var(--space-xl) auto 0;
  padding: var(--space-lg) var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-secondary);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
@media (max-width: 720px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ============ Cards / sections ============ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  box-shadow: var(--shadow-matte-card);
}
.section-head {
  max-width: 640px;
  margin-bottom: var(--space-xl);
}
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { display: block; margin-bottom: var(--space-sm); }
.section-head p { margin-top: var(--space-sm); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font: 600 13px/1.4 var(--font-sans);
  background: var(--gradient-badge);
  color: var(--color-accent);
}

/* ============ Grid helpers ============ */
.grid {
  display: grid;
  gap: var(--space-lg);
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ============ Screen illustration component ============ */
.device-frame {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-floating);
  overflow: hidden;
  width: 100%;
  max-width: 320px;
  position: relative;
}
/* Real app screenshots (not CSS-built illustrations) share the same
   frame treatment for visual consistency across the two. */
.device-frame img {
  display: block;
  width: 100%;
  height: auto;
}
.device-frame--screenshot {
  max-width: 280px;
}
.screen {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-md) var(--space-md);
}
.screen--compact { padding: var(--space-lg) var(--space-md); gap: var(--space-lg); }

.screen__status-bar {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-secondary);
  letter-spacing: 0.04em;
}

.screen__hero-card {
  background: var(--gradient-hero);
  border-radius: var(--radius-control);
  padding: var(--space-lg) var(--space-md);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.screen__hero-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero-sheen);
  pointer-events: none;
}
.screen__hero-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
  font-weight: 800;
}
.screen__hero-amount {
  font: 700 34px/1.05 var(--font-sans);
  letter-spacing: -0.5px;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.screen__section-label {
  font: 700 11px/1 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.screen__list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.screen__list-row:last-child { border-bottom: none; }
.screen__list-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--gradient-badge);
  color: var(--color-accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}
.screen__list-label { flex: 1; font-size: 13px; color: var(--color-text-primary); font-weight: 500; }
.screen__list-sub { font-size: 11px; color: var(--color-text-secondary); }
.screen__list-amount { font: 600 13px/1 var(--font-sans); font-variant-numeric: tabular-nums; }
.screen__list-amount--negative { color: var(--color-text-primary); }
.screen__list-amount--positive { color: var(--color-success); }

.screen__pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font: 600 13px/1 var(--font-sans);
  background: var(--color-accent);
  color: #fff;
  align-self: flex-start;
}

.screen__nav-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px var(--space-sm);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}
.screen__nav-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-text-tertiary);
  opacity: 0.4;
}
.screen__nav-dot--active { background: var(--color-accent); opacity: 1; }
.screen__nav-add {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-top: -18px;
  box-shadow: var(--shadow-matte-card);
}

/* Wraps an annotated screenshot: unlike .device-frame (which clips its
   own content to rounded corners via overflow:hidden), this wrapper has
   no overflow clipping, so absolutely-positioned .callout bubbles placed
   inside it can extend past the frame's edge without being cut off. */
.screenshot-annotated {
  position: relative;
  max-width: 280px;
  margin: 0 auto;
}

/* Callouts — First-Aha annotation bubbles only */
.callout {
  position: absolute;
  background: var(--color-text-primary);
  color: var(--color-bg);
  font: 600 12px/1.4 var(--font-sans);
  padding: 8px 12px;
  border-radius: var(--radius-control);
  max-width: 160px;
  box-shadow: var(--shadow-floating);
  z-index: 2;
}
.callout__connector {
  position: absolute;
  width: 2px;
  background: var(--color-text-primary);
  opacity: 0.4;
}

/* Below this width the callouts' outward offset (translateX ±100%) would
   push them past the viewport edge and cause horizontal scroll — found
   via an automated overflow check during verification, not hypothetical.
   The adjacent body copy already explains the same flow in text, so
   hiding the floating annotations here is a progressive enhancement,
   not an information loss. */
@media (max-width: 700px) {
  .callout { display: none; }
}

/* ============ FAQ accordion (native details/summary) ============ */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0;
}
.faq-item summary {
  cursor: pointer;
  font: 600 16px/1.4 var(--font-sans);
  color: var(--color-text-primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--color-accent);
  transition: transform var(--motion-quick) var(--ease-out);
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: var(--space-sm); padding-right: var(--space-xl); }

@media (prefers-reduced-motion: reduce) {
  .faq-item summary::after { transition: none; }
}

/* ============ Illustration story blocks ============ */
.story-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xxl);
  align-items: center;
  padding: var(--space-xl) 0;
}
.story-block--reverse .story-block__media { order: 2; }
.story-block__media { display: flex; justify-content: center; }
@media (max-width: 800px) {
  .story-block, .story-block--reverse { grid-template-columns: 1fr; }
  .story-block--reverse .story-block__media { order: 0; }
}

/* ============ Pricing table ============ */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.pricing-table th, .pricing-table td {
  text-align: left;
  padding: 14px var(--space-md);
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}
.pricing-table th { color: var(--color-text-secondary); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.04em; }
.pricing-table tr:last-child td { border-bottom: none; }
.pricing-table td.yes { color: var(--color-success); font-weight: 600; }
.pricing-table td.no { color: var(--color-text-secondary); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.plan-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.plan-card--featured {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-floating);
  position: relative;
}
.plan-card__price { font: 700 36px/1 var(--font-sans); letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.plan-card__period { font-size: 14px; color: var(--color-text-secondary); }
.plan-card ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.plan-card li::before { content: '✓'; color: var(--color-success); margin-right: 8px; font-weight: 700; }
