/* factandstory.com — the company site (reboot, October 2026).
   Charcoal ground carried over from the old identity; the old yellow matured into the book's ochre.
   Geist for display (Matt's choice, 13 Oct: modern, and deliberately not the book's Fraunces), Inter for
   text. Both self-hosted (Geist from @fontsource-variable/geist 5.3.0). One dark theme by design. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #16140f;
  --ground-2: #1f1c16;
  --ground-3: #2a261e;
  --paper: #f4eddd;
  --dim: #bdb3a0;
  --faint: #8a816f;
  --rule: rgba(244, 237, 221, 0.14);
  --ochre: #d9a63a;
  --ochre-hi: #e8b84c;

  --display: "Geist", "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --sans: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --measure: 34rem;
  --gutter: 16px;
  --wide: 1160px;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (min-width: 1100px) { :root { --gutter: 48px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--paper);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ochre-hi); }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-optical-sizing: auto; font-weight: 600; margin: 0; text-wrap: balance; letter-spacing: -0.025em; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 0.5rem; background: var(--paper); color: var(--ground); padding: 0.5rem 0.8rem; z-index: 2; }

/* small type */
.kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ochre); margin: 0 0 1rem; }
.dim { color: var(--dim); }

/* masthead */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.3rem; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.wordmark .amp { color: var(--ochre); }
.nav { display: flex; gap: 1.3rem; font-size: 0.92rem; }
.nav a { text-decoration: none; color: var(--dim); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--paper); }
@media (max-width: 420px) { .nav { gap: 1rem; font-size: 0.88rem; } .nav .nav-book { display: none; } }

/* sections */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { margin-bottom: 2.2rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.08; max-width: 20ch; }

/* hero: the claim */
.hero { padding: clamp(4rem, 12vw, 9rem) 0 clamp(3rem, 8vw, 6rem); }
.hero h1 { font-size: clamp(2.6rem, 7.6vw, 6.4rem); line-height: 0.98; font-weight: 600; max-width: 19ch; margin-bottom: 2rem; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--ochre); }
.hero .standfirst { font-size: clamp(1.15rem, 2.1vw, 1.55rem); line-height: 1.5; color: var(--dim); max-width: 54rem; margin: 0; }

/* the credentials: client names and awards */
.creds { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1.6rem 0; }
.creds .wrap { display: grid; gap: 1.2rem; }
.creds-label { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin: 0 0 0.5rem; }
.names { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.4rem; font-family: var(--display); font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
.awards { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.4rem; color: var(--dim); font-size: 0.95rem; }
@media (min-width: 900px) { .creds .wrap { grid-template-columns: 2fr 1fr; gap: 3rem; } }

/* the feature: The Days of You */
.feature { display: grid; gap: 2.4rem; align-items: center; }
.feature-photo { margin: 0; }
.feature-photo img { border-radius: 2px; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9); }
.feature h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1; margin-bottom: 0.5rem; }
.feature .line { font-family: var(--display); font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--ochre); margin-bottom: 1.4rem; }
.feature .body { max-width: var(--measure); }
.feature .price { font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
@media (min-width: 860px) { .feature { grid-template-columns: 6fr 5fr; gap: clamp(2.5rem, 5vw, 5rem); } }

.spread { margin: clamp(3rem, 6vw, 5rem) 0 0; }
.spread img { width: 100%; border-radius: 2px; box-shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.9); }
.spread figcaption { margin-top: 0.9rem; font-size: 0.9rem; color: var(--dim); max-width: 46rem; }
.spread figcaption b { color: var(--paper); font-weight: 600; }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.8rem; }
.button { display: inline-block; font-weight: 600; font-size: 0.95rem; padding: 0.85rem 1.4rem; border-radius: 3px; border: 1.5px solid var(--ochre); text-decoration: none; line-height: 1.2; transition: background 0.15s, color 0.15s; }
.button-primary { background: var(--ochre); color: var(--ground); }
.button-primary:hover { background: var(--ochre-hi); border-color: var(--ochre-hi); color: var(--ground); }
.button-quiet { color: var(--paper); border-color: var(--rule); }
.button-quiet:hover { border-color: var(--paper); color: var(--paper); }

/* more of our work: the data-rich sites */
.sites { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.sites li { border-bottom: 1px solid var(--rule); }
.sites a { display: grid; gap: 0.3rem; padding: 1.4rem 0; text-decoration: none; }
.sites a:hover h3 { color: var(--ochre-hi); }
.sites h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.15; transition: color 0.15s; }
.sites p { margin: 0; color: var(--dim); max-width: 40rem; }
.sites .url { font-size: 0.85rem; color: var(--faint); letter-spacing: 0.02em; }
@media (min-width: 860px) {
  .sites a { grid-template-columns: 16rem 1fr auto; align-items: baseline; gap: 2rem; }
}

/* people */
.people { display: grid; gap: 2.4rem; }
.person h3 { font-size: 1.5rem; line-height: 1.15; }
.person .role { font-size: 0.9rem; color: var(--ochre); margin: 0.3rem 0 1rem; }
.person p { color: var(--dim); max-width: var(--measure); }
@media (min-width: 860px) { .people { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* prose pages */
.page-head { padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(2rem, 5vw, 3.5rem); }
.page-head h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); line-height: 1.02; font-weight: 600; letter-spacing: -0.03em; max-width: 16ch; margin-bottom: 1.4rem; }
.page-head .standfirst { font-size: clamp(1.1rem, 1.9vw, 1.35rem); color: var(--dim); max-width: 46rem; margin: 0; }
.prose { max-width: var(--measure); }
.prose p { color: var(--dim); }
.prose h2 { font-size: 1.5rem; margin: 2.2rem 0 0.8rem; }

/* contact */
.contact-line { font-family: var(--display); font-size: clamp(1.1rem, 5.2vw, 2.2rem); line-height: 1.15; font-weight: 500; margin: 0 0 1.2rem; white-space: nowrap; }
.contact-line a { text-decoration-color: var(--ochre); text-decoration-thickness: 2px; }
.contact-grid { display: grid; gap: 2rem; margin-top: 3rem; }
.contact-grid h2 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.contact-grid p { color: var(--dim); margin: 0; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }

/* the closing band */
.close { background: var(--ground-2); }
.close h2 { font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.08; max-width: 18ch; margin-bottom: 1rem; }
.close p { color: var(--dim); max-width: var(--measure); }

/* footer */
.footer { border-top: 1px solid var(--rule); padding: 2.4rem 0 3rem; font-size: 0.85rem; color: var(--faint); }
.footer .wrap { display: grid; gap: 0.6rem; }
.footer a { color: var(--dim); }
.footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.person h2 { font-size: 1.5rem; line-height: 1.15; }
@media (min-width: 860px) { .feature-photo { order: -1; } }

/* the hero's background movement (hero.js): faint, and calmer behind the words */
.hero { position: relative; overflow: hidden; }
.hero > .wrap { position: relative; z-index: 1; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.6) 35%, #000 70%);
          mask-image: linear-gradient(to right, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.6) 35%, #000 70%); }
@media (max-width: 719px) { .hero-canvas { opacity: 0.6; } }
