/* The app's own faces and colours (frontend/src/Styles.jsx): ink on paper,
   Fraunces for titles, IBM Plex Sans for reading. The font files are copied
   from frontend/public/fonts at build time, so there is one set of them. */
@font-face {
  font-family: 'Fraunces Wordmark';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('/fonts/Fraunces-Wordmark.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces Display';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('/fonts/Fraunces-Display.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal; font-weight: 100 700; font-display: swap;
  src: url('/fonts/IBMPlexSans.woff2') format('woff2');
}

:root {
  --paper: #F5F1EA;
  --card: #FFFCF7;
  --ink: #14213D;
  --ink2: #1D2E52;
  --muted: #5B6478;
  --line: #E3DBCC;
  --soft: #EEE8DB;
  --button: #14213D;
  --button-ink: #F5F1EA;
  --mark: #FFEC8A;
  --mark-ink: #14213D;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1526;
    --card: #18223A;
    --ink: #F4F1EA;
    --ink2: #93A9DC;
    --muted: #A3AEC8;
    --line: #2D3A5C;
    --soft: #202C48;
    --button: #F4F1EA;
    --button-ink: #14213D;
    --mark: #6B5A16;
    --mark-ink: #F4F1EA;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; width: 100%; max-width: 46rem; margin: 0 auto; padding: 0 1.25rem 4rem; }
a { color: var(--ink2); text-underline-offset: 0.18em; }
a:focus-visible { outline: 2px solid var(--ink2); outline-offset: 3px; border-radius: 2px; }
mark { background: var(--mark); color: var(--mark-ink); padding: 0 0.15em; border-radius: 2px; }

.draft {
  background: var(--mark);
  color: var(--mark-ink);
  text-align: center;
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
}
.draft mark { background: transparent; text-decoration: underline; }

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
}
/* The mark and the name together, the way the app signs itself. The name
   was set at 1.7rem on its own and read as fading out beside the headline;
   it is sized against the headline now, not against the button. */
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.brand .mark { width: 44px; height: 44px; display: block; flex: none; }
.wordmark {
  font: 600 2.2rem/1 'Fraunces Wordmark', 'Fraunces Display', Georgia, serif;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.open, .button {
  display: inline-block;
  background: var(--button);
  color: var(--button-ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
  white-space: nowrap;
}
.open:hover, .button:hover { opacity: 0.9; }

/* Home */
.home main { max-width: 64rem; }
.hero { padding: 3.5rem 0 2.5rem; max-width: 40rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 1rem;
}
.hero h1 {
  font: 600 clamp(2rem, 5vw, 3.1rem)/1.12 'Fraunces Display', Georgia, serif;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
.lede { font-size: 1.15rem; color: var(--ink); margin: 0 0 2rem; max-width: 36rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 0; }
.button { font-size: 1.05rem; padding: 0.8rem 1.5rem; }
.free { color: var(--muted); font-size: 0.95rem; }
.points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  padding: 1rem 0 2rem;
}
.points div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
}
.points h2 { font: 600 1.15rem/1.3 'Fraunces Display', Georgia, serif; margin: 0 0 0.4rem; }
.points p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* Policy pages */
.doc { padding-top: 1.5rem; }
.doc h1 {
  font: 600 clamp(1.8rem, 4vw, 2.3rem)/1.15 'Fraunces Display', Georgia, serif;
  margin: 0.5rem 0 1.25rem;
  text-wrap: balance;
}
.doc h2 {
  font: 600 1.25rem/1.3 'Fraunces Display', Georgia, serif;
  margin: 2.25rem 0 0.6rem;
  text-wrap: balance;
}
.doc h3 { font-size: 1.05rem; margin: 1.5rem 0 0.4rem; }
.doc p, .doc li { max-width: 65ch; }
.doc ul, .doc ol { padding-left: 1.3rem; }
.doc li { margin: 0.25rem 0; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 1.75rem 0; }
.doc blockquote {
  margin: 1.25rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
.doc em { color: var(--muted); }
.doc table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
  max-width: 100%;
}
.doc th, .doc td {
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--line);
  padding: 0.55rem 0.75rem;
}
.doc th { background: var(--soft); font-weight: 600; }

/* Footer: the company's details, which Rule 26 of the Companies
   (Incorporation) Rules asks for on the home page. */
.foot {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 2rem 0 2.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.foot-links, .company { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-bottom: 1.25rem; }
.foot-links a { color: var(--ink); }
.company p { margin: 0.2rem 0; }
.company strong { color: var(--ink); font-weight: 600; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .brand { gap: 0.5rem; }
  .brand .mark { width: 34px; height: 34px; }
  .wordmark { font-size: 1.55rem; }
  .open { padding: 0.5rem 0.9rem; font-size: 0.9rem; }
  .hero { padding-top: 2rem; }
}
