/* ============================================================
   michaelforlexington.org
   Campaign design language v0.2

   The Five Fields system with the accent swapped. Neutrals, type,
   scale and the mono metadata detail are unchanged from ffcollab.com.
   Only the accent and the second colour are the campaign's own.
   ============================================================ */

/* ---- Typefaces -------------------------------------------------
   Söhne, licensed from Klim to the committee for this domain.
   Self-hosted WOFF2, which is what the web licence requires.

   Paths are relative to this stylesheet, so they resolve the same
   way on Netlify and from a local file:// preview.

   Weight numbering follows the firm's own convention, where Halbfett
   is 700 and Dreiviertelfett is 800. Klim's own scale puts Halbfett
   at 600; the firm's PDF skills have always used 700 and the comps
   were approved against that, so the two stay in step.

   Dreiviertelfett and Mono Buch are declared but unused today.
   Browsers only fetch a face when something on the page is set in
   it, so they cost nothing until they are wanted.
   ------------------------------------------------------------------ */

@font-face { font-family:"Söhne"; src:url("fonts/soehne-leicht.woff2") format("woff2");
             font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:"Söhne"; src:url("fonts/soehne-buch.woff2") format("woff2");
             font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"Söhne"; src:url("fonts/soehne-kraftig.woff2") format("woff2");
             font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:"Söhne"; src:url("fonts/soehne-halbfett.woff2") format("woff2");
             font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:"Söhne"; src:url("fonts/soehne-dreiviertelfett.woff2") format("woff2");
             font-weight:800; font-style:normal; font-display:swap; }
@font-face { font-family:"Söhne Mono"; src:url("fonts/soehne-mono-leicht.woff2") format("woff2");
             font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:"Söhne Mono"; src:url("fonts/soehne-mono-buch.woff2") format("woff2");
             font-weight:400; font-style:normal; font-display:swap; }

:root {
  /* Neutrals, lifted unchanged from the firm */
  --paper:  #F4F1EC;
  --ink:    #1C1C1A;
  --mid:    #8C8880;
  --rule:   #DDD9D2;
  --field:  #FFFFFF;

  /* The campaign's two colours. Blue acts. Ochre marks. */
  --accent: #1C4E9E;
  --ochre:  #D9A520;

  --sans: "Söhne", "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  --mono: "Söhne Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Golden-ratio scale, as on the firm site */
  --s-1: 1.618rem;
  --s-2: 2.618rem;
  --s-3: 4.236rem;
  --measure: 34rem;

  /* Mark geometry. The viewBox is 280 x 58, so the height follows the
     width and the two baselines sit at fixed fractions of it.

     402px is 175% of the 230px we started with. The firm's mark is 230px,
     but it carries eleven characters on the top line and this one carries
     nineteen, so matching the firm's WIDTH shrank the name to under half
     the size the firm's reads at. This matches the name's size instead. */
  --mark-w: 402px;
  --mark-h: calc(var(--mark-w) * 58 / 280);

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.618;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 46rem; margin: 0 auto; padding: var(--s-2) 1.5rem var(--s-3); }

/* ---- Masthead --------------------------------------------------
   The meta sits on the mark's own two baselines. Both are uppercase,
   so sharing baselines is what reads as aligned.
   ----------------------------------------------------------------- */
.masthead { position: relative; min-height: var(--mark-h); }
/* min() rather than a flat width: the mark can never be wider than the space
   it has, so no phone gets a sideways scrollbar. Above the stacking point
   below, --mark-w always wins, so --mark-h stays accurate where it is used. */
.mark { display: block; width: min(var(--mark-w), 100%); height: auto; }

.meta {
  position: absolute;
  right: 0;
  font-family: var(--mono);
  font-weight: 300;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.09em;
  white-space: nowrap;
}
/* 0.874em is where the baseline falls in a line-height:1 box for this face */
.meta-1 { top: calc(var(--mark-h) * 0.67110 - 0.874em); color: var(--ink); }
.meta-2 { top: calc(var(--mark-h) * 0.89655 - 0.874em); color: var(--mid); }

/* Treatment A: one ochre hairline under the masthead, nothing else. */
hr.bar { border: 0; border-top: 3px solid var(--ochre); margin: var(--s-1) 0 0; }

/* ---- Reading ---------------------------------------------------- */
.lede {
  font-weight: 300;
  font-size: 2.4rem;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: var(--s-2) 0 var(--s-1);
  max-width: 30rem;
}
p { max-width: var(--measure); margin: 0 0 1.05rem; }
.sig { font-weight: 400; margin-top: 1.4rem; }

h2 {
  font-weight: 300;
  font-size: 1.9rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: var(--s-2) 0 0.35rem;
}
.sub { color: var(--mid); max-width: var(--measure); margin: 0 0 var(--s-1); }

/* ---- Form ------------------------------------------------------- */
label.field { display: block; margin: 0 0 1.15rem; max-width: var(--measure); }
label.field > span { display: block; font-size: 0.875rem; font-weight: 400; margin-bottom: 0.4rem; }
.hint { color: var(--mid); font-weight: 300; }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  font: inherit;
  font-size: 1rem;
  width: 100%;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.7rem 0.8rem;
}
textarea { min-height: 5.5rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.row { display: grid; grid-template-columns: 1fr 9rem; gap: 0.9rem; max-width: var(--measure); }

fieldset { border: 0; padding: 0; margin: 0 0 1.3rem; max-width: var(--measure); }
legend { font-size: 0.875rem; font-weight: 400; padding: 0; margin-bottom: 0.5rem; }
.choice { display: flex; gap: 0.65rem; align-items: flex-start; margin-bottom: 0.5rem; font-size: 0.95rem; }
.choice input { margin: 0.42rem 0 0; flex: none; width: 1rem; height: 1rem; accent-color: var(--accent); }
.why { display: block; color: var(--mid); font-size: 0.82rem; line-height: 1.5; margin-top: 0.2rem; }

/* Blue acts. The one action on the page carries the accent. */
button {
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  background: var(--accent);
  color: var(--paper);
  border: 0;
  border-radius: 0;
  padding: 0.85rem 2.2rem;
  cursor: pointer;
  margin-top: 0.4rem;
}

/* Honeypot */
.hp { position: absolute; left: -9999px; }

/* ---- Notes and colophon ----------------------------------------- */
.note { color: var(--mid); font-size: 0.9rem; max-width: var(--measure); margin-top: var(--s-1); }
/* Links are blue and set in the heavier weight, never underlined ink. */
.note a, a.link { color: var(--accent); font-weight: 700; text-decoration: none; }
.note a:hover, a.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.foot {
  margin-top: var(--s-2);
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-weight: 300;
  font-size: 10px;
  line-height: 1.9;
  letter-spacing: 0.09em;
}
.foot .contact { color: var(--ink); }
.foot .disclaimer { color: var(--mid); }

/* The masthead stacks before the rest of the page does. Mark and metadata
   side by side need roughly 700px of content width, and the mark is wide
   now, so this sits well above the phone breakpoint. */
@media (max-width: 800px) {
  .masthead { min-height: 0; }
  .meta { position: static; margin-top: 1.1rem; text-align: left; }
  .meta-1, .meta-2 { display: block; line-height: 1.75; }
}

@media (max-width: 540px) {
  .meta { font-size: 9px; }
  .lede { font-size: 1.8rem; }
  .row { grid-template-columns: 1fr; }
}
