/* Tariq & Asma Farid Foundation — site styles */

:root {
  --bg: #F4EFE6;          /* warm off-white */
  --bg-card: #FBF7EE;
  --ink: #1A1614;         /* deep, slightly warm ink */
  --ink-soft: #4A443D;
  --ink-muted: #7A736A;
  --rule: #D9D2C4;
  --accent: #5C6B5A;      /* muted sage */
  --accent-soft: #E4E2D6;
  --warm-stripe: #ECE4D2;

  --font-sans: "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;

  --max-w: 1240px;
  --gutter: 48px;

  /* Spacing scale — adjust to retune vertical density site-wide */
  --space-section: 72px;        /* was 96px */
  --space-section-tight: 48px;  /* was 64px */
  --space-hero-top: 56px;       /* was 80px */
  --space-hero-bot: 72px;       /* was 96px */
  --space-footer-top: 64px;     /* was 120px */
  --space-partner: 40px;        /* was 64px */
  --space-pullquote: 64px;      /* was 96px */
  --space-band-dark: 72px;      /* was 96px */
  --space-section-head: 24px;   /* was 40/48 */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body.tafs {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 17px;
  line-height: 1.55;
}

/* ----------------------------------------------------------- */
/* PAGE FRAME (used inside design canvas artboards)            */
/* ----------------------------------------------------------- */
.page {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  width: 1440px;
  position: relative;
  overflow: hidden;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ----------------------------------------------------------- */
/* TYPE                                                        */
/* ----------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}

.eyebrow.with-rule {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow.with-rule::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--ink-muted);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.018em; margin: 0; color: var(--ink); }
h1 { font-size: 64px; line-height: 1.05; letter-spacing: -0.028em; font-weight: 450; }
h2 { font-size: 40px; line-height: 1.12; font-weight: 450; }
h3 { font-size: 24px; line-height: 1.25; font-weight: 500; }
h4 { font-size: 17px; font-weight: 500; }

p { margin: 0; text-wrap: pretty; }
.lede { font-size: 22px; line-height: 1.45; color: var(--ink-soft); font-weight: 400; max-width: 680px; }

a { color: inherit; text-decoration: none; }
a.link {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color .15s ease, color .15s ease;
}
a.link:hover { border-color: var(--ink); }

.tnum { font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------- */
/* HEADER                                                      */
/* ----------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand .brand-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}
.brand .mark {
  width: 28px; height: 28px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  align-self: center;
}
.brand .name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
}
.brand .name small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 400;
  margin-top: 4px;
}

.nav {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav a {
  font-size: 14px;
  color: var(--ink-soft);
  position: relative;
}
.nav a.active { color: var(--ink); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--ink);
}

/* ----------------------------------------------------------- */
/* FOOTER                                                      */
/* ----------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 48px var(--gutter) 32px;
  margin-top: var(--space-footer-top);
}
.site-footer .row {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 48px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer ul a { font-size: 14px; color: var(--ink-soft); }
.site-footer ul a:hover { color: var(--ink); }

.site-footer .colophon {
  max-width: var(--max-w);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px 48px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  line-height: 1.75;
}
.site-footer .colophon > div { display: flex; flex-direction: column; gap: 4px; }
.site-footer .colophon .colophon-legal { flex: 1 1 480px; min-width: 0; max-width: 760px; }
.site-footer .colophon .colophon-meta { text-align: right; align-items: flex-end; flex: 0 0 auto; }

/* ----------------------------------------------------------- */
/* PHOTO PLACEHOLDERS                                          */
/* ----------------------------------------------------------- */
.photo {
  position: relative;
  background: var(--warm-stripe);
  background-image:
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(26,22,20,.04) 18px 19px);
  border: 1px solid var(--rule);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}
.photo--filled { background: #1a1614; }
.photo--filled .caption {
  color: rgba(255,255,255,0.85);
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  position: relative;
  z-index: 2;
}
.photo .caption {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(244,239,230,.95), rgba(244,239,230,0));
  width: 100%;
}
.photo--dark {
  background: #2A241E;
  background-image:
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,.04) 18px 19px);
}
.photo--dark .caption { color: rgba(255,255,255,.7); background: linear-gradient(to top, rgba(20,16,14,.85), transparent); }

/* ----------------------------------------------------------- */
/* SECTIONS / RHYTHM                                           */
/* ----------------------------------------------------------- */
.section { padding: var(--space-section) 0; }
.section--tight { padding: var(--space-section-tight) 0; }
.section--hero { padding-top: var(--space-hero-top); padding-bottom: var(--space-hero-top); }

.section-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: baseline;
  padding-bottom: var(--space-section-head);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 32px;
}
.section-head .label { display: flex; flex-direction: column; gap: 16px; }
.section-head h2 { max-width: 720px; }

/* Numbered figure markers */
.figure-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}

/* ----------------------------------------------------------- */
/* CARDS / PARTNERS                                            */
/* ----------------------------------------------------------- */
.partner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: var(--space-partner) 0;
  border-top: 1px solid var(--rule);
}
.partner:last-child { border-bottom: 1px solid var(--rule); }
.partner .meta { display: flex; flex-direction: column; gap: 20px; }
.partner .meta .num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}
.partner h3 { font-size: 28px; line-height: 1.2; max-width: 480px; }
.partner .body { font-size: 16px; line-height: 1.6; color: var(--ink-soft); max-width: 540px; }
.partner .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.partner .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.partner .photo { aspect-ratio: 4/3; }

.partner.flip .photo { order: -1; }

/* ----------------------------------------------------------- */
/* PULL QUOTE                                                  */
/* ----------------------------------------------------------- */
.pullquote {
  padding: var(--space-pullquote) 0;
  text-align: left;
}
.pullquote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: -0.018em;
  color: var(--ink);
  max-width: 920px;
}
.pullquote cite {
  display: block;
  margin-top: 28px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ----------------------------------------------------------- */
/* STATS LINE                                                  */
/* ----------------------------------------------------------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat-row .stat {
  padding: 32px 24px;
  border-right: 1px solid var(--rule);
}
.stat-row .stat:last-child { border-right: 0; }
.stat-row .stat .value {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  font-weight: 450;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.stat-row .stat .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 12px;
  display: block;
}

/* ----------------------------------------------------------- */
/* BUTTONS                                                     */
/* ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-family: var(--font-sans);
  padding: 14px 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn.btn--ghost:hover { background: var(--ink); color: var(--bg); }

.btn .arrow {
  display: inline-block;
  transition: transform .15s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ----------------------------------------------------------- */
/* ASIDE NOTE                                                  */
/* ----------------------------------------------------------- */
.note {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.note .key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.note .val { font-size: 16px; color: var(--ink-soft); max-width: 560px; }

/* ----------------------------------------------------------- */
/* GRANTS PROCESS                                              */
/* ----------------------------------------------------------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.process .step {
  padding: 32px 24px 40px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.process .step:last-child { border-right: 0; }
.process .step .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}
.process .step h4 { font-size: 18px; font-weight: 500; }
.process .step p { font-size: 14px; line-height: 1.55; color: var(--ink-soft); }

/* ----------------------------------------------------------- */
/* FORM                                                        */
/* ----------------------------------------------------------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.form .field { display: flex; flex-direction: column; gap: 8px; }
.form .field.full { grid-column: span 2; }
.form label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.form input, .form textarea, .form select {
  font-family: var(--font-sans);
  font-size: 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease;
}
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--ink); }
.form input::placeholder, .form textarea::placeholder { color: rgba(20, 18, 14, 0.22); font-style: italic; opacity: 1; }
.form textarea { resize: vertical; min-height: 120px; }

/* ----------------------------------------------------------- */
/* HERO SPECIFIC                                               */
/* ----------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  padding: var(--space-hero-top) var(--gutter) var(--space-hero-bot);
  max-width: var(--max-w);
  margin: 0 auto;
}
.hero h1 { max-width: 580px; }
.hero .right { display: flex; flex-direction: column; gap: 24px; }
.hero .photo { aspect-ratio: 4/5; height: 480px; width: 100%; }
.hero .meta-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}
.hero .meta-line .key { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); }
.hero .meta-line .val { font-size: 14px; color: var(--ink-soft); }

/* ----------------------------------------------------------- */
/* DARK SECTION (single contemplative band)                    */
/* ----------------------------------------------------------- */
.band-dark {
  background: #1A1614;
  color: #E8E2D2;
  padding: var(--space-band-dark) 0;
}
.band-dark h2, .band-dark h3 { color: #F2EBDB; }
.band-dark .eyebrow { color: rgba(232, 226, 210, 0.6); }
.band-dark .eyebrow.with-rule::before { background: rgba(232, 226, 210, 0.5); }

/* ----------------------------------------------------------- */
/* MAP-LIKE GRID for impact reach                              */
/* ----------------------------------------------------------- */
.reach {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.reach .cell {
  aspect-ratio: 1/1;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-muted);
}
.reach .cell.on { background: var(--accent); }
.reach .cell.soft { background: var(--accent-soft); }

/* ----------------------------------------------------------- */
/* LETTER                                                      */
/* ----------------------------------------------------------- */
.letter {
  max-width: 720px;
  margin: 0 auto;
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.letter p + p { margin-top: 18px; }
.letter .signature {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  margin-top: 32px;
}

/* ----------------------------------------------------------- */
/* TINY ITEM ROWS (year list)                                  */
/* ----------------------------------------------------------- */
.year-list { border-top: 1px solid var(--rule); }
.year-list .row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 100px;
  gap: 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.year-list .row .y { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); letter-spacing: 0.08em; }
.year-list .row .name { font-size: 17px; font-weight: 500; }
.year-list .row .focus { font-size: 14px; color: var(--ink-soft); }
.year-list .row .where { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); text-align: right; }


/* ============================================================ */
/* RESPONSIVE — tablet & mobile                                 */
/* ============================================================ */

/* Tablet — 1024px and below */
@media (max-width: 1024px) {
  :root { --gutter: 32px; }
  body.tafs { font-size: 16px; }
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  .lede { font-size: 19px; }

  .hero { grid-template-columns: 1fr; gap: 48px; padding: 56px var(--gutter) 72px; }
  .hero .photo { height: auto; aspect-ratio: 4/5; max-height: 520px; }

  .section { padding: 72px 0; }
  .section-head { grid-template-columns: 200px 1fr; gap: 32px; }

  .partner { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
  .partner.flip .photo { order: 0; }

  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-row .stat:nth-child(2) { border-right: 0; }
  .stat-row .stat:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }

  .process { grid-template-columns: repeat(2, 1fr); }
  .process .step:nth-child(2) { border-right: 0; }
  .process .step:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }

  .reach { grid-template-columns: repeat(8, 1fr); }

  .site-footer .row { grid-template-columns: 1fr 1fr; gap: 32px; }

  .band-dark .container { grid-template-columns: 1fr !important; gap: 32px !important; }
}

/* Tablet header collapse — kicks in earlier so wordmark + nav don't crowd */
@media (max-width: 880px) {
  .site-header { flex-wrap: wrap; gap: 16px; padding: 20px var(--gutter); }
  .site-header .lockup { --u: 13px !important; }
  .site-header .lockup .wordmark .full { font-size: 9px; max-width: 240px; }
  .nav { width: 100%; gap: 0; justify-content: space-between; border-top: 1px solid var(--rule); padding-top: 12px; overflow-x: auto; }
  .nav a { font-size: 13px; white-space: nowrap; }
}

/* Mobile — 720px and below */
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  body.tafs { font-size: 15.5px; }
  h1 { font-size: 36px; line-height: 1.1; }
  h2 { font-size: 26px; }
  h3 { font-size: 20px; }
  .lede { font-size: 17px; }

  .site-header {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
    padding: 20px var(--gutter);
  }
  .site-header .lockup { --u: 12px !important; }
  .site-header .lockup .wordmark .full { font-size: 9px; }
  .nav {
    width: 100%;
    gap: 0;
    overflow-x: auto;
    border-top: 1px solid var(--rule);
    padding-top: 14px;
    justify-content: space-between;
  }
  .nav a { font-size: 13px; white-space: nowrap; }
  .nav a.active::after { bottom: -4px; }

  .hero { padding: 36px var(--gutter) 56px; gap: 32px; }
  .hero .photo { max-height: 420px; }
  .hero h1 { max-width: 100%; }

  .section { padding: 56px 0; }
  .section-head { grid-template-columns: 1fr; gap: 16px; padding-bottom: 24px; margin-bottom: 32px; }

  .pullquote { padding: 56px 0; }
  .pullquote blockquote { font-size: 24px; line-height: 1.3; }

  .partner h3 { font-size: 22px; }
  .partner .meta { gap: 14px; }

  .stat-row { grid-template-columns: 1fr; }
  .stat-row .stat { border-right: 0; border-bottom: 1px solid var(--rule); }
  .stat-row .stat:last-child { border-bottom: 0; }
  .stat-row .stat .value { font-size: 36px; }

  .process { grid-template-columns: 1fr; }
  .process .step { border-right: 0; border-bottom: 1px solid var(--rule); }
  .process .step:last-child { border-bottom: 0; }

  .reach { grid-template-columns: repeat(6, 1fr); }

  .form { grid-template-columns: 1fr; gap: 18px; }
  .form .field.full { grid-column: span 1; }
  .form input, .form textarea, .form select { font-size: 16px; /* prevent iOS zoom */ }

  .site-footer { padding: 48px var(--gutter) 32px; margin-top: 72px; }
  .site-footer .row { grid-template-columns: 1fr; gap: 32px; }
  .site-footer .colophon { flex-direction: column; gap: 12px; align-items: flex-start; }
  .site-footer .colophon .colophon-meta { text-align: left; align-items: flex-start; }

  .note { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; }
  .letter { font-size: 17px; }

  .band-dark { padding: 64px 0; }
  .band-dark h2 { font-size: 24px !important; }

  .btn { padding: 12px 18px; font-size: 13.5px; }

  .year-list .row { grid-template-columns: 60px 1fr; gap: 12px; }
  .year-list .row .focus, .year-list .row .where { display: none; }
}

/* Very small screens — keep readable */
@media (max-width: 480px) {
  .site-header .lockup .wordmark .full { display: none; }
}

@media (max-width: 380px) {
  h1 { font-size: 30px; }
  .nav { gap: 12px; justify-content: flex-start; }
  .nav a { font-size: 12px; }
}


/* ----------------------------------------------------------- */
/* SAFETY: hide legacy figure captions on all viewports        */
/* ----------------------------------------------------------- */
.photo .caption,
.photo--filled .caption,
.photo--dark .caption,
.figure-num,
.hero .meta-line,
figure > figcaption { display: none !important; }
