/* =========================================================
   CommonGood landing page
   Design: Figma "CommonGood Landing Page" (1440 / 1024 / 375 frames)
   ========================================================= */

:root {
  /* Colors (Figma variables) */
  --paper: #f5f0e7;
  --ink: #292522;
  --stone: #b7a99a;
  --raspberry: #a33262;
  --raspberry-dark: #8a2853;

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* Layout: 142px side gutter at 1440, 16px on phones */
  --gutter: clamp(16px, 9.86vw, 142px);
  --edge: clamp(16px, 1.67vw, 24px);   /* the 24px edge margin used by full-bleed blocks */
  --section-gap: clamp(80px, 8.33vw, 120px);

  /* Type scale (desktop → phone) */
  --fs-hero: clamp(48px, 10.14vw, 146px);
  --fs-h2: clamp(40px, 5.56vw, 80px);
  --fs-h2-small: clamp(40px, 4.44vw, 64px);
  --fs-eyebrow: clamp(14px, 1.25vw, 18px);
  --fs-body: clamp(16px, 1.39vw, 20px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-optical-sizing: auto;
  font-size: var(--fs-body);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
cite { font-style: normal; }
[id] { scroll-margin-top: 24px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 100px;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--raspberry); outline-offset: 3px; }

/* ---------- shared pieces ---------- */
.eyebrow {
  font-weight: 700;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.btn {
  display: inline-flex; align-items: center; gap: 24px;
  min-height: 64px; padding: 16px 24px;
  border-radius: 100px;
  background: var(--raspberry); color: #fff;
  font-weight: 700; font-size: 18px; line-height: 24px;
  text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color .2s ease, color .2s ease;
}
.btn:hover { background: var(--raspberry-dark); }
.btn--small { min-height: 0; padding: 8px 24px; font-size: 16px; }
.btn--paper { background: var(--paper); color: var(--ink); }
.btn--paper:hover { background: #fff; }
.btn--outline { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn--outline:hover { background: var(--paper); color: var(--ink); }
.arrow, .arrow-ext { fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.arrow { width: 40px; height: 15px; transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- nav ---------- */
.site-header {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: var(--edge);
}
.site-header__logo img { width: clamp(114px, 11.9vw, 171px); height: auto; }
.site-nav ul { display: flex; align-items: center; gap: clamp(20px, 2.5vw, 40px); }
.site-nav a:not(.btn) {
  font-weight: 700; font-size: 16px; line-height: 16px; text-decoration: none;
  padding: 8px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .2s ease;
}
.site-nav a:not(.btn):hover { background-size: 100% 2px; }
.menu-toggle {
  display: none;
  font: 700 16px/16px var(--sans); color: var(--ink);
  background: none; border: 0; padding: 14px 0 14px 16px; cursor: pointer;
}

/* ---------- 1. hero ---------- */
.hero {
  padding: clamp(80px, 9.44vw, 136px) var(--gutter) 0;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-hero);
  line-height: 1.055;
  letter-spacing: -0.02em;
  max-width: 8.5em;
}
.hero__lede {
  width: min(566px, 100%);
  margin: 40px clamp(0px, 8.2vw, 118px) 0 auto;
  font-size: clamp(18px, 1.67vw, 24px);
  line-height: 1.33;
}
.hero__art {
  display: block; width: min(920px, 100%); height: auto;
  margin: 80px auto 0;
}

/* ---------- 2. about ---------- */
.about { position: relative; padding-bottom: var(--section-gap); }
.about__panel {
  background: var(--stone);
  width: 82%;
  min-height: 640px;
  padding: 80px var(--gutter);
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
}
.about__panel .h2 { max-width: 566px; }
.about__art {
  position: absolute; z-index: 1;
  top: 80px; right: -15px;
  width: min(605px, 42vw); height: auto;
}
.about__body {
  position: relative; z-index: 2;
  margin: 80px 0 0 calc(16.67% + 20px);
  max-width: 566px;
  line-height: 1.4;
}
.about__body p + p { margin-top: 1.4em; }
.about__body .btn { margin-top: 40px; }

/* ---------- 3. team ---------- */
.team { position: relative; padding: 40px var(--edge) var(--section-gap); }
.team__header { position: relative; text-align: center; }
.team__art {
  position: absolute; left: calc(-1 * var(--edge)); top: -140px;
  width: min(472px, 33vw); height: auto;
}
.team__heading { position: relative; max-width: 920px; margin: 0 auto; }
.team__heading .h2 { margin-top: 40px; }
.team__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 72px 24px;
  margin-top: 80px;
  position: relative;
}
.person__photo {
  width: 100%; aspect-ratio: 448 / 520; object-fit: cover;
  background: #d9d9d9; margin-bottom: 16px;
}
.person__name { font-weight: 700; font-size: clamp(20px, 1.67vw, 24px); line-height: 1.3; }
.person__role { font-weight: 700; font-size: clamp(14px, 1.11vw, 16px); line-height: 1.5; text-transform: uppercase; margin-bottom: 1.3em; }
.person__bio { font-size: clamp(16px, 1.25vw, 18px); line-height: 1.33; }

/* ---------- 4. clients ---------- */
.clients {
  background: var(--stone);
  min-height: 800px;
  padding: 80px var(--edge);
  display: grid; grid-template-columns: minmax(0, 566px) minmax(0, 1fr);
  gap: 48px clamp(24px, 1.39vw, 40px);
}
.clients__text { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.clients__title {
  font-family: var(--serif); font-weight: 500;
  font-size: var(--fs-h2-small); line-height: 1.125; letter-spacing: -0.01em;
}
.clients__logos {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center; justify-items: center;
  gap: clamp(32px, 4vw, 56px) clamp(16px, 2.5vw, 40px);
  align-self: center;
}
.clients__logos li { display: flex; align-items: center; justify-content: center; width: 100%; height: 120px; }
.clients__logos img { max-height: var(--h, 80px); max-width: 100%; width: auto; height: auto; }

/* ---------- 5. curava ---------- */
.curava { padding: var(--section-gap) var(--gutter); }
.curava__title { max-width: 920px; }
.curava__row {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px; align-items: end;
  margin-top: 64px;
}
.curava__text p { line-height: 1.4; max-width: 566px; }
.curava__text .btn { margin-top: 40px; }
.curava__logo {
  background: #fff; aspect-ratio: 566 / 320;
  display: flex; align-items: center; justify-content: center; padding: 0 12%;
}
.curava__logo img { width: 100%; height: auto; }

/* ---------- 6. latest thinking ---------- */
.thinking {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 684px);
  gap: 24px;
  margin: 0 var(--edge) var(--section-gap);
  padding: 80px 0 0;
}
.thinking::before {
  content: ""; position: absolute; z-index: -1;
  left: 0; top: 0; right: calc(118px - var(--edge)); bottom: 24px;
  background: var(--stone);
}
.thinking__panel {
  padding: 0 0 80px 40px;
  display: flex; flex-direction: column; gap: 24px;
}
.thinking__panel .h2 { max-width: 526px; margin-top: auto; padding-top: 160px; }
.thinking__intro { font-size: clamp(16px, 1.25vw, 18px); line-height: 1.33; max-width: 526px; }
.thinking__card {
  background: var(--ink); color: var(--paper);
  padding: 40px;
  display: flex; flex-direction: column; gap: 48px;
  margin-right: calc(-1 * var(--edge) + 24px);
}
.post { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.post__image { display: block; width: min(100%, 320px); margin-bottom: 16px; }
.post__image img { width: 100%; height: auto; aspect-ratio: 1; }
.post__meta { font-weight: 700; font-size: clamp(14px, 1.11vw, 16px); line-height: 1.5; text-transform: uppercase; }
.post__title { font-weight: 700; font-size: clamp(24px, 3.33vw, 48px); line-height: 1.17; }
.post__summary { font-size: clamp(14px, 1.11vw, 16px); line-height: 1.5; }
.post .btn { margin-top: 24px; }
.divider { border: 0; border-top: 1px solid rgba(245, 240, 231, .5); margin: 0; }
.subscribe { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.subscribe__title { font-weight: 700; font-size: clamp(18px, 1.67vw, 24px); line-height: 1.33; }
.subscribe__text { font-size: clamp(14px, 1.11vw, 16px); line-height: 1.5; }
.subscribe .btn { margin-top: 24px; }

/* ---------- 7. footer / contact ---------- */
.site-footer { background: var(--ink); color: #fff; }
.site-footer__inner {
  min-height: 600px;
  padding: 120px var(--gutter) 72px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 448px);
  grid-template-rows: 1fr auto;
  gap: 40px;
}
.site-footer__logo { width: min(450px, 100%); height: auto; }
.site-footer__contact { grid-row: span 2; display: flex; flex-direction: column; align-items: flex-start; }
.site-footer__heading { font-weight: 500; font-size: clamp(24px, 2.22vw, 32px); line-height: 1.25; color: var(--paper); }
.site-footer__contact .btn { margin-top: 40px; }
.site-footer__label { font-weight: 700; font-size: 16px; text-transform: uppercase; margin-top: 80px; }
.site-footer__social { margin-top: 16px; display: grid; gap: 16px; }
.site-footer__social a { display: inline-flex; align-items: center; gap: 10px; font-size: 24px; line-height: 24px; text-decoration: none; }
.site-footer__social a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer__copy { align-self: end; font-size: 14px; }

/* =========================================================
   Tablet
   ========================================================= */
@media (max-width: 1100px) {
  .about__panel { width: 78%; min-height: 577px; padding-left: clamp(16px, 12vw, 124px); padding-right: 40px; }
  .about__art { top: 281px; right: -9px; width: min(409px, 40vw); }
  .about__body { margin-left: clamp(16px, 12vw, 124px); max-width: 476px; }
  .team__header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; text-align: left; align-items: start; }
  .team__art { position: static; width: 100%; max-width: 376px; margin: -80px 0 0; justify-self: end; }
  .team__heading { margin: 0; }
  .team__heading .h2 { margin-top: 24px; }
  .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clients { grid-template-columns: 1fr; min-height: 0; }
  .clients__text { gap: 24px; }
  .thinking { grid-template-columns: 1fr; }
  .thinking::before { right: 0; bottom: auto; height: calc(100% - 200px); }
  .thinking__panel { padding-bottom: 0; }
  .thinking__card { margin-right: 0; }
}

/* =========================================================
   Phone
   ========================================================= */
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .menu-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid rgba(41,37,34,.15);
    padding: 8px 16px 24px;
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
  .site-nav a:not(.btn) { display: block; padding: 12px 0; font-size: 18px; }
  .site-nav .btn { margin-top: 12px; }
  .no-js .site-nav { position: static; display: block; }

  .hero { padding-top: 80px; }
  .hero__title { line-height: 1.17; }
  .hero__lede { margin: 40px 0 0; width: 100%; line-height: 1.45; }
  .hero__art { margin-top: 64px; }

  .about__panel { width: 100%; min-height: 500px; padding: 40px 16px 154px; }
  .about__art { top: 362px; right: -9px; width: 275px; }
  .about__body { margin: 242px 16px 0; font-size: 16px; line-height: 1.5; }

  .team { padding-top: 80px; }
  .team__header { grid-template-columns: 130px minmax(0, 1fr); gap: 16px; }
  .team__art { width: 180px; max-width: none; margin: 10px 0 0 -36px; }
  .team__heading .h2 { margin-top: 24px; font-size: min(40px, 9vw); }
  .team__grid { grid-template-columns: 1fr; gap: 48px; margin-top: 0; padding: 0 calc(16px - var(--edge)); }
  .person__photo { aspect-ratio: 343 / 400; }

  .clients { padding: 40px 16px 64px; }
  .clients__text { gap: 120px; }
  .clients__logos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .clients__logos li { height: 90px; }
  .clients__logos img { max-height: calc(var(--h, 80px) * .7); }

  .curava__row { grid-template-columns: 1fr; gap: 40px; margin-top: 48px; }
  .curava__logo { order: -1; aspect-ratio: 343 / 200; }
  .curava__text p { font-size: 16px; }

  .thinking { margin: 0 0 0; padding-top: 40px; }
  .thinking::before { left: 16px; height: calc(100% - 560px); }
  .thinking__panel { padding: 0 16px 40px 24px; }
  .thinking__panel .h2 { padding-top: 96px; }
  .thinking__card { padding: 40px 16px; gap: 40px; }

  .site-footer__inner {
    grid-template-columns: 1fr; grid-template-rows: auto;
    padding: 64px 16px 40px; gap: 64px; min-height: 0;
  }
  .site-footer__logo { width: 100%; }
  .site-footer__contact { grid-row: auto; }
  .site-footer__contact .btn { margin-top: 24px; }
  .site-footer__label { margin-top: 64px; }
}
