/* inboxfold.app, part 1 of 3 (base): fonts, colours, header, footer.
   build.mjs joins css/base.css + home.css + doc.css into web/styles.css.
   Colours come from the app theme (tailwind.config.js, brand.*). Fonts are the app's own
   (Manrope, Nunito for "Fold"; SIL Open Font License, see fonts/OFL-*.txt), served from
   this site. Nothing is loaded from other hosts. */

@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url("fonts/manrope-400.woff") format("woff"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url("fonts/manrope-500.woff") format("woff"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url("fonts/manrope-600.woff") format("woff"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("fonts/manrope-700.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("fonts/nunito-700.ttf") format("truetype"); }

:root {
  color-scheme: light dark;
  --bg: #faf8f5;            /* brand.paper */
  --surface: #ffffff;       /* brand.surface */
  --ink: #2c2942;           /* brand.ink */
  --muted: #57536b;         /* the welcome screen's grey text */
  --accent: #4f46e5;        /* brand.iris-text: links, 6.6:1 on paper */
  --iris: #5b55e7;          /* brand.iris */
  --iris-soft: rgba(91, 85, 231, 0.1);   /* the app's bg-brand-iris/10 */
  --border: #e6e2ed;        /* brand.border */
  --logo-iris: #5b55e7;
  --logo-ink: #2c2942;
  --code-bg: #efecf5;
  --note-bg: #f1eff9;
  --shadow: 0 1px 2px rgba(44, 41, 66, 0.04), 0 6px 20px rgba(44, 41, 66, 0.06);
  --glow-a: rgba(140, 190, 250, 0.35);   /* the app's logo glow */
  --glow-b: rgba(91, 85, 231, 0.12);
  --draft-bg: #b42318;
  --draft-ink: #ffffff;
  --mark-bg: #fde68a;
  --mark-ink: #2c2942;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17151f;
    --surface: #211e2c;
    --ink: #eceaf4;
    --muted: #b4b0c6;
    --accent: #aaa6ff;
    --iris: #9d98ff;
    --iris-soft: rgba(157, 152, 255, 0.14);
    --border: #3a3650;
    --logo-ink: #eceaf4;    /* the ink fold and "Inbox" turn light on a dark page */
    --code-bg: #2b2739;
    --note-bg: #221f30;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --glow-a: rgba(90, 120, 220, 0.18);
    --glow-b: rgba(91, 85, 231, 0.16);
    --mark-bg: #7a5d00;
    --mark-ink: #ffffff;
  }
}

*,
*::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-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
summary:focus-visible,
.table-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.draft-banner {
  background: var(--draft-bg);
  color: var(--draft-ink);
  font-weight: 700;
  text-align: center;
  padding: 10px 16px;
  letter-spacing: 0.02em;
}

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

.skip-link:focus {
  left: 16px;
  top: 8px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 8px;
  z-index: 10;
}

/* The logo: the mark + "Inbox" (Manrope, ink) "Fold" (Nunito, iris), as in the app. */
.mark-iris { fill: var(--logo-iris); }
.mark-ink { fill: var(--logo-ink); }
.wordmark { display: inline-flex; align-items: baseline; letter-spacing: -0.02em; line-height: 1.15; }
.wm-inbox { font-family: var(--font); font-weight: 600; color: var(--logo-ink); }
.wm-fold { font-family: "Nunito", var(--font); font-weight: 700; color: var(--logo-iris); }

/* Header: the small logo row (InboxFoldBrandRow) and, on wider screens, the page links. */
.bar {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 6px 0;
}

.brand-mark { width: 28px; height: 28px; flex: none; }
.brand .wordmark { font-size: 1.25rem; }
.brand .wm-inbox { font-weight: 700; }

.header-nav { display: none; }

@media (min-width: 720px) {
  .header-nav {
    display: flex;
    gap: 24px;
    font-size: 0.9375rem;
    font-weight: 500;
  }
  .page-home .header-nav { margin-left: auto; }
}

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

.header-nav a:hover,
.site-footer nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.header-nav a[aria-current="page"],
.site-footer nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

/* On the home page the hero carries the logo, so phones get no header at all. */
@media (max-width: 719px) {
  .page-home .site-header { display: none; }
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
}

.site-footer .bar { padding-top: 32px; padding-bottom: 40px; }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  margin-bottom: 12px;
}

.footer-mark { width: 24px; height: 24px; }
.footer-brand .wordmark { font-size: 1.0625rem; }

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 20px;
  margin-bottom: 8px;
}

.site-footer nav a { display: inline-block; padding: 8px 0; }  /* larger tap targets */
.site-footer p { margin: 0 0 6px; }

/* inboxfold.app, part 2 of 3 (home): the landing page, laid out like the app's welcome screen. */

.hero {
  text-align: center;
  padding: 48px 16px 8px;
  background:
    radial-gradient(closest-side, var(--glow-a), transparent) 50% 0 / 560px 320px no-repeat,
    radial-gradient(closest-side, var(--glow-b), transparent) 50% 120px / 760px 420px no-repeat;
}

/* InboxFoldLogo size="lg" layout="center-2row": the mark beside the wordmark, centred. */
.hero-logo {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.hero-mark { width: 64px; height: 64px; flex: none; }
.hero-logo .wordmark { font-size: 2.625rem; }

/* The tagline: "Many emails." in ink, "A few things that matter." in iris (WelcomeIntro). */
.tagline {
  margin: 14px 0 0;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.tagline-start,
.tagline-end { display: block; }
.tagline-end { color: var(--iris); }

.lead {
  max-width: 34rem;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* Example cards, as on the welcome screen. */
.examples {
  list-style: none;
  max-width: 27rem;
  margin: 28px auto 0;
  padding: 0;
  display: grid;
  gap: 10px;
  text-align: left;
}

.example-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.example-icon,
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--iris-soft);
  color: var(--iris);
}

.icon { width: 18px; height: 18px; }

.example-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.example-title { font-size: 0.96875rem; line-height: 1.4; font-weight: 700; }
.example-when { font-size: 0.84375rem; line-height: 1.4; color: var(--muted); }

.chip {
  flex: none;
  border-radius: 999px;
  background: var(--iris-soft);
  color: var(--accent);
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.caption {
  margin: 12px 0 0;
  font-size: 0.84375rem;
  color: var(--muted);
}

/* Sections */
.home-section {
  max-width: 792px;
  margin: 0 auto;
  padding: 56px 16px 0;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-icon { width: 40px; height: 40px; }
.section-icon .icon { width: 20px; height: 20px; }

.home-section h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* "How it works": numbered step cards. */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 12px;
}

.steps > li,
.panel,
.points {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding: 14px 16px 14px 56px;
  line-height: 1.55;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 15px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--iris);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .steps > li::before { background: #5b55e7; }
}

/* Paragraphs after a list: the AI note and the Google Limited Use statement. Always visible. */
.note {
  margin: 14px 0 0;
  padding: 14px 16px;
  background: var(--note-bg);
  border-radius: 12px;
  font-size: 0.96875rem;
  line-height: 1.55;
}

.panel { padding: 18px 20px; }
.panel > p { margin: 0; }
.panel > p + p { margin-top: 12px; }

/* "Your privacy": a checklist. */
.points {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.points > li {
  position: relative;
  padding: 12px 18px 12px 54px;
  line-height: 1.5;
}

.points > li + li { border-top: 1px solid var(--border); }

.points > li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 13px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--iris-soft);
}

.points > li::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 17px;
  width: 6px;
  height: 11px;
  border: solid var(--iris);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

@media (min-width: 560px) {
  .tagline-start,
  .tagline-end { display: inline; }
}

@media (min-width: 720px) {
  .hero { padding-top: 40px; }
  .hero-mark { width: 80px; height: 80px; }
  .hero-logo { gap: 20px; }
  .hero-logo .wordmark { font-size: 3.5rem; }
  .tagline { font-size: 1.875rem; margin-top: 18px; }
  .lead { font-size: 1.1875rem; }
  .examples { margin-top: 36px; }
  .home-section { padding-top: 72px; }
  .home-section h2 { font-size: 1.75rem; }
  .steps > li { padding: 18px 22px 18px 66px; }
  .steps > li::before { left: 20px; top: 17px; }
  .examples { max-width: 29rem; }
}

/* inboxfold.app, part 3 of 3 (doc): the Privacy Policy, Terms, Delete your account and 404 pages. */

main.doc {
  max-width: 752px;   /* about 70 characters a line, plus the 16px gutters */
  margin: 0 auto;
  padding: 8px 16px 0;
}

.doc h1,
.doc h2,
.doc h3 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.doc h1 {
  font-size: 1.875rem;
  margin: 24px 0 16px;
}

.doc h2 {
  font-size: 1.3125rem;
  margin: 44px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 16px;
}

.doc p,
.doc ul,
.doc ol,
.doc blockquote,
.doc .table-wrap {
  margin: 0 0 16px;
}

.doc ul,
.doc ol { padding-left: 1.4em; }
.doc li + li { margin-top: 6px; }
.doc li::marker { color: var(--muted); }

/* "Effective date: ..." under the title. */
.doc .meta {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.875rem;
}

.doc .meta strong { color: var(--ink); font-weight: 600; }

code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 4px;
}

blockquote {
  padding: 14px 16px;
  background: var(--note-bg);
  border-radius: 12px;
}

blockquote > :last-child { margin-bottom: 0; }

mark.placeholder {
  background: var(--mark-bg);
  color: var(--mark-ink);
  padding: 0 3px;
  border-radius: 3px;
}

/* "On this page": the Privacy Policy's section list; opens on tap, no script. */
.toc { margin: 24px 0 8px; }

.toc details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

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

.toc summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border: solid var(--muted);
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s;
}

.toc details[open] summary::after { transform: translateY(2px) rotate(-135deg); }

.toc ol {
  margin: 0;
  padding: 4px 16px 14px 40px;
  font-size: 0.9375rem;
  border-top: 1px solid var(--border);
}

.toc ol li { margin: 0; padding: 4px 0; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Tables: a bordered box; wide ones scroll inside it, never the page. */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

thead th {
  font-weight: 700;
  background: var(--code-bg);
}

tbody tr:last-child td { border-bottom: 0; }

@media (min-width: 640px) {
  .toc ol { columns: 2; column-gap: 32px; }
  .doc h1 { font-size: 2.25rem; margin-top: 32px; }
}

/* Phones: each table row becomes a small card, with its column names above the values. */
@media (max-width: 639px) {
  .table-wrap {
    overflow: visible;
    border: 0;
    background: none;
  }

  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    min-width: 0;
  }

  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .table-wrap tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2px 14px;
    margin-bottom: 10px;
  }

  .table-wrap tbody tr td { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .table-wrap tbody td:last-child { border-bottom: 0; }
  .table-wrap td:first-child { font-weight: 600; }

  .table-wrap td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}
