/* ==========================================================================
   FtC website 2026 — shared components
   Reset, page frame, nav, buttons, tags, metrics. Page-specific layout
   lives in the page's own stylesheet (e.g. sf-forum/sf-forum.css).
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-mist);
  color: var(--c-black);
  font-family: var(--f-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

/* Sections stack with zero spacing; each carries its own padding (Ira). */
.section {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Fixed-width content lock beyond 1440px — mirrors Ira's grid rule so
   full-bleed backgrounds stay full-bleed while content centres.          */
.section__inner {
  position: relative;
  width: 100%;
  margin-inline: auto;
}
@media (min-width: 1441px) {
  .section__inner { max-width: var(--grid-max-width); }
}

/* Hidden-until-content: sections and blocks gated by content.js flags. */
[hidden] { display: none !important; }

/* ---- Top nav ------------------------------------------------------------ */
.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  height: 103px;              /* 35px top offset + 33px row + breathing room */
  padding: 35px var(--grid-margin) 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.nav__left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav__logo {
  display: block;
  height: 33px;
  width: auto;
}
.nav__logo img { height: 33px; width: auto; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 33px;          /* 233 − 40 − 144 − 16 at 1440 */
}
.menu-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--r-md);
  background: var(--c-white);
  color: var(--c-black);
  white-space: nowrap;
}
.menu-item--dark {
  background: var(--c-black);
  color: var(--c-white);
}
.menu-item__caret {
  width: 12px;
  height: 12px;
  display: block;
}

.nav__pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 33px;
  padding: 4px 8px;
  border: 1px solid var(--c-white);
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, rgba(228, 255, 207, 0.6), rgba(223, 211, 255, 0.6));
  color: var(--c-black);
  white-space: nowrap;
}
.nav__pill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-live-green);
  box-shadow: 0 0 0 2px rgba(76, 243, 64, 0.25);
  flex: none;
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 331px;
  padding: 20px 36px;
  border-radius: var(--r-md);
  background: var(--c-white);
  color: var(--c-black);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease;
}
.btn--dark {
  background: var(--c-black);
  color: var(--c-white);
}
.btn--outline {
  background: var(--c-white);
  border-color: rgba(0, 0, 0, 0.28);   /* the pale blue outline disappeared on some screens (Tereza, 17 Sep) */
}
.btn--full { width: 100%; }
.btn__arrow {
  width: 14px;
  height: 14px;
  flex: none;
}
.btn__arrow { color: inherit; }
/* No hover states in Figma yet (Ira). Focus ring for keyboard users only. */
.btn:focus-visible,
.menu-item:focus-visible,
.nav__pill:focus-visible {
  outline: 2px solid var(--c-black);
  outline-offset: 2px;
}

/* ---- Theme tag ---------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--c-tag);
  text-align: left;
}

/* ---- Metric card -------------------------------------------------------- */
.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px 20px 12px;
  border-radius: var(--r-md);
  background: var(--c-white);
  overflow: hidden;
  min-height: 159px;
}
.metric__value {
  font: 400 64px/1.1 var(--f-display);
}

/* ---- Utility ------------------------------------------------------------ */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---- Nav: tablet and mobile --------------------------------------------
   Hamburger (33px white square, two bars) from 1024px down. On mobile the
   pill drops to its own full-width row under the logo row (Figma
   "opening B with CFP - mobile").                                          */
.nav__burger {
  display: none;
  width: 33px; height: 33px;
  padding: 0;
  border: 0;
  border-radius: var(--r-md);
  background: var(--c-white);
  cursor: pointer;
  flex: none;
  position: relative;
}
.nav__burger::before,
.nav__burger::after {
  content: "";
  position: absolute;
  left: 8px;
  width: 17px; height: 2px;
  background: var(--c-black);
}
.nav__burger::before { top: 12px; }
.nav__burger::after { top: 19px; }
.nav__right { display: flex; align-items: center; gap: 8px; }
@media (max-width: 1024px) {
  .nav__burger { display: block; }
  .nav { height: auto; align-items: center; gap: 8px; }
  .nav__left { flex: 0 0 auto; }
  .nav__pill { margin-left: auto; }
}
@media (max-width: 699px) {
  .nav {
    padding-top: 52px;
    flex-wrap: wrap;
    row-gap: 20px;
    column-gap: 8px;
  }
  .nav__left { flex: 1 1 auto; justify-content: space-between; }
  .nav__burger { order: 2; }
  .nav__pill {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}
/* Full-screen menu (Figma "navigation mobile"). Opens from the burger. */
.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: auto;
  background: var(--c-white);
  padding: 32px var(--grid-margin) 40px;
  display: none;
  flex-direction: column;
}
.menu[data-open="true"] { display: flex; }
body[data-menu-open="true"] { overflow: hidden; }
.menu__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.menu__close {
  width: 33px; height: 33px;
  border: 0; padding: 0;
  border-radius: var(--r-md);
  background: var(--c-white);
  cursor: pointer;
  position: relative;
  flex: none;
}
.menu__close::before, .menu__close::after {
  content: ""; position: absolute; left: 8px; top: 15px;
  width: 17px; height: 2px; background: var(--c-black);
}
.menu__close::before { transform: rotate(45deg); }
.menu__close::after { transform: rotate(-45deg); }
.menu__group { margin-top: 56px; text-align: center; }
.menu__heading { font: 400 36px/1 var(--f-display); }
.menu__links { display: flex; flex-direction: column; margin-top: 20px; }
.menu__link { display: block; padding: 12px 36px; border-radius: var(--r-md); font: 500 16px/1.2 var(--f-sans); }
.menu__event {
  margin-top: auto;
  padding-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.menu__card {
  position: relative;
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 12px;
  padding: 4px;
  border-radius: var(--r-md);
  background: var(--c-lilac);
  min-height: 132px;
}
.menu__card img { width: 124px; height: 124px; border-radius: var(--r-sm); object-fit: cover; }
.menu__card-text { padding: 13px 28px 12px 0; display: flex; flex-direction: column; gap: 8px; }
.menu__card-text .t-meta { color: var(--c-ink-60); }
.menu__card-arrow { position: absolute; right: 12px; bottom: 12px; width: 12px; height: 12px; }
.menu .nav__pill { width: 100%; justify-content: flex-start; }

@media (max-width: 699px) {
  .metric__value { font-size: 36px; }
}

/* ==========================================================================
   Shared blocks used across pages (moved up from sf-forum.css for www)
   ========================================================================== */

/* ---- Section title: display line + tinted second line, centred ---------- */
.section-title {
  text-align: center;
  margin: 0 auto;
  padding-top: var(--s-section-top);
}
.ink-60 { color: var(--c-ink-60); }
.ink-50 { color: var(--c-ink-50); }
.ink-40 { color: var(--c-ink-40); }
.ink-20 { color: var(--c-ink-20); }
.ink-10 { color: rgba(0, 0, 0, 0.1); }
[data-reveal] .w { transition: color 220ms linear; }

/* ---- Feature card: text left (or right with --flip), image 670 wide ----- */
.feature {
  display: grid;
  grid-template-columns: 1fr 670px;
  min-height: 600px;                   /* grows with long copy instead of squeezing it */
  padding: 4px;
  border-radius: var(--r-xl);
  background: var(--c-white);
  overflow: hidden;
}
.feature--flip { grid-template-columns: 670px 1fr; }
.feature--flip .feature__media { order: -1; }
.feature__body {
  display: flex;
  flex-direction: column;
  padding: 56px 40px 36px 36px;
  min-width: 0;
}
.feature__label { color: var(--c-ink-70); }
.feature__headline { margin-top: 60px; max-width: 606px; }
.feature__footer { margin-top: auto; padding-top: 48px; }
.feature__list { margin-top: 10px; min-height: 48px; max-width: 606px; font-size: 14px; line-height: 1.5; color: var(--c-ink-70); }
.feature__list span { white-space: nowrap; }
.feature__list span:not(:last-child)::after { content: " \00B7"; }
.feature__footer .btn { margin-top: 40px; }
.feature__media {
  position: relative;
  height: auto;
  min-height: 592px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(160deg, var(--c-lilac) 0%, var(--c-sky-pale) 55%, var(--c-cream) 100%);
}
.feature__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature__media--slides .slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}
.feature__media--slides .slide.is-on { opacity: 1; }

/* ---- Buttons, extra variants ------------------------------------------- */
.btn--yellow { background: #fcff9f; color: var(--c-black); }
.btn--center { justify-content: center; }
.btn--small { width: auto; padding: 12px 20px; justify-content: center; }
.micro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 8px;
  border: 1px solid var(--c-border-blue);
  border-radius: var(--r-sm);
  background: var(--c-white);
  color: var(--c-black);
  white-space: nowrap;
  cursor: pointer;
}
.micro-btn--wide { width: 100%; }
/* Hover from Ira's interactions page (Dev ready, 21 Sep): a pale blue-grey fill */
.micro-btn { transition: background-color .15s ease; }
.micro-btn:hover { background: #eff4f5; }
.micro-btn:focus-visible { outline: 2px solid var(--c-black); outline-offset: 2px; }

/* Big two-row button (Figma "Main button", 446×106) */
.btn-big {
  display: grid;
  grid-template-rows: auto auto;
  gap: 10px;
  min-height: 106px;
  padding: 20px 24px;
  border-radius: var(--r-md);
  background: var(--c-white);
  color: var(--c-black);
  cursor: pointer;
}
.btn-big--dark { background: var(--c-black); color: var(--c-white); }
.btn-big__arrow { justify-self: end; align-self: end; }
.btn-big.is-disabled { cursor: default; opacity: 0.85; }

/* Yellow / blue CTA cards (Figma "main CTA" 331×159) */
.cta-card {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  min-height: 159px;
  padding: 16px 24px 20px;
  border-radius: var(--r-md);
  color: var(--c-black);
}
.cta-card--yellow { background: #fcff9f; }
.cta-card--blue { background: #0044ff; color: var(--c-white); }
.cta-card__arrow { justify-self: end; }

/* ---- Pills (location / date) ------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--r-md);
  background: var(--c-white);
  white-space: nowrap;
}
.pill--soft { background: rgba(216, 227, 229, 0.5); }
.pill--type { background: var(--c-lilac); }
/* One colour per kind of gathering, so the type reads before the words do. */
.pill--conference { background: var(--c-lilac); }
.pill--hackathon  { background: var(--c-sky-pale); }
.pill--residency  { background: var(--c-cream); }
.pill--popup      { background: var(--c-mist-warm); }

/* ---- Metric card variants ---------------------------------------------- */
.metric--short { min-height: 124px; }
.metric--bare { background: transparent; min-height: 140px; }
.metric--bare .metric__value { font-size: 48px; }

/* ---- Logo rows and tiles (Forum hero row style) ------------------------ */
.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 48px;
  padding-inline: var(--grid-margin);
}
.logo-tile {
  height: 44px;   /* Ira's logo files share one 80px artboard; 40px renders them at one optical size */
  display: flex;
  align-items: center;
  flex: none;
}
.logo-tile img { height: 32px; width: auto; max-width: 180px; object-fit: contain; }
.logo-tile--ph {
  padding: 0 14px;
  border: 1px dashed rgba(0, 0, 0, 0.28);
  border-radius: var(--r-sm);
  color: var(--c-ink-60);
  font: 500 12px/1.2 var(--f-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* Marquee: the row scrolls slowly; pauses on hover; still for reduced motion */
.logo-marquee {
  display: block;
  overflow: hidden;
  padding-inline: 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
}
.logo-marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 44px;            /* Ira, 21 Sep: 44px between logos */
  padding-right: 44px;
  white-space: nowrap;
  animation: logo-scroll 160s linear infinite;   /* half the old speed */
  will-change: transform;
}
.logo-marquee:hover .logo-marquee__track { animation-play-state: paused; }
.hero__logo-row--reverse .logo-marquee__track { animation-direction: reverse; }
@keyframes logo-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .logo-marquee__track { animation: none; } }

/* ---- Lite YouTube player: poster + play until clicked ------------------ */
.yt { position: relative; overflow: hidden; background: var(--c-black); }
.yt__poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt__play {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; padding: 0;
  background: transparent;
  cursor: pointer;
}
.yt__button {
  position: absolute; left: 50%; top: 50%;
  width: 80px; height: 80px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--c-black);
  display: flex; align-items: center; justify-content: center;
}
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-pill {
  position: absolute;
  left: 120px; top: 100px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border: 1px solid var(--c-border-blue);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.3);
  color: var(--c-white);
}

/* ---- Quote card (Figma "small testimonial", 445×546) ------------------- */
.quote {
  position: relative;
  min-height: 546px;
  padding: 132px 12px 28px;            /* quote starts under the name, not low in the card (Tereza) */
  border-radius: var(--r-md);
  background: var(--c-white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.quote__avatar {
  position: absolute; left: 8px; top: 8px;
  width: 142px; height: 80px;
  border-radius: var(--r-md);
  object-fit: cover;
}
.quote__name { position: absolute; left: 158px; top: 10px; }
.quote__role { position: absolute; left: 158px; right: 12px; top: 33px; max-width: 215px; opacity: 0.4; }
.quote__text { max-width: 361px; }
.quote__source { margin-top: auto; align-self: flex-start; border-color: rgba(0, 68, 255, 0.4); }

/* ---- Review marker: never on a presented copy -------------------------- */
.todo { color: #e5001c; }
.is-pending { outline: 2px dotted #e5001c !important; outline-offset: 2px; }

/* ---- Bands at the top of sections (Forum page pattern) ------------------
   Sit inside the section's 180px top padding: brand mark + a slow line.  */
.band {
  position: absolute;
  left: var(--grid-margin);
  right: var(--grid-margin);
  top: 62px;
  height: 56px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.14);
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
  color: var(--c-ink-60);
  font: 500 14px/1.2 var(--f-mono);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.band__mark { flex: none; display: flex; }
.band__mark img { height: 22px; width: auto; opacity: 0.85; }
.band__viewport {
  flex: 1 1 auto;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}
.band__track {
  display: inline-flex;
  white-space: nowrap;
  animation: band-scroll 90s linear infinite;
  will-change: transform;
}
.band__item { padding-right: 64px; }
.band__item::after { content: "\25C9"; margin-left: 64px; opacity: 0.5; }
@keyframes band-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.band:hover .band__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .band__track { animation: none; } }
@media (min-width: 1441px) { .band { left: 50%; right: auto; width: 1440px; transform: translateX(-50%); } }

/* ---- No lone last words ------------------------------------------------
   Browsers that support it rebalance a paragraph's last lines so a single
   word never sits alone (the "move" at the end of the fundraising copy).
   Headlines keep their designed breaks. ---------------------------------- */
p, li, dd, figcaption, summary { text-wrap: pretty; }

/* ---- Back to top ---------------------------------------------------------
   Lives here, not in library.css, because the shared footer puts it on every
   generated page; without these rules it showed as a bare arrow at the left edge. */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 900;
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--c-black); color: var(--c-white);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.to-top.is-on { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* Logo bands (Home hero, About network): one tone, so colour logos sit with the black ones (22 Sep) */
.hero__logo-row .logo-tile img, .ab-network__logos .logo-tile img { filter: grayscale(1); }

/* "Explore our network": the overview page leads the dropdown, set apart from its sub-pages (22 Sep) */
.dropdown__link--lead { color: #2b4fd6; border-bottom: 1px solid var(--c-ink-20); padding-bottom: 12px; margin-bottom: 6px; }
.dropdown__link--lead:hover { color: #1a36a8; }
.menu__link--lead { color: #2b4fd6; }

/* ---- Buttons, round of 22 Sep (Kim chose option D from "Button options") ----
   Every big button is a capsule. The main action, black until now, is lilac with
   black text; secondary buttons stay white or outlined; yellow is kept for the
   few moments that are ours to play with. On hover the arrow steps up and right. */
.btn { border-radius: 999px; transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.btn .btn__arrow { transition: transform .25s ease; }
.btn:hover .btn__arrow { transform: translate(3px, -3px); }
.btn--dark { background: var(--c-lilac); color: var(--c-black); }
.btn--dark:hover { background: #cbbaff; }
.btn:not(.btn--dark):not(.btn--yellow):hover { background: #eff4f5; }
.btn--yellow:hover { background: #f6fa70; }
.btn-big--dark { background: var(--c-lilac); color: var(--c-black); }
.btn-big--dark:hover { background: #cbbaff; }
.nl-form__input { border-radius: 999px; }
/* A button that sizes to its label, for anything longer than the 331px box */
.btn--auto { width: auto; min-width: 331px; max-width: 100%; }
.btn { max-width: 100%; }

/* ---- Button scale (Kim, 22 Sep) -------------------------------------------
   The 331 x 64 pill with a 20px label read as huge on a MacBook at 100%.
   One size down, everywhere: 288 wide, 56 tall, 18px label. Type and layout
   are untouched; this is the one change ahead of Friday's design round. */
.btn { width: auto; min-width: 288px; padding: 16px 28px; white-space: nowrap; }  /* long labels grow instead of wrapping */
.btn.t-label { font-size: 18px; line-height: 1.2; }
.btn--auto { min-width: 288px; }
.btn--small { padding: 11px 18px; min-width: 0; }   /* the pop-up Sign up button; the 288px floor squeezed the email box to 64px */
