/* ============================================================================
   Mailo — public site.

   Same tokens as the product, so the landing page and the app cannot drift
   apart: a visitor who signs in should recognise the thing they were shown.
   Only layout that has no meaning inside the app lives here.
   ========================================================================== */

.site { background: var(--v2-bg); }

.wrap { max-width: 1080px; margin-inline: auto; padding-inline: 20px; }

.skip {
  position: absolute; inset-inline-start: -9999px; top: 8px;
  background: var(--v2-accent); color: #fff;
  padding: 10px 16px; border-radius: var(--v2-r-sm); z-index: 200;
}
.skip:focus { inset-inline-start: 12px; }

/* ---------------------------------------------------------------- header -- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklab, var(--v2-bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--v2-dur) var(--v2-ease);
}
.site-head.is-stuck { border-bottom-color: var(--v2-line); }
.site-head-in { display: flex; align-items: center; gap: 20px; min-height: 66px; }

.brand { display: flex; align-items: center; gap: 9px; }
.brand-name { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }

/* The nav takes the centre. In Version A brand and nav clustered hard against
   one edge and the CTAs stranded at the other, leaving a void through the
   middle of a 1280px header. */
.site-nav { display: flex; gap: 4px; margin-inline: auto; }
.site-nav a {
  padding: 8px 12px; border-radius: var(--v2-r-xs);
  font-size: var(--v2-fs-sm); font-weight: 500; color: var(--v2-ink-soft);
}
.site-nav a:hover { color: var(--v2-ink); background: var(--v2-bg-sunken); }

.site-cta { display: flex; gap: 8px; align-items: center; }

.site-burger {
  margin-inline-start: auto;
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--v2-line); border-radius: var(--v2-r-sm);
  background: var(--v2-surface); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.site-burger span { display: block; width: 17px; height: 1.6px; background: var(--v2-ink); border-radius: 2px; }

/* `display: grid` on the class beats the `hidden` attribute's UA rule, so the
   drawer rendered open on every page load until this guard existed. */
.site-drawer[hidden] { display: none !important; }
.site-drawer {
  display: grid; gap: 4px;
  padding: 8px 20px 20px;
  border-top: 1px solid var(--v2-line);
  background: var(--v2-bg);
}
.site-drawer a:not(.v2-btn) { padding: 13px 6px; font-weight: 500; border-bottom: 1px solid var(--v2-line-faint); }
.site-drawer .v2-btn { margin-top: 8px; }

@media (max-width: 880px) {
  .site-nav, .site-cta { display: none; }
  .site-burger { display: flex; }
}
@media (min-width: 881px) {
  .site-drawer { display: none !important; }
}

/* ------------------------------------------------------------------ hero -- */
.hero { padding-block: 56px 24px; overflow: hidden; }
.hero-in { display: grid; gap: 44px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding-block: 84px 56px; }
  .hero-in { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
}

.badge {
  display: inline-flex; align-items: center;
  height: 26px; padding-inline: 11px;
  border-radius: var(--v2-r-full);
  background: var(--v2-accent-tint); color: var(--v2-accent);
  font-size: var(--v2-fs-xs); font-weight: 500;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(38px, 9vw, 64px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 20px;
}
.lede {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--v2-ink);
  font-weight: 500;
  line-height: 1.45;
  max-width: 30ch;
  margin-bottom: 14px;
}
.sub { font-size: var(--v2-fs-md); color: var(--v2-ink-soft); line-height: 1.65; max-width: 46ch; }

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.fineprint { font-size: var(--v2-fs-xs); color: var(--v2-ink-faint); margin-top: 16px; max-width: 44ch; line-height: 1.5; }

/* ----------------------------------------------------------------- phone -- */
/* A real device frame, drawn rather than photographed: a screenshot would be
   stale the first time a component changed, and these frames render the live
   components instead. */
.phone {
  width: 268px;
  border-radius: 38px;
  background: #12171C;
  padding: 9px;
  box-shadow: 0 18px 44px rgba(23, 28, 34, 0.20), 0 2px 8px rgba(23, 28, 34, 0.10);
}
.phone-screen {
  border-radius: 30px;
  background: var(--v2-bg);
  height: 520px;
  overflow: hidden;
  position: relative;
  padding: 14px 13px;
}
.phone-screen .v2-fin { padding: 16px; border-radius: 16px; }
.phone-screen .v2-fin-value { font-size: 19px; }
.phone-screen .v2-fin-row.is-profit .v2-fin-value { font-size: 24px; }
.phone-screen .v2-row { min-height: 54px; padding: 9px 12px; }
.phone-screen .v2-row-title { font-size: 13px; }
.phone-screen .v2-row-sub { font-size: 11px; }
.phone-screen .v2-row-amount { font-size: 13px; }
.phone-screen .v2-avatar { width: 32px; height: 32px; font-size: 11px; }
.phone-screen .v2-section-title { font-size: 13px; }
.phone-screen .v2-list, .phone-screen .v2-card { border-radius: 14px; }

/* Below 900px there is one phone, centred and in flow. */
.hero-art { position: relative; display: flex; justify-content: center; align-items: flex-start; }
.phone-back { display: none; }

@media (min-width: 900px) {
  /* Above it, two staggered devices. Both are absolutely positioned INSIDE a
     box tall and wide enough to hold them: the hero clips its overflow to
     stop the page scrolling sideways, so a phone that hangs outside this box
     does not read as depth, it reads as a cropping bug. */
  .hero-art { display: block; height: 600px; }
  .phone-back, .phone-front { position: absolute; top: 0; }
  .phone-back {
    display: block;
    inset-inline-start: 0;
    top: 46px;
    transform: rotate(-3.5deg);
    opacity: 0.9;
    z-index: 1;
  }
  .phone-front { inset-inline-end: 0; z-index: 2; transform: rotate(1.5deg); }
}

/* Between 900 and 1120 the column is too narrow to hold two 268px frames
   without them stacking into a smudge. One phone, properly placed. */
@media (min-width: 900px) and (max-width: 1119px) {
  .phone-back { display: none; }
  .phone-front { inset-inline-end: 50%; transform: translateX(50%) rotate(1.5deg); }
  [dir="rtl"] .phone-front { transform: translateX(-50%) rotate(1.5deg); }
}

/* ----------------------------------------------------------------- bands -- */
.band { padding-block: 64px; }
.band-tint { background: var(--v2-bg-sunken); }
.band-title { font-size: clamp(26px, 4.4vw, 36px); letter-spacing: -0.03em; margin-bottom: 10px; }
.band-sub { font-size: var(--v2-fs-md); color: var(--v2-ink-soft); max-width: 52ch; margin-bottom: 36px; }

.grid-3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.feature {
  background: var(--v2-surface);
  border-radius: var(--v2-r-lg);
  padding: 24px;
  box-shadow: var(--v2-shadow-sm);
}
.feature-icon {
  width: 38px; height: 38px;
  border-radius: var(--v2-r-xs);
  background: var(--v2-accent-tint); color: var(--v2-accent);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 19px; height: 19px; }
.feature h3 { font-size: var(--v2-fs-lg); margin-bottom: 8px; letter-spacing: -0.015em; }
.feature p { font-size: var(--v2-fs-sm); color: var(--v2-ink-soft); line-height: 1.6; }

.sources { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 28px; font-size: var(--v2-fs-sm); color: var(--v2-ink-faint); }

/* ----------------------------------------------------------------- steps -- */
/* Editorial, not cards. This section sat between two card grids, so the middle
   of the page was three consecutive rows of equal boxes. The content is
   unchanged; only the rhythm is. */
.steps { display: grid; gap: 4px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
.steps li {
  padding: 22px 0;
  border-top: 1px solid var(--v2-line);
}
@media (min-width: 760px) { .steps li { border-top-width: 2px; } }
.step-n {
  display: block;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--v2-accent);
  opacity: 0.28;
  margin-bottom: 12px;
}
.steps h3 { font-size: var(--v2-fs-md); margin-bottom: 6px; }
.steps p { font-size: var(--v2-fs-sm); color: var(--v2-ink-soft); line-height: 1.55; }

/* ----------------------------------------------------------------- trust -- */
/* A hairline list rather than a third card grid. */
.trust { display: grid; gap: 0; }
@media (min-width: 720px) { .trust { grid-template-columns: repeat(2, 1fr); column-gap: 48px; } }
.trust li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 20px 0;
  border-top: 1px solid var(--v2-line);
}
.trust-icon {
  width: 32px; height: 32px; flex: none;
  border-radius: var(--v2-r-xs);
  background: var(--v2-accent-tint); color: var(--v2-accent);
  display: grid; place-items: center;
}
.trust-icon svg { width: 17px; height: 17px; }
.trust h3 { font-size: var(--v2-fs-md); margin-bottom: 4px; }
.trust p { font-size: var(--v2-fs-sm); color: var(--v2-ink-soft); line-height: 1.55; }

.note {
  margin-top: 28px;
  font-size: var(--v2-fs-sm);
  color: var(--v2-ink-faint);
  max-width: 62ch;
  line-height: 1.6;
}

/* ----------------------------------------------------------------- shots -- */
.shots {
  display: flex; gap: 22px;
  overflow-x: auto;
  padding-block: 8px 22px;
  margin-inline: -20px; padding-inline: 20px;
  scrollbar-width: thin;
}
.shots figure { margin: 0; flex: none; }
.shots figcaption { margin-top: 12px; text-align: center; font-size: var(--v2-fs-sm); color: var(--v2-ink-faint); }

/* ----------------------------------------------------------------- about -- */
.about-body { max-width: 62ch; }
.about-body p { font-size: var(--v2-fs-lg); line-height: 1.7; color: var(--v2-ink-soft); margin-bottom: 18px; }
.about-motto {
  font-size: clamp(20px, 3vw, 26px) !important;
  font-weight: 600;
  color: var(--v2-ink) !important;
  letter-spacing: -0.02em;
  margin-top: 28px !important;
}

/* ------------------------------------------------------------------- faq -- */
.faq { max-width: 760px; }
.faq details {
  background: var(--v2-surface);
  border-radius: var(--v2-r-md);
  box-shadow: var(--v2-shadow-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 500;
  font-size: var(--v2-fs-md);
  list-style: none;
  position: relative;
  padding-inline-end: 46px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  position: absolute;
  inset-inline-end: 20px; top: 50%;
  width: 9px; height: 9px;
  border-inline-end: 1.8px solid var(--v2-ink-faint);
  border-bottom: 1.8px solid var(--v2-ink-faint);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--v2-dur) var(--v2-ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 20px 20px; font-size: var(--v2-fs-sm); color: var(--v2-ink-soft); line-height: 1.65; }

/* ------------------------------------------------------------------ beta -- */
.beta-in { display: grid; gap: 32px; }
@media (min-width: 860px) { .beta-in { grid-template-columns: 1fr 420px; gap: 56px; align-items: start; } }
.beta-form {
  background: var(--v2-surface);
  border-radius: var(--v2-r-lg);
  padding: 26px;
  box-shadow: var(--v2-shadow-md);
  display: grid; gap: 14px;
}
.beta-form label { display: grid; gap: 6px; }
.beta-form label span { font-size: var(--v2-fs-sm); font-weight: 500; color: var(--v2-ink-soft); }
.beta-form input {
  min-height: 46px;
  padding-inline: 14px;
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-r-sm);
  background: var(--v2-surface);
  font-family: var(--v2-font); font-size: var(--v2-fs-md);
  color: var(--v2-ink);
}
.beta-form input:focus { border-color: var(--v2-accent); box-shadow: 0 0 0 3px var(--v2-accent-ring); outline: none; }
.beta-form input[aria-invalid="true"] { border-color: var(--v2-negative); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.beta-status { font-size: var(--v2-fs-sm); min-height: 20px; }
.beta-status.is-ok { color: var(--v2-positive); }
.beta-status.is-err { color: var(--v2-negative); }

/* ---------------------------------------------------------------- footer -- */
.site-foot { background: var(--v2-surface-inverse); color: #fff; padding-block: 40px; }
.site-foot-in { display: grid; gap: 18px; }
.foot-brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; }
.foot-links { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.foot-links a { font-size: var(--v2-fs-sm); color: rgba(255, 255, 255, 0.72); }
.foot-links a:hover { color: #fff; }
.foot-note { font-size: var(--v2-fs-xs); color: rgba(255, 255, 255, 0.45); }

/* ----------------------------------------------------------------- login -- */
.login-page {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--v2-bg);
}
.login-card {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 32px 20px 60px;
}
.login-mark { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 30px; }
.login-mark span { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.login-box {
  background: var(--v2-surface);
  border-radius: var(--v2-r-lg);
  box-shadow: var(--v2-shadow-md);
  padding: 28px 24px;
}
.login-title { font-size: var(--v2-fs-2xl); letter-spacing: -0.025em; margin-bottom: 6px; }
.login-sub { font-size: var(--v2-fs-sm); color: var(--v2-ink-soft); margin-bottom: 24px; line-height: 1.55; }
.login-foot { text-align: center; margin-top: 22px; font-size: var(--v2-fs-xs); color: var(--v2-ink-faint); line-height: 1.6; }
.login-foot a { color: var(--v2-accent); }
.login-beta { margin-top: 20px; text-align: start; }
.login-lang { margin-inline-start: auto; }
/* A refused sign-in, said in words, above the buttons that retry it. */
.login-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--v2-r-md, 12px);
  background: var(--v2-negative-tint);
  color: var(--v2-negative);
  font-size: var(--v2-fs-sm);
  line-height: 1.55;
}
.login-alert:focus { outline: 2px solid var(--v2-negative); outline-offset: 2px; }
/* The invitation page reuses the login card; its facts sit in a quiet list. */
.login-meta { margin: 18px 0; border-top: 1px solid var(--v2-line, rgba(0,0,0,.08)); }
.login-meta-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--v2-line, rgba(0,0,0,.08)); font-size: var(--v2-fs-sm); }
.login-meta-row span { color: var(--v2-ink-soft); }
.login-meta-row b { font-weight: 600; overflow-wrap: anywhere; text-align: end; }
.login-note { font-size: var(--v2-fs-xs); color: var(--v2-ink-soft); line-height: 1.55; margin-bottom: 18px; }
