/* ═══════════════════════════════════════════════
   FOUNDER STACK — barcelonaentrepreneurs.com
   Partner perks directory: hero + sticky category filters + logo card grid.
   ═══════════════════════════════════════════════ */

:root {
  --fs-header-h: 80px;
}

/* ── HERO ── */
.fs-hero {
  position: relative;
  z-index: 1;
  padding: calc(var(--fs-header-h) + 72px) 48px 48px;
  text-align: center;
}
.fs-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}
.fs-kicker {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.fs-hero h1 {
  margin-bottom: 18px;
}
.fs-hero-sub {
  font-size: clamp(0.98rem, 1.4vw, 1.12rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 20px;
}
.fs-count {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin: 0;
}
.fs-count strong { color: var(--red); font-weight: 600; }

/* Affiliate disclosure — sits under the grid. The modal carries its own copy
   next to the actual click, which is the one that has to be conspicuous. */
.fs-disclosure {
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
  max-width: 620px;
  margin: 40px auto 0;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.fs-disclosure[hidden] { display: none; }

/* ── FILTERS (sticky under the site header) ── */
.fs-filters {
  position: sticky;
  top: var(--fs-header-h);
  z-index: 50;
  background: rgba(var(--cream-rgb), 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.fs-filters-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 48px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.fs-filters-inner::-webkit-scrollbar { display: none; }
.fs-filters-inner:empty { display: none; }

.fs-pill {
  flex-shrink: 0;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.fs-pill:hover { border-color: var(--red); }
.fs-pill.is-active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

/* ── GRID ── */
.fs-main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px;
}
.fs-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
}

.fs-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
  font-size: 0.92rem;
}
.fs-empty em { color: var(--red); font-style: italic; }

/* ── CARD ── */
.fs-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.fs-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--red-rgb), 0.35);
  box-shadow: 0 16px 40px rgba(var(--ink-rgb), 0.09);
}

/* Logo tile — contained so every partner looks consistent regardless of aspect */
.fs-card__logo {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 28px;
  background: var(--cream-alt);
  border-bottom: 1px solid var(--border);
}
.fs-card__logo img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

/* Wordmark fallback — shown only when the logo file is missing on the CDN,
   so a partner added before their logo is uploaded never renders an empty tile. */
.fs-card__logo-text {
  display: none;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  color: var(--ink);
  opacity: 0.65;
}
.fs-card__logo.is-fallback .fs-card__logo-text { display: block; }

.fs-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 24px;
}
.fs-card__cat {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}
.fs-card__name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
}
.fs-card__desc {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 16px;
}
.fs-card__offer {
  display: inline-block;
  align-self: flex-start;
  background: rgba(var(--red-rgb), 0.08);
  color: var(--red);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 18px;
}
.fs-card__cta {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: var(--white);
  border-radius: 100px;
  padding: 11px 22px;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.15s;
}
.fs-card__cta:hover { background: var(--red-dim); transform: translateY(-1px); }

/* ── PARTNER CTA ── */
.fs-cta {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 48px 110px;
}
.fs-cta h2 { margin-bottom: 16px; }
.fs-cta p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ── "HOW TO CLAIM" MODAL ── */
.fs-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.fs-modal[hidden] { display: none; }
.fs-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(var(--ink-rgb), 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.fs-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--white);
  border-radius: 18px;
  padding: 32px 32px 28px;
  box-shadow: 0 24px 64px rgba(var(--ink-rgb), 0.3);
  animation: fsModalIn 0.22s ease;
}
@keyframes fsModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.fs-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  padding: 4px 8px;
}
.fs-modal__close:hover { color: var(--red); }
.fs-modal__cat {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}
.fs-modal__name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 12px;
  padding-right: 24px;
}
.fs-modal__offer {
  background: rgba(var(--red-rgb), 0.08);
  color: var(--red);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 18px;
}
.fs-modal__offer[hidden] { display: none; }
.fs-modal__lead {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 22px;
}
.fs-modal__steps {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fs-modal__steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
}
.fs-modal__step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(var(--red-rgb), 0.1);
  color: var(--red);
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fs-modal__steps strong {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.fs-modal__steps p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ── PROMO CODE ── */
.fs-modal__code-wrap {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  background: var(--cream);
}
.fs-modal__code-wrap[hidden] { display: none; }
.fs-modal__code-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.fs-modal__code-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fs-modal__code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  word-break: break-all;
}
.fs-modal__copy {
  flex-shrink: 0;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.fs-modal__copy:hover { border-color: var(--red); color: var(--red); }
.fs-modal__copy.is-copied {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.fs-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fs-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
}
.fs-modal__btn:hover { transform: translateY(-1px); }
.fs-modal__site { background: var(--red); color: var(--white); }
.fs-modal__site:hover { background: var(--red-dim); }
.fs-modal__site[hidden] { display: none; }

body.fs-modal-open { overflow: hidden; }

/* ── "BECOME A PARTNER" FORM ── */
/* .btn-primary is written for <a>; reset the bits a <button> brings with it. */
.fs-cta__btn {
  border: none;
  font-family: var(--font-body);
}

.fs-modal__dialog--form { max-width: 560px; }

.fs-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fs-form[hidden] { display: none; }
.fs-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fs-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.fs-field > span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.fs-field > span small {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--muted);
}
.fs-field input,
.fs-field select,
.fs-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  transition: border-color 0.15s, background 0.15s;
}
.fs-field textarea {
  resize: vertical;
  line-height: 1.5;
}
.fs-field input:focus,
.fs-field select:focus,
.fs-field textarea:focus {
  outline: none;
  border-color: var(--red);
  background: var(--white);
}

/* Custom category dropdown (native <select> can't style its open list) */
.fs-select { position: relative; }
.fs-select__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-align: left;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.fs-select__btn:hover { border-color: rgba(var(--red-rgb), 0.4); }
.fs-select__btn:focus-visible,
.fs-select.is-open .fs-select__btn {
  outline: none;
  border-color: var(--red);
  background: var(--white);
}
.fs-select__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fs-select__value.is-placeholder { color: var(--muted); }
.fs-select__chevron {
  flex-shrink: 0;
  width: 11px;
  height: 8px;
  color: var(--muted);
  transition: transform 0.18s ease, color 0.15s;
}
.fs-select.is-open .fs-select__chevron {
  transform: rotate(180deg);
  color: var(--red);
}

.fs-select__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 240px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(var(--ink-rgb), 0.14);
  animation: fsSelectIn 0.14s ease;
}
.fs-select__list[hidden] { display: none; }
@keyframes fsSelectIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.fs-select__opt {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--ink);
  cursor: pointer;
}
.fs-select__opt.is-active { background: rgba(var(--red-rgb), 0.08); }
.fs-select__opt[aria-selected="true"] {
  color: var(--red);
  font-weight: 600;
}

.fs-form__error {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--red);
}
.fs-form__error[hidden] { display: none; }

.fs-form__submit {
  margin-top: 4px;
  border: none;
  cursor: pointer;
}
.fs-form__submit:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.fs-form__head[hidden] { display: none; }

.fs-form__done {
  text-align: center;
  padding: 12px 0 0;
}
.fs-form__done[hidden] { display: none; }

/* Tick draws itself in: ring sweeps, then the check strokes on. */
.fs-form__tick {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
}
.fs-form__tick svg { width: 100%; height: 100%; }
.fs-form__tick circle {
  fill: rgba(var(--red-rgb), 0.07);
  stroke: rgba(var(--red-rgb), 0.3);
  stroke-width: 2;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  transform-origin: 50% 50%;
  transform: rotate(-90deg);
  animation: fsTickRing 0.5s ease forwards;
}
.fs-form__tick path {
  fill: none;
  stroke: var(--red);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 34;
  stroke-dashoffset: 34;
  animation: fsTickMark 0.3s 0.38s ease forwards;
}
@keyframes fsTickRing { to { stroke-dashoffset: 0; } }
@keyframes fsTickMark { to { stroke-dashoffset: 0; } }

.fs-form__done h3 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px;
}
/* Direct child only — the "what happens next" steps have their own <p> styling. */
.fs-form__done > p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 4px;
}
.fs-form__next {
  text-align: left;
  margin: 22px 0 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.fs-form__done .fs-modal__btn {
  width: 100%;
  cursor: pointer;
  border: none;
}

@media (prefers-reduced-motion: reduce) {
  .fs-form__tick circle,
  .fs-form__tick path { animation-duration: 0.01ms; animation-delay: 0ms; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  :root { --fs-header-h: 68px; }

  .fs-hero { padding: calc(var(--fs-header-h) + 48px) 20px 36px; }
  .fs-filters-inner { padding: 12px 20px; }
  .fs-main { padding: 32px 20px; }
  .fs-grid { gap: 18px; }
  .fs-cta { padding: 16px 20px 80px; }
}

@media (max-width: 600px) {
  .fs-grid { grid-template-columns: 1fr; }
  .fs-modal { padding: 14px; }
  .fs-modal__dialog { padding: 28px 22px 24px; max-height: calc(100vh - 28px); }
  .fs-form__row { grid-template-columns: 1fr; }
}
