/* VSD Community — shared design tokens & components */

:root {
  --ink: #12181f;
  --ink-soft: #4b5866;
  --ink-faint: #7c8794;
  --paper: #f7f5ef;
  --white: #ffffff;
  --steel-900: #10161d;
  --steel-800: #1b2530;
  --steel-600: #33465a;
  --steel-300: #b9c4cd;
  --steel-200: #d7dee4;
  --steel-100: #eef1f4;
  --accent: #c8501c;
  --accent-dark: #a8410f;
  --accent-100: #f5e2d3;
  --accent-ink: #8a3813;
  --teal: #1f6f63;
  --teal-100: #dceeea;
  --teal-ink: #14493f;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--steel-900);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav__row {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 100px;
}
.nav__logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--white);
}
.nav__logo span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--steel-300);
  letter-spacing: 0.04em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-grow: 1;
}
.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--steel-300);
  position: relative;
  transition: color .18s ease;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  transition: right .2s ease;
}
.nav__link:hover::after, .nav__link--active::after { right: 0; }
.nav__link:hover { color: var(--white); }
.nav__link--active { color: var(--white); }
.nav__logo { transition: opacity .18s ease; }
.nav__logo:hover { opacity: 0.82; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(200,80,28,0.28); }
.btn--ghost-dark { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.35); }
.btn--ghost-dark:hover { border-color: var(--white); transform: translateY(-2px); }
.btn--secondary { background: var(--white); color: var(--ink); border-color: var(--steel-200); }
.btn--secondary:hover { border-color: var(--steel-600); transform: translateY(-2px); box-shadow: 0 10px 18px rgba(18,24,31,0.10); }
.btn--small { padding: 8px 16px; font-size: 13px; border-radius: 6px; }
.btn:active { transform: translateY(0) !important; box-shadow: none !important; }

/* Type helpers */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow--light { color: var(--steel-300); }
.h1 { font-family: var(--font-display); font-weight: 700; font-size: 52px; line-height: 1.08; margin: 0; color: var(--ink); }
.h1--light { color: var(--white); }
.h2 { font-family: var(--font-display); font-weight: 700; font-size: 32px; line-height: 1.15; margin: 0; color: var(--ink); }
.h2.h1--light, .h3.h1--light { color: var(--white); }
.h3 { font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 1.3; margin: 0; color: var(--ink); }
.lede { font-size: 18px; line-height: 1.6; color: var(--ink-soft); margin: 0; }

/* Tags / pills */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 5px;
  background: var(--accent-100);
  color: var(--accent-ink);
}
.tag--teal { background: var(--teal-100); color: var(--teal-ink); }

.pill {
  font-size: 14px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--steel-200);
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pill--active { background: var(--steel-900); border-color: var(--steel-900); color: var(--white); }
.pill:hover:not(.pill--active) { border-color: var(--steel-600); }

/* Sections */
.section { padding: 88px 0; }
.section--tight { padding: 64px 0; }
.section--dark { background: var(--steel-900); color: var(--white); }
.section--panel { background: var(--steel-100); }
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 24px;
}
.link-more { font-size: 14px; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
.link-more--light { color: var(--white); }

/* Grids */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--steel-200);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card__thumb {
  height: 150px;
  background: linear-gradient(135deg, var(--steel-600), var(--steel-800));
  display: flex;
  align-items: center;
  justify-content: center;
}
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.card__meta { font-size: 13px; color: var(--ink-faint); margin-top: auto; padding-top: 8px; }

.stat-row { display: flex; gap: 0; border-top: 1px solid var(--steel-200); border-bottom: 1px solid var(--steel-200); }
.stat { flex: 1; padding: 24px 0; text-align: center; border-left: 1px solid var(--steel-200); }
.stat:first-child { border-left: none; }
.stat__num { font-family: var(--font-display); font-weight: 700; font-size: 28px; color: var(--ink); }
.stat__label { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* Thread rows (forum) */
.thread {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--steel-200);
}
.thread__avatar {
  width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0;
  background: var(--steel-200);
}
.thread__title { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--ink); }
.thread__snippet { font-size: 14px; color: var(--ink-soft); margin-top: 4px; }
.thread__meta { font-size: 13px; color: var(--ink-faint); margin-top: 8px; display: flex; gap: 14px; align-items: center; }
.thread__count { flex-shrink: 0; text-align: center; width: 64px; }
.thread__count-num { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); }
.thread__count-label { font-size: 11px; color: var(--ink-faint); }

/* Directory cards */
.org-card { background: var(--white); border: 1px solid var(--steel-200); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.org-card__logo { width: 48px; height: 48px; border-radius: 10px; background: var(--steel-800); display: flex; align-items: center; justify-content: center; color: var(--white); font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.org-card__name { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.org-card__loc { font-size: 13px; color: var(--ink-faint); }
.org-card__desc { font-size: 14px; color: var(--ink-soft); line-height: 1.5; flex-grow: 1; }

/* Event cards */
.event-card { display: flex; gap: 20px; background: var(--white); border: 1px solid var(--steel-200); border-radius: 12px; padding: 22px; }
.event-card__logo { width: 56px; height: 56px; flex-shrink: 0; border-radius: 8px; border: 1px solid var(--steel-200); background: #fff; object-fit: contain; padding: 6px; }
.event-date { width: 68px; flex-shrink: 0; text-align: center; background: var(--steel-100); border-radius: 8px; padding: 10px 0; }
.event-date__month { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--accent-ink); text-transform: uppercase; }
.event-date__day { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--ink); }

/* Footer */
.footer { background: var(--steel-900); color: var(--steel-300); padding: 64px 0 32px; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer__brand { color: var(--white); font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.footer__brand-logo { height: 56px; display: block; }
.footer__tagline { font-size: 14px; line-height: 1.6; margin-top: 10px; color: var(--steel-300); max-width: 260px; }
.footer__col-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--steel-300); margin-bottom: 14px; }
.footer__col a { display: block; font-size: 14px; color: var(--white); opacity: 0.85; margin-bottom: 10px; }
.footer__col a:hover { opacity: 1; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 13px; color: var(--steel-300); }
.footer__contact { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.footer__contact a { font-size: 14px; color: var(--white); opacity: 0.85; transition: opacity 0.15s ease; }
.footer__contact a:hover { opacity: 1; }
.footer__address { font-size: 13px; color: var(--steel-300); line-height: 1.5; max-width: 260px; }
.footer__bottom a { color: var(--white); opacity: 0.85; text-decoration: none; transition: opacity 0.15s ease; }
.footer__bottom a:hover { opacity: 1; }

/* Page header (subpages) */
.page-header { padding: 64px 0 40px; border-bottom: 1px solid var(--steel-200); }
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }

.search-bar { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--steel-200); border-radius: 10px; padding: 14px 18px; font-size: 15px; color: var(--ink-faint); margin-top: 28px; }

/* Brand guideline components */
.brand-panel { background: var(--white); border: 1px solid var(--steel-200); border-radius: 14px; padding: 32px; }
.swatch { border-radius: 10px; overflow: hidden; border: 1px solid var(--steel-200); }
.swatch__color { height: 80px; }
.swatch__label { padding: 12px 14px; background: var(--white); }
.swatch__name { font-weight: 600; font-size: 14px; }
.swatch__hex { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.swatch__use { font-size: 12px; color: var(--ink-soft); margin-top: 6px; line-height: 1.4; }

.type-row { display: flex; align-items: baseline; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--steel-200); }
.type-row__label { width: 160px; flex-shrink: 0; font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }

.dont-card { border: 1.5px dashed #b23b1f; border-radius: 12px; padding: 20px; background: #fdf4f1; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dont-label { font-size: 12px; font-weight: 600; color: #b23b1f; text-align: center; }

.mock-frame { background: var(--steel-100); border-radius: 16px; padding: 36px; display: flex; align-items: center; justify-content: center; min-height: 260px; }
.mock-caption { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 14px; text-align: center; }

/* ============================================
   Interactivity: nav shadow, hover lift, scroll reveal
   ============================================ */
.nav { transition: box-shadow .25s ease; }
.nav--scrolled { box-shadow: 0 8px 22px rgba(0,0,0,0.28); }

.card, .org-card, .event-card, .resource-card {
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover, .org-card:hover, .event-card:hover, .resource-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 32px rgba(18,24,31,0.12);
  border-color: var(--steel-200);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal--in { opacity: 1; transform: translateY(0); }

/* Icon / badge motion on card hover */
.card__thumb svg circle,
.card__thumb svg polygon { transition: transform .3s ease; transform-origin: center; }
.card:hover .card__thumb svg circle,
.card:hover .card__thumb svg polygon { transform: scale(1.12); }

.org-card__logo { transition: transform .25s ease; }
.org-card:hover .org-card__logo { transform: scale(1.08) rotate(-2deg); }

.event-date { transition: background .22s ease, transform .22s ease; }
.event-card:hover .event-date { background: var(--accent-100); transform: scale(1.04); }

.resource-card__icon { transition: transform .28s ease, background .22s ease; }
.resource-card:hover .resource-card__icon { transform: scale(1.1) rotate(-4deg); background: var(--accent-100); }

.value-pillar svg { transition: transform .28s ease; }
.value-pillar:hover svg { transform: translateY(-3px) scale(1.08); }

.link-more { display: inline-flex; align-items: center; transition: gap .18s ease, color .18s ease; }
.link-more:hover { gap: 4px; color: var(--accent-dark); }

/* Hero photo band */
.hero-photo { border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 6; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Featured project cards */
.project-card {
  background: var(--white);
  border: 1px solid var(--steel-200);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 32px rgba(18,24,31,0.12);
  border-color: var(--steel-200);
}
.project-card__photo { height: 240px; position: relative; overflow: hidden; background: var(--steel-900); }
.project-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-card__photo img.photo-fit__bg { position: absolute; inset: 0; filter: blur(22px) brightness(0.65) saturate(1.1); transform: scale(1.15); }
.project-card__photo img.photo-fit__img { position: relative; object-fit: contain; }
.project-card__body { padding: 20px; }

/* ============================================
   Page-fade transitions between artboards
   ============================================ */
.page-fade { opacity: 0; transition: opacity .28s ease; }
.page-fade.page-fade--in { opacity: 1; }

/* ============================================
   Hero stat count-up
   ============================================ */
.stat-count { font-variant-numeric: tabular-nums; }

/* Search bar input (real control, replaces static text) */
.search-bar__input {
  border: none;
  outline: none;
  background: transparent;
  flex-grow: 1;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
}
.search-bar__input::placeholder { color: var(--ink-faint); }

/* ============================================
   Resources / partner lead-capture
   ============================================ */
.resource-card {
  background: var(--white);
  border: 1px solid var(--steel-200);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.resource-card__icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--steel-100);
  display: flex; align-items: center; justify-content: center;
}
.resource-card__photo {
  margin: -24px -24px 4px;
  height: 140px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.resource-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.resource-card__partner {
  font-size: 11px; color: var(--ink-faint); font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.04em;
}

.gate-overlay {
  position: fixed; inset: 0; background: rgba(16,22,29,0.62);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 24px;
  animation: gateFadeIn .2s ease;
}
.gate-modal {
  background: var(--white); border-radius: 16px; padding: 36px;
  max-width: 440px; width: 100%;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  animation: gateScaleIn .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes gateFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gateScaleIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.gate-field { display: flex; flex-direction: column; gap: 6px; }
.gate-field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.gate-field input, .gate-field select {
  border: 1px solid var(--steel-200); border-radius: 8px; padding: 10px 12px;
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  width: 100%; box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.gate-field input:focus, .gate-field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.gate-overlay .btn--primary:hover { transform: translateY(-2px) scale(1.02); }
.gate-success {
  border: 1px solid var(--teal); background: var(--teal-100); color: var(--teal-ink);
  border-radius: 10px; padding: 16px 18px; font-size: 14px;
  display: flex; flex-direction: column; gap: 6px;
}

/* ============================================
   Responsive (mobile / tablet) — applies when this
   design is exported as a real, fluid-width website.
   ============================================ */
@media (max-width: 960px) {
  .container { padding: 0 24px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .h1 { font-size: 40px; }
  [style*="grid-template-columns: repeat(4, 1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 720px) {
  .container { padding: 0 18px; }

  .nav__row { height: auto; flex-wrap: wrap; gap: 12px; padding: 14px 0; }
  .nav__links { gap: 14px; flex-wrap: wrap; order: 3; width: 100%; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  [style*="grid-template-columns: repeat(4, 1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }

  [style*="justify-content: space-between"] {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 18px !important;
  }

  .h1 { font-size: 32px; }
  .h2 { font-size: 26px; }
  .lede { font-size: 16px; }
  .section { padding: 56px 0; }
  .section--tight { padding: 44px 0; }
  .page-header { padding: 44px 0 28px; }

  .footer__top { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 12px; }

  .event-card { flex-direction: column; }
  .event-date { width: auto; display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; }

  .stat-row { flex-wrap: wrap; }
  .stat { flex: 1 1 50%; border-left: none !important; border-top: 1px solid var(--steel-200); }
  .stat:nth-child(-n+2) { border-top: none; }

  .pill-row { gap: 8px; }

  .section > .container[style*="align-items: flex-start"] { flex-direction: column; }
  .section > .container[style*="align-items: flex-start"] > div[style*="width: 280px"] { width: 100% !important; }

  .gate-modal { padding: 26px; }

  .project-card__photo { height: 180px; }
  .hero-photo { aspect-ratio: 4 / 3; }
}

@media (max-width: 480px) {
  .h1 { font-size: 27px; }
  [style*="grid-template-columns: repeat(4, 1fr)"] { grid-template-columns: 1fr 1fr !important; }
  .org-card, .event-card, .card, .resource-card { border-radius: 10px; }
}

/* ============================================
   v6 additions — lead-capture modals, video
   embeds, project detail page, deep-link offsets
   ============================================ */
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.gate-field textarea {
  border: 1px solid var(--steel-200); border-radius: 8px; padding: 10px 12px;
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  width: 100%; box-sizing: border-box; resize: vertical;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.gate-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

[id] { scroll-margin-top: 96px; }

.vsd-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px);
  background: var(--steel-900); color: var(--white);
  padding: 14px 22px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.28);
  z-index: 80; opacity: 0; transition: opacity .25s ease, transform .25s ease;
  max-width: min(420px, calc(100vw - 32px)); text-align: center;
}
.vsd-toast--in { opacity: 1; transform: translate(-50%, 0); }

.video-embed {
  display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--steel-200); background: var(--white);
}
.video-embed__frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #10161d; }
.video-embed__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.video-embed__body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 4px; }

.project-detail { display: flex; flex-direction: column; gap: 18px; border-radius: 16px; overflow: hidden; border: 1px solid var(--steel-200); background: var(--white); }
.project-detail__photo { width: 100%; height: 360px; overflow: hidden; position: relative; background: var(--steel-900); }
.project-detail__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-detail__photo img.photo-fit__bg { position: absolute; inset: 0; filter: blur(28px) brightness(0.65) saturate(1.1); transform: scale(1.15); }
.project-detail__photo img.photo-fit__img { position: relative; object-fit: contain; }
.project-detail__body { padding: 0 32px 32px; display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 720px) {
  .project-detail__photo { height: 220px; }
  .project-detail__body { padding: 0 20px 24px; }
  .video-embed__body { padding: 14px 16px 18px; }
}
