/* The (Digital) Ad Lab — one stylesheet, no external requests.
   Editorial serif display + warm paper, sharing a family resemblance with the
   Refacto sites but carrying the Ad Lab's own olive accent. */

:root {
  --paper: #faf8f3;
  --paper-2: #f3efe6;
  --ink: #1f1d19;
  --ink-2: #4a453c;
  --muted: #7a7266;
  --rule: #e2dbcd;
  --accent: #5f7c36;
  --accent-bright: #8cb04a;
  --panel: #23211c;
  --panel-ink: #f3efe6;
  --max: 68rem;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171613;
    --paper-2: #201e1a;
    --ink: #f0ece3;
    --ink-2: #c5bdae;
    --muted: #9a9284;
    --rule: #34302a;
    --accent: #a3c76a;
    --accent-bright: #a3c76a;
    --panel: #201e1a;
    --panel-ink: #f0ece3;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Text-only sections: a narrower column keeps the heading and its prose on the
   same left edge instead of stranding a wide empty gutter beside the measure. */
.wrap.narrow { max-width: 50rem; }

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

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }

/* ----- header ----- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  margin-right: auto;
}

.monogram {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  background: var(--panel);
  color: var(--paper-2);
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--panel);
}

@media (prefers-color-scheme: dark) {
  .monogram { border-color: var(--rule); }
}

.nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav a { text-decoration: none; color: var(--ink-2); padding: 0.35rem 0; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 2px solid var(--accent-bright);
}

/* ----- hero ----- */

.hero { padding: 4.5rem 0 3rem; border-bottom: 1px solid var(--rule); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  max-width: 20ch;
}

.hero .lede {
  margin: 1.5rem 0 0;
  max-width: 56ch;
  font-size: 1.2rem;
  color: var(--ink-2);
}

.hero .rule {
  width: 4.5rem;
  height: 4px;
  background: var(--accent-bright);
  margin: 2rem 0 0;
}

/* ----- sections ----- */

section { padding: 3.5rem 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.section-head h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }

.section-head .more {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.prose { max-width: 62ch; }
.prose p { margin: 0 0 1.1rem; }
.prose h3 { font-size: 1.2rem; margin: 2.25rem 0 0.6rem; }

/* ----- project cards ----- */

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }

.card {
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card h3 { margin: 0; font-size: 1.3rem; }

.card .kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.card p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }

.card .go {
  margin-top: auto;
  padding-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

/* ----- detailed project entries ----- */

.entry { padding: 2.25rem 0; border-top: 1px solid var(--rule); }
.entry:first-of-type { border-top: 0; padding-top: 0.5rem; }
.entry h2 { margin: 0 0 0.3rem; font-size: 1.65rem; }
.entry .meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}
.entry p { max-width: 62ch; color: var(--ink-2); margin: 0 0 1rem; }

/* ----- ventures list (About) ----- */

.ventures { list-style: none; margin: 0 0 1.1rem; padding: 0; max-width: 62ch; }

.ventures li {
  padding: 0.7rem 0 0.7rem 1rem;
  border-left: 2px solid var(--rule);
  margin-bottom: 0.4rem;
  color: var(--ink-2);
}

.ventures li a { font-family: var(--serif); font-weight: 700; color: var(--ink); }
.ventures li a:hover { color: var(--accent); }

/* ----- figure (swap the render for photographs later, same markup) ----- */

.figure { margin: 0 0 2.5rem; }

.figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}

.figure figcaption {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.7rem;
}

/* ----- spec table ----- */

.spec { list-style: none; margin: 0; padding: 0; }

.spec li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.4rem 1.5rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
}

.spec li:first-child { border-top: 0; }

.spec .k {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.25rem;
}

.spec .v { color: var(--ink-2); }

@media (max-width: 34rem) {
  .spec li { grid-template-columns: 1fr; }
}

/* ----- document downloads ----- */

.docs { list-style: none; margin: 0; padding: 0; }

.docs li { padding: 1rem 0; border-top: 1px solid var(--rule); max-width: 66ch; }
.docs li:first-child { border-top: 0; }

.docs a { font-family: var(--serif); font-size: 1.08rem; font-weight: 700; }

.docs .meta-line {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.docs .note { display: block; color: var(--ink-2); font-size: 0.95rem; margin-top: 0.3rem; }

/* ----- press / publications list ----- */

.press { list-style: none; margin: 0; padding: 0; }

.press li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
  max-width: 66ch;
}

.press li:first-child { border-top: 0; }

.press .src {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.press .title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
}

.press .note { display: block; color: var(--ink-2); font-size: 0.95rem; margin-top: 0.35rem; }

/* ----- engagement list ----- */

.engagements { list-style: none; margin: 0; padding: 0; }

.engagements li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
  max-width: 66ch;
}

.engagements li:first-child { border-top: 0; }
.engagements strong { display: block; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 0.25rem; }
.engagements span { color: var(--ink-2); }

/* ----- pull quote ----- */

.quote {
  background: var(--panel);
  color: var(--panel-ink);
  padding: 2.25rem;
  border: 1px solid var(--panel);
}

@media (prefers-color-scheme: dark) { .quote { border-color: var(--rule); } }

.quote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.55;
  max-width: 60ch;
}

.quote figcaption {
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

/* ----- call to action ----- */

.cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.7rem 1.4rem;
  background: var(--panel);
  color: var(--panel-ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--panel);
}

.cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* A set of sibling destinations (e.g. the three Refacto editions): the first is
   primary, the rest are outlined so the row doesn't read as three shouts. */
.cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.cta-row .cta { margin-top: 0; }

.cta.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.cta.ghost:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ----- footer ----- */

.site-foot {
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 2.5rem 0;
  font-size: 0.92rem;
  color: var(--ink-2);
}

/* Grid rather than flex: the newsletter column is expected to grow, and
   auto-fit keeps the columns even as they are added instead of leaving the
   last one stranded across half the footer. */
.site-foot .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 2rem 2.5rem;
}

.site-foot h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
  font-weight: 400;
}

.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 0.3rem; }
.site-foot .fine { margin-top: 2rem; font-size: 0.82rem; color: var(--muted); max-width: 60ch; }

@media (max-width: 34rem) {
  .site-head .wrap { min-height: 0; padding-top: 0.9rem; padding-bottom: 0.9rem; }
  .brand { margin-right: 0; width: 100%; }
  .nav { gap: 1.1rem; }
  .hero { padding: 3rem 0 2.25rem; }
}
