/* Hero (based on wiki/static/wiki/css/pattern_home.css) */
.hero {
  max-width: 525px;
  margin: 24px auto 32px auto;
  text-align: center;
  padding: 0 16px;
  width: 100%;
  box-sizing: border-box;
}
.hero-eyebrow {
  font-size: clamp(10px, 2vw, 14px);
  letter-spacing: 0.18em;
  color: #606060;
  text-transform: uppercase;
  margin-bottom: 12px;
  text-align: center;
  width: 100%;
}
.hero-title {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-weight: 200;
  font-size: clamp(20px, 4vw, 40px);
  max-width: clamp(210px, 50vw, 440px);
  line-height: 1.15;
  margin: 0 auto 16px auto;
  text-align: center;
  width: 100%;
}
.hero-subtitle {
  font-size: 18px;
  color: #3a3a3a;
  max-width: clamp(210px, 50vw, 420px);
  margin: 0 auto 20px auto;
  text-align: center;
  width: 100%;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: #fff;
  border-radius: 10px;
  padding: 12px 18px;
  /* margin-bottom: 100px; */
  text-decoration: none;
  box-shadow: 0 2px 0 rgba(0,0,0,0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.hero-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); background: var(--primary-dark); }
.hero-cta .g-icon { display: inline-flex; margin-right: 10px; }

/* Responsive styles for hero */
@media (max-width: 600px) {
  .hero {
    margin: 16px auto 24px auto;
    padding: 0 12px;
  }
  
  .hero-title {
    font-size: clamp(18px, 5vw, 32px);
    margin: 0 auto 24px auto;
  }
  
  .hero-subtitle {
    font-size: 16px;
    line-height: 1.4;
  }
}

@media (max-width: 400px) {
  .hero {
    margin: 12px auto 20px auto;
    padding: 0 8px;
  }
  
  .hero-title {
    font-size: clamp(16px, 6vw, 28px);
    margin: 0 auto 20px auto;
  }
  
  .hero-subtitle {
    font-size: 15px;
    line-height: 1.5;
  }
  
  .hero-eyebrow {
    font-size: 12px;
  }
}

/* Layout wrapper */
.pattern-root { min-width: 900px; margin-left: auto; margin-right: auto; padding: 0 16px 0 16px; }
@media (max-width: 960px) { .pattern-root { min-width: 0; } }

/* Prevent horizontal scrolling on this page */
html, body { max-width: 100%; overflow-x: hidden; }

/* Video card */
.video-card {
  position: relative;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #d6d6d6;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 2px 0 rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  margin-bottom: 100px;
}
.video-card:active { transform: scale(0.995); }
.video-card.is-playing { transform: scale(1.02); box-shadow: 0 14px 42px rgba(0,0,0,0.18); }

/* Image card (for transparent PNG map) */
.image-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin-bottom: 40px;
  /* Full-bleed, centered to viewport */
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  max-width: 100vw;
  border-radius: 0;
  overflow: visible;
  cursor: default;
}
.image-card img {
  display: block;
  width: 100%;
  max-width: 1000px;
  height: auto;
  margin: 0 auto;
  border-radius: 0;
}
.image-card:active { transform: none; }

.video-aspect { position: relative; aspect-ratio: 16 / 9; background: #f5f5f5; }
.video-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }

.video-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(255,255,255,0.35), rgba(255,255,255,0.0) 60%); }
.play-button { border: none; background: transparent; width: 92px; height: 92px; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.25)); transition: transform 200ms ease; border-radius: 999px; padding: 0; }
.play-button:hover { transform: scale(1.05); }

.video-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }


/* Mission callout under video */
.mission-callout {
    text-align: center;
    margin: 0 auto 48px auto;
    max-width: 600px;
    padding: 0 16px;
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .mission-heading {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: 100;
    font-size: clamp(18px, 3.2vw, 32px);
    line-height: 1.25;
    margin: 0 0 40px 0;
    max-width: 50ch;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    color: #111;
  }
  .mission-callout .hero-cta {
    background: #fff;
    color: var(--primary-color);
    border: 1px solid rgba(37,99,235,0.25);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  }
  .mission-callout .hero-cta:hover { background: #f8fafc; color: var(--primary-dark); }

/* Section eyebrows (for non-hero sections) */
.pattern-root .hero-eyebrow {
  text-align: center;
  margin: 0 auto 32px auto;
  max-width: 640px;
  padding: 0 16px;
}

/* Links grid */
.links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto 50px auto;
  padding: 0 16px;
}
/* Card row */
.info-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 14px 14px 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 0 rgba(0,0,0,0.04);
  transition: transform 160ms cubic-bezier(0.22,1,0.36,1), box-shadow 160ms ease;
}
.info-card-body { display: grid; row-gap: 4px; }
.info-card-arrow { width: 18px; height: 18px; color: #64748b; flex: 0 0 auto; margin-left: 12px; transition: transform 160ms ease, color 160ms ease; }
.info-card-arrow svg { width: 100%; height: 100%; display: block; }
.info-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.10); }
.info-card:hover .info-card-arrow { transform: translateX(2px); color: var(--primary-color); }
.info-card-title { font-family: Georgia, 'Times New Roman', Times, serif; font-weight: 400; font-size: 18px; margin-bottom: 4px; }
.info-card-text { font-size: 14px; color: #475569; }

@media (max-width: 960px) { .links-grid { grid-template-columns: 1fr; } }
@media (max-width: 540px) { .links-grid { grid-template-columns: 1fr; } }

/* Substack embeds grid */
.substack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto 80px auto;
  padding: 0 16px;
  align-items: start;     /* align cards to the top of each row */
  justify-items: center;  /* center cards within their grid areas */
  width: 100%;
  box-sizing: border-box; /* include padding to avoid accidental overflow */
}
.substack-post-embed {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 6px 0 12px -6px rgba(0,0,0,0.15), 0 6px 12px -6px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 420px; /* keep a comfortable readable width and enable centering */
}
.substack-post-embed a[data-post-link] { color: var(--primary-color); text-decoration: none; }
.substack-post-embed a[data-post-link]:hover { text-decoration: underline; }

@media (max-width: 1130px) { .substack-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 840px) { .substack-grid { grid-template-columns: 1fr; } }

/* Subscribe embed */
.subscribe-embed { display: flex; justify-content: center; margin: 24px 0 24px 0; }

/* Background number grid canvas + content wrapper */
.bg-number-grid {
  position: fixed;
  left: 0;
  /* top is dynamically positioned by JS to align with mission module */
  width: 100vw;
  height: 0; /* JS will size */
  z-index: 0;
  pointer-events: none;
}
.content-wrap {
  position: relative;
  z-index: 1;
}

/* Mission module with local background canvas */
.mission-module {
  position: relative;
  padding-top: 40px;
}
.mission-module > * {
  position: relative;
  z-index: 1;
}