/* cartalma.com — one stylesheet, no script.
 *
 * The colours and faces are the app's own (frontend/src/styles/tokens.css); copied, not
 * imported, because this site builds with nothing but a shell script. If the app's palette
 * changes, change the matching line here. The fonts are served from this site (fonts/, OFL)
 * rather than from Google: a page that promises no trackers must not hand every visitor's
 * address to a third party just to draw its type. */

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/playfair-display-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/eb-garamond-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/eb-garamond-italic-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/archivo-latin.woff2) format('woff2');
}

:root {
  color-scheme: light;
  /* tokens.css */
  --color-paper: #f7f2e7;
  --color-pollen: #efe3c8;
  --color-paper-raised: #fdfaf2;
  --color-thread: #e2d8c3;
  --color-ink: #2b2520;
  --color-ink-soft: #6e6257;
  --color-ink-pressed: #504a44;
  --color-sepia: #8a6844;
  --color-wax: #7e2f25;
  --color-wax-soft: #a8574a;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-text: 'EB Garamond', Georgia, serif;
  --font-ui: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-text);
  font-size: 1.1875rem;
  line-height: 1.55;
}

a { color: var(--color-wax); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--color-wax-soft); }
a:focus-visible { outline: 2px solid var(--color-wax); outline-offset: 2px; border-radius: 2px; }

main { flex: 1 0 auto; width: 100%; }

/* The wax seal: a monogram pressed into a disc of the app's wax red. Drawn in CSS so the
 * page carries no image to load or to keep in step. */
.seal {
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #9a4236 0%, var(--color-wax) 55%, #5e2119 100%);
  box-shadow:
    inset 0 0 0 0.3rem rgba(0, 0, 0, 0.08),
    inset 0 0 0 0.36rem rgba(255, 235, 215, 0.12),
    0 0.15rem 0.4rem rgba(43, 37, 32, 0.25);
  color: #f3dfc9;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 220, 200, 0.18);
  user-select: none;
}
.seal--small { width: 2.5rem; height: 2.5rem; font-size: 1.2rem; }

/* — The front page — */

.front {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.sheet {
  width: 100%;
  max-width: 34rem;
  padding: 2.75rem 2rem 2.5rem;
  background: var(--color-paper-raised);
  border: 1px solid var(--color-thread);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 0.6rem 1.6rem rgba(43, 37, 32, 0.08);
  text-align: center;
}

.wordmark {
  margin: 1.25rem 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 11vw, 3.25rem);
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--color-ink-pressed);
}

.tagline {
  margin: 0.4rem 0 0;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--color-sepia);
}

.rule {
  width: 3rem;
  height: 1px;
  margin: 1.6rem auto;
  border: 0;
  background: var(--color-thread);
}

.lede { margin: 0 auto; max-width: 26rem; }

.coming {
  display: inline-block;
  margin-top: 1.9rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--color-sepia);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-sepia);
}

/* — Inner pages (support) — */

.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2rem;
}
.page-head a { text-decoration: none; display: inline-flex; align-items: center; gap: 0.7rem; color: var(--color-ink-pressed); }
.page-head__name { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; }

.page h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.2rem;
  line-height: 1.15;
  color: var(--color-ink-pressed);
}
.page .intro { margin: 0.5rem 0 0; color: var(--color-ink-soft); font-style: italic; }

.page h2 {
  margin: 2.4rem 0 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--color-thread);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--color-ink-pressed);
}
.page h3 {
  margin: 1.4rem 0 0.3rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-sepia);
}
.page p { margin: 0.6rem 0; }
.page ol, .page ul { margin: 0.5rem 0; padding-inline-start: 1.4rem; }
.page li { margin-bottom: 0.3rem; }
.page li::marker { color: var(--color-sepia); }
.page strong { font-weight: 500; color: var(--color-ink); }
.ui { font-family: var(--font-ui); font-weight: 600; font-size: 0.85em; letter-spacing: 0.01em; white-space: nowrap; }

.note {
  margin: 1rem 0;
  padding: 0.9rem 1.1rem;
  background: var(--color-pollen);
  border-inline-start: 3px solid var(--color-wax);
  border-radius: 2px;
}
.note p { margin: 0; }

.address { font-size: 1.3rem; overflow-wrap: anywhere; }

/* — The legal pages —
 * Copied from the backend (static/legal/) with their own <style> block removed by
 * build.sh; these rules dress the classes they use. Never their text. */

.legal .updated { margin: 0.4rem 0 2rem; color: var(--color-ink-soft); font-style: italic; }
.legal .contact {
  margin: 1rem 0;
  padding: 0.9rem 1.1rem;
  background: var(--color-pollen);
  border-inline-start: 3px solid var(--color-wax);
  border-radius: 2px;
}
.legal .contact p { margin: 0; }
.legal .table-wrap { overflow-x: auto; margin: 1rem 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.legal th, .legal td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--color-thread);
  text-align: start;
  vertical-align: top;
}
.legal th {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-sepia);
}
.legal em { font-style: italic; }

/* — Footer — */

.site-foot {
  flex-shrink: 0;
  padding: 1.5rem 1rem 2rem;
  border-top: 1px solid var(--color-thread);
  text-align: center;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--color-ink-soft);
}
.site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem 1.1rem; }
.site-foot a { color: var(--color-ink-soft); text-decoration: none; padding: 0.35rem 0; }
.site-foot a:hover { color: var(--color-wax); text-decoration: underline; }
.site-foot a[aria-current] { color: var(--color-ink); }
.site-foot .langs { margin-top: 0.6rem; }
.site-foot .copy { margin: 0.9rem 0 0; font-weight: 500; opacity: 0.85; }

@media (max-width: 420px) {
  body { font-size: 1.125rem; }
  .front { padding: 1.5rem 1rem; align-items: flex-start; }
  .sheet { padding: 2.25rem 1.25rem 2rem; }
  .page h1 { font-size: 1.9rem; }
}
