/* ---------------------------------------------------------------
   jeroen-janssen.com — redesign mockup
   Sanity.io-inspired brand language.
   Warm peach paper · bright red accent · bold sans display with
   italic serif emphasis · pill buttons · rounded cards · mono labels.
   --------------------------------------------------------------- */

:root {
  --paper:        #FDE5DC;   /* warm peach paper */
  --paper-2:      #FBD9CA;   /* slightly deeper peach */
  --surface:      #FFFFFF;   /* card surface */
  --ink:          #0E0E0E;
  --ink-2:        #1F1F1F;
  --muted:        #5C5450;
  --hairline:     #F2C8B6;
  --hairline-2:   #ECB89E;

  --red:          #F03E2F;   /* sanity red */
  --red-dark:     #C7290E;
  --red-soft:     #FBC9BD;

  --max:          1440px;
  --pad-x:        clamp(20px, 5vw, 80px);

  --r-sm:         12px;
  --r-md:         20px;
  --r-lg:         32px;
  --r-pill:       9999px;

  --serif:        "Instrument Serif", "GT Sectra Display", "Times New Roman", serif;
  --sans:         "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --body:         "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono:         "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--red); color: #fff; }

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

.frame {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.section { padding: clamp(56px, 8vw, 112px) 0; }

.rule { height: 1px; background: var(--hairline); width: 100%; }

/* ---------- typography ---------- */

.eyebrow,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  white-space: nowrap;
}
.tag.red {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.tag.soft {
  background: rgba(14,14,14,0.05);
  border-color: transparent;
}
.tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  display: inline-block;
}
.tag.red .dot { background: #fff; }

.label-mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

h1, h2, h3, h4 { margin: 0; font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; }

.display {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(48px, 8.4vw, 128px);
  line-height: 0.96;
  letter-spacing: -0.035em;
}
.display em,
.display .ital,
.h2 em,
.h2 .ital,
.h3 em,
.h3 .ital,
.thesis em,
.thesis .ital {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.display.red em,
.display .red { color: var(--red); }

.h2 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(36px, 5.4vw, 80px);
  line-height: 1.0;
  letter-spacing: -0.025em;
}

.h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.018em;
}

.lede {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.45;
  color: var(--ink);
  max-width: 56ch;
  font-weight: 400;
}

.body { font-size: 17px; line-height: 1.6; max-width: 62ch; }
.body p { margin: 0 0 1em 0; }
.body p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); }

/* ---------- buttons (pill) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}
.btn .arrow { transition: transform .2s; display: inline-block; }
.btn:hover .arrow { transform: translateX(3px); }

.btn.primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn.secondary:hover { background: var(--ink); color: var(--paper); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}
.btn.ghost:hover { color: var(--red); }

.btn.dark {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn.dark:hover { background: var(--red); border-color: var(--red); color: #fff; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* arrow link (no pill, but still distinct) */
.arrow-link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: color .15s, border-color .15s;
}
.arrow-link:hover { color: var(--red); border-color: var(--red); }
.arrow-link::after { content: "→"; }

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

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}
header.site .frame {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 24px;
}
.logotype {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logotype .mark {
  width: 28px; height: 28px;
  background: var(--red);
  border-radius: 8px;
  display: inline-block;
  position: relative;
}
.logotype .mark::after {
  content: ""; position: absolute; inset: 8px;
  background: var(--paper);
  border-radius: 2px;
}
nav.primary {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}
nav.primary a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  position: relative;
  padding: 6px 0;
}
nav.primary a:hover { color: var(--red); }
nav.primary a.active { color: var(--red); }
nav.primary .nav-cta {
  margin-left: 8px;
}

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

.hero { padding: clamp(64px, 10vw, 144px) 0 clamp(48px, 7vw, 96px); }
.hero .tag { margin-bottom: 28px; }
.hero .display { max-width: 18ch; }
.hero .lede { margin-top: 28px; }
.hero .btn-row { margin-top: 40px; }

/* ---------- logo strip ---------- */

.logos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  padding: 32px 0 24px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.logos .label-mono { margin-right: 16px; }
.logos .logo-name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
  opacity: 0.85;
}
.logos .sep { color: var(--hairline-2); font-weight: 300; }

/* ---------- section heads ---------- */

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: clamp(40px, 5vw, 80px);
  max-width: 920px;
}
.section-head .tag { align-self: flex-start; }
.section-head .h2 { margin-top: 8px; }
.section-head .lede { margin-top: 20px; }

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

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: clamp(28px, 3.6vw, 48px);
  position: relative;
  overflow: hidden;
}
.card.dark {
  background: var(--ink);
  color: var(--paper);
}
.card.dark .label-mono { color: var(--paper-2); opacity: 0.7; }
.card.dark a { color: var(--paper); }
.card.dark a:hover { color: var(--red); }

.card.red {
  background: var(--red);
  color: #fff;
}
.card.red .label-mono { color: #fff; opacity: 0.7; }

.card.outline {
  background: transparent;
  border: 1px solid var(--ink);
}

/* ---------- thesis pull ---------- */

.thesis {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  max-width: 22ch;
}

/* ---------- feature grid (engagement modes, four layers, etc.) ---------- */

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cards-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.cards-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 1100px) { .cards-4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) {
  .cards-3, .cards-2, .cards-4 { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: clamp(28px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 260px;
}
.feature-card .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
}
.feature-card h3 { margin: 0; }
.feature-card p { color: var(--muted); margin: 0; font-size: 15px; line-height: 1.55; }
.feature-card .meta {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- work list ---------- */

.work-list {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.work-item {
  display: grid;
  grid-template-columns: 100px 2fr 3fr 60px;
  gap: 24px;
  align-items: center;
  padding: 24px clamp(20px, 3vw, 36px);
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  position: relative;
  transition: background .15s, padding-left .2s;
}
.work-item:last-child { border-bottom: 0; }
.work-item:hover {
  background: var(--paper-2);
}
.work-item:hover .work-arrow { color: var(--red); transform: translateX(6px); }
.work-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.work-client {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1;
  letter-spacing: -0.025em;
}
.work-engagement {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}
.work-arrow {
  font-family: var(--sans);
  font-size: 22px;
  text-align: right;
  color: var(--muted);
  transition: color .2s, transform .2s;
}
@media (max-width: 760px) {
  .work-item { grid-template-columns: 60px 1fr 24px; padding: 20px 20px; }
  .work-item .work-engagement { grid-column: 2 / 3; }
}

/* ---------- writing list ---------- */

.essay-list {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.essay-item {
  display: grid;
  grid-template-columns: 130px 1fr 60px;
  gap: 24px;
  align-items: baseline;
  padding: 28px clamp(20px, 3vw, 36px);
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  transition: background .15s, padding-left .2s;
}
.essay-item:last-child { border-bottom: 0; }
.essay-item:hover { background: var(--paper-2); }
.essay-date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.essay-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 8px 0;
}
.essay-dek { color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 60ch; margin: 0; }
.essay-arrow { text-align: right; color: var(--muted); font-size: 20px; }
@media (max-width: 760px) {
  .essay-item { grid-template-columns: 1fr; gap: 8px; }
  .essay-arrow { display: none; }
}

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

footer.site {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(64px, 8vw, 112px) 0 32px;
  margin-top: clamp(64px, 8vw, 112px);
}
footer.site .frame { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { footer.site .frame { grid-template-columns: 1fr 1fr; gap: 32px; } }
footer.site a { color: var(--paper); }
footer.site a:hover { color: var(--red); }
footer.site .col-title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0.6;
  margin-bottom: 16px;
}
footer.site .colophon {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  max-width: 16ch;
}
footer.site .colophon em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--red); }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin: 0 0 10px 0; font-size: 15px; }
footer.site .signoff {
  border-top: 1px solid rgba(253,229,220,0.15);
  margin-top: clamp(56px, 6vw, 96px);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--paper); opacity: 0.6;
}
footer.site .signoff .frame-inner { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0; display: flex; justify-content: space-between; }

/* ---------- newsletter ---------- */

.newsletter {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--surface);
  border-radius: var(--r-pill);
  padding: 6px;
  max-width: 360px;
}
footer.site .newsletter { background: rgba(253,229,220,0.1); }
.newsletter input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  padding: 10px 14px;
}
footer.site .newsletter input { color: var(--paper); }
.newsletter input::placeholder { color: var(--muted); }
footer.site .newsletter input::placeholder { color: rgba(253,229,220,0.5); }
.newsletter button {
  border: 0;
  background: var(--red);
  color: #fff;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  border-radius: var(--r-pill);
  padding: 10px 18px;
  cursor: pointer;
  transition: background .15s;
}
.newsletter button:hover { background: var(--red-dark); }

/* ---------- contact form ---------- */

.brief {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 760px) { .brief { grid-template-columns: 1fr; } }
.brief .full { grid-column: 1 / -1; }
.brief label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.brief input, .brief textarea, .brief select {
  width: 100%;
  border: 1px solid var(--hairline);
  background: var(--surface);
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.brief textarea { min-height: 140px; resize: vertical; }
.brief input:focus, .brief textarea:focus, .brief select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(240,62,47,0.18);
}
.brief select { cursor: pointer; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%230E0E0E' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }

/* ---------- case study ---------- */

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 48px 0;
}
@media (max-width: 760px) { .case-meta { grid-template-columns: repeat(2, 1fr); } }
.case-meta > div {
  padding: clamp(20px, 2vw, 28px);
  border-right: 1px solid var(--hairline);
}
.case-meta > div:last-child { border-right: 0; }
@media (max-width: 760px) {
  .case-meta > div:nth-child(2n) { border-right: 0; }
  .case-meta > div { border-bottom: 1px solid var(--hairline); }
  .case-meta > div:nth-last-child(-n+2) { border-bottom: 0; }
}
.case-meta .label-mono { margin-bottom: 8px; display: block; }
.case-meta div > div { font-size: 16px; line-height: 1.4; }

.case-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 48px 0;
  border-top: 1px solid var(--hairline);
}
.case-section:first-child { border-top: 0; padding-top: 0; }
.case-section .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--red);
  padding-top: 12px;
  text-transform: uppercase;
}
.case-section h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 24px 0;
}
.case-section .body { font-size: 18px; line-height: 1.55; max-width: 64ch; }
@media (max-width: 760px) { .case-section { grid-template-columns: 1fr; gap: 16px; } }

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

.about-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}
@media (max-width: 860px) { .about-hero { grid-template-columns: 1fr; } }
.about-hero .body { color: var(--muted); font-size: 17px; }
.about-hero .body p { color: var(--ink); }

/* ---------- portrait card (about page) ---------- */

.portrait-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper-2);
  width: 100%;
  align-self: stretch;
  min-height: 480px;
}
.portrait-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
}
/* Soft gradient at the bottom so the caption pill always reads */
.portrait-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 38%;
  background: linear-gradient(to top, rgba(14,14,14,0.42), rgba(14,14,14,0));
  pointer-events: none;
}
.portrait-card .caption {
  position: absolute;
  left: 24px;
  bottom: 20px;
  z-index: 1;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.5);
  padding: 8px 14px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.portrait-card .caption::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
}

/* Mobile: stack and let the photo take a sensible height */
@media (max-width: 860px) {
  .portrait-card {
    aspect-ratio: 4 / 5;
    min-height: 0;
  }
}

/* ---------- four-layer card list (approach page) ---------- */

.layer-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: clamp(28px, 3vw, 40px);
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 16px;
}
@media (max-width: 860px) {
  .layer-card { grid-template-columns: 1fr; gap: 16px; }
}
.layer-card .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
  padding-top: 8px;
}
.layer-card h3 { margin: 0 0 12px 0; }
.layer-card p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.layer-card p + p { margin-top: 12px; }

/* ---------- big endcap CTA ---------- */

.endcap {
  padding: clamp(48px, 8vw, 96px) 0;
}
.endcap .card {
  padding: clamp(48px, 7vw, 112px);
}
.endcap .card .display {
  max-width: 18ch;
  margin: 0 0 32px 0;
}

/* ---------- mobile menu toggle ---------- */

.menu-toggle { display: none; }   /* the hidden checkbox stays hidden everywhere */
.menu-button { display: none; }    /* hamburger hidden on desktop */

@media (max-width: 760px) {
  /* Show hamburger on small screens */
  .menu-button {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    margin: -10px;
    -webkit-tap-highlight-color: transparent;
  }
  .menu-button span {
    display: block;
    width: 22px; height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
  }
  .menu-toggle:checked ~ .menu-button span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-toggle:checked ~ .menu-button span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle:checked ~ .menu-button span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Mobile nav slides down out of the sticky header */
  nav.primary {
    position: absolute;
    top: 100%; right: 0; left: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--pad-x) 24px;
    transform: translateY(-110%);
    transition: transform .28s ease;
    pointer-events: none;
    visibility: hidden;
  }
  .menu-toggle:checked ~ nav.primary {
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
  }
  nav.primary a:not(.btn) {
    display: block;
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid var(--hairline);
    font-size: 16px;
  }
  nav.primary a:not(.btn):last-of-type { border-bottom: 0; }
  nav.primary .nav-cta {
    display: inline-flex;
    align-self: flex-start;
    margin: 20px 0 4px;
  }
}

/* ---------- mobile responsive overrides ---------- */

/* Force inline grid-template-columns on cards-2/3/4 to single column on mobile.
   The inline styles otherwise win against the simple media query rule. */
@media (max-width: 760px) {
  .cards-2,
  .cards-3,
  .cards-4 {
    grid-template-columns: 1fr !important;
  }
  .case-meta { grid-template-columns: repeat(2, 1fr) !important; }
  .layer-card { grid-template-columns: 1fr !important; gap: 12px !important; }
  .case-section { grid-template-columns: 1fr !important; }
}

/* Footer collapses fully on small phones */
@media (max-width: 540px) {
  footer.site .frame { grid-template-columns: 1fr !important; gap: 32px; }
  footer.site .signoff { flex-direction: column; gap: 8px; }
  footer.site .signoff .frame-inner { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* Hero typography: tighten the lower bound so 48px doesn't crash on small phones */
@media (max-width: 540px) {
  .display { font-size: clamp(40px, 11vw, 96px) !important; line-height: 1.0; }
  .thesis  { font-size: clamp(32px, 9vw, 72px) !important; }
  .h2      { font-size: clamp(30px, 8vw, 56px) !important; }
}

/* Endcap and section padding tighten on small phones */
@media (max-width: 540px) {
  .endcap .card, .endcap .card.red {
    padding: clamp(28px, 8vw, 56px) !important;
  }
  .frame {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Logo-strip wraps cleanly */
@media (max-width: 760px) {
  .logos { gap: 8px 16px; }
  .logos .logo-name { font-size: 16px; }
  .logos .sep { display: none; }
}

/* ---------- inline icons ---------- */
.icon-arrow { display: inline-block; }
