/* carlforraca.club
   Racing green and brass from the Club's motoring heritage. Barlow Condensed
   for headings, after road signage. Atkinson Hyperlegible Next for reading,
   because many members will read this on a phone. */

:root {
  --paper: #F5F6F2;
  --surface: #FFFFFF;
  --ink: #1C2421;
  --muted: #55605A;
  --line: #D8DCD4;
  --green: #174631;
  --green-deep: #0E3022;
  --green-soft: #E4ECE6;
  --brass: #9C7431;
  --brass-light: #D9B878;
  --signal: #A3301F;
  --signal-soft: #F7E7E3;
  --blank-bg: #FFEFAD;
  --blank-ink: #5E4800;
  --blank-line: #C79B00;

  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --measure: 66ch;
  --wrap: 1120px;
  --gutter: clamp(1.1rem, 4vw, 2rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.25rem; /* 20px, Source Sans 3 runs a touch smaller than Atkinson */
  line-height: 1.6;
}

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

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--green-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--surface); padding: 0.5rem 1rem; z-index: 10;
}
.skip:focus { left: 0.5rem; }

/* ---------- Draft bar ---------- */

.draft-bar {
  background: var(--blank-bg);
  color: var(--blank-ink);
  border-bottom: 2px dashed var(--blank-line);
  font-size: 0.95rem;
  padding: 0.45rem 0;
}

/* ---------- Header ---------- */

.site-header { background: var(--green); color: #fff; }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 5.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem;
}

.mark { color: #fff; text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.mark:hover { color: #fff; }
.mark-name { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 5vw, 2.75rem); letter-spacing: 0.01em; }
.mark-role { font-family: var(--display); font-weight: 500; font-size: 1.2rem; color: var(--brass-light); margin-top: 0.25rem; }

.menu-toggle {
  font-family: var(--display); font-weight: 600; font-size: 1.25rem;
  background: none; color: #fff; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 4px;
  padding: 0.3rem 0.9rem;
}
.menu-toggle[aria-expanded="true"] { background: var(--green-deep); }

.site-header { position: relative; }
.header-inner { flex-wrap: wrap; }

.nav-list {
  list-style: none; margin: 0; padding: 0 0 0.8rem;
  display: flex; flex-wrap: wrap; gap: 0 1.1rem;
}
.nav-list a {
  display: block; color: #fff; text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: 1.2rem;
  padding: 0.25rem 0;
}
.nav-list a:hover { color: var(--brass-light); }
.nav-list a[aria-current="page"] { color: var(--brass-light); }

/* With JavaScript on small screens, the list becomes a dropdown */
@media (max-width: 59.99rem) {
  .js .nav-list {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--green-deep); padding: 0.4rem 0 0.8rem; z-index: 5;
    flex-direction: column;
  }
  .js .nav-list.open { display: flex; }
  .js .nav-list a { font-size: 1.45rem; padding: 0.55rem var(--gutter); }
}

@media (min-width: 60rem) {
  .menu-toggle { display: none; }
  .nav-list { padding: 0; gap: 0 1.35rem; justify-content: flex-end; }
  .nav-list a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--brass-light); }
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.005em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.8rem, 8vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.6vw, 2.9rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.85rem); font-weight: 600; }

p, ul, ol, table, figure { margin: 0; }
.prose > * + * { margin-top: 1.1rem; }
.prose { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.45rem; }
.prose h3 { margin-top: 2.4rem; }
.prose h3 + * { margin-top: 0.7rem; }

.lede { font-size: clamp(1.35rem, 2.6vw, 1.7rem); line-height: 1.4; }

/* ---------- Page layout ---------- */

.page-head { padding: clamp(2.5rem, 7vw, 4.5rem) 0 1.5rem; }
.page-head .lede { margin-top: 1rem; max-width: 40ch; color: var(--muted); }

.section { padding: clamp(2.2rem, 6vw, 3.8rem) 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section > .wrap > h2 + * { margin-top: 1.1rem; }

/* ---------- Home ---------- */

.hero { padding: clamp(2.5rem, 8vw, 5.5rem) 0 clamp(2rem, 5vw, 3rem); }
.hero-grid { display: grid; gap: 2.5rem; align-items: start; }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 1.4rem; font-weight: 600; color: var(--green); }
.hero .prose { margin-top: 1.6rem; }

.portrait { margin: 0; max-width: 22rem; }
.portrait img { width: 100%; border-radius: 3px; border: 1px solid var(--line); }
.portrait figcaption { margin-top: 0.9rem; font-size: 1rem; color: var(--muted); }
.portrait figcaption strong { display: block; color: var(--ink); font-family: var(--display); font-size: 1.5rem; font-weight: 700; }

@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 4rem; }
  .portrait { justify-self: end; margin-top: 0.6rem; }
}

.pagelist { list-style: none; padding: 0; margin: 1.4rem 0 0; border-top: 2px solid var(--ink); }
.pagelist li { border-bottom: 1px solid var(--line); }
.pagelist a {
  display: grid; gap: 0.2rem; padding: 1.05rem 0; text-decoration: none; color: var(--ink);
}
@media (min-width: 46rem) {
  .pagelist a { grid-template-columns: 17rem 1fr; gap: 1.5rem; align-items: baseline; }
}
.pagelist .t { font-family: var(--display); font-weight: 700; font-size: 1.65rem; color: var(--green); line-height: 1.1; }
.pagelist .d { color: var(--muted); }
.pagelist a:hover .t { text-decoration: underline; text-underline-offset: 0.15em; }

/* ---------- Video ---------- */

.video { margin-top: 1.3rem; max-width: 52rem; }
.video video, .video iframe {
  width: 100%; aspect-ratio: 16 / 9; background: var(--ink); border-radius: 3px; border: 0;
}
.video figcaption { margin-top: 0.6rem; font-size: 1rem; color: var(--muted); }
.video-grid { display: grid; gap: 1.8rem; margin-top: 1.4rem; }
@media (min-width: 52rem) { .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .video-grid .video { margin-top: 0; } }

/* ---------- Who I am: photos down the left ---------- */

.bio { display: grid; gap: 2.2rem; }
.bio-text h3:first-child { margin-top: 0; }
.bio-media { display: grid; gap: 1.2rem; align-content: start; order: 2; }
.bio-photo { margin: 0; }
.bio-photo img { width: 100%; border-radius: 3px; }
.bio-photo figcaption { margin-top: 0.45rem; font-size: 0.95rem; color: var(--muted); line-height: 1.4; }

@media (min-width: 36rem) and (max-width: 55.99rem) {
  .bio-media { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 56rem) {
  .bio { grid-template-columns: 19rem minmax(0, 1fr); gap: 3rem; align-items: start; }
  .bio-media { order: 0; }
}

/* ---------- Photographs ---------- */

.shot { margin-top: 1.4rem; max-width: 52rem; }
.shot img { width: 100%; border-radius: 3px; }
.shot figcaption { margin-top: 0.6rem; font-size: 1rem; color: var(--muted); }

/* ---------- Event card ---------- */

.event-card {
  display: grid; grid-template-columns: auto 1fr; gap: 1.3rem; align-items: center;
  max-width: 34rem; margin-top: 1.3rem; padding: 1.1rem 1.4rem;
  background: var(--surface); border: 2px solid var(--green);
  border-radius: 4px; text-decoration: none; color: var(--ink);
}
.event-card:hover { background: var(--green-soft); color: var(--ink); }
.event-date {
  display: grid; justify-items: center; align-content: center;
  background: var(--green); color: #fff; border-radius: 3px;
  padding: 0.5rem 0.9rem; line-height: 1;
}
.event-day { font-family: var(--display); font-weight: 700; font-size: 2.6rem; }
.event-month { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--brass-light); }
.event-body { display: grid; gap: 0.2rem; }
.event-title { font-family: var(--display); font-weight: 700; font-size: 1.75rem; line-height: 1.1; }
.event-meta { color: var(--ink); font-size: 1.2rem; line-height: 1.35; }
.event-cta { margin-top: 0.35rem; font-weight: 700; color: var(--green); text-decoration: underline; text-underline-offset: 0.18em; }

/* ---------- Lists of items (built, plan) ---------- */

.items { list-style: none; padding: 0; margin: 1.2rem 0 0; max-width: var(--measure); }
.items li { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.items li:last-child { border-bottom: 1px solid var(--line); }
.items strong { font-weight: 700; }

.pledge {
  margin-top: 1.6rem; max-width: var(--measure);
  background: var(--green-soft); border-left: 6px solid var(--green);
  padding: 1rem 1.25rem;
}

/* ---------- The numbers: the one bold element ---------- */

.page-the-numbers .page-head h1 { max-width: 16ch; }

.figure {
  display: grid; gap: 0.9rem;
  padding: clamp(1.8rem, 5vw, 2.8rem) 0;
  border-top: 1px solid var(--line);
}
.figure:first-child { border-top: 0; }
@media (min-width: 56rem) {
  .figure { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 2.75rem; }
}

.figure-plate {
  border-left: 10px solid var(--signal);
  padding: 0.2rem 0 0.2rem 1.1rem;
  align-self: start;
}
.figure-num {
  display: block;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 3.9rem); line-height: 0.95;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--ink);
}
.figure-label { display: block; margin-top: 0.4rem; font-size: 1rem; color: var(--muted); max-width: 22ch; }

.figure-body h2 { font-size: clamp(1.7rem, 3.6vw, 2.2rem); }
.figure-body > * + * { margin-top: 0.9rem; }
.figure-body { max-width: var(--measure); }

.why {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 1.8rem); line-height: 1.15;
  color: var(--signal);
  text-wrap: balance;
}

blockquote {
  margin: 0; padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--brass);
  font-style: italic;
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 22rem; font-size: 1.02rem; }
th, td { text-align: left; padding: 0.55rem 0.9rem 0.55rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; border-bottom: 2px solid var(--ink); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; padding-right: 0; padding-left: 0.9rem; }
td.num, td:first-child { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.2; }
table td:first-child:not(:only-child) { font-weight: 500; }
tr.stand td { font-weight: 700; color: var(--signal); }

.asks { counter-reset: ask; list-style: none; padding: 0; margin: 1.3rem 0 0; max-width: var(--measure); }
.asks li { counter-increment: ask; display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.6rem; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.asks li::before { content: counter(ask); font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1.05; color: var(--signal); }

.sources { font-size: 0.98rem; color: var(--muted); max-width: var(--measure); }

/* ---------- Questions ---------- */

.qa { max-width: var(--measure); }
.qa h2 { font-size: clamp(1.6rem, 3.4vw, 2.05rem); }
.qa + .qa { margin-top: 2.4rem; padding-top: 2.4rem; border-top: 1px solid var(--line); }
.qa > * + * { margin-top: 0.8rem; }

/* ---------- Form ---------- */

.form { max-width: 38rem; margin-top: 1.5rem; display: grid; gap: 1.2rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 700; }
.field .hint { font-size: 0.95rem; color: var(--muted); }
input[type="text"], input[type="email"], textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 2px solid #9AA39D; border-radius: 4px; padding: 0.7rem 0.85rem; width: 100%;
}
textarea { min-height: 9rem; resize: vertical; }
input:focus, textarea:focus { border-color: var(--green); outline: 3px solid var(--brass-light); outline-offset: 0; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; }
.check input { width: 1.4rem; height: 1.4rem; margin-top: 0.2rem; accent-color: var(--green); flex: none; }
.hp { position: absolute; left: -9999px; }

.button {
  font: inherit; font-family: var(--display); font-weight: 700; font-size: 1.45rem;
  background: var(--green); color: #fff; border: 0; border-radius: 4px;
  padding: 0.7rem 1.6rem; cursor: pointer; justify-self: start;
}
.button:hover { background: var(--green-deep); }
.button[disabled] { opacity: 0.6; cursor: wait; }
.form-status { font-weight: 700; min-height: 1.6em; }
.form-status.ok { color: var(--green); }
.form-status.error { color: var(--signal); }
.privacy { font-size: 0.98rem; color: var(--muted); }

.wall { list-style: none; padding: 0; margin: 1.3rem 0 0; display: grid; gap: 1rem; max-width: var(--measure); }
.wall li { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1rem 1.2rem; }
.wall q { quotes: "\201C" "\201D"; font-size: 1.15rem; }
.wall .who { display: block; margin-top: 0.4rem; color: var(--muted); font-size: 0.98rem; }

/* ---------- Contact ---------- */

.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; max-width: var(--measure); }
.contact-list li { display: grid; gap: 0.15rem; padding: 1rem 0; border-top: 1px solid var(--line); }
@media (min-width: 46rem) { .contact-list li { grid-template-columns: 9rem 1fr; gap: 1.5rem; } }
.contact-list .k { font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1.2; }

/* ---------- Blanks (draft only) ---------- */

.blank {
  background: var(--blank-bg); color: var(--blank-ink);
  outline: 2px dashed var(--blank-line); outline-offset: 1px;
  border-radius: 2px; padding: 0 0.25em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.blank-block {
  display: block; padding: 0.9rem 1.1rem; margin-top: 1.1rem;
  font-size: 1.02rem; max-width: var(--measure);
}
.blank-block > * + * { margin-top: 0.6rem; }
.blank-media {
  display: grid; place-items: center; text-align: center;
  aspect-ratio: 4 / 3; padding: 1rem; margin: 0;
}

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: #E7EAE5; margin-top: 3rem; padding: 2.2rem 0 2.6rem; }
.site-footer a { color: var(--brass-light); }
.footer-inner { display: grid; gap: 0.8rem; }
.footer-note { font-size: 0.95rem; color: #AEB6B0; max-width: 70ch; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
