/* ============================================================
   Swellmail marketing landing page styles.
   Depends on the token layer in tokens.css (load that first).
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text-body);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-strong); margin: 0; line-height: var(--lh-snug); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--navy-200); }

.wrap { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--navy-600);
  font-weight: var(--fw-medium);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--navy-400); border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), box-shadow var(--dur-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn-primary { background: var(--navy-600); color: var(--text-on-brand); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-700); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--text-heading); }
.btn-ghost:hover { background: var(--navy-50); }
.btn-warm { background: var(--ink-900); color: var(--text-on-ink); }
.btn-warm:hover { background: #11151f; }
.btn-lg { padding: 16px 28px; font-size: var(--fs-body); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base), background var(--dur-base);
}
.nav.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-xs); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 1.4rem; color: var(--text-strong); letter-spacing: -0.01em; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a { padding: 8px 14px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-muted); transition: color var(--dur-fast), background var(--dur-fast); }
.nav-links a:hover { color: var(--text-strong); background: var(--navy-50); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-login { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-heading); padding: 10px 14px; border-radius: var(--radius-pill); }
.nav-login:hover { background: var(--navy-50); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(40px, 6vw, 72px); padding-bottom: var(--section-y); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 78% 12%, var(--navy-100) 0%, transparent 60%),
    radial-gradient(50% 40% at 12% 0%, var(--cream-100) 0%, transparent 55%);
  opacity: 0.8;
}
.hero-grid { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { max-width: 560px; }
.hero h1 { font-size: var(--fs-display); font-weight: var(--fw-semibold); margin-top: 20px; }
.hero h1 .accent { color: var(--post-500); }
.hero-sub { font-size: var(--fs-lead); color: var(--text-muted); margin-top: 22px; max-width: 30em; text-wrap: pretty; }
.signup { display: flex; gap: 10px; margin-top: 30px; max-width: 460px; }
.signup .field {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill); padding: 4px 6px 4px 18px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.signup .field:focus-within { border-color: var(--navy-500); box-shadow: 0 0 0 4px var(--focus-ring); }
.signup input { flex: 1; border: 0; outline: 0; background: transparent; font-family: var(--font-body); font-size: var(--fs-sm); color: var(--text-strong); min-width: 0; }
.signup input::placeholder { color: var(--text-faint); }
.signup .field .btn { padding: 11px 20px; }
.micro { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; color: var(--text-faint); font-size: var(--fs-xs); }
.micro span { display: inline-flex; align-items: center; gap: 6px; }
.micro i { width: 15px; height: 15px; color: var(--navy-500); }

/* ---------- Animated inbox visual ---------- */
.stage { position: relative; justify-self: center; width: 100%; max-width: 440px; }
.device {
  position: relative; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl); overflow: hidden;
  aspect-ratio: 360 / 460;
  display: flex; flex-direction: column;
}
.device-bar { display: flex; align-items: center; gap: 10px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.device-bar .title { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 1.05rem; color: var(--text-strong); display:flex; align-items:center; gap:8px; }
.counter-pill {
  margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500;
  padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--clutter-100); color: var(--clutter-500);
  transition: background var(--dur-base), color var(--dur-base);
  white-space: nowrap;
}
.device[data-phase="calm"] .counter-pill,
.device[data-phase="ding"] .counter-pill { background: var(--navy-100); color: var(--navy-700); }

.scroller { position: relative; flex: 1; overflow: hidden; }
.stream { position: absolute; inset: 0; padding: 10px 14px; display: flex; flex-direction: column; gap: 9px; }
.device[data-phase="chaos"] .stream { animation: frantic 1.6s linear infinite; }
.device[data-phase="sweep"] .stream { animation: sweepUp 0.7s var(--ease-in-out) forwards; }
.device[data-phase="calm"] .stream,
.device[data-phase="ding"] .stream { opacity: 0; pointer-events: none; }
@keyframes frantic { from { transform: translateY(0); } to { transform: translateY(-204px); } }
@keyframes sweepUp { to { transform: translateY(-60px); opacity: 0; filter: blur(6px); } }

.junk { display: flex; align-items: center; gap: 11px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 11px 13px; }
.junk .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--clutter-500); flex: none; }
.junk .jbody { min-width: 0; flex: 1; }
.junk .jfrom { font-size: 11px; color: var(--text-faint); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.junk .jsubj { font-size: 13px; color: var(--text-heading); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.junk .jtag { font-size: 10px; font-weight: 700; color: var(--clutter-500); background: var(--clutter-100); padding: 2px 7px; border-radius: var(--radius-pill); flex: none; }

/* calm empty + digest */
.calm-layer { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; opacity: 0; transition: opacity var(--dur-slow) var(--ease-out); }
.device[data-phase="calm"] .calm-layer,
.device[data-phase="ding"] .calm-layer { opacity: 1; }
.calm-check { width: 56px; height: 56px; border-radius: 50%; background: var(--navy-100); color: var(--navy-700); display: grid; place-items: center; }
.calm-check i { width: 28px; height: 28px; }
.calm-title { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--text-strong); }
.calm-sub { font-size: var(--fs-sm); color: var(--text-muted); }

/* single swellmail email that arrives in the calm inbox */
.swell-email {
  position: absolute; left: 14px; right: 14px; top: 14px;
  display: flex; gap: 12px; align-items: flex-start;
  background: linear-gradient(180deg, #fff 0%, var(--cream-100) 140%);
  border: 1.5px solid var(--post-400); border-radius: var(--radius-lg);
  padding: 13px 15px; box-shadow: var(--shadow-ding);
  transform: translateY(-160%); opacity: 0;
  transition: transform var(--dur-slow) var(--ease-spring), opacity var(--dur-base);
}
.device[data-phase="ding"] .swell-email { transform: translateY(0); opacity: 1; }
.se-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--post-500); color: #fff; display: grid; place-items: center; flex: none; }
.device[data-phase="ding"] .se-mark { animation: ring 0.7s var(--ease-out); }
@keyframes ring { 0%{transform:rotate(0)} 20%{transform:rotate(-16deg)} 40%{transform:rotate(12deg)} 60%{transform:rotate(-7deg)} 80%{transform:rotate(4deg)} 100%{transform:rotate(0)} }
.se-mark i { width: 18px; height: 18px; }
.se-body { min-width: 0; flex: 1; }
.se-top { display: flex; align-items: baseline; gap: 8px; }
.se-from { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; color: var(--text-strong); }
.se-time { margin-left: auto; font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); }
.se-subj { font-size: 13px; color: var(--text-heading); font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.digest-deals { display: flex; gap: 7px; margin-top: 11px; }
.deal-chip { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 8px; text-align: center; }
.deal-chip .pct { font-family: var(--font-display); font-weight: 700; color: var(--navy-700); font-size: 0.95rem; }
.deal-chip .lbl { font-size: 9px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }

/* before/after caption above the device */
.stage-caption { text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--text-muted); margin-bottom: 16px; letter-spacing: var(--ls-tight); min-height: 1.5em; transition: opacity var(--dur-base) var(--ease-out); }
.stage-caption.fading { opacity: 0; }

/* floating bits around device */
.float { position: absolute; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); border-radius: var(--radius-md); padding: 10px 13px; display: flex; align-items: center; gap: 9px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-heading); }
.float i { width: 16px; height: 16px; }
.float.f1 { top: 8%; left: -8%; color: var(--navy-700); }
.float.f1 i { color: var(--navy-600); }
.float.f2 { bottom: 16%; right: -10%; color: var(--post-600); }
.float.f2 i { color: var(--post-500); }
.float { animation: bob 5s var(--ease-in-out) infinite; }
.float.f2 { animation-delay: -2.5s; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-9px)} }

/* ---------- Section heads ---------- */
.section { padding-block: var(--section-y); }
.section-head { max-width: 640px; margin: 0 auto var(--space-7); text-align: center; }
.section-head h2 { font-size: var(--fs-h2); margin-top: 16px; }
.section-head p { color: var(--text-muted); font-size: var(--fs-lead); margin-top: 16px; text-wrap: pretty; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 26px; box-shadow: var(--shadow-sm); }
.step-num { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; color: var(--navy-600); background: var(--navy-50); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px; }
.step h3 { font-size: var(--fs-h4); margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: var(--fs-sm); }
.step .glyph { position: absolute; top: 24px; right: 24px; color: var(--navy-300); }
.step .glyph i { width: 30px; height: 30px; }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-sm); transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base); }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature .ficon { width: 50px; height: 50px; border-radius: var(--radius-md); display: grid; place-items: center; margin-bottom: 18px; }
.feature .ficon i { width: 24px; height: 24px; }
.feature.c-sage .ficon { background: var(--navy-100); color: var(--navy-700); }
.feature.c-honey .ficon { background: var(--cream-200); color: var(--post-600); }
.feature.c-ink .ficon { background: var(--ink-900); color: var(--text-on-ink); }
.feature.c-clutter .ficon { background: var(--clutter-100); color: var(--clutter-500); }
.feature h3 { font-size: var(--fs-h4); margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: var(--fs-sm); }
.feature .fmeta { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--navy-600); }

/* ---------- Before / After ---------- */
.ba-band { background: var(--ink-900); color: var(--text-on-ink); border-radius: var(--radius-2xl); padding: clamp(32px, 5vw, 64px); }
.ba-band .section-head h2 { color: #fff; }
.ba-band .section-head .eyebrow { color: var(--navy-300); }
.ba-band .section-head .eyebrow::before { background: var(--navy-500); }
.ba-band .section-head p { color: rgba(241,244,237,0.7); }
.ba-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: center; }
.ba-card { border-radius: var(--radius-lg); padding: 22px; }
.ba-before { background: rgba(124,133,151,0.14); border: 1px solid rgba(124,133,151,0.32); }
.ba-after { background: rgba(47,87,147,0.16); border: 1px solid rgba(90,125,176,0.38); }
.ba-card .ba-label { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.ba-before .ba-label { color: #AEB6C4; }
.ba-after .ba-label { color: var(--navy-300); }
.ba-row { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: var(--radius-md); background: rgba(255,255,255,0.05); margin-bottom: 9px; font-size: var(--fs-sm); }
.ba-row .rdot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ba-before .rdot { background: var(--clutter-500); }
.ba-after .rdot { background: var(--navy-400); }
.ba-row .rtxt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(241,244,237,0.85); }
.ba-row.muted { opacity: 0.45; }
.ba-arrow { width: 56px; height: 56px; border-radius: 50%; background: var(--navy-500); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-md); }
.ba-arrow i { width: 26px; height: 26px; }
.ba-empty { text-align: center; color: rgba(241,244,237,0.6); font-size: var(--fs-sm); padding: 18px 0; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.stars { display: flex; gap: 3px; color: var(--post-500); margin-bottom: 16px; }
.stars i { width: 16px; height: 16px; fill: currentColor; }
.quote blockquote { margin: 0; font-size: var(--fs-body); color: var(--text-heading); font-weight: 500; line-height: var(--lh-relaxed); flex: 1; text-wrap: pretty; }
.quote-by { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--navy-200); color: var(--navy-700); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; flex: none; }
.quote-by .who { font-weight: 600; font-size: var(--fs-sm); color: var(--text-strong); }
.quote-by .role { font-size: var(--fs-xs); color: var(--text-faint); }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 32px 30px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.tier.featured { background: var(--navy-50); border: 1.5px solid var(--navy-300); box-shadow: var(--shadow-md); position: relative; }
.tier .tflag { position: absolute; top: 22px; right: 22px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy-700); background: var(--navy-100); padding: 4px 10px; border-radius: var(--radius-pill); }
.tier .tname { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h4); color: var(--text-strong); }
.tier .tprice { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; color: var(--text-strong); margin-top: 14px; letter-spacing: -0.02em; }
.tier .tprice span { font-size: var(--fs-sm); font-weight: 500; color: var(--text-faint); font-family: var(--font-body); }
.tier .tdesc { color: var(--text-muted); font-size: var(--fs-sm); margin-top: 8px; }
.tier ul { list-style: none; padding: 0; margin: 22px 0; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.tier li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-sm); color: var(--text-heading); }
.tier li i { width: 18px; height: 18px; color: var(--navy-600); flex: none; margin-top: 1px; }
.tier .btn { width: 100%; }

/* ---------- Footer ---------- */
.footer { background: var(--ink-900); color: rgba(241,244,237,0.7); padding-top: var(--space-9); padding-bottom: var(--space-6); margin-top: var(--section-y); }
.footer .brand { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-bottom: var(--space-7); border-bottom: 1px solid rgba(255,255,255,0.1); }
.foot-blurb { font-size: var(--fs-sm); margin-top: 16px; max-width: 30ch; color: rgba(241,244,237,0.55); }
.foot-col h4 { color: #fff; font-family: var(--font-body); font-weight: 600; font-size: var(--fs-sm); margin-bottom: 14px; }
.foot-col a { display: block; font-size: var(--fs-sm); padding: 5px 0; color: rgba(241,244,237,0.6); transition: color var(--dur-fast); }
.foot-col a:hover { color: #fff; }
.foot-bottom { display: flex; align-items: center; gap: 16px; padding-top: 24px; font-size: var(--fs-xs); color: rgba(241,244,237,0.45); }
.foot-bottom .spacer { flex: 1; }
.foot-social { display: flex; gap: 8px; }
.foot-social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.08); display: grid; place-items: center; color: rgba(241,244,237,0.7); }
.foot-social a:hover { background: var(--navy-600); color: #fff; }
.foot-social i { width: 16px; height: 16px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; background: linear-gradient(160deg, var(--navy-100), var(--cream-100)); border-radius: var(--radius-2xl); padding: clamp(40px, 6vw, 72px); }
.cta-band h2 { font-size: var(--fs-h1); }
.cta-band p { color: var(--text-muted); font-size: var(--fs-lead); margin-top: 14px; }
.cta-band .signup { margin: 28px auto 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { max-width: 640px; margin-inline: auto; }
  .hero-sub, .signup, .micro { margin-inline: auto; }
  .micro { justify-content: center; }
  .stage { margin-top: 8px; }
  .steps, .features, .quotes, .pricing { grid-template-columns: 1fr; }
  .ba-grid { grid-template-columns: 1fr; }
  .ba-arrow { transform: rotate(90deg); margin: 4px auto; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .device .stream { animation: none !important; opacity: 0 !important; }
  .float { animation: none !important; }
  .digest, .digest-bell { transition: none !important; }
}
