/*
 * Fuelaria website – one stylesheet for all pages.
 * Colours as in the app (src/constants/colors.ts), deliberately without red.
 * System fonts only: nothing is loaded from other servers (no Google Fonts), so visiting
 * the site sends no data to third parties.
 */
:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --fg: #1c1c1e;
  --muted: #5f625e;
  --line: #e3e4dd;
  --accent: #2e7d5b;
  --accent-soft: #e3f1e8;
  /* Placeholders still to fill in before publishing (amber, never red). */
  --todo: #8a5e0e;
  --todo-soft: #fbf1dc;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121412;
    --surface: #1b1e1b;
    --fg: #eeefea;
    --muted: #a5a9a2;
    --line: #2e322d;
    --accent: #6fcf97;
    --accent-soft: #1f3528;
    --todo: #e3b866;
    --todo-soft: #33291a;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p,
ul,
ol {
  margin: 0;
}

/* ——— Site header and footer ——— */

.site-header {
  padding-block: 20px;
}

.site-header a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-header .icon {
  width: 36px;
  height: 36px;
}

.site-header .wordmark img {
  height: 26px;
  width: auto;
  display: block;
}

.site-footer {
  margin-top: 72px;
  padding-block: 24px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 10px;
}

.site-footer a {
  color: var(--fg);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

/* ——— Start page ——— */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding-block: 40px 24px;
}

.hero .icon {
  width: 96px;
  height: 96px;
}

.hero .wordmark img {
  width: min(340px, 80vw);
  height: auto;
  display: block;
}

/* The slogan is drawn in the wordmark's letters (scripts/make_website_assets.mjs). */
.tagline {
  margin: 0;
}

.tagline img {
  width: min(290px, 68vw);
  height: auto;
  display: block;
}

.lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 34rem;
  text-wrap: balance;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--accent-soft);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  text-wrap: balance;
}

.status::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.cta {
  margin-top: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cta h2 {
  font-size: 1.25rem;
  margin: 0;
}

/* ——— Legal and contact pages ——— */

.doc {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 16px;
}

.doc-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc h1 {
  font-size: clamp(1.9rem, 5vw, 2.4rem);
  margin: 0;
}

.stamp {
  color: var(--muted);
  font-size: 0.92rem;
}

.doc section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc h2 {
  font-size: 1.12rem;
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.doc h2 .num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  min-width: 1.6em;
}

.doc ul {
  padding-left: 1.3em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: 0.9rem;
}

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

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Still to fill in: find all with  grep -n 'class="ph"' website/*.html  */
.ph {
  background: var(--todo-soft);
  color: var(--todo);
  border-bottom: 1.5px dashed var(--todo);
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 500;
}
