/* mailstash — marketing homepage.
   Hand-authored from the approved design: cream canvas, forest-green accent,
   Sora / Hanken Grotesk / JetBrains Mono. */

:root {
  --bg: #f2f0e9;
  --ink: #20201c;
  --body: #5e5950;
  --muted: #6a655c;
  --accent: #356b54;
  --card: #fbfaf6;
  --border: #e3ddd0;
  --line-2: #e7e1d4;
  --warn: #9a6a32;
  --warn-bg: #f6ecdb;
  --warn-border: #ecdcc2;

  --font-display: "Sora", system-ui, sans-serif;
  --font-sans: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --wrap: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image: radial-gradient(rgba(32, 32, 28, 0.035) 1px, transparent 1.2px);
  background-size: 26px 26px;
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
.accent { color: var(--accent); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 32px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn--dark { background: var(--ink); color: #fff; padding: 9px 17px; font-size: 14px; }
.btn--dark:hover { background: #000; }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid #ddd5c6; padding: 9px 17px; font-size: 14px; }
.btn--ghost:hover { border-color: #cdc8c4; }
.btn--lg { padding: 13px 26px; font-size: 15px; }

/* ---- brand / nav ---- */
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.brand__word {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(242, 240, 233, 0.85);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 14px;
}
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 5px;
}
.nav__links a:hover { color: var(--ink); }
.nav__signin { font-weight: 600 !important; margin-left: 6px; }
.nav__links a.btn--dark { color: #fff; }

/* ---- hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 60px;
  align-items: center;
  padding-block: 76px 60px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 45px;
  line-height: 1.07;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 22px;
  text-wrap: balance;
}
.lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--body);
  margin-bottom: 32px;
  max-width: 540px;
  text-wrap: pretty;
}
.hero__cta { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.checks {
  list-style: none;
  margin-top: 30px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.checks li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
}
.checks .accent { font-weight: 700; }

/* ---- hero diagram ---- */
.diagram { display: flex; align-items: center; gap: 14px; }
.diagram__before { flex: none; width: 228px; }
.stack { position: relative; display: flex; flex-direction: column; gap: 12px; }
.stack__hint {
  position: absolute;
  left: 10px; right: -10px; bottom: -12px;
  height: 64px;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  opacity: 0.45;
  transform: rotate(1.8deg);
}
.mini {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 13px 14px;
  box-shadow: 0 4px 12px -8px rgba(27, 27, 25, 0.28);
}
.tilt-a { transform: rotate(-0.8deg); }
.tilt-b { transform: rotate(1deg) translateX(6px); }
.mini__from { display: flex; align-items: center; gap: 9px; }
.mini__meta { min-width: 0; flex: 1; }
.mini__addr,
.row__addr { font-size: 12px; font-weight: 600; color: #3a352c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini__to { font-size: 10px; color: #a59c8c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini__subject { font-size: 12.5px; font-weight: 600; margin-top: 10px; }
.warn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 6px;
  padding: 3px 8px;
  margin-top: 10px;
  max-width: 100%;
}
.avatar {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #ece6d9;
  color: #a89e8c;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mono { font-family: var(--font-mono); }
.diagram__label,
.home__label { font-family: var(--font-mono); font-size: 10.5px; color: #a59c8c; }
.diagram__label { margin-top: 14px; text-align: center; }
.diagram__connector { flex: none; }

.diagram__after { position: relative; flex: 1; min-width: 0; }
.halo {
  position: absolute;
  inset: -10% -6%;
  background: radial-gradient(closest-side, rgba(53, 107, 84, 0.16), transparent);
  z-index: 0;
}
.home {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 50px -28px rgba(27, 27, 25, 0.4);
}
.home__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: #e7ece8; /* light green tint */
  border-bottom: 1px solid var(--border);
}
.home__icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.home__domain { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.home__list { list-style: none; display: flex; flex-direction: column; gap: 6px; padding: 8px 12px; }
.row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px; }
.row:hover { background: #faf8f2; }
.row__meta { min-width: 0; flex: 1; }
.row__subject { font-size: 11px; color: #8c8576; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* In the "after" panel the avatars are dark (vs the light ones on the scattered cards). */
.home .avatar { background: #20201c; color: #fff; }
.pill {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(53, 107, 84, 0.1);
  border-radius: 999px;
  padding: 4px 11px;
}
.home__foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid #f0ece1; }
.team { display: flex; }
.team__a {
  width: 24px; height: 24px;
  margin-left: -6px;
  border-radius: 50%;
  background: #2c2c28;
  border: 2px solid #fff;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.team__a:first-child { margin-left: 0; }

/* ---- generic section ---- */
.section { padding-block: 64px; }
/* "How it works" sits on a slightly darker, denser-dotted band, bordered top & bottom. */
.section--alt {
  background-color: #efeae0;
  background-image: radial-gradient(rgba(32, 32, 28, 0.04) 1px, transparent 1.4px);
  background-size: 20px 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
/* Pricing sits on a clean white band. */
.section--white { background: #fff; border-top: 1px solid var(--border); }
.section__head { max-width: 640px; margin-bottom: 40px; }
.section__head h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 12px;
  text-wrap: balance;
}
.section__head p { font-size: 16px; color: var(--body); text-wrap: pretty; }

/* ---- how it works ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; }
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.step__tag { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.step__num {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.step__kind { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.step h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--body); }

/* ---- features ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; list-style: none; }
.feature {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}
.feature__tag {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: #ece6d9;
  color: #8c8576;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.feature h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature p { font-size: 13.5px; color: var(--body); }
.feature__badge {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(53, 107, 84, 0.1);
  border-radius: 5px;
  padding: 3px 8px;
}

/* ---- pricing ---- */
.billing { display: flex; justify-content: center; margin-bottom: 36px; }
.billing__toggle {
  display: inline-flex;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
.billing__toggle button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.billing__toggle button.is-active { background: var(--ink); color: #fff; }
.billing__save {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(53, 107, 84, 0.12);
  border-radius: 5px;
  padding: 2px 6px;
}
.billing__toggle button.is-active .billing__save { color: #fff; background: rgba(255, 255, 255, 0.18); }

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.tier {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  padding: 28px;
}
.tier--popular {
  border: 2px solid var(--accent);
  box-shadow: 0 8px 22px -14px rgba(27, 27, 25, 0.16);
  padding-top: 46px;
}
/* Full-width banner across the top of the popular card. */
.tier__flag {
  position: absolute;
  top: 0; left: 0; right: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  text-align: center;
  padding: 7px;
}
.tier h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.tier__tagline { font-size: 13.5px; color: var(--body); margin-top: 4px; min-height: 38px; }
.tier__price { display: flex; align-items: baseline; gap: 4px; margin-top: 14px; }
.tier__amount { font-family: var(--font-display); font-size: 38px; font-weight: 800; letter-spacing: -0.02em; }
.tier__per { font-size: 14px; color: var(--muted); }
.tier__note { font-size: 12px; color: var(--muted); margin-top: 4px; min-height: 18px; }
/* Both tier CTAs (dark popular + ghost side tiers) share the same height. */
.tier__cta { width: 100%; justify-content: center; margin: 22px 0 18px; padding: 12px; font-size: 14.5px; }
.tier hr { border: none; border-top: 1px solid var(--border); margin: 0 0 16px; }
.tier__features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tier__features li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: #3a352c; }
.tier__features .accent { font-weight: 700; }
.pricing__note { text-align: center; font-size: 13px; color: var(--muted); margin-top: 28px; }

/* ---- footer ---- */
.footer { background: #f7f5ef; border-top: 1px solid var(--border); padding-block: 48px; }
.footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer__brand p { font-size: 13.5px; color: var(--body); margin-top: 14px; max-width: 320px; }
.footer__title { font-family: var(--font-display); font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.footer__col a { display: block; text-decoration: none; color: var(--muted); font-size: 13.5px; padding: 4px 0; }
.footer__col a:hover { color: var(--ink); }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
}

/* ---- responsive ---- */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 38px; }
  .steps, .features, .tiers { grid-template-columns: 1fr; }
  .nav__links a:not(.btn):not(.nav__signin) { display: none; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 20px; }
  .diagram { flex-direction: column; }
  .footer__cols { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* Destination for sign-in and plan CTAs during the marketing-only launch. */
.launch { max-width: 680px; margin: 12vh auto; padding: 28px; }
.launch .brand { display: inline-block; margin-bottom: 40px; }
.launch h1 { font-family: var(--font-display); font-size: clamp(30px, 6vw, 48px); line-height: 1.15; }
.launch p { margin: 24px 0; line-height: 1.7; }
.launch .btn { margin: 0 8px 12px 0; }
