/* ============================================================
   ATTIO — LANDING PATTERNS
   Hero, stats, features, how-it-works, integrations, CTA, footer.
   Uses only DS tokens — no invented colors.
   ============================================================ */

.landing {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-8) var(--space-24);
  background: var(--color-page-bg);
}

/* ---------- Floating topbar (reuses .topbar) ---------- */
.landing-header {
  position: sticky;
  top: var(--space-4);
  z-index: 10;
  margin-bottom: var(--space-16);
}
.landing-header .topbar {
  width: 100%;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--color-stroke-default);
}
[data-theme="dark"] .landing-header .topbar {
  background: rgba(35, 37, 41, 0.88);
  border-color: rgba(80, 89, 103, 0.6);
}

/* ---------- HERO ---------- */
.hero {
  padding: var(--space-16) 0 var(--space-16);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  position: relative;
}

/* Soft airy wash behind the hero — Attio uses these very subtle gradients */
.hero::before {
  content: '';
  position: absolute;
  inset: -10% 0 auto 0;
  height: 480px;
  background:
    radial-gradient(ellipse 50% 50% at 50% 20%, rgba(148, 185, 255, 0.28), transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 30%, rgba(200, 220, 255, 0.22), transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 40%, rgba(232, 240, 255, 0.35), transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(40px);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-sm);
  color: var(--color-text-secondary);
  box-shadow: var(--shadow-layer-2);
}
.hero-eyebrow .pill {
  display: inline-flex;
  align-items: center; gap: 4px;
  padding: 2px 7px;
  background: var(--blue-100);
  color: var(--blue-600);
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 3px rgba(15, 194, 123, 0.18);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--color-text-primary);
  font-weight: var(--fw-semibold);
  margin: var(--space-2) 0 0;
  max-width: 920px;
  text-wrap: balance;
}
.hero h1 .accent,
.hero h1 .underline,
.hero h1 em {
  color: var(--color-text-tertiary);
  font-style: normal;
  font-family: inherit;
  font-weight: inherit;
  background: none;
  padding: 0;
}
.hero-sub {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--color-text-tertiary);
  max-width: 640px;
  margin: 0 auto;
  text-wrap: pretty;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-sm);
}
.hero-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
  align-items: center;
}

/* Trust strip */
.hero-trust {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-stroke-subtle);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}
.hero-trust-label {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--color-text-muted);
  font-weight: var(--fw-semibold);
}
.client-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-10);
  align-items: center;
}
.client-logo {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 17px;
  color: var(--color-text-subtle);
  letter-spacing: var(--ls-md);
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--dur-fast), opacity var(--dur-fast);
}
.client-logo:hover { color: var(--color-text-secondary); opacity: 1; }
.client-logo .glyph {
  width: 18px; height: 18px;
  border-radius: 5px;
  background: currentColor;
  opacity: 0.5;
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  margin: var(--space-16) 0;
  box-shadow: var(--shadow-card);
}
.stat {
  padding: var(--space-8) var(--space-6);
  border-right: 1px solid var(--color-stroke-subtle);
}
.stat:last-child { border-right: 0; }
.stat-value {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-lg);
  color: var(--color-text-primary);
  line-height: 1;
}
.stat-value .unit { font-size: 24px; color: var(--color-text-tertiary); margin-left: 2px; font-weight: var(--fw-medium); }
.stat-label {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  line-height: 1.5;
  font-weight: var(--fw-medium);
}
.stat-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* ---------- Section head block ---------- */
.sec-head {
  text-align: center;
  margin-bottom: var(--space-12);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-3);
}
.sec-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--color-accent);
  font-weight: var(--fw-semibold);
  padding: 4px 10px;
  background: var(--blue-100);
  border-radius: var(--radius-pill);
  border: 1px solid var(--blue-200);
}
.sec-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  font-weight: var(--fw-semibold);
  margin: 0;
  max-width: 720px;
  text-wrap: balance;
}
.sec-sub {
  font-size: var(--text-base);
  color: var(--color-text-tertiary);
  max-width: 600px;
  line-height: 1.6;
  margin: 0;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-sm);
}

/* ---------- Feature grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.feature {
  background: var(--color-surface);
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  display: flex; flex-direction: column;
  min-height: 360px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-layer-1);
  transition: box-shadow var(--dur-base), border-color var(--dur-base), transform var(--dur-base);
}
.feature:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--color-stroke-strong);
}
.feature-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  font-weight: var(--fw-semibold);
  display: inline-flex; align-items: center; gap: var(--space-2);
}
.feature-eyebrow .ix {
  width: 22px; height: 22px;
  border-radius: var(--radius-sm);
  background: var(--blue-100);
  color: var(--blue-600);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  border: 1px solid var(--blue-200);
}
.feature-title {
  font-family: var(--font-display);
  color: var(--color-text-primary);
  font-size: 26px;
  line-height: 1.15;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-md);
  margin: 0 0 var(--space-3);
  max-width: 380px;
}
.feature-body {
  color: var(--color-text-tertiary);
  font-size: var(--text-base);
  line-height: 1.55;
  margin: 0;
  max-width: 420px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-sm);
}
.feature-visual {
  margin-top: auto;
  padding-top: var(--space-6);
}

/* ---------- Mini viz: record list ---------- */
.score-list {
  display: flex; flex-direction: column;
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.score-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-stroke-subtle);
  align-items: center;
  font-size: var(--text-sm);
  background: var(--color-surface);
}
.score-row:last-child { border-bottom: 0; }
.score-row .h { color: var(--color-text-primary); display: flex; align-items: center; gap: 8px; font-weight: var(--fw-semibold); letter-spacing: var(--ls-sm); }
.score-row .h-glyph {
  width: 24px; height: 24px;
  background: var(--blue-100);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-md);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--blue-600);
  font-weight: var(--fw-semibold);
  flex-shrink: 0;
}
.score-bar {
  width: 80px;
  height: 4px;
  background: var(--color-stroke-subtle);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.score-bar span {
  display: block;
  height: 100%;
  background: var(--green-500);
  border-radius: 2px;
}
.score-bar.mid span { background: var(--yellow-500); }
.score-bar.low span { background: var(--color-text-subtle); }
.score-val {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  min-width: 32px;
  text-align: right;
  font-weight: var(--fw-medium);
}

/* Persona stack */
.persona-stack {
  display: flex; flex-direction: column; gap: var(--space-2);
}
.persona {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius-lg);
  align-items: center;
  box-shadow: var(--shadow-layer-1);
}
.persona-avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  background: var(--blue-100);
  border: 1px solid var(--blue-200);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--blue-600);
  font-weight: var(--fw-semibold);
}
.persona-name { color: var(--color-text-primary); font-size: var(--text-sm); font-weight: var(--fw-semibold); letter-spacing: var(--ls-sm); }
.persona-role { color: var(--color-text-muted); font-size: var(--text-xs); margin-top: 1px; font-weight: var(--fw-medium); }

/* Message preview */
.msg-preview {
  background: var(--color-surface);
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  line-height: 1.55;
  font-weight: var(--fw-medium);
  box-shadow: var(--shadow-layer-1);
}
.msg-preview .hl {
  background: var(--blue-100);
  color: var(--blue-600);
  padding: 0 4px;
  border-radius: 3px;
  font-weight: var(--fw-semibold);
}
.msg-preview .hl.g {
  background: #d7f4e5;
  color: var(--green-600);
}
.msg-header {
  display: flex; justify-content: space-between;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-stroke-subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Agent loop */
.agent-loop {
  display: flex; flex-direction: column; gap: var(--space-2);
}
.loop-step {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius-lg);
  align-items: center;
  font-size: var(--text-sm);
  box-shadow: var(--shadow-layer-1);
}
.loop-step .idx {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--blue-600);
  background: var(--blue-100);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-md);
}
.loop-step .name { color: var(--color-text-primary); font-weight: var(--fw-semibold); letter-spacing: var(--ls-sm); }

/* ---------- How it works ---------- */
.how {
  background: var(--color-surface);
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-10);
  box-shadow: var(--shadow-card);
}
.how-steps {
  display: flex; flex-direction: column;
  gap: var(--space-1);
}
.how-step {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--dur-fast) var(--ease-out);
}
.how-step .label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.how-step .title {
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-sm);
  font-family: var(--font-display);
}
.how-step .desc {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
  line-height: 1.55;
  display: none;
  font-weight: var(--fw-medium);
}
.how-step.active {
  background: var(--blue-100);
  border-color: var(--blue-200);
}
.how-step.active .label { color: var(--blue-600); }
.how-step.active .title { color: var(--blue-600); }
.how-step.active .desc { display: block; color: var(--color-text-tertiary); }

.how-visual {
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  min-height: 420px;
  position: relative;
  overflow: hidden;
}

/* Dashboard mock */
.dash-mock .dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 var(--space-4);
  border-bottom: 1px solid var(--color-stroke-subtle);
  margin-bottom: var(--space-3);
}
.dash-mock .dash-title {
  font-family: var(--font-display);
  color: var(--color-text-primary);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-sm);
  display: flex; align-items: center; gap: var(--space-2);
}
.dash-mock .dash-actions { display: flex; gap: var(--space-2); }
.dash-mock .data-table { border: none; background: transparent; border-radius: 0; box-shadow: none; }
.dash-mock .data-table thead th { background: transparent; font-size: 11px; }
.dash-mock .data-table tbody td { padding: 10px var(--space-3); font-size: var(--text-xs); }

/* ---------- Integrations grid ---------- */
.sources {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.source {
  background: var(--color-surface);
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex; align-items: center; gap: var(--space-3);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  box-shadow: var(--shadow-layer-1);
}
.source:hover { border-color: var(--color-stroke-strong); box-shadow: var(--shadow-card); }
.source-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: var(--blue-100);
  border: 1px solid var(--blue-200);
  display: grid; place-items: center;
  color: var(--blue-600);
  flex-shrink: 0;
}
.source-name { color: var(--color-text-primary); font-size: var(--text-sm); font-weight: var(--fw-semibold); letter-spacing: var(--ls-sm); }
.source-desc { color: var(--color-text-muted); font-size: 11px; font-family: var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 2px; }

/* ---------- Before / After ---------- */
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.ba-card {
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  border: 1px solid var(--color-stroke-default);
  box-shadow: var(--shadow-layer-1);
}
.ba-card.before {
  background: var(--color-surface-sunken);
}
.ba-card.after {
  background: var(--color-surface);
  border-color: var(--blue-300);
  box-shadow: var(--shadow-card), 0 0 0 4px var(--blue-100);
}
.ba-label {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  display: flex; align-items: center; gap: 8px;
  font-weight: var(--fw-semibold);
}
.ba-label .dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.ba-card.after .ba-label { color: var(--color-accent); }
.ba-title {
  font-family: var(--font-display);
  color: var(--color-text-primary);
  font-size: 22px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-md);
  margin: 0 0 var(--space-5);
}
.ba-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.ba-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--space-3);
  font-size: var(--text-base);
  color: var(--color-text-tertiary);
  line-height: 1.5;
  align-items: start;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-sm);
}
.ba-list li .mark {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-muted);
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-stroke-default);
  margin-top: 2px;
}
.ba-card.after .mark {
  color: var(--color-accent);
  background: var(--blue-100);
  border-color: var(--blue-200);
}

/* ---------- Large CTA ---------- */
.cta-block {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius-3xl);
  padding: var(--space-16) var(--space-10);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-5);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.cta-block h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
  margin: 0;
  max-width: 720px;
  position: relative;
}
.cta-block p {
  font-size: var(--text-base);
  color: var(--color-text-tertiary);
  max-width: 520px;
  margin: 0;
  position: relative;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-sm);
}
.cta-block .btn { position: relative; }

/* ---------- Footer ---------- */
.landing-footer {
  margin-top: var(--space-16);
  padding: var(--space-10) 0 0;
  border-top: 1px solid var(--color-stroke-subtle);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
}
.landing-footer .brand-col {
  display: flex; flex-direction: column; gap: var(--space-3);
}
.landing-footer h5 {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
  font-weight: var(--fw-semibold);
}
.landing-footer a {
  display: block;
  padding: 4px 0;
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-sm);
}
.landing-footer a:hover { color: var(--color-text-primary); }
.landing-footer .tagline {
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
  line-height: 1.55;
  max-width: 320px;
  font-weight: var(--fw-medium);
}
.footer-bottom {
  margin-top: var(--space-10);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-stroke-subtle);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--color-text-muted);
  grid-column: 1 / -1;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(odd) { border-right: 1px solid var(--color-stroke-subtle); }
  .stat { border-bottom: 1px solid var(--color-stroke-subtle); }
  .features, .before-after, .how { grid-template-columns: 1fr; }
  .how { padding: var(--space-6); gap: var(--space-6); }
  .sources { grid-template-columns: repeat(2, 1fr); }
  .landing-footer { grid-template-columns: 1fr 1fr; }
}
