/*
 * The public pages: the home page and the privacy policy (layouts/home).
 *
 * Paper is the idea, so the page is warm off-white with ink-dark type and the
 * seven category colours as its only accents. System fonts, no web fonts, no
 * JavaScript, one real sheet: it should be readable before anything else
 * arrives. Every selector sits under body.home, and this file is linked only
 * by layouts/home, so none of it reaches the app.
 */

body.home {
  --paper: #fbfaf7;
  --ink: #1c1c1e;
  --muted: #5d5d64;
  --rule: #e3e1db;
  --accent: #3a4b8f;
  --accent-dark: #2f3e78;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);

  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.home *, body.home *::before, body.home *::after { box-sizing: border-box; }
body.home a { color: var(--accent); }
body.home h1, body.home h2, body.home h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
body.home h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
body.home h3 { font-size: 1.1rem; letter-spacing: -0.01em; }
body.home :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.home-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.home-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.home-skip { position: absolute; left: -999px; top: 0.5rem; background: #fff; padding: 0.5rem 0.75rem; border-radius: 6px; }
.home-skip:focus { left: 0.5rem; z-index: 10; }

/* ---- header ---------------------------------------------------------- */

.home-header { position: sticky; top: env(safe-area-inset-top, 0); z-index: 5;
  background: rgb(251 250 247 / 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.home-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.home-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 500; color: var(--ink) !important;
  text-decoration: none; letter-spacing: -0.01em; }
.home-brand b { font-weight: 750; }
.home-brand__mark { width: 1.6rem; height: 1.6rem; color: var(--accent); }
.home-nav { display: flex; align-items: center; gap: clamp(0.75rem, 2.5vw, 1.75rem); font-size: 0.95rem; }
.home-nav a { color: var(--ink); text-decoration: none; }
.home-nav a:hover { color: var(--accent); }
@media (max-width: 40rem) { .home-nav a:not(.home-button) { display: none; } }

/* ---- buttons and the start form ---------------------------------------- */

.home-button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
  padding: 0.6rem 1.15rem; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600;
  font-size: 1rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.home-button--primary { background: var(--accent); color: #fff !important; }
.home-button--primary:hover { background: var(--accent-dark); }
.home-button--quiet { background: #fff; color: var(--ink) !important; border-color: var(--rule); min-height: 2.4rem; padding: 0.4rem 0.9rem; }
.home-button--quiet:hover { border-color: #c9c6be; }

.home-start { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.75rem 0 0; max-width: 30rem; }
.home-start__email { flex: 1 1 14rem; min-height: 2.75rem; padding: 0.6rem 0.85rem; font: inherit; font-size: 1rem;
  border: 1px solid #cfccc4; border-radius: 8px; background: #fff; color: var(--ink); }
.home-start__email:focus { border-color: var(--accent); }
.home-start__note { margin: 0.65rem 0 0; color: var(--muted); font-size: 0.92rem; }
.home-inline-form { display: inline; }
.home-link-button { display: inline; padding: 0; border: 0; background: none; font: inherit; color: var(--accent);
  text-decoration: underline; cursor: pointer; }

/* ---- hero -------------------------------------------------------------- */

.home-hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 4rem); overflow: hidden; }
.home-hero__inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; }
.home-eyebrow { margin: 0 0 0.9rem; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.home-hero__title { font-size: clamp(2.4rem, 5.2vw, 4.1rem); letter-spacing: -0.035em; line-height: 1.04; }
/* Each half of the headline stays whole, so it breaks only between them. */
.home-nowrap { white-space: nowrap; }
.home-hero__lede { margin: 1.4rem 0 0; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: #3b3b40; max-width: 34rem; }

/*
 * The sample sheet. The whole sheet is measured in --u (sheet.css): one
 * sheet pixel. Setting it smaller here scales every line, box and letter of
 * the real thing at once -- no image, no transform -- so it is sharp at any
 * size and always exactly what the app prints.
 */
.home-hero__visual { margin: 0; justify-self: center; }
.home-paper {
  --u: min(0.44px, calc((100vw - 2 * var(--gutter) - 28px) / 1191));
  /* On paper the sheet starts below the printed page margin, a fixed 124.6px
     in sheet.css; here the frame's padding is the margin. */
  --top: 0px;
  background: #fff;
  padding: 22px 21px;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 12px 28px rgb(40 34 20 / 0.12), 0 32px 64px rgb(40 34 20 / 0.08);
  transform: rotate(1.25deg);
}
.home-paper .sheet { margin: 0; }
.home-hero__visual figcaption { margin-top: 1rem; text-align: center; font-size: 0.85rem; color: var(--muted); }

@media (max-width: 60rem) {
  .home-hero__inner { grid-template-columns: 1fr; }
  .home-paper { transform: none; padding: 14px; }
}

/* ---- promises ------------------------------------------------------------ */

.home-promises { border-block: 1px solid var(--rule); background: #fff; }
.home-promises__list { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem 2rem; padding-block: 1.6rem; font-size: 0.95rem; color: #3b3b40; }
.home-promises__list strong { display: block; color: var(--ink); }
@media (max-width: 60rem) { .home-promises__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 30rem) { .home-promises__list { grid-template-columns: 1fr; } }

/* ---- sections ------------------------------------------------------------ */

.home-section { padding-block: clamp(3rem, 8vw, 6rem); }

.home-why__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 5vw, 4rem); }
.home-why__text p { margin: 0 0 1rem; color: #3b3b40; font-size: 1.08rem; }
@media (max-width: 52rem) { .home-why__inner { grid-template-columns: 1fr; } }

.home-how { background: #fff; border-block: 1px solid var(--rule); }
.home-steps { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); }
.home-step h3 { margin: 0.9rem 0 0.5rem; }
.home-step p { margin: 0; color: #3b3b40; }
.home-step__number { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; }
@media (max-width: 52rem) { .home-steps { grid-template-columns: 1fr; } }

.home-grid { margin-top: 2.25rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.home-tile { position: relative; padding: 1.5rem 1.4rem 1.4rem; background: #fff; border: 1px solid var(--rule);
  border-radius: 12px; overflow: hidden; }
.home-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--tile, var(--rule)); }
.home-tile h3 { margin-bottom: 0.5rem; }
.home-tile p { margin: 0; color: #3b3b40; font-size: 0.98rem; }
.home-tile--wide { grid-column: span 2; }
.home-tile--full { grid-column: 1 / -1; }
@media (max-width: 52rem) {
  .home-grid { grid-template-columns: 1fr; }
  .home-tile--wide, .home-tile--full { grid-column: auto; }
}

.home-faq { background: #fff; border-block: 1px solid var(--rule); }
.home-faq__inner { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(1.5rem, 5vw, 4rem); }
.home-faq__list details { border-bottom: 1px solid var(--rule); padding: 1rem 0; }
.home-faq__list details:first-child { border-top: 1px solid var(--rule); }
.home-faq__list summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.home-faq__list summary::-webkit-details-marker { display: none; }
.home-faq__list summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.home-faq__list details[open] summary::after { content: "\2212"; }
.home-faq__list p { margin: 0.6rem 0 0; color: #3b3b40; }
@media (max-width: 52rem) { .home-faq__inner { grid-template-columns: 1fr; } }

.home-final { text-align: center; }
.home-final__inner { display: grid; justify-items: center; }
.home-final .home-start { justify-content: center; margin-inline: auto; }

/* ---- footer -------------------------------------------------------------- */

.home-footer { border-top: 1px solid var(--rule); padding-block: 1.75rem calc(1.75rem + env(safe-area-inset-bottom, 0px)); font-size: 0.9rem; color: var(--muted); }
.home-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; }
.home-footer nav { display: flex; gap: 1.25rem; }
.home-footer a { color: var(--muted); }

/* ---- the privacy page ---------------------------------------------------- */

.home-prose { max-width: 44rem; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.home-prose h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.home-prose h2 { font-size: 1.3rem; margin: 2.2rem 0 0.6rem; }
.home-prose__updated { color: var(--muted); font-size: 0.9rem; margin: 0.4rem 0 1.5rem; }
.home-prose p, .home-prose li { color: #2f2f34; }
.home-prose ul { padding-left: 1.2rem; }
.home-prose li { margin: 0.45rem 0; }

@media print {
  .home-header, .home-footer, .home-skip { display: none; }
}
