/* =========================================================
   Fullstack Builder Residency — landing styles
   Dark, minimal, premium (Linear/Vercel-leaning), RTL
   ========================================================= */

/* ---------- Local fonts ---------- */
@font-face {
  font-family: "PelakFA";
  src: url("./assets/fonts/pelak/PelakFA-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PelakFA";
  src: url("./assets/fonts/pelak/PelakFA-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PelakFA";
  src: url("./assets/fonts/pelak/PelakFA-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Morabba";
  src: url("./assets/fonts/moraba/Morabba-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Morabba";
  src: url("./assets/fonts/moraba/Morabba-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Morabba";
  src: url("./assets/fonts/moraba/Morabba-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --bg-2: #0e0e10;
  --surface: #111114;
  --surface-2: #15151a;
  --border: #1f1f24;
  --border-2: #26262d;
  --text: #fafafa;
  --muted: #8b8b95;
  --muted-2: #a8a8b3;
  --accent: #a78bfa;
  /* violet */
  --accent-2: #7c5cff;
  --good: #4ade80;
  --bad: #f87171;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 30px 60px -30px rgba(0, 0, 0, .6);
  --font: "PelakFA", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --font-display: "Morabba", "PelakFA", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button {
  font-family: var(--font);
  cursor: pointer;
}

/* All titles use the display font (Morabba). Body uses Pelak. */
h1,
h2,
h3,
h4,
.hero__title,
.section__head h2,
.apply__intro h2,
.card h3,
.feat h3,
.ccard h3,
.tl h3,
.modal__title,
.stat__num {
  font-family: var(--font-display);
}

::selection {
  background: var(--accent);
  color: #0a0a0a;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Background ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(124, 92, 255, .10), transparent 60%), var(--bg);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 50%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 50%, transparent 85%);
  opacity: .55;
}

.bg-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  opacity: .35;
}

.bg-glow--a {
  width: 520px;
  height: 520px;
  background: #6d28d9;
  top: -160px;
  left: -120px;
}

.bg-glow--b {
  width: 420px;
  height: 420px;
  background: #1e3a8a;
  bottom: -120px;
  right: -120px;
  opacity: .25;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: rgba(10, 10, 10, .55);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.brand__mark {
  width: 22px;
  height: 22px;
  color: var(--text);
}

.brand__text {
  font-size: 15px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--muted-2);
}

.nav__links a {
  transition: color .2s;
}

.nav__links a:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .nav__links {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}

.btn--sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn--lg {
  padding: 14px 22px;
  font-size: 15px;
}

.btn--primary {
  background: #fafafa;
  color: #0a0a0a;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 8px 24px -10px rgba(255, 255, 255, .25);
}

.btn--primary:hover {
  transform: translateY(-1px);
  background: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}

.btn--ghost:hover {
  border-color: #3a3a44;
  background: rgba(255, 255, 255, .02);
}

/* ---------- HERO ---------- */
.hero {
  padding: 96px 0 0px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--border-2);
  background: rgba(255, 255, 255, .02);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--muted-2);
  margin-bottom: 28px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
}

.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, .18);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(167, 139, 250, .18);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(167, 139, 250, .04);
  }
}

.hero__title {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -.03em;
  margin: 0 auto 22px;
  max-width: 25ch;
}

.grad {
  background: linear-gradient(180deg, #fff 0%, #a78bfa 120%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.ink {
  color: var(--text);
}

.hero__sub {
  color: var(--muted-2);
  font-size: clamp(15px, 1.7vw, 18px);
  text-align: justify;
  max-width: 107ch;
  margin: 0 auto 36px;
}

.hero__sub strong {
  font-weight: 600;
}

.hero__cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}

.hero__stats li {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0));
  border-radius: var(--radius);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.stat__num {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.stat__lbl {
  font-size: 12.5px;
  color: var(--muted);
}

.hero__stats--single {
  grid-template-columns: 1fr;
}

.hero__stats--single li {
  flex-direction: row;
  gap: 14px;
  padding: 22px 22px;
  text-align: start;
  justify-content: flex-start;
}

.stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0));
  color: var(--ink, currentColor);
}

.stat__icon svg {
  width: 22px;
  height: 22px;
}

.stat__lbl--lg {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink, currentColor);
}

@media (max-width: 640px) {
  .hero {
    padding: 20px 0 10px;
  }

  .container,
  .sponsor {
    padding: 15px !important;
  }

  .stat__icon {
    display: none;
  }

  .footer__inner {
    justify-content: center;
  }

  .hero__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__stats--single {
    grid-template-columns: 1fr;
  }

  .hero__stats--single li {
    padding: 18px;
  }

  .stat__lbl--lg {
    font-size: 13.5px;
  }
}

/* ---------- Sections ---------- */
.section {
  padding: 96px 0;
  position: relative;
}

.section--alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, .015), transparent 60%);
  border-top: 1px solid rgba(255, 255, 255, .04);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.section__head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}

.kicker {
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 10px;
  background: rgba(167, 139, 250, .08);
  border: 1px solid rgba(167, 139, 250, .18);
  margin-bottom: 18px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
}

.section__head h2 {
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 700;
  margin: 0 0 16px;
}

.lead {
  color: var(--muted-2);
  text-align: center;
  font-size: 16px;
  margin: 0;
}

@media (max-width: 640px) {
  .section {
    padding: 72px 0;
  }

  .section__head {
    margin-bottom: 40px;
  }
}

/* ---------- Duo cards (is / is-not, signals) ---------- */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 820px) {
  .duo {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.card header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.card__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-2);
}

.card__icon svg {
  width: 18px;
  height: 18px;
}

.card__icon--good {
  color: var(--good);
  background: rgba(74, 222, 128, .06);
  border-color: rgba(74, 222, 128, .18);
}

.card__icon--bad {
  color: var(--bad);
  background: rgba(248, 113, 113, .06);
  border-color: rgba(248, 113, 113, .2);
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--muted-2);
  font-size: 14.5px;
}

.check-list li {
  position: relative;
  padding-right: 26px;
}

.check-list li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 9px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.check-list--good li::before {
  background-color: rgba(74, 222, 128, .12);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}

.check-list--bad li::before {
  background-color: rgba(248, 113, 113, .12);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f87171' stroke-width='3' stroke-linecap='round'><line x1='18' y1='6' x2='6' y2='18'/><line x1='6' y1='6' x2='18' y2='18'/></svg>");
}

/* ---------- Grid features ---------- */
.grid {
  display: grid;
  gap: 20px;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 920px) {
  .grid--3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .grid--3 {
    grid-template-columns: 1fr;
  }
}

.feat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: border-color .2s, transform .2s;
}

.feat:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.feat__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(167, 139, 250, .06);
  border: 1px solid rgba(167, 139, 250, .18);
  margin-bottom: 16px;
}

.feat__icon svg {
  width: 22px;
  height: 22px;
}

.feat h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.feat p {
  margin: 0;
  color: var(--muted-2);
  font-size: 14.5px;
}

/* ---------- Criteria cards ---------- */
.grid--criteria .ccard {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px 22px;
  overflow: hidden;
}

.grid--criteria .ccard::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(400px 120px at 100% 0%, rgba(167, 139, 250, .08), transparent 70%);
  opacity: .8;
}

.ccard__num {
  font-family: var(--font);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
  letter-spacing: .04em;
}

.ccard h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.ccard p {
  margin: 0 0 18px;
  color: var(--muted-2);
  font-size: 14.5px;
}

.weight {
  display: inline-block;
  font-family: var(--font);
  font-size: 11.5px;
  letter-spacing: .03em;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(167, 139, 250, .08);
  border: 1px solid rgba(167, 139, 250, .18);
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  max-width: 880px;
  margin-inline: auto;
}

.tl {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  padding-right: 78px;
}

.tl::before {
  content: "";
  position: absolute;
  right: 26px;
  top: 28px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, .15);
}

.tl__tag {
  display: inline-block;
  font-family: var(--font);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .03em;
  margin-bottom: 8px;
}

.tl h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.tl p {
  margin: 0;
  color: var(--muted-2);
  font-size: 14.5px;
}

/* ---------- Weekly cadence ---------- */
.week {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.week__day {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .2s, transform .2s;
}

.week__day:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.week__lbl {
  font-family: var(--font);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .04em;
}

.week__title {
  font-size: 16px;
  font-weight: 600;
}

.week__desc {
  font-size: 13.5px;
  color: var(--muted-2);
}

@media (max-width: 920px) {
  .week {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .week {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
}

.faq__item {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color .2s;
}

.faq__item[open] {
  border-color: var(--border-2);
}

.faq__item summary {
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  font-family: var(--font);
  color: var(--muted);
  font-size: 20px;
  transition: transform .2s, color .2s;
}

.faq__item[open] summary::after {
  content: "−";
  color: var(--accent);
}

.faq__item p {
  margin: 12px 0 0;
  color: var(--muted-2);
  font-size: 14.5px;
}

/* ---------- After program ---------- */
.container--wide {
  max-width: 1680px;
}

.after-note {
  max-width: 820px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}

.after-note p {
  margin: 0;
  color: var(--muted-2);
  font-size: 15.5px;
  line-height: 1.85;
  text-align: center;
}

.after-companies {
  margin-top: 56px;
}

.after-companies__title {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 0 0 24px;
  color: var(--text);
}

.logo-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.logo-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 170px;
  height: 110px;
  display: grid;
  place-items: center;
  padding: 18px;
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.logo-box img {
  width: 110px;
  height: 60px;
  object-fit: contain;
}

@media (max-width: 560px) {
  .logo-box {
    width: calc(50% - 8px);
    height: 100px;
  }

  .logo-box--lead {
    width: 100%;
  }

  .logo-box img {
    width: 100%;
    max-width: 110px;
    height: 56px;
  }

  .after-note {
    padding: 22px 20px;
  }

  .after-note p {
    font-size: 14.5px;
    text-align: right;
  }
}

/* ---------- Apply form ---------- */
.apply {
  padding-top: 80px;
}

.apply__intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.apply__intro h2 {
  font-size: clamp(28px, 4.2vw, 42px);
  letter-spacing: -.02em;
  margin: 12px 0;
}

.form {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  gap: 20px;
  box-shadow: var(--shadow);
}

/* Locked registration form */
.form-lock {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.form-lock .form {
  filter: blur(7px);
  pointer-events: none;
  user-select: none;
}

.form-lock__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(10, 10, 10, .35);
  z-index: 2;
}

.form-lock__icon {
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.form-lock__text {
  margin: 0;
  max-width: 440px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.8;
  color: var(--text);
}

/* Fixed alert (bottom-right) */
.alert-fixed {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 360px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: alert-in .4s ease both;
}

.alert-fixed__icon {
  flex: none;
  color: var(--accent);
}

.alert-fixed__text {
  margin: 0;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.7;
  color: var(--text);
}

.alert-fixed__close {
  flex: none;
  width: 26px;
  height: 26px;
  margin-inline-start: auto;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  color: var(--muted, #888);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.alert-fixed__close:hover {
  color: var(--text);
  background: var(--bg-2);
}

@keyframes alert-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .alert-fixed {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .form__row {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.field__label {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.field__label--opt span {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
}

.field input,
.field textarea {
  width: 100%;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.7;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(167, 139, 250, .5);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, .12);
  background: #101015;
}

.field__hint {
  font-size: 12px;
  color: var(--muted);
}

.field__err {
  display: none;
  color: var(--bad);
  font-size: 12.5px;
}

.field--error .field__err {
  display: block;
}

.field--error input,
.field--error textarea {
  border-color: rgba(248, 113, 113, .6);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, .08);
}

.radios {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color .15s, background .15s;
}

.radio:hover {
  border-color: var(--border-2);
}

.radio input {
  accent-color: var(--accent);
}

.radio input:checked~span {
  color: var(--text);
}

.radio:has(input:checked) {
  border-color: rgba(167, 139, 250, .5);
  background: rgba(167, 139, 250, .06);
}

.form__foot {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 4px;
}

.form__legal {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.form__status {
  display: none;
}

/* ---------- Toast (top-center, auto-dismiss) ---------- */
.toast-stack {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 32px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 280px;
  max-width: 460px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(20, 20, 24, .92);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.2) both;
}

.toast.is-out {
  animation: toastOut .3s ease-in both;
}

.toast--success {
  border-color: rgba(74, 222, 128, .32);
  background: linear-gradient(180deg, rgba(74, 222, 128, .08), rgba(20, 20, 24, .92));
}

.toast--error {
  border-color: rgba(248, 113, 113, .35);
  background: linear-gradient(180deg, rgba(248, 113, 113, .08), rgba(20, 20, 24, .92));
}

.toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 999px;
  margin-top: 1px;
}

.toast--success .toast__icon {
  color: var(--good);
  background: rgba(74, 222, 128, .12);
}

.toast--error .toast__icon {
  color: var(--bad);
  background: rgba(248, 113, 113, .12);
}

.toast__icon svg {
  width: 14px;
  height: 14px;
}

.toast__msg {
  flex: 1;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-28px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-28px);
  }
}

@media (prefers-reduced-motion: reduce) {

  .toast,
  .toast.is-out {
    animation: none;
  }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(255, 255, 255, .05);
  padding: 28px 0;
  margin-top: 40px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.footer__brand .brand__mark {
  width: 18px;
  height: 18px;
}

/* ---------- Inline term (clickable glossary) ---------- */
.term {
  font: inherit;
  color: var(--text);
  background: transparent;
  border: none;
  padding: 0 2px;
  cursor: pointer;
  position: relative;
  font-weight: 600;
  text-underline-offset: 5px;
  text-decoration: underline dashed rgba(167, 139, 250, .55);
  text-decoration-thickness: 1.5px;
  transition: color .15s ease, text-decoration-color .15s ease;
}

.term:hover,
.term:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
  outline: none;
}

/* term variant for gradient text (used in hero title).
   Decouples the dashed underline from the transparent gradient fill. */
.term--grad {
  text-decoration: none;
  display: inline-block;
  line-height: 1;
  padding: 0 2px 6px;
  position: relative;
  transition: transform .2s ease;
}

.term--grad::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 5px;
  border-bottom: 2px dashed rgba(167, 139, 250, .45);
  transition: border-color .2s ease, transform .2s ease;
}

.term--grad:hover,
.term--grad:focus-visible {
  transform: translateY(-2px);
}

.term--grad:hover::after,
.term--grad:focus-visible::after {
  border-color: var(--accent);
}

/* ---------- Glass modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
  animation: modalIn .25s ease-out both;
}

@keyframes modalIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 9, .55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  border-radius: 22px;
  padding: 32px 30px 28px;
  color: var(--text);
  background: linear-gradient(180deg,
      rgba(255, 255, 255, .06) 0%,
      rgba(255, 255, 255, .05) 25%,
      rgba(255, 255, 255, .04) 50%,
      rgba(255, 255, 255, .03) 75%,
      rgba(255, 255, 255, .02) 100%),
    rgba(20, 20, 26, .65);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 40px 80px -20px rgba(0, 0, 0, .65), 0 0 60px -20px rgba(167, 139, 250, .25);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  transform: translateY(8px) scale(.98);
  opacity: 0;
  animation: panelIn .35s cubic-bezier(.2, .7, .2, 1) .04s forwards;
  -webkit-border-radius: ;
  -moz-border-radius: ;
  -ms-border-radius: ;
  -o-border-radius: ;
}

@keyframes panelIn {
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal__close {
  position: absolute;
  top: 14px;
  left: 14px;
  /* RTL: top-left is the visual close corner */
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  transition: color .15s, background .15s, border-color .15s, transform .15s;
}

.modal__close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .16);
  transform: rotate(90deg);
}

.modal__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted-2);
  padding: 5px 12px;
  border-radius: 10px;
  background: rgba(167, 139, 250, .08);
  border: 1px solid rgba(167, 139, 250, .18);
  margin-bottom: 18px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
}

.modal__tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, .18);
}

.modal__title {
  margin: 0 0 14px;
  font-size: clamp(22px, 3.4vw, 28px);
  font-weight: 700;
  letter-spacing: -.02em;
}

.modal__body {
  margin: 0 0 18px;
  color: var(--muted-2);
  font-size: 15px;
  line-height: 1.85;
}

.modal__body strong {
  color: var(--text);
  font-weight: 600;
}

.modal__list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 10px;
  color: var(--muted-2);
  font-size: 14px;
}

.modal__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
}

.modal__list li span {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 11px;
  color: var(--accent);
  background: rgba(167, 139, 250, .10);
  border: 1px solid rgba(167, 139, 250, .22);
}

.modal__quote {
  margin: 0;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, .10);
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .nav,
body.modal-open main,
body.modal-open .footer,
body.modal-open .bg-layer {
  filter: blur(8px) saturate(120%);
  transition: filter .25s ease;
  pointer-events: none;
}

@media (max-width: 480px) {
  .modal__panel {
    padding: 26px 22px 22px;
    border-radius: 18px;
  }

  .modal__close {
    top: 10px;
    left: 10px;
  }
}

/* ---------- Animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
}

[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- Sponsor ---------- */
.sponsor {
  padding: 56px 0 80px;
  border-top: 1px solid rgba(255, 255, 255, .04);
  background: linear-gradient(180deg, rgba(255, 255, 255, .012), transparent 70%);
}

.sponsor__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.sponsor__combined {
  display: grid;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0));
  border-radius: var(--radius);
  align-items: flex-start;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.sponsor__stat {
  display: flex;
  flex-direction: row;
  gap: 14px;
  padding: 22px;
  align-items: flex-start;
}

@media (max-width: 820px) {
  .sponsor__combined {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.sponsor__label {
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.sponsor__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  transition: border-color .2s ease, background .2s ease, transform .15s ease;
}

.sponsor__logo:hover {
  border-color: var(--border-2);
  background: rgba(255, 255, 255, .04);
  transform: translateY(-1px);
}

.sponsor__logo img {
  width: 132px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: .92;
}

.sponsor__note {
  margin: 0;
  font-size: 14px;
  color: var(--muted-2);
}

.sponsor__link {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .22);
  text-underline-offset: 4px;
  transition: text-decoration-color .2s ease, color .2s ease;
}

.sponsor__link:hover {
  text-decoration-color: var(--accent);
}