/* Nib Mail — nibmail.eu
   Ink on white, slate-black in dark mode. No third-party resources. */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-ext-500-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f5f6f8;
  --surface-2: #eceff3;
  --ink: #10141b;        /* body text: 18.4:1 on --bg */
  --ink-accent: #1b2230; /* buttons, links */
  --muted: #4f5a6b;      /* 7.0:1 on --bg, 6.4:1 on --surface */
  --line: #dde2e9;
  --line-strong: #b9c1cd;
  --on-accent: #ffffff;
  --focus: #1b2230;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e13;
    --surface: #131820;
    --surface-2: #1a2029;
    --ink: #eef1f6;        /* 17.0:1 on --bg */
    --ink-accent: #dfe4ec;
    --muted: #a3adbc;      /* 8.4:1 on --bg, 7.6:1 on --surface */
    --line: #232a35;
    --line-strong: #3a4352;
    --on-accent: #0b0e13;
    --focus: #c3cad6;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--ink-accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
::selection { background: color-mix(in srgb, var(--ink) 16%, transparent); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(44px, 7.2vw, 88px); }
h2 { font-size: clamp(34px, 4.6vw, 54px); }
h3 { font-size: clamp(24px, 2.4vw, 28px); line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  display: block;
  font: 600 12px/1.4 var(--sans);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.6; color: var(--muted); max-width: 38em; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 14px; background: var(--ink-accent); color: var(--on-accent);
  border-radius: var(--radius-sm); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); text-decoration: none;
  font: 500 30px/1 var(--serif); letter-spacing: 0;
}
.wordmark img { width: 28px; height: 28px; }
.site-nav { margin-left: auto; display: flex; gap: clamp(14px, 3vw, 28px); }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 420px) { .site-nav .nav-optional { display: none; } }

/* ---------- buttons / store badge ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 20px 8px 16px;
  background: var(--ink-accent); color: var(--on-accent);
  border-radius: var(--radius); text-decoration: none;
}
.store-badge:hover { opacity: .92; }
.store-badge .glyph { width: 26px; height: 26px; flex: none; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.15; }
.store-badge small { font-size: 11px; letter-spacing: .04em; }
.store-badge strong { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.store-note { font-size: 14px; color: var(--muted); }
.text-link { font-weight: 500; }

/* ---------- sections ---------- */
section { padding: clamp(64px, 9vw, 120px) 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 760px; }

.hero { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 7vw, 88px); }
.hero-copy { display: grid; gap: 24px; max-width: 820px; }
.hero h1 em { font-style: italic; }

/* screenshot placeholders */
.shots {
  margin-top: clamp(48px, 6vw, 72px);
  display: grid; grid-template-columns: minmax(0, 3.2fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 32px); align-items: end;
}
.shot {
  margin: 0;
  display: grid; place-items: center; text-align: center;
  padding: 16px;
  background: var(--surface);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--muted); font-size: 14px; line-height: 1.45;
}
.shot strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.shot code { font: 12px var(--mono); }
.shot-mac { aspect-ratio: 16 / 10; }
.shot-iphone { aspect-ratio: 9 / 19.5; border-radius: 18px; }
@media (max-width: 640px) {
  .shots { grid-template-columns: 1fr; }
  .shot-iphone { width: min(62%, 240px); justify-self: center; }
}

/* what Nib does (OAuth statement) */
.purpose {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
}
.purpose-card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface);
  display: grid; gap: 12px; align-content: start;
}
.purpose-card ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.purpose-card .scope { font: 13px/1.5 var(--mono); color: var(--muted); }
.purpose-note { margin-top: 28px; max-width: 760px; color: var(--muted); }
@media (max-width: 760px) { .purpose { grid-template-columns: 1fr; } }

/* features */
.features {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.feature {
  padding: 28px 28px 32px 0;
  border-bottom: 1px solid var(--line);
  display: grid; gap: 10px; align-content: start;
}
.feature:nth-child(3n+2), .feature:nth-child(3n) { padding-left: 28px; border-left: 1px solid var(--line); }
.feature p { color: var(--muted); font-size: 16px; }
.feature .eyebrow { font-size: 11px; }
@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature:nth-child(3n+2), .feature:nth-child(3n) { padding-left: 0; border-left: 0; }
  .feature:nth-child(2n) { padding-left: 24px; border-left: 1px solid var(--line); }
  .feature { padding-right: 24px; }
}
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(2n) { padding: 24px 0; border-left: 0; }
}

/* privacy */
.privacy-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 88px); align-items: start;
}
.checks { list-style: none; margin: 0; padding: 0; display: grid; }
.checks li {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.checks li:first-child { border-top: 1px solid var(--line); }
.checks svg { width: 18px; height: 18px; margin-top: 4px; color: var(--ink); }
.checks strong { display: block; font-weight: 600; }
.checks span { color: var(--muted); font-size: 16px; }
@media (max-width: 800px) { .privacy-grid { grid-template-columns: 1fr; } }

/* platforms */
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.platform {
  padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  display: grid; gap: 12px; align-content: start;
}
.platform svg { width: 32px; height: 32px; color: var(--ink); }
.platform p { color: var(--muted); font-size: 16px; }
@media (max-width: 760px) { .platforms { grid-template-columns: 1fr; } }

.closing { text-align: left; }
.closing .wrap { display: grid; gap: 24px; justify-items: start; }

/* ---------- prose (legal, support) ---------- */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 40px); }
.page-head .wrap { display: grid; gap: 16px; }
.prose-wrap { padding-bottom: clamp(64px, 8vw, 112px); }
.prose { max-width: 720px; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: clamp(28px, 3.2vw, 36px); margin-top: 1.6em; }
.prose h3 { font-size: clamp(22px, 2.2vw, 26px); margin-top: 1.4em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose code {
  font: .88em var(--mono); padding: .1em .35em;
  background: var(--surface-2); border-radius: var(--radius-sm);
}
.prose .doc-meta { color: var(--muted); font-size: 15px; }
.prose kbd {
  font: .85em var(--mono); padding: .05em .4em;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--radius-sm);
}

.support-layout {
  display: grid; grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
.toc { position: sticky; top: 24px; font-size: 15px; }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
@media (max-width: 820px) {
  .support-layout { grid-template-columns: 1fr; }
  .toc { position: static; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
}
.contact-card {
  padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); display: grid; gap: 8px; max-width: 720px;
}
.contact-card a { font-size: 20px; font-weight: 600; }
.howto { scroll-margin-top: 24px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 56px; font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: start; }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer address strong { color: var(--ink); font-weight: 600; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.footer-links a { text-decoration: none; }
.footer-legal { grid-column: 1 / -1; font-size: 13px; }
@media (max-width: 640px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.notfound { padding: clamp(80px, 14vw, 160px) 0; }
.notfound .wrap { display: grid; gap: 20px; justify-items: start; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
