/* ============================================================
   INSTEM BRAND TOKENS  (palette from instem.com)
   ============================================================ */
:root {
  --ink:        #2b2b2a;
  --ink-soft:   #5a5a63;
  --ink-faint:  #8a8a93;
  --magenta:    #e33dbb;
  --magenta-2:  #cf2aba;
  --purple:     #9c55b3;
  --amber:      #ff8a00;
  --yellow:     #fcb900;
  --paper:      #ffffff;
  --mist:       #f1f2f4;
  --mist-2:     #e9eaee;
  --line:       #e4e4ea;
  --shadow:     0 1px 2px rgba(20,18,30,.04), 0 8px 24px rgba(20,18,30,.06);
  --shadow-lg:  0 10px 24px rgba(20,18,30,.10), 0 24px 60px rgba(20,18,30,.10);
  --brand-grad: linear-gradient(120deg, #9c55b3 0%, #e33dbb 42%, #ff6900 78%, #fcb900 100%);
}

/* ============================================================ RESET / BASE */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--mist);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: min(1180px, 92vw); margin: 0 auto; }
h1, h2, h3 { font-family: "Montserrat", "Poppins", sans-serif; letter-spacing: -.01em; }

/* ============================================================ HEADER */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 14px 0;
}
.logo img { height: 38px; width: auto; }
.header-right { display: flex; align-items: center; gap: 14px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--ink-soft);
  background: #fff; border: 1px solid var(--line);
  padding: 7px 13px; border-radius: 999px; transition: .2s;
}
.status-pill:hover { border-color: var(--magenta); color: var(--ink); }
.status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #18b368; box-shadow: 0 0 0 3px rgba(24,179,104,.18);
}

.btn-support {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: #fff;
  background: var(--magenta); border-radius: 999px;
  padding: 8px 16px; transition: .2s;
  box-shadow: 0 4px 12px rgba(227,61,187,.28);
}
.btn-support:hover { background: var(--magenta-2); transform: translateY(-1px); }

/* Environment selector */
.env-picker { display: flex; align-items: center; gap: 10px; }
.env-picker > label {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint);
}
.env-select-wrap { position: relative; }
.env-select-wrap::after {
  content: ""; position: absolute; right: 14px; top: 50%;
  width: 7px; height: 7px;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
}
.env-select-wrap select {
  appearance: none; -webkit-appearance: none;
  font-family: "Poppins", sans-serif; font-size: 13.5px; font-weight: 600; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 34px 8px 15px; cursor: pointer; transition: .2s;
}
.env-select-wrap select:hover { border-color: var(--magenta); }
.env-select-wrap select:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }

/* ============================================================ HERO */
.hero { padding: 52px 0 30px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 120% at 88% -10%, rgba(227,61,187,.14), transparent 60%),
    radial-gradient(50% 120% at 100% 0%, rgba(252,185,0,.12), transparent 55%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--magenta-2); margin-bottom: 14px;
}
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; line-height: 1.08; }
.hero h1 .accent, .accent {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede {
  margin-top: 16px; max-width: 640px;
  font-size: clamp(15px, 1.6vw, 18px); color: var(--ink-soft);
}

/* ============================================================ SECTIONS */
section.block { padding: 30px 0 12px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; margin-bottom: 22px; flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; }
.section-head h2 .count {
  font-size: 14px; font-weight: 600; color: var(--magenta-2);
  background: rgba(227,61,187,.10); padding: 3px 10px; border-radius: 999px;
  vertical-align: middle; margin-left: 8px;
}
.section-head p { color: var(--ink-soft); font-size: 14.5px; max-width: 560px; margin-top: 4px; }
.section-head.centered { justify-content: center; text-align: center; margin-bottom: 28px; }
.section-head.centered .eyebrow { margin-bottom: 10px; }
.section-head.centered p { margin-left: auto; margin-right: auto; }

/* Filter chips */
.filter-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-bottom: 26px; }
.chip {
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 13px; font-weight: 500; color: var(--ink-soft);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 15px; cursor: pointer; transition: .18s;
  display: inline-flex; align-items: center; gap: 7px;
}
.chip:hover { border-color: var(--magenta); color: var(--ink); }
.chip:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }
.chip .chip-n {
  font-size: 11px; font-weight: 600; color: var(--ink-faint);
  background: var(--mist); border-radius: 999px; padding: 1px 7px;
}
.chip.active { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.chip.active .chip-n { background: rgba(255,255,255,.22); color: #fff; }

/* ============================================================ GRID + CARDS */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.card {
  position: relative; background: var(--paper);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  padding: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; min-height: 188px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card.licensed { cursor: pointer; }
.card.licensed:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card.licensed::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent, var(--brand-grad)); opacity: 0; transition: opacity .22s;
}
.card.licensed:hover::after { opacity: 1; }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.badge-icon {
  width: 52px; height: 52px; border-radius: 13px; flex: none;
  position: relative; overflow: hidden;
  display: grid; place-items: center; color: #fff;
  font-family: "Montserrat"; font-weight: 800; font-size: 17px; letter-spacing: -.02em;
  background: var(--accent, var(--brand-grad));
  box-shadow: 0 6px 16px rgba(20,18,30,.16);
}
.badge-icon .logo-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: 7px; background: #fff;
}
.cat-tag {
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-faint); border: 1px solid var(--line);
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}
.tags { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.card h3 { font-size: 18px; font-weight: 700; margin: 16px 0 6px; font-family: "Poppins"; }
.card p.desc { font-size: 13.5px; color: var(--ink-soft); flex: 1; }

.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.launch { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--magenta-2); }
.launch svg { transition: transform .2s; }
.card.licensed:hover .launch:not(.disabled) svg { transform: translateX(4px); }
.launch.disabled { color: var(--ink-faint); cursor: not-allowed; pointer-events: none; }
.launch.disabled svg { display: none; }
.page-link { font-size: 13px; font-weight: 500; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 5px; }
.page-link:hover { color: var(--magenta-2); text-decoration: underline; }

/* Locked (unlicensed) cards */
.card.locked { background: #fafafb; border-style: dashed; box-shadow: none; }
.card.locked .badge-icon { background: var(--mist-2); color: var(--ink-faint); box-shadow: none; filter: grayscale(1); }
.card.locked .badge-icon .logo-img { filter: grayscale(1); opacity: .85; }
.card.locked h3 { color: var(--ink-soft); }
.card.locked p.desc { color: var(--ink-faint); }
.card.locked .cat-tag { opacity: .7; }
.card.locked:hover { border-color: var(--purple); }
.lock-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-faint); }
.req-link { font-size: 13.5px; font-weight: 600; color: var(--purple); display: inline-flex; align-items: center; gap: 6px; }
.req-link:hover { text-decoration: underline; }

.split { margin: 40px auto 8px; padding: 26px 0 0; border-top: 1px solid var(--line); }

/* ============================================================ FOOTER */
footer.site { margin-top: 60px; background: #211f26; color: #cfcdd6; padding: 56px 0 28px; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1.6fr 1fr 1fr 1fr; }
footer .brand-col img { height: 34px; margin-bottom: 16px; }
footer .brand-col p { font-size: 13.5px; color: #9a98a4; max-width: 280px; }
footer .social { display: flex; gap: 10px; margin-top: 18px; }
footer .social a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); transition: .2s; }
footer .social a:hover { background: var(--magenta); }
footer h4 { font-family: "Poppins"; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
footer ul { list-style: none; }
footer li { margin-bottom: 11px; }
footer li a { font-size: 13.5px; color: #b9b7c2; transition: .15s; display: inline-flex; align-items: center; gap: 7px; }
footer li a:hover { color: #fff; }
.foot-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #18b368; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.10);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: #8d8b97;
}
.footer-bottom a { color: #b9b7c2; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom .legal { display: flex; gap: 18px; flex-wrap: wrap; }

/* ============================================================ RESPONSIVE */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  footer .brand-col { grid-column: 1 / -1; }
  .env-picker > label { display: none; }
}
@media (max-width: 560px) {
  .header-right .status-pill { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
}
