/* red-ffi.com. One stylesheet, no inline styles anywhere: the Content-Security-Policy in
   site/nginx.conf allows style-src 'self' only.

   Color pairs (WCAG AA, checked):
     buttons                 #fff on --red-dark              6.1:1
     small red text, light   --red-dark on #fff / --wash     6.1 / 5.5
     small red text, dark    --red-on-dark on --ink / --panel 6.4 / 5.6
     --red (#de3a3a)         only for icons, rules and artwork: it is below 4.5:1 on every background */

@font-face {
  font-family: "Questrial";
  src: url("/fonts/questrial-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #15181c;
  --panel: #1f242a;
  --line-dark: #3a424b;
  --red: #de3a3a;
  --red-dark: #b82c2c;
  --red-darker: #9c2424;
  --red-on-dark: #ff6b6b;
  --text: #1d2228;
  --muted: #5a636e;
  --rule: #dde1e5;
  --wash: #f2f4f6;
  --on-dark: #e9ecef;
  --on-dark-muted: #a7b0ba;

  --display: "Questrial", "Century Gothic", "Segoe UI", system-ui, sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;

  --accent: var(--red-dark);
  --focus: var(--red-dark);
  --header-h: 4rem;
}

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

html {
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; line-height: 1.25; }
p { margin: 0; }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

.wrap { width: min(70rem, 100% - 2.5rem); margin-inline: auto; }

.dark {
  --accent: var(--red-on-dark);
  --focus: var(--red-on-dark);
  background: var(--ink);
  color: var(--on-dark);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: #fff;
  color: var(--text);
  border-radius: 4px;
}
.skip:focus { top: 0.75rem; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.lead { font-size: 1.2rem; line-height: 1.55; color: var(--muted); max-width: 40rem; }
.dark .lead { color: var(--on-dark-muted); }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  background: var(--red-dark);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  line-height: 1.2;
}
.btn:hover { background: var(--red-darker); }
.btn-small { padding: 0.55rem 1.1rem; font-size: 0.95rem; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2rem; }
.more { color: var(--on-dark); text-underline-offset: 0.3em; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.more:hover { text-decoration-color: var(--red-on-dark); }

/* ---- header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  --focus: var(--red-on-dark);
  background: var(--ink);
  color: var(--on-dark);
  border-bottom: 1px solid var(--line-dark);
}
.bar { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; margin-right: auto; }
.brand-fox { width: auto; height: 1.9rem; }
.brand-word { width: auto; height: 1.05rem; }
.nav { display: none; gap: 1.75rem; }
.nav a { text-decoration: none; color: var(--on-dark-muted); font-size: 0.98rem; }
.nav a:hover { color: #fff; }

/* ---- hero ---- */
.hero { padding-block: clamp(3.5rem, 9vw, 7.5rem); overflow: hidden; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero h1 { color: #fff; max-width: 14em; }
.hero .lead { margin-top: 1.4rem; }
.hero-art { display: none; }

/* ---- sections ---- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.wash { background: var(--wash); }
.section h2 + .lead { margin-top: 1rem; }

.split { display: grid; gap: 1.5rem; }
.split .lead { color: var(--text); }

/* ---- cards ---- */
.cards {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}
.card {
  padding: 1.6rem 1.5rem 1.7rem;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--red);
  border-radius: 8px;
  background: #fff;
}
.icon { width: 2rem; height: 2rem; color: var(--red-dark); margin-bottom: 1rem; }
.card p { margin-top: 0.5rem; color: var(--muted); font-size: 1rem; }
.card-feature {
  --accent: var(--red-on-dark);
  background: var(--ink);
  border-color: var(--ink);
  border-top-color: var(--red);
  color: #fff;
}
.card-feature .icon { color: var(--red-on-dark); }
.card-feature p { color: var(--on-dark-muted); max-width: 44rem; }

/* ---- who / about ---- */
.dots { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.7rem; }
.dots li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 1rem;
}
.dots li::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--red); flex: none; }

.facts { margin: 2rem 0 0; display: grid; gap: 1rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(9rem, max-content)); }
.facts div { border-left: 3px solid var(--red); padding-left: 0.9rem; }
.facts dt { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0.15rem 0 0; font-family: var(--display); font-size: 1.35rem; }

/* ---- contact ---- */
.contact { position: relative; padding-block: clamp(4rem, 9vw, 7rem); overflow: hidden; text-align: center; }
.contact::before {
  content: "";
  position: absolute;
  inset: -10% -5% -10% 35%;
  background: url("/img/fox.svg") no-repeat right center / contain;
  opacity: 0.1;
  pointer-events: none;
}
.contact .wrap { position: relative; }
.contact h2 { color: #fff; }
.contact .lead { margin: 1rem auto 0; }
.contact .actions { justify-content: center; }

/* ---- footer ---- */
.site-footer { background: var(--panel); border-top: 1px solid var(--line-dark); padding-block: 2.5rem; }
.foot { display: grid; gap: 1.75rem; align-items: center; }
.foot img { width: 8.5rem; }
.legal { font-size: 0.9rem; color: var(--on-dark-muted); display: grid; gap: 0.5rem; max-width: 46rem; }
.legal a { color: var(--on-dark); text-underline-offset: 0.25em; }

/* ---- not-found page ---- */
.notfound { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 2rem 1.25rem; }
.notfound img { width: 11rem; margin: 0 auto 2rem; }
.notfound h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); }
.notfound .lead { margin: 1rem auto 0; }
.notfound .actions { justify-content: center; }

/* ---- wider screens ---- */
@media (min-width: 40rem) {
  .nav { display: flex; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card-feature { grid-column: 1 / -1; display: flex; gap: 1.5rem; align-items: flex-start; }
  .card-feature .icon { flex: none; margin: 0.15rem 0 0; }
  .foot { grid-template-columns: auto 1fr; gap: 3rem; }
}

@media (min-width: 58rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 3rem; }
  .hero-art {
    display: block;
    aspect-ratio: 517 / 278;
    background: url("/img/fox.svg") no-repeat center / contain;
  }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 4rem; align-items: start; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, .nav a, .more { transition: background-color 0.15s ease, color 0.15s ease, text-decoration-color 0.15s ease; }
}
