/* Shelter home page. Colours and type follow apps/mobile/src/styles/theme.ts:
   cream paper, black ink, oxblood accent, blue links, Charter for headings and prose. */

:root {
  --paper-50: #f9f7e8;
  --paper-100: #f1eedc;
  --paper-200: #e4e0c8;
  --paper-300: #cfcab0;
  --ink-500: #6a675c;
  --ink-700: #3d3b34;
  --ink-800: #161512;
  --ink-900: #000000;
  --accent-100: #efdcd5;
  --accent-500: #7a2e2b;
  --accent-600: #64241f;
  --link: #1f5aa6;
  --rule: #a8a48c;

  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--paper-50);
  color: var(--ink-800);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink-900);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); letter-spacing: -0.01em; max-width: 18ch; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); max-width: 24ch; }
h3 { font-size: 1.2rem; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-500);
  margin: 0 0 12px;
}

/* Masthead */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(249, 247, 232, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--paper-200);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-900);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
}

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

nav { display: flex; gap: 22px; }

nav a {
  color: var(--ink-700);
  text-decoration: none;
  font-size: 0.92rem;
}

nav a:hover { color: var(--accent-500); }

.nav-cta {
  color: var(--paper-50) !important;
  background: var(--accent-500);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
}

.nav-cta:hover { background: var(--accent-600); }

nav { align-items: center; }

@media (max-width: 760px) {
  nav a:not(.nav-cta) { display: none; }
}

.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: var(--paper-50);
  background: var(--accent-500);
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: var(--accent-600); }
.button.light { color: var(--ink-900); background: var(--paper-50); }
.button.light:hover { background: var(--paper-200); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  padding: 88px 24px 80px;
}

.hero h1 { max-width: 16ch; }

.hero .lede { margin-bottom: 32px; }

.hero-actions { display: flex; align-items: center; gap: 24px; margin: 0; }
.text-link { color: var(--ink-700); font-weight: 600; text-decoration: none; }
.text-link:hover { color: var(--accent-500); }

.hero-icon {
  width: 240px;
  height: 240px;
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(32, 31, 26, 0.12);
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 56px; }
  .hero-icon { width: 160px; height: 160px; order: -1; border-radius: 20px; }
}

/* The argument, one idea per line with its illustration, ending on the name */

.opening {
  background: var(--ink-900);
  color: var(--paper-50);
  padding: 96px 0 104px;
}

.argument {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  line-height: 1.35;
  max-width: 34em;
}

.argument li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 28px;
  align-items: center;
  margin: 0 0 28px;
  color: var(--paper-300);
}

.argument .turn { color: var(--paper-50); font-size: 1.15em; margin-top: 44px; }
.argument .question { color: var(--paper-50); }
.argument em { font-style: italic; }

/* Illustrations: black ink on cream paper, like the app icon */

.glyph {
  width: 76px;
  height: 76px;
  background: var(--paper-50);
  border-radius: 16px;
  padding: 5px;
  overflow: visible;
}

/* Drawn on a 96 grid: one stroke weight, solid ink for mass, paper lines cut into it. */

.glyph .s, .glyph .sb, .glyph .sp {
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glyph .s { fill: none; stroke: var(--ink-900); }
.glyph .sb { fill: var(--paper-50); stroke: var(--ink-900); }
.glyph .sp { fill: none; stroke: var(--paper-50); }
.glyph .f { fill: var(--ink-900); }
.glyph .b { fill: var(--paper-50); }
.glyph .thin { stroke-width: 3; }
.glyph .bolt { stroke: var(--paper-50); stroke-width: 3; stroke-linejoin: round; }

.answer-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 28px;
  align-items: center;
  margin-top: 56px;
}

.answer-row .glyph { width: 112px; height: 112px; border-radius: 22px; padding: 8px; }

.opening .answer {
  color: var(--paper-50);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  max-width: none;
  margin: 0;
}

@media (max-width: 600px) {
  .argument li { grid-template-columns: 56px 1fr; gap: 18px; }
  .glyph { width: 56px; height: 56px; border-radius: 12px; padding: 4px; }
  .answer-row { grid-template-columns: 80px 1fr; gap: 18px; }
  .answer-row .glyph { width: 80px; height: 80px; border-radius: 16px; }
}

.opening-cta { margin: 40px 0 0; }

/* What Shelter is */

.enough { padding: 88px 24px 72px; }
.enough h2 { max-width: 22ch; }

.lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.55;
  color: var(--ink-700);
  max-width: 40em;
  margin: 0;
}

/* Sources */

.sources {
  background: var(--paper-100);
  border-top: 1px solid var(--paper-200);
  border-bottom: 1px solid var(--paper-200);
  padding: 88px 0;
}

.sources p:not(.eyebrow) { color: var(--ink-700); max-width: 36em; }

.home-line {
  margin: 0;
  align-self: center;
  border-left: 3px solid var(--accent-500);
  padding: 8px 0 8px 28px;
}

.home-line p {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  line-height: 1.35;
  color: var(--ink-900);
  margin: 0;
}

/* How it works */

.how { padding: 88px 24px; }

.steps {
  list-style: none;
  padding: 0;
  margin: 40px 0 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.steps li {
  background: var(--paper-100);
  border: 1px solid var(--paper-200);
  border-radius: 10px;
  padding: 24px;
}

.steps p { margin: 0; color: var(--ink-700); font-size: 0.97rem; }

.step-n {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-500);
  color: var(--paper-50);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.how-close {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink-700);
  max-width: 36em;
  margin: -24px 0 64px;
}

.subhead { font-size: 1.4rem; margin: 0; }
.steps.detail { margin-top: 20px; }
.steps.detail li { background: transparent; }

@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

.funnel { margin: 0 auto; max-width: 720px; }

.funnel-row {
  width: var(--w);
  min-width: 220px;
  margin: 0 auto 6px;
  background: var(--paper-300);
  color: var(--ink-800);
  border-radius: 6px;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.92rem;
  white-space: nowrap;
}

.funnel-row:nth-child(2) { background: #c4bfa4; }
.funnel-row:nth-child(3) { background: #b5b098; }
.funnel-row:nth-child(4) { background: #a8a48c; }
.funnel-row.accent { background: var(--accent-500); color: var(--paper-50); font-weight: 600; }

figcaption {
  font-size: 0.82rem;
  color: var(--ink-500);
  text-align: center;
  margin-top: 12px;
}

/* The briefing */

.briefing-section {
  background: var(--paper-100);
  border-top: 1px solid var(--paper-200);
  border-bottom: 1px solid var(--paper-200);
  padding: 88px 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}

@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.features { list-style: none; padding: 0; margin: 24px 0 0; }

.features li {
  padding: 14px 0;
  border-bottom: 1px solid var(--paper-200);
  color: var(--ink-700);
}

.features li:last-child { border-bottom: none; }

.features strong {
  display: block;
  font-family: var(--serif);
  color: var(--ink-900);
  font-size: 1.08rem;
}

.sample { margin: 0; }

.phone {
  background: var(--paper-50);
  border: 1px solid var(--paper-300);
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: 0 18px 40px rgba(32, 31, 26, 0.12);
  max-width: 380px;
  margin: 0 auto;
}

.sample-meta {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-500);
  font-weight: 600;
  margin: 0 0 12px;
}

.sample-prose {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 20px;
}

.sample-prose a { text-decoration: none; }

.sample-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 0 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

.sample-story { padding: 10px 0; border-bottom: 1px solid var(--paper-200); }
.sample-title { font-family: var(--serif); color: var(--link); margin: 0; line-height: 1.35; }
.sample-source { font-size: 0.8rem; color: var(--ink-500); margin: 2px 0 0; }

.sample-actions { display: flex; gap: 8px; margin-top: 14px; }

.sample-actions span {
  font-size: 0.78rem;
  background: var(--paper-100);
  border: 1px solid var(--paper-300);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--ink-700);
}

/* Spoken briefings */

.listen { padding: 88px 24px; }
.listen .listen-text p:not(.eyebrow) { color: var(--ink-700); max-width: 34em; }

.player { margin: 0; }

.player-card {
  background: var(--ink-900);
  color: var(--paper-50);
  border-radius: 20px;
  padding: 24px;
  max-width: 380px;
  margin: 0 auto;
  box-shadow: 0 18px 40px rgba(32, 31, 26, 0.18);
}

.player-card .sample-meta { color: var(--accent-100); }
.player .player-length { font-family: var(--serif); font-size: 1.5rem; color: var(--paper-50); margin: 0 0 16px; }

.player-bar { height: 4px; background: #3d3b34; border-radius: 2px; margin-bottom: 18px; }
.player-bar span { display: block; width: var(--p); height: 100%; background: var(--paper-50); border-radius: 2px; }

.chapters { list-style: none; padding: 0; margin: 0; }

.chapters li {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-top: 1px solid #3d3b34;
  color: var(--paper-300);
  font-size: 0.95rem;
}

.chapters li.done { color: var(--ink-500); }
.chapters li.now { color: var(--paper-50); font-weight: 600; }

/* Settings */

.settings {
  background: var(--paper-100);
  border-top: 1px solid var(--paper-200);
  border-bottom: 1px solid var(--paper-200);
  padding: 88px 0;
}

.settings-lede { color: var(--ink-700); margin: 0; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}

.setting {
  background: var(--paper-50);
  border: 1px solid var(--paper-200);
  border-radius: 10px;
  padding: 22px;
}

.setting h3 { margin-bottom: 6px; }
.setting > p { margin: 0 0 14px; color: var(--ink-700); font-size: 0.95rem; }
.setting > p:last-child { margin-bottom: 0; }

.options { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }

.options li {
  font-size: 0.9rem;
  color: var(--ink-500);
  border: 1px solid var(--paper-300);
  border-radius: 8px;
  padding: 6px 10px;
}

.options strong { color: var(--ink-900); font-weight: 600; margin-right: 6px; }

/* A card with no options spans the row, so six option cards stay in even rows. */
.setting.wide { grid-column: 1 / -1; }

@media (max-width: 900px) { .settings-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .settings-grid { grid-template-columns: 1fr; } }

/* Trust */

.trust { padding: 88px 24px; }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 48px;
  margin-top: 36px;
}

.trust-grid h3 { color: var(--accent-600); }
.trust-grid p { margin: 0; color: var(--ink-700); }

@media (max-width: 700px) { .trust-grid { grid-template-columns: 1fr; } }

/* Request access */

.request {
  background: var(--paper-100);
  border-top: 1px solid var(--paper-200);
  padding: 88px 0;
}

.request p { color: var(--ink-700); max-width: 34em; }
.request .eyebrow { color: var(--accent-500); }

.closing-line {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--ink-900) !important;
  margin: 32px 0 0;
}

.request-form {
  background: var(--paper-50);
  border: 1px solid var(--paper-200);
  border-radius: 14px;
  padding: 28px;
}

.request-form label { display: block; font-weight: 600; font-size: 0.95rem; margin: 18px 0 6px; color: var(--ink-900); }
.request-form label:first-child { margin-top: 0; }
.optional { font-weight: 400; color: var(--ink-500); }

.request-form input,
.request-form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink-800);
  background: #fff;
  border: 1px solid var(--paper-300);
  border-radius: 8px;
  padding: 10px 12px;
}

.request-form textarea { resize: vertical; }

.request-form input:focus,
.request-form textarea:focus { outline: 2px solid var(--accent-500); outline-offset: 1px; border-color: transparent; }

.request-form .button { margin-top: 22px; }
.request-form .field-hint { font-size: 0.82rem; color: var(--ink-500); margin: 6px 0 0; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Contact */

.contact { padding: 88px 24px; }
.contact .two-col > div > p:not(.eyebrow) { color: var(--ink-700); max-width: 30em; }

/* Short pages: request sent, request problem */

.notice { padding: 120px 24px; max-width: 720px; }
.notice p:not(.eyebrow) { color: var(--ink-700); font-size: 1.1rem; }

.footer a { color: var(--ink-500); }

.footer {
  padding: 24px;
  font-size: 0.85rem;
  color: var(--ink-500);
  text-align: center;
}
