/* Masked Email Manager (maskedmail.app).
   Palette is lifted from the app icon: #23022C ink, #F0ECDF cream. */

:root {
  color-scheme: light dark;

  --ink: #23022c;
  --ink-2: #2d0938;
  --cream: #f0ecdf;

  --paper: #fbfaf6;
  --surface: #ffffff;
  --text: #1b1220;
  --muted: #5f5468;
  --line: #e6e1d6;
  --accent: #7c3f96;
  --accent-soft: #f3ecf6;
  --on-ink: #f0ecdf;
  --on-ink-muted: #b6a6be;
  --on-ink-line: #43254e;

  --radius: 14px;
  --container: 68rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17051d;
    --surface: #20092a;
    --text: #ece5ef;
    --muted: #b3a2bb;
    --line: #37183f;
    --accent: #d0a3e2;
    --accent-soft: #2a0f34;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}
h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.narrow {
  max-width: 46rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface);
  padding: 0.6rem 1rem;
  border-radius: 8px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Narrow screens: brand and the download button hold the top row, and the
   section links become their own scrollable row underneath. */
@media (max-width: 47.99rem) {
  .site-nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1.1rem;
    padding-bottom: 0.75rem;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .header-cta {
    padding: 0.5rem 0.9rem;
    font-size: 0.95rem;
  }

  .brand {
    font-size: 0.95rem;
  }

  .brand img {
    width: 26px;
    height: 26px;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--ink-2);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--accent);
}

/* Invert the primary button on ink and dark grounds: it has no contrast there. */
.on-ink .btn-primary,
.hero .btn-primary {
  background: var(--cream);
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  .btn-primary {
    background: var(--cream);
    color: var(--ink);
  }

  .btn-primary:hover {
    background: #fff;
  }
}

.on-ink .btn-primary:hover,
.hero .btn-primary:hover {
  background: #fff;
}

.on-ink .btn-ghost,
.hero .btn-ghost {
  background: transparent;
  border-color: var(--on-ink-line);
  color: var(--on-ink);
}

.on-ink .btn-ghost:hover,
.hero .btn-ghost:hover {
  border-color: var(--on-ink);
}

/* Sections */

section {
  padding: 4.5rem 0;
}

.section-head {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.on-ink {
  background: var(--ink);
  color: var(--on-ink);
}

.on-ink h2,
.on-ink h3 {
  color: var(--on-ink);
}

.on-ink p {
  color: var(--on-ink-muted);
}

.on-ink .eyebrow,
.on-ink a:not(.btn),
.hero a:not(.btn) {
  color: #d5b6e4;
}

/* Hero */

.hero {
  background: var(--ink);
  color: var(--on-ink);
  padding: clamp(3rem, 7vw, 5.5rem) 0 0;
  overflow: hidden;
}

.hero .container {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  align-items: end;
}

@media (min-width: 62rem) {
  .hero .container {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
  }
}

.hero-copy {
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.hero h1 {
  color: var(--on-ink);
}

.hero-lead {
  font-size: 1.2rem;
  color: var(--on-ink-muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 1rem;
}

.hero-note {
  font-size: 0.95rem;
  color: var(--on-ink-muted);
  margin: 0;
}

.hero-shot {
  display: flex;
  justify-content: center;
}

.hero-shot img {
  width: min(19rem, 78%);
  filter: drop-shadow(0 24px 48px rgb(0 0 0 / 45%));
}

/* Screenshots */

.device {
  display: block;
  width: 100%;
  border-radius: 8.3% / 3.9%;
}

.hero-shot .device,
.showcase-shot .device {
  filter: drop-shadow(0 18px 40px rgb(0 0 0 / 28%));
}

.hero-shot .device {
  filter: drop-shadow(0 24px 48px rgb(0 0 0 / 45%));
}

.showcase .container {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  grid-template-columns: 1fr;
}

/* Narrow screens read the claim first, then the proof. */
.showcase-copy {
  order: 1;
}

.showcase-shot {
  order: 2;
  display: flex;
  justify-content: center;
}

/* A quiet band between the showcase rows, so three of them do not read as one
   long stretch of the same surface. */
.showcase.reverse {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.showcase-shot .device {
  width: min(17rem, 70%);
}

@media (min-width: 62rem) {
  .showcase .container {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
  }

  /* Alternate which side the phone sits on without reordering the markup. */
  .showcase .showcase-shot {
    order: 1;
  }

  .showcase .showcase-copy {
    order: 2;
  }

  .showcase.reverse .showcase-shot {
    order: 2;
  }

  .showcase.reverse .showcase-copy {
    order: 1;
  }

  .showcase-shot .device {
    width: min(19rem, 100%);
  }
}

.showcase-copy h2 {
  margin-bottom: 0.6rem;
}

.showcase-copy p {
  color: var(--muted);
  max-width: 34rem;
}

.showcase-copy p:last-child {
  margin-bottom: 0;
}

/* Cards */

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h3 {
  margin-bottom: 0.4rem;
}

.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--accent);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.on-ink .card {
  background: var(--ink-2);
  border-color: var(--on-ink-line);
}

/* --muted is tuned for the paper ground and drops to 2.45:1 on ink, so every
   muted run inside an ink section needs the inverted tone. */
.on-ink .card p,
.on-ink .prose .meta {
  color: var(--on-ink-muted);
}

/* FAQ */

.faq {
  border-top: 1px solid var(--line);
  max-width: 46rem;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  padding: 1.1rem 2rem 1.1rem 0;
  font-weight: 600;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 1rem;
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--accent);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details > *:not(summary) {
  color: var(--muted);
}

.faq details > p:last-child {
  padding-bottom: 0.5rem;
}

/* Prose pages */

.page-head {
  padding: 3.5rem 0 1rem;
}

.page-head p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 40rem;
}

.prose {
  padding-top: 1rem;
}

.prose h2 {
  margin-top: 2.5rem;
}

.prose h3 {
  margin-top: 1.75rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin: 0 0 1.1em;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose .meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.25rem;
  margin: 1.75rem 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* CTA */

.cta {
  text-align: center;
}

.cta .container {
  max-width: 40rem;
}

.cta .hero-actions {
  justify-content: center;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 2.5rem;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  margin-bottom: 2.5rem;
}

.footer-grid h2 {
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 0.4rem;
}

.footer-grid a {
  color: var(--text);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: var(--muted);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--accent);
}
