/* dmail's landing page. Soul sheet: docs/landing-pages/dmail.md. A showcase: nothing here is the
   app, nothing is a screenshot, and the page asks for nothing but its own files, the app's two
   fonts, its emblem and its icon. Everything is in rem and one column holds the first screen,
   every section and the top bar. From 1024 px up the root size follows the window, so a 4K screen
   shows the same page larger instead of a small page in a field.
   The pieces of the product (.card and below) wear dmail's own light look: its paper, its green,
   Onest for words and DM Sans for every address. The page around them is white and ink, and the
   only colour on it is the one each address carries, so you can tell them apart. */

@font-face { font-family: 'Gabarito'; src: url('/welcome/fonts/gabarito-v9-latin.woff2') format('woff2'); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/welcome/fonts/figtree-v9-latin.woff2') format('woff2'); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Onest'; src: url('/fonts/onest-var-latin.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/dm-sans-var-latin.woff2') format('woff2'); font-weight: 100 1000; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --ground: #ffffff; --ink: #16161a; --soft: #4a4a55; --faint: #696974; --rule: #e6e6ec;
  --display: 'Gabarito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --btn-bg: #16161a; --btn-ink: #ffffff; --btn-hover: #2e2e36;
  --quiet-bg: #ffffff; --quiet-ink: #16161a; --quiet-line: #d5d5de; --quiet-hover: #f3f3f6;
  --pill: rgb(255 255 255 / 0.86); --pill-line: rgb(22 22 26 / 0.1); --pill-shadow: rgb(22 22 26 / 0.12);
  --focus: #2456d6; --select: #dfe7ff;
  --tab-bg: #f0f0f4; --tab-ink: #4a4a55; --tab-on: #16161a; --tab-on-ink: #ffffff;
  --sb-thumb: #d3d3dc; --sb-hover: #b7b7c4; --sb-active: #9898a6;
  /* one colour per address; each reads at 4.5:1 or better as white-on-colour and as a tag */
  --c-hello: #a8532f; --c-shop: #6246b8; --c-bank: #24796e; --c-flights: #2f6fb5; --c-news: #8a7417; --c-gym: #a93a6c;
  /* the product's own look */
  --p-surface: #ffffff; --p-ground: #f7f6f2; --p-tile: #f1efe9;
  --p-ink: #141311; --p-muted: #5f5a52; --p-faint: #6f6a61; --p-rule: #e6e2d9; --p-rule-strong: #d6d1c6;
  --p-accent: #48b768; --p-accent-ink: #0f2a1a; --p-accent-text: #27794e; --p-accent-soft: rgb(72 183 104 / 0.14);
  --p-warn: #8a5a08; --p-warn-soft: rgb(201 138 28 / 0.16); --p-bad: #b23325; --p-bad-soft: rgb(196 58 44 / 0.1);
  --p-font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --p-addr: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --p-shadow: 0 0 0 1px #e4e4ea, 0 1px 2px rgb(0 0 0 / 0.03), 0 1rem 2.5rem rgb(22 22 26 / 0.09);
  --pad: 1.25rem; --column: 100vw; --bar: 3.75rem;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}
@media (min-width: 64rem) {
  :root { --pad: 2.5rem; --column: 72rem; --bar: 4.25rem; }
  html { font-size: clamp(100%, min(1.1111vw, 1.7778vh), 250%); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1.0625rem/1.5 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
::selection { background: var(--select); color: var(--ink); }
svg, img { display: block; max-width: 100%; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2 { font-family: var(--display); font-weight: 700; text-wrap: balance; }
h1 { letter-spacing: -0.025em; line-height: 1.04; font-size: clamp(2.375rem, 1.1rem + 5.6vw, 4.75rem); }
h2 { letter-spacing: -0.02em; line-height: 1.08; font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3.25rem); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 0.5rem; }
[hidden] { display: none !important; }
.mono { font-family: var(--p-addr); font-feature-settings: 'tnum' 1; }

/* The page's own scrollbar, on pointer devices only: touch screens keep their overlay bar. In px,
   so it does not grow on a 4K screen. The lane is the page's ground, which is one colour all the
   way down. Firefox's two properties sit behind @supports, because Chrome treats them as final
   and would drop the rules above. */
@media (hover: hover) and (pointer: fine) {
  html::-webkit-scrollbar { width: 12px; height: 12px; }
  html::-webkit-scrollbar-track { background: var(--ground); }
  html::-webkit-scrollbar-button { display: none; }
  html::-webkit-scrollbar-thumb { background-color: var(--sb-thumb); background-clip: padding-box; border: 3px solid transparent; border-radius: 999px; min-height: 48px; }
  html::-webkit-scrollbar-thumb:hover { background-color: var(--sb-hover); }
  html::-webkit-scrollbar-thumb:active { background-color: var(--sb-active); }
}
@supports not selector(::-webkit-scrollbar) { html { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) var(--ground); } }

/* one column: the first screen and every section share these two edges */
.col { padding-inline: max(var(--pad), calc((100% - var(--column)) / 2)); }

/* top bar: the full width at the top, a pill once the page moves, always on screen */
.bar { position: fixed; inset: 0 0 auto; z-index: 40; pointer-events: none; }
.bar-in {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.75rem;
  height: var(--bar); max-width: 100%; margin-inline: auto; border-radius: 999px;
  transition: max-width 0.34s var(--ease), margin-top 0.34s var(--ease), padding 0.34s var(--ease), height 0.34s var(--ease), background-color 0.2s ease-out, box-shadow 0.2s ease-out;
}
.bar.is-pill .bar-in {
  max-width: min(24rem, 100%); height: 3.25rem; margin-top: 0.625rem; padding-inline: 1rem 0.4375rem;
  background: var(--pill); box-shadow: 0 0 0 1px var(--pill-line), 0 0.625rem 1.75rem var(--pill-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; font-family: var(--p-font); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand img { height: 1.875rem; width: auto; flex: none; }
.bar-nav { display: flex; align-items: center; gap: 1.5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 3.125rem; padding-inline: 1.625rem; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-ink); font-weight: 650; font-size: 1.0625rem; white-space: nowrap;
  transition: transform 0.16s ease-out, background-color 0.16s ease-out;
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) { .btn:hover { background: var(--btn-hover); } }
.btn-s { height: 2.375rem; padding-inline: 1.0625rem; font-size: 0.9375rem; }
.btn-quiet { background: var(--quiet-bg); color: var(--quiet-ink); box-shadow: inset 0 0 0 1px var(--quiet-line); }
@media (hover: hover) { .btn-quiet:hover { background: var(--quiet-hover); } }

/* first screen: the headline, one line, one object. No button: the bar has it. */
.hero {
  min-height: max(100svh, 31rem);
  padding-top: calc(var(--bar) + clamp(0.25rem, 1.5svh, 1.25rem)); padding-bottom: clamp(0.875rem, 3svh, 2rem);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.hero-line { margin-top: clamp(0.625rem, 1.8svh, 1.125rem); max-width: 37rem; color: var(--soft); font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.3125rem); line-height: 1.45; text-wrap: balance; }
.hero-obj { width: 100%; margin-top: clamp(1.125rem, 3.4svh, 2.5rem); display: flex; justify-content: center; text-align: left; }

/* sections: a centred headline, one line, then one object */
.sec { padding-block: clamp(4rem, 9vw, 7.5rem); display: flex; flex-direction: column; align-items: center; text-align: center; }
.lede { margin-top: 1rem; max-width: 37rem; color: var(--soft); font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem); line-height: 1.45; text-wrap: balance; }
.obj { width: 100%; margin-top: clamp(2rem, 4.2vw, 3.25rem); display: flex; justify-content: center; text-align: left; }

/* ---------- pieces of the product ---------- */
.card { background: var(--p-surface); color: var(--p-ink); border-radius: 1.125rem; box-shadow: var(--p-shadow); font-family: var(--p-font); font-size: 0.9375rem; line-height: 1.45; }
.av { flex: none; display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--h, #6f6a61); color: #fff; font: 700 0.875rem/1 var(--p-font); font-style: normal; }
.h-hello { --h: var(--c-hello); } .h-shop { --h: var(--c-shop); } .h-bank { --h: var(--c-bank); }
.h-flights { --h: var(--c-flights); } .h-news { --h: var(--c-news); } .h-gym { --h: var(--c-gym); }
.pill { display: inline-flex; align-items: center; justify-content: center; height: 1.625rem; padding-inline: 0.625rem; border-radius: 999px; background: var(--p-tile); color: var(--p-muted); font: 600 0.75rem/1 var(--p-font); white-space: nowrap; }
.p-btn { display: inline-flex; align-items: center; justify-content: center; height: 2.5rem; padding-inline: 1.125rem; border-radius: 0.75rem; background: var(--p-accent); color: var(--p-accent-ink); font: 650 0.9375rem/1 var(--p-font); white-space: nowrap; transition: transform 0.12s ease-out, background-color 0.12s linear; }
button.p-btn:active { transform: scale(0.97); }
.p-btn-line { background: var(--p-surface); color: var(--p-ink); box-shadow: inset 0 0 0 1px var(--p-rule-strong); }
@media (hover: hover) { button.p-btn-line:hover { background: var(--p-tile); } }

/* tabs over a viewer: one panel showing, every panel in the same box, so nothing moves */
.viewer { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.tabs { display: inline-flex; gap: 0.25rem; padding: 0.25rem; border-radius: 999px; background: var(--tab-bg); max-width: 100%; }
.tabs [role='tab'] { height: 2.5rem; padding-inline: 1rem; border-radius: 999px; color: var(--tab-ink); font-weight: 600; font-size: 0.9375rem; white-space: nowrap; transition: background-color 0.16s ease-out, color 0.16s ease-out; }
.tabs [role='tab'][aria-selected='true'] { background: var(--tab-on); color: var(--tab-on-ink); }
@media (hover: hover) { .tabs [role='tab']:not([aria-selected='true']):hover { color: var(--ink); } }
.panels { width: 100%; display: grid; justify-items: center; }
.panels > [role='tabpanel'] { grid-area: 1 / 1; width: 100%; visibility: hidden; opacity: 0; transition: opacity 0.18s ease-out; display: flex; justify-content: center; }
.panels > [role='tabpanel'].is-on { visibility: visible; opacity: 1; }

/* a received mail's head */
.m-head { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.m-who { min-width: 0; display: flex; flex-direction: column; }
.m-who b { font-weight: 650; font-size: 0.9375rem; }
.m-who span { color: var(--p-muted); font-size: 0.8125rem; overflow-wrap: anywhere; }
.m-to { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.375rem; max-width: 100%; height: 1.75rem; padding-inline: 0.625rem; border-radius: 999px; background: var(--p-tile); color: var(--p-ink); font: 500 0.8125rem/1 var(--p-addr); white-space: nowrap; }
.m-to i { font-style: normal; color: var(--p-muted); }
.tag { color: var(--p-faint); font: 650 0.75rem/1 var(--p-font); letter-spacing: 0.08em; text-transform: uppercase; }

/* the inbox: every address in one list, and the chips that pick one */
.inbox { --rows: 5; --row-h: 3.875rem; width: 100%; max-width: 46rem; padding: 1.125rem 1.375rem 0.375rem; display: flex; flex-direction: column; }
.in-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-bottom: 1rem; }
.in-chips button { display: inline-flex; align-items: center; gap: 0.4375rem; height: 2.25rem; padding-inline: 0.8125rem; border-radius: 999px; background: var(--p-surface); box-shadow: inset 0 0 0 1px #d9d9e0; font: 600 0.9375rem/1 var(--p-addr); color: var(--p-ink); transition: background-color 0.12s linear, color 0.12s linear, box-shadow 0.12s linear, transform 0.12s ease-out; }
.in-chips button:active { transform: scale(0.96); }
.in-chips button i { width: 0.5625rem; height: 0.5625rem; border-radius: 50%; background: var(--h); transition: background-color 0.12s linear; }
@media (hover: hover) { .in-chips button:hover { background: #f4f4f7; } }
.in-chips button[aria-pressed='true'] { background: var(--h, #16161a); color: #fff; box-shadow: none; }
.in-chips button[aria-pressed='true'] i { background: #fff; }
.in-list { height: calc(var(--rows) * var(--row-h)); overflow: hidden; border-top: 1px solid var(--p-rule); }
.in-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; column-gap: 0.875rem; height: var(--row-h); border-bottom: 1px solid var(--p-rule); }
.in-row.is-off { display: none; }
.in-row .av { background: #ededf2; color: #3c3c46; }
.in-main { min-width: 0; display: flex; flex-direction: column; gap: 0.0625rem; }
.in-main b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.in-main span { color: var(--p-muted); font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.in-to { display: inline-flex; align-items: center; height: 1.625rem; padding-inline: 0.5625rem; border-radius: 999px; background: #f1f1f5; color: var(--h); background: color-mix(in srgb, var(--h) 13%, #fff); color: color-mix(in srgb, var(--h) 82%, #000); font: 600 0.8125rem/1 var(--p-addr); white-space: nowrap; }
.in-time { width: 2.75rem; text-align: right; color: var(--p-faint); font: 500 0.8125rem/1 var(--p-addr); font-feature-settings: 'tnum' 1; }
.in-count { display: flex; align-items: center; min-height: 2.75rem; color: var(--p-muted); font-size: 0.875rem; }
/* short windows give up rows before the headline gives up a pixel */
@media (min-width: 48rem) and (max-height: 47rem) { .inbox { --rows: 4; } }
@media (min-width: 48rem) and (max-height: 43rem) { .inbox { --rows: 3; } }
@media (max-width: 47.99rem) {
  .inbox { --rows: 4; --row-h: 3.625rem; padding: 0.875rem 1rem 0.125rem; }
  /* six addresses as three by two; a second tap on one shows every address again */
  .in-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.375rem; padding-bottom: 0.75rem; }
  .in-chips [data-filter='all'] { display: none; }
  .in-chips button { justify-content: center; gap: 0.375rem; padding-inline: 0.375rem; font-size: 0.875rem; }
  .in-chips button i { width: 0.5rem; height: 0.5rem; }
  .in-row { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 0.625rem; }
  .in-row .av { width: 2rem; height: 2rem; font-size: 0.8125rem; }
  .in-time { display: none; }
  .in-count { min-height: 2.5rem; }
}
@media (max-width: 47.99rem) and (max-height: 45rem) { .inbox { --rows: 3; } }
@media (max-width: 47.99rem) and (max-height: 39rem) { .inbox { --rows: 2; } .in-count { min-height: 2.125rem; } .in-chips { padding-bottom: 0.625rem; } }

/* one address, three senders */
.signup { width: 100%; max-width: 36rem; padding: 0.375rem 1.375rem 0; }
.signup .in-row { height: 3.875rem; grid-template-columns: auto minmax(0, 1fr) auto; }
.signup p { display: flex; align-items: center; min-height: 3.25rem; padding-block: 0.625rem; color: var(--p-muted); }
.signup p b { color: var(--p-ink); font-weight: 600; }

/* reply: a mail that arrived, and the reply's From, filled in by itself */
.reply-grid { width: 100%; max-width: 56rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.25rem; }
.reply-grid .card { min-width: 0; padding: 1.375rem 1.5rem; display: flex; flex-direction: column; gap: 0.875rem; align-self: stretch; }
.m-sub { font-weight: 650; font-size: 1.0625rem; letter-spacing: -0.01em; }
.m-snip { color: var(--p-muted); }
.reply-arrow { color: var(--ink); width: 2rem; height: 2rem; }
.r-rows { display: flex; flex-direction: column; }
.r-row { display: grid; grid-template-columns: 4.25rem 1fr; align-items: center; min-height: 2.75rem; border-top: 1px solid var(--p-rule); }
.r-row:first-child { border-top: 0; }
.r-row > span:first-child { color: var(--p-muted); font-size: 0.875rem; }
.r-row > :last-child { min-width: 0; overflow-wrap: anywhere; }
.from-auto { justify-self: start; display: inline-flex; align-items: center; height: 2rem; padding-inline: 0.75rem; border-radius: 0.625rem; background: var(--p-accent-soft); color: var(--p-ink); font: 600 0.9375rem/1 var(--p-addr); }
@media (max-width: 47.99rem) {
  .reply-grid { grid-template-columns: 1fr; gap: 0.75rem; max-width: 30rem; }
  .reply-arrow { justify-self: center; transform: rotate(90deg); }
  .reply-grid .card { padding: 1.125rem; }
}

/* Spam and Not spam */
.spamdemo { width: 100%; max-width: 34rem; padding: 1.375rem 1.5rem; display: flex; flex-direction: column; gap: 1.125rem; }
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.spamdemo[data-folder='spam'] .pill { background: var(--p-bad-soft); color: var(--p-bad); }
.sp-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.125rem; border-top: 1px solid var(--p-rule); }
.sp-bar p { color: var(--p-muted); min-height: 2.9em; display: flex; align-items: center; overflow-wrap: anywhere; }
.sp-bar .p-btn { min-width: 6.25rem; }
@media (max-width: 30rem) { .sp-bar { flex-direction: column; align-items: stretch; } .sp-bar .p-btn { height: 2.75rem; width: 100%; } }

/* the reader: three protections, one at a time */
.reader { width: 100%; max-width: 40rem; padding: 1.375rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.shield { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.4375rem; height: 1.875rem; padding-inline: 0.625rem 0.75rem; border-radius: 0.5rem; background: var(--p-tile); color: var(--p-ink); font-weight: 600; font-size: 0.8125rem; }
.shield svg { width: 1rem; height: 1rem; color: var(--p-accent-text); }
.r-note { color: var(--p-muted); font-size: 0.875rem; }
.paper { border-radius: 0.75rem; background: var(--p-ground); padding: 1.125rem 1.25rem; display: flex; flex-direction: column; gap: 0.625rem; }
.paper h3 { font: 700 1.125rem/1.25 var(--p-font); letter-spacing: -0.01em; }
.paper p { color: var(--p-muted); }
.paper .lnk { color: #1a56c4; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.scene { height: 5.5rem; border-radius: 0.5rem; background: linear-gradient(#e9a85c 0 62%, #b3562c 62%); position: relative; overflow: hidden; }
.scene::after { content: ''; position: absolute; right: 16%; top: 18%; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: #f6d7a4; }
.check { border-top: 1px solid var(--p-rule); padding-top: 1.125rem; display: flex; flex-direction: column; gap: 0.75rem; }
.check b { font-size: 1.0625rem; }
.check .url { display: flex; align-items: center; min-height: 2.5rem; padding: 0.5rem 0.75rem; border-radius: 0.625rem; background: var(--p-tile); font: 500 0.875rem/1.3 var(--p-addr); overflow-wrap: anywhere; }
.check-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.check-btns .p-btn { height: 2.375rem; }
.warn { display: flex; align-items: flex-start; gap: 0.625rem; padding: 0.75rem 0.875rem; border-radius: 0.75rem; background: var(--p-warn-soft); color: #5c3c05; font-weight: 550; }
.warn svg { flex: none; width: 1.125rem; height: 1.125rem; margin-top: 0.125rem; color: var(--p-warn); }
.pics { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; color: var(--p-muted); font-size: 0.875rem; }
.pics .p-btn { height: 2.125rem; padding-inline: 0.875rem; font-size: 0.8125rem; }

/* the close */
.close { padding-block: clamp(4.5rem, 10vw, 8rem) clamp(3rem, 6vw, 5rem); display: flex; flex-direction: column; align-items: center; text-align: center; }
.close .lede { margin-bottom: 2rem; }
.foot { padding-block: 1.5rem 2.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--faint); font-size: 0.875rem; border-top: 1px solid var(--rule); }
.foot a { color: var(--soft); min-height: 2rem; display: inline-flex; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar-in, .btn, .p-btn, .in-chips button, .tabs [role='tab'], .panels > [role='tabpanel'] { transition: none; }
}
