/* =========================================================
   983 Mail — shared styles
   Palette: crisp white + deep emerald, ink text, mint accent
   Type:    Space Grotesk (display) + Inter (body/UI)
   ========================================================= */

:root {
  --paper:    #ffffff;
  --panel:    #f4f7f5;
  --panel-2:  #e9f0ec;
  --ink:      #14201b;
  --ink-soft: #4c5c54;
  --ink-mute: #6f7f77;
  --brand:    #12654e;
  --brand-600:#0e5240;
  --brand-700:#0a3f31;
  --mint:     #34d399;
  --mint-soft:#d6f5e6;
  --line:     #dde6e0;
  --line-2:   #eef2f0;
  --danger:   #c0392b;
  --danger-bg:#fdecea;

  --radius-lg: 20px;
  --radius:    14px;
  --radius-sm: 9px;

  --shadow-1: 0 1px 2px rgba(20,32,27,.05);
  --shadow-2: 0 10px 30px -12px rgba(14,63,49,.28);
  --shadow-3: 0 30px 60px -24px rgba(14,63,49,.35);

  --wrap: 1140px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .display {
  font-family: "Space Grotesk", "Inter", sans-serif;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 600;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--brand);
  --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: "Inter", sans-serif;
  font-weight: 600; font-size: .98rem;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  background: var(--bg); color: var(--fg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .2s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); background: var(--brand-600); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }

.btn--ghost {
  --bg: transparent; --fg: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { background: var(--panel); box-shadow: none; border-color: var(--brand); color: var(--brand); }

.btn--light { --bg: #fff; --fg: var(--brand-700); }
.btn--light:hover { background: #f2f7f4; }

.btn--block { width: 100%; padding-block: .95rem; }

/* ---------- top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.nav.is-stuck { border-color: var(--line); box-shadow: var(--shadow-1); }
.nav__inner { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.28rem; letter-spacing: -.03em; }
.brand__mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(150deg, var(--brand), var(--brand-700));
  color: #fff; font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.brand__mark svg { width: 19px; height: 19px; }
.nav__links { display: flex; gap: 1.6rem; margin-left: auto; align-items: center; }
.nav__links a.link { color: var(--ink-soft); font-weight: 500; font-size: .96rem; transition: color .2s; }
.nav__links a.link:hover { color: var(--brand); }
.nav__cta { display: flex; gap: .7rem; align-items: center; }

.nav__toggle { display: none; }

/* ---------- footer ---------- */
.footer { background: var(--brand-700); color: #cfe3da; margin-top: 6rem; }
.footer a { color: #cfe3da; opacity: .85; }
.footer a:hover { opacity: 1; color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; padding-block: 4rem 2.5rem; }
.footer__brand { color: #fff; }
.footer h4 { font-family: "Inter", sans-serif; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: #8fbfae; margin: 0 0 1rem; font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; font-size: .95rem; }
.footer__bar { border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.4rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: #8fbfae; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   AUTH PAGES (register / login)
   ========================================================= */
.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--paper);
}
.auth__aside {
  position: relative;
  background: linear-gradient(155deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #eafaf3;
  padding: 3rem 3.2rem;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.auth__aside::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(520px 320px at 82% 12%, rgba(52,211,153,.35), transparent 60%),
    radial-gradient(460px 300px at 5% 92%, rgba(52,211,153,.18), transparent 60%);
  pointer-events: none;
}
.auth__aside .brand { color: #fff; position: relative; z-index: 1; }
.auth__pitch { position: relative; z-index: 1; margin-top: auto; }
.auth__pitch h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); color: #fff; max-width: 15ch; }
.auth__pitch p { color: #bfe6d7; margin-top: 1rem; max-width: 38ch; }
.auth__points { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: .8rem; position: relative; z-index: 1; }
.auth__points li { display: flex; gap: .7rem; align-items: flex-start; color: #d6f2e7; font-size: .98rem; }
.auth__points svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--mint); }

.auth__main { display: grid; place-items: center; padding: 3rem 1.5rem; }
.card {
  width: 100%; max-width: 420px;
  animation: cardIn .6s var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card__eyebrow { color: var(--brand); font-weight: 600; font-size: .9rem; }
.card h1 { font-size: 1.9rem; margin: .35rem 0 .4rem; }
.card__sub { color: var(--ink-soft); margin: 0 0 1.8rem; }

.field { margin-bottom: 1.05rem; }
.field label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: .4rem; color: var(--ink-soft); }
.field .control { position: relative; display: flex; align-items: center; }
.field input {
  width: 100%;
  font: inherit; font-size: .98rem;
  padding: .82rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.field .with-suffix input { padding-right: 9rem; }
.field input::placeholder { color: #9aa8a1; }
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(18,101,78,.12); }
.field .suffix { position: absolute; right: .9rem; color: var(--ink-mute); font-size: .95rem; pointer-events: none; max-width: 7.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .92rem; color: var(--ink-soft); }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.link-inline { color: var(--brand); font-weight: 600; font-size: .92rem; }
.link-inline:hover { text-decoration: underline; }

.turnstile-wrap { margin: .2rem 0 1.2rem; min-height: 65px; }

.form-note { margin-top: 1.5rem; text-align: center; font-size: .95rem; color: var(--ink-soft); }
.form-note a { color: var(--brand); font-weight: 600; }
.form-note a:hover { text-decoration: underline; }

.alert {
  display: none;
  align-items: flex-start; gap: .6rem;
  border-radius: var(--radius-sm);
  padding: .8rem .95rem;
  font-size: .93rem;
  margin-bottom: 1.3rem;
  border: 1px solid transparent;
}
.alert.show { display: flex; animation: shake .4s var(--ease); }
.alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.alert--error { background: var(--danger-bg); color: var(--danger); border-color: #f3c9c3; }
.alert--info { background: var(--mint-soft); color: var(--brand-700); border-color: #b7ead1; }
@keyframes shake { 10%,90%{transform:translateX(-1px)} 30%,70%{transform:translateX(3px)} 50%{transform:translateX(-3px)} }

.auth__back { position: relative; z-index: 1; margin-top: 1.4rem; font-size: .92rem; color: #bfe6d7; }
.auth__back:hover { color: #fff; }

.btn.is-loading { pointer-events: none; opacity: .8; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin .7s linear infinite; display: none; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn__label { opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   HOME PAGE
   ========================================================= */
.hero { position: relative; padding-top: 4.5rem; padding-bottom: 5rem; overflow: clip; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(680px 460px at 88% -8%, rgba(52,211,153,.16), transparent 62%),
    radial-gradient(560px 420px at -6% 8%, rgba(18,101,78,.10), transparent 60%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.hero__copy { min-width: 0; }
.mock { max-width: 100%; }

.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .38rem .8rem .38rem .5rem; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: .85rem; color: var(--ink-soft); font-weight: 500;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(52,211,153,.25); }

.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4rem); margin: 1.3rem 0 0; max-width: 15ch; }
.hero__lead { font-size: 1.18rem; color: var(--ink-soft); margin: 1.3rem 0 0; max-width: 46ch; }
.hero__cta { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 2rem; }
.hero__meta { margin-top: 1.5rem; color: var(--ink-mute); font-size: .92rem; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.hero__meta span { display: inline-flex; align-items: center; gap: .45rem; }
.hero__meta svg { width: 16px; height: 16px; color: var(--brand); }

/* hero word animation */
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; transform: translateY(105%); animation: riseUp .9s var(--ease) forwards; }
.hero h1 .line:nth-child(2) > span { animation-delay: .09s; }
.hero h1 .line:nth-child(3) > span { animation-delay: .18s; }
@keyframes riseUp { to { transform: translateY(0); } }
.hero__lead, .hero__cta, .hero__meta { opacity: 0; animation: fadeUp .8s var(--ease) forwards; }
.hero__lead { animation-delay: .35s; } .hero__cta { animation-delay: .48s; } .hero__meta { animation-delay: .6s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* email client mockup */
.mock {
  border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-9deg) rotateX(3deg);
  opacity: 0; animation: mockIn 1s var(--ease) .3s forwards;
}
@keyframes mockIn { to { opacity: 1; transform: perspective(1400px) rotateY(-5deg) rotateX(2deg); } }
.mock__bar { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line-2); background: var(--panel); }
.mock__dot { width: 11px; height: 11px; border-radius: 50%; background: #d3ddd7; }
.mock__dot:nth-child(2){ background:#c7d5cd; } .mock__dot:nth-child(3){ background:#bccfc5; }
.mock__addr { margin-left: .8rem; font-family: "Space Grotesk", sans-serif; font-size: .86rem; color: var(--ink-soft); }
.mock__addr .cursor { display: inline-block; width: 2px; height: 1em; background: var(--brand); margin-left: 1px; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mock__body { display: grid; grid-template-columns: 88px 1fr; min-height: 300px; }
.mock__rail { border-right: 1px solid var(--line-2); padding: 1rem .6rem; display: grid; gap: .5rem; align-content: start; }
.mock__folder { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--ink-mute); padding: .4rem .5rem; border-radius: 8px; }
.mock__folder.active { background: var(--mint-soft); color: var(--brand-700); font-weight: 600; }
.mock__folder .fdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; }
.mock__list { padding: .5rem; display: grid; gap: .3rem; align-content: start; }
.mrow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .6rem .55rem; border-radius: 10px; transition: background .2s; }
.mrow > div { min-width: 0; }
.mrow:hover { background: var(--panel); }
.mrow__av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .72rem; font-weight: 700; background: var(--brand); }
.mrow:nth-child(2) .mrow__av { background: #2f8f6f; } .mrow:nth-child(3) .mrow__av { background: #3fa07d; } .mrow:nth-child(4) .mrow__av { background: #57b18f; }
.mrow__from { font-size: .82rem; font-weight: 600; color: var(--ink); }
.mrow__sub { font-size: .76rem; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow__time { font-size: .7rem; color: var(--ink-mute); }
.mrow.unread { background: linear-gradient(90deg, rgba(52,211,153,.10), transparent); }
.mrow.unread .mrow__from::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-left: .4rem; box-shadow: 0 0 0 3px rgba(52,211,153,.22); }
.mrow.incoming { animation: slideIn .6s var(--ease) both; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }

/* logos / trust strip */
.trust { border-block: 1px solid var(--line-2); background: var(--panel); }
.trust__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 1.4rem; flex-wrap: wrap; }
.trust__label { font-size: .85rem; color: var(--ink-mute); }
.trust__stats { display: flex; gap: 2.6rem; flex-wrap: wrap; }
.stat b { font-family: "Space Grotesk", sans-serif; font-size: 1.5rem; color: var(--brand); display: block; letter-spacing: -.02em; }
.stat span { font-size: .82rem; color: var(--ink-mute); }

/* section scaffolding */
.section { padding-block: 5.5rem; }
.section__head { max-width: 60ch; margin-bottom: 3rem; }
.section__head.center { margin-inline: auto; text-align: center; }
.section__kicker { color: var(--brand); font-weight: 600; font-size: .95rem; margin: 0 0 .7rem; }
.section h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.section__intro { color: var(--ink-soft); font-size: 1.1rem; margin-top: 1rem; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.feature {
  padding: 1.7rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; transition: border-color .25s, transform .25s var(--ease);
}
.feature:hover { border-color: var(--brand); transform: translateY(-3px); }
.feature__ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--mint-soft); color: var(--brand); margin-bottom: 1.1rem; }
.feature__ic svg { width: 23px; height: 23px; }
.feature h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.feature p { color: var(--ink-soft); font-size: .97rem; margin: 0; }

/* security band */
.band { background: var(--brand-700); color: #d7efe6; border-radius: var(--radius-lg); padding: 3.4rem; display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.band h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.band p { color: #b8e0d1; margin-top: 1rem; }
.band__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.band__list li { display: flex; gap: .8rem; }
.band__list svg { flex: none; width: 22px; height: 22px; color: var(--mint); margin-top: 2px; }
.band__list b { color: #fff; display: block; font-weight: 600; }
.band__list span { color: #9fd3c0; font-size: .93rem; }

/* pricing */
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; align-items: stretch; }
.plan {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff; padding: 1.8rem 1.4rem;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.plan--featured { border-color: var(--brand); box-shadow: var(--shadow-2); position: relative; }
.plan--featured::before {
  content: "Most popular"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: .74rem; font-weight: 600;
  padding: .3rem .8rem; border-radius: 999px; letter-spacing: .01em;
}
.plan__name { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1.15rem; }
.plan__desc { color: var(--ink-mute); font-size: .9rem; margin: .35rem 0 0; min-height: 2.6em; }
.plan__price { margin: 1.2rem 0 .2rem; display: flex; align-items: baseline; gap: .2rem; }
.plan__price .amt { font-family: "Space Grotesk", sans-serif; font-size: 2.7rem; font-weight: 700; letter-spacing: -.03em; }
.plan__price .per { color: var(--ink-mute); font-size: .95rem; }
.plan__note { color: var(--ink-mute); font-size: .84rem; margin-bottom: 1.4rem; }
.plan .btn { margin-bottom: 1.6rem; }
.plan__feats { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.plan__feats li { display: flex; gap: .6rem; font-size: .93rem; color: var(--ink-soft); }
.plan__feats svg { flex: none; width: 18px; height: 18px; color: var(--brand); margin-top: 2px; }

/* faq */
.faq { display: grid; gap: .8rem; max-width: 780px; margin-inline: auto; }
.qa { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.qa summary { cursor: pointer; padding: 1.15rem 1.3rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); transition: transform .2s; font-weight: 400; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa__body { padding: 0 1.3rem 1.2rem; color: var(--ink-soft); font-size: .97rem; }

/* CTA banner */
.cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-700) 100%);
  border-radius: var(--radius-lg); padding: 4rem; text-align: center; color: #eafaf3;
}
.cta-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 300px at 80% 0, rgba(52,211,153,.3), transparent 60%); pointer-events: none; }
.cta-band h2 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.7rem); position: relative; z-index: 1; }
.cta-band p { color: #bfe6d7; margin: 1rem auto 2rem; max-width: 48ch; position: relative; z-index: 1; }
.cta-band .btn { position: relative; z-index: 1; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; }
  .mock { transform: none; margin-top: 1rem; }
  .features { grid-template-columns: 1fr; }
  .band, .cta-band { grid-template-columns: 1fr; padding: 2.4rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
/* pricing scales 4 -> 2 -> 1 */
@media (max-width: 1080px) { .pricing { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; } }
@media (max-width: 620px)  { .pricing { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 1rem 24px 1.4rem; gap: 1rem;
    box-shadow: var(--shadow-2);
  }
  .nav__links.open .nav__cta { flex-direction: column; align-items: stretch; width: 100%; }
  .nav__toggle { display: inline-grid; place-items: center; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
  .nav__toggle svg { width: 20px; height: 20px; }
  body { font-size: 16px; }
  .section { padding-block: 4rem; }
  .footer__grid { grid-template-columns: 1fr; }
}
