/* Marketing landing (logged-out home) — complements site-legal.css tokens */

#login-screen {
  max-width: none;
  width: 100%;
  overflow-x: hidden;
}

.marketing-main {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.marketing-shell {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--page-inline) 32px;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .marketing-shell {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0));
  }
}

.marketing-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 8px;
  flex-wrap: wrap;
}

.marketing-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.marketing-theme-toggle {
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.marketing-theme-toggle:hover,
.marketing-theme-toggle:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.marketing-brand {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  text-decoration: none;
}

.marketing-brand:hover,
.marketing-brand:focus-visible {
  text-decoration: underline;
  outline: none;
}

.marketing-top-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s;
}

.marketing-top-link:hover,
.marketing-top-link:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  left: 8px;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.marketing-hero {
  padding: 28px 0 28px;
  text-align: center;
}

.marketing-hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 12px;
  max-width: 20ch;
  margin-left: auto;
  margin-right: auto;
}

.marketing-subhead {
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--text);
  max-width: 38rem;
  margin: 0 auto 12px;
  font-weight: 500;
}

.marketing-subhead strong {
  color: var(--accent);
  font-weight: 700;
}

.marketing-lead {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto 20px;
}

.marketing-hero-preview {
  margin: 0 auto 24px;
  max-width: min(100%, 720px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  display: flex;
  justify-content: center;
  align-items: center;
}

.marketing-hero-preview-img {
  display: block;
  max-width: 50%;
  width: auto;
  height: auto;
  margin: 0 auto;
  vertical-align: middle;
}

.marketing-hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 4px;
  font-size: 14px;
  margin: 0 auto 18px;
  max-width: 36rem;
}

.marketing-hero-links-sep {
  color: var(--muted);
  padding: 0 2px;
}

.marketing-privacy-badge {
  font-size: 12px;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 auto;
  line-height: 1.45;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(60, 75, 210, 0.15);
}

html[data-theme="dark"] .marketing-privacy-badge {
  border-color: rgba(120, 134, 255, 0.25);
}

.marketing-app-store-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 4px auto 16px;
}

.marketing-app-store-badge {
  display: inline-flex;
  border-radius: 8px;
  transition: opacity 0.15s;
}

.marketing-app-store-badge:hover {
  opacity: 0.85;
}

.marketing-section-title {
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
  text-align: center;
}

.marketing-section-title-left {
  text-align: left;
}

.marketing-section-intro {
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 28px;
  line-height: 1.5;
}

.marketing-features {
  padding: 12px 0 40px;
}

.feature-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 560px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 20px 22px;
  border: 1px solid var(--border);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.feature-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 12px;
  font-weight: 700;
}

/* How it works — visual row */
.marketing-steps-visual {
  padding: 8px 0 28px;
}

.marketing-steps-row {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
  padding: 0;
}

@media (min-width: 640px) {
  .marketing-steps-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

.marketing-step-card {
  text-align: center;
  padding: 20px 16px 22px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
}

.marketing-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: var(--accent-soft);
  font-size: 1.35rem;
  line-height: 1;
}

.marketing-step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.marketing-step-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

/* Interactive demo — mirrors app ledger chrome */
.marketing-demo {
  padding: 8px 0 36px;
}

.marketing-demo-app {
  max-width: 440px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--header-bg);
}

.marketing-demo-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  padding: 0 6px;
  border-bottom: 1px solid var(--header-border);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.marketing-demo-tab {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 10px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.marketing-demo-tab.is-active {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 0 var(--accent);
}

.marketing-demo-banner {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--banner-text, #fff);
  padding: 10px var(--page-inline);
  letter-spacing: 0.01em;
}

.marketing-demo-banner--ledger {
  background: linear-gradient(
    135deg,
    var(--primary, #5b6af0) 0%,
    var(--primary-container, #5766ec) 100%
  );
  text-align: left;
}

html[data-theme="dark"] .marketing-demo-banner--ledger {
  color: var(--banner-text, #00139f);
}

.marketing-demo-shell {
  padding: 16px 18px 18px;
  background: var(--bg);
}

.marketing-demo-card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 14px;
}

.marketing-demo-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.marketing-demo-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px 12px;
  align-items: center;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-container-low, var(--surface-tonal));
  border: 1px solid var(--border);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.marketing-demo-row-new {
  opacity: 0;
  transform: translateY(8px);
}

.marketing-demo-row-visible {
  opacity: 1;
  transform: translateY(0);
}

.marketing-demo-cat {
  color: var(--text);
  font-weight: 600;
  text-align: left;
}

.marketing-demo-amt {
  font-weight: 700;
  color: var(--accent);
  text-align: right;
}

.marketing-demo-who {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.marketing-demo-add {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
}

/* Widget grid (recurring, data, get started, trust) */
.marketing-widgets {
  padding: 8px 0 28px;
}

.marketing-widget-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 560px) {
  .marketing-widget-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .marketing-widget-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.marketing-widget-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px 20px 22px;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.marketing-widget-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.marketing-widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.marketing-widget-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

.marketing-widget-sub {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin: 12px 0 0;
}

.marketing-widget-trust-list {
  margin: 0;
  padding: 0 0 0 1.1em;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.marketing-widget-trust-list li {
  margin-bottom: 6px;
}

.marketing-widget-trust-list li:last-child {
  margin-bottom: 0;
}

/* FAQ */
.marketing-faq {
  padding: 8px 0 24px;
}

.marketing-faq-list {
  max-width: 40rem;
  margin: 0 auto;
}

.marketing-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  padding: 0 12px;
  background: var(--surface);
}

.marketing-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 4px;
  color: var(--text);
  list-style: none;
}

.marketing-faq-item summary::-webkit-details-marker {
  display: none;
}

.marketing-faq-item summary::after {
  content: '+';
  float: right;
  color: var(--muted);
  font-weight: 700;
}

.marketing-faq-item[open] summary::after {
  content: '−';
}

.marketing-faq-item p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 4px 14px;
  padding-top: 4px;
}

.marketing-consent-row {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto 14px;
  text-align: left;
}

.marketing-consent-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}

.marketing-consent-label input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}

.marketing-consent-label a {
  color: var(--accent);
  font-weight: 600;
}

/* Mobile sticky CTA */
.marketing-sticky-cta {
  display: none;
  position: fixed;
  z-index: 260;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px var(--page-inline) calc(10px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(
    180deg,
    rgba(248, 249, 253, 0) 0%,
    var(--bg) 28%
  );
  background-color: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(26, 29, 46, 0.08);
  justify-content: center;
  align-items: center;
}

html[data-theme="dark"] .marketing-sticky-cta {
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

@media (max-width: 767px) {
  .marketing-sticky-cta {
    display: flex;
  }
}

.marketing-sticky-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  min-height: 52px;
  padding: 14px 20px;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  text-decoration: none;
  background: var(--primary);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(60, 75, 210, 0.35);
  transition: transform 0.15s, opacity 0.15s;
}

.marketing-sticky-btn:active {
  transform: scale(0.98);
}

#legal-consent-modal.modal-backdrop {
  z-index: 400;
}

.legal-consent-intro {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 16px;
}
