:root {
  --sf-max-width: 76rem;
  --sf-nav-height: 4rem;
  --sf-radius: 6px;
  --sf-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --sf-charcoal: #171717;
  --sf-ink: #0a0a0a;
  --sf-bg: #ffffff;
  --sf-bg-dark: #0a0a0a;
  --sf-bg-elevated: #0a0a0a;
  --sf-bg-muted: #fafafa;
  --sf-text: #f5f5f5;
  --sf-text-muted: #a3a3a3;
  --sf-text-subtle: #737373;
  --sf-text-dark: #171717;
  --sf-text-dark-muted: #525252;
  --sf-border: rgba(255, 255, 255, 0.12);
  --sf-border-light: #e5e5e5;
  --sf-brand: #0a0a0a;
  --sf-brand-hover: #262626;
  --sf-accent: #d4d4d4;
  --sf-accent-dim: #a3a3a3;
  --sf-lime: #c8f264;
  --sf-lime-dim: #a8d44a;
  --sf-lime-glow: rgba(200, 242, 100, 0.14);
  --sf-prose: min(52rem, 100%);
  --sf-btn-height: 2.5rem;
  --sf-btn-min-width: 11.5rem;
  --sf-btn-max-width: 14rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--sf-text-dark);
  background: var(--sf-bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
strong,
b {
  font-weight: 400;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.shell {
  width: 100%;
  max-width: var(--sf-max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 500;
  padding: 0.5rem 0.75rem;
  background: var(--sf-ink);
  color: #fff;
  border-radius: var(--sf-radius);
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0a0a0a;
  border-bottom: 1px solid var(--sf-border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--sf-nav-height);
  gap: 1rem;
}

.header__left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}

.header__brand img {
  height: clamp(2rem, 5vw, 2.5rem);
  width: auto;
}

.header__nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.header__link {
  display: inline-flex;
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--sf-text);
  border-radius: var(--sf-radius);
  transition: background 0.15s;
}

.header__link:hover {
  background: #262626;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.header__signin {
  display: none;
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  color: var(--sf-text);
  border-radius: var(--sf-radius);
  transition: color 0.15s;
}

.header__signin:hover {
  color: #ffffff;
}

.header__menu {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  color: var(--sf-text);
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu__backdrop {
  position: fixed;
  inset: 0;
  z-index: 199;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  width: min(12.5rem, 72vw);
  padding: 1.125rem 1.125rem 1.75rem;
  background: var(--sf-bg-dark);
  border-left: 1px solid var(--sf-border);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
  overflow-y: auto;
}

.mobile-menu[hidden],
.mobile-menu__backdrop[hidden],
.apply-modal[hidden] {
  display: none !important;
}

.mobile-menu__head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.75rem;
}

.mobile-menu__close {
  display: flex;
  padding: 0;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 0;
}

.apply-panel__close {
  display: flex;
  padding: 0;
  color: #171717;
  background: #e5e5e5;
  border: 1px solid #d4d4d4;
  border-radius: var(--sf-radius);
  cursor: pointer;
  line-height: 0;
}

.apply-panel__close:hover {
  background: #d4d4d4;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu__link {
  display: block;
  padding: 0.625rem 0;
  font-size: 1rem;
  font-weight: 400;
  color: var(--sf-text);
}

.mobile-menu__link:hover {
  color: var(--sf-lime);
}

.btn--header {
  display: none;
}

.mobile-menu__cta {
  display: inline-flex !important;
  width: 100%;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .header__nav {
    display: flex;
  }

  .header__signin {
    display: inline-flex;
  }

  .btn--header {
    display: inline-flex;
  }

  .header__menu {
    display: none;
  }
}

@media (min-width: 1012px) {
  :root {
    --sf-nav-height: 4.25rem;
  }

}

/* Typography helpers */
.title-split {
  display: block;
}

.title-split--muted {
  color: var(--sf-text-muted);
}

/* Text link CTAs (GitHub chevron style) */
.link-chevron {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.9375rem;
  color: var(--sf-text);
  transition: color 0.15s;
}

.link-chevron::after {
  content: ">";
  font-size: 0.875em;
  transition: transform 0.15s var(--sf-ease);
}

.link-chevron:hover {
  color: var(--sf-lime);
}

.link-chevron:hover::after {
  transform: translateX(2px);
}

.link-chevron--on-dark {
  color: var(--sf-text-muted);
}

.link-chevron--on-dark:hover {
  color: var(--sf-text);
}

/* Hero showcase */
.showcase {
  position: relative;
  padding: clamp(3rem, 8vh, 5rem) 0;
  background: #0a0a0a;
  overflow: hidden;
}

.showcase--hero {
  z-index: 2;
  padding: clamp(3.5rem, 10vh, 6rem) 0 clamp(3rem, 8vh, 5rem);
  border-top: none;
  overflow: visible;
}

.showcase--hero + .stories {
  border-top: none;
}

.showcase__glow {
  position: absolute;
  pointer-events: none;
}

.showcase--hero .showcase__glow {
  inset: -10% -10% -20% -10%;
  background: radial-gradient(ellipse 68% 52% at 48% 20%, var(--sf-lime-glow) 0%, transparent 68%);
}

.showcase--hero::after {
  content: "";
  position: absolute;
  inset: 28% 8% -72% 8%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 48% 42% at 34% 32%, rgba(255, 255, 255, 0.034) 0%, transparent 78%),
    radial-gradient(ellipse 40% 36% at 71% 48%, rgba(255, 255, 255, 0.022) 0%, transparent 74%),
    radial-gradient(ellipse 52% 28% at 52% 68%, rgba(255, 255, 255, 0.016) 0%, transparent 82%),
    radial-gradient(ellipse 35% 22% at 28% 82%, rgba(255, 255, 255, 0.01) 0%, transparent 70%);
  filter: blur(32px);
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 18%,
    #000 38%,
    rgba(0, 0, 0, 0.85) 62%,
    rgba(0, 0, 0, 0.45) 82%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 18%,
    #000 38%,
    rgba(0, 0, 0, 0.85) 62%,
    rgba(0, 0, 0, 0.45) 82%,
    transparent 100%
  );
}

.showcase__inner {
  position: relative;
  z-index: 1;
}

.section-head__title--hero {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  max-width: var(--sf-prose);
  margin-inline: auto;
}

.showcase__frame {
  margin-top: 2.5rem;
  padding: 0 clamp(0.25rem, 2vw, 1rem);
}

.showcase__mock {
  max-width: 58rem;
  margin-inline: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 32px 64px rgba(0, 0, 0, 0.55),
    0 12px 32px rgba(0, 0, 0, 0.35);
}

.dash-mock {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  min-height: 22rem;
  font-size: 0.8125rem;
}

.dash-mock__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.875rem 0.65rem;
  background: #0a0a0a;
  border-right: 1px solid #262626;
}

.dash-mock__brand {
  height: 1.25rem;
  width: auto;
  margin-inline: 0.25rem;
  object-fit: contain;
}

.dash-mock__nav {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
}

.dash-mock__nav-item {
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  color: #a3a3a3;
  border-radius: 6px;
}

.dash-mock__nav-item.is-active {
  color: #0a0a0a;
  background: #ffffff;
}

.dash-mock__main {
  padding: 1rem 1.125rem 1.125rem;
  background: #f5f5f5;
  color: #171717;
}

.dash-mock__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}

.dash-mock__page-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.dash-mock__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  font-size: 0.6875rem;
  color: #737373;
}

.dash-mock__badge {
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  color: #0a0a0a;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.dash-mock__badge--dim {
  color: #0a0a0a;
  background: #ffffff;
  border-color: #e5e5e5;
}

.dash-mock__updated {
  white-space: nowrap;
}

.dash-mock__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
}

.dash-mock__card {
  padding: 0.875rem 1rem;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.03);
}

.dash-mock__card-label {
  margin: 0 0 0.5rem;
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #737373;
}

.dash-mock__stat-value {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #171717;
}

.dash-mock__stat-sub {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #525252;
}

.dash-mock__card--wide {
  grid-column: span 2;
}

.dash-mock__card--full {
  grid-column: 1 / -1;
}

.dash-mock__chart {
  margin-top: 0.25rem;
}

.dash-mock__chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.dash-mock__conn-line {
  margin: 0 0 0.3rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #525252;
}

.dash-mock__conn-line--lead {
  margin-bottom: 0.65rem;
}

.dash-mock__conn-hint {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: #92400e;
}

.dash-mock__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-mock__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  color: #0a0a0a;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.showcase__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  margin-top: 2.5rem;
}

@media (min-width: 480px) {
  .showcase__actions {
    flex-direction: row;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .dash-mock {
    grid-template-columns: 1fr;
  }

  .dash-mock__sidebar {
    flex-direction: row;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border-right: none;
    border-bottom: 1px solid #262626;
  }

  .dash-mock__nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
  }

  .dash-mock__grid {
    grid-template-columns: 1fr;
  }

  .dash-mock__card--wide,
  .dash-mock__card--full {
    grid-column: auto;
  }
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #f5f5f5;
  background: rgba(10, 10, 10, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s, transform 0.2s var(--sf-ease), border-color 0.2s;
}

.back-to-top:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.back-to-top[hidden] {
  display: none !important;
}

/* Stories (GitHub-style segment + grid) */
.stories {
  padding: clamp(3rem, 8vh, 5rem) 0;
  background: #0a0a0a;
  border-top: 1px solid var(--sf-border);
}

.stories__segment {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  margin: 0 auto 2.5rem;
  padding: 0.3rem;
  border: 1px solid var(--sf-border);
  border-radius: 999px;
}

.stories__tab {
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
  color: var(--sf-text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.stories__tab:hover {
  color: var(--sf-text);
}

.stories__tab.is-active {
  color: #0a0a0a;
  background: var(--sf-lime);
  border-color: var(--sf-lime);
}

.stories__inner {
  text-align: center;
}

.stories__inner .stories__segment {
  display: flex;
  width: fit-content;
  max-width: 100%;
}

.stories__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: var(--sf-max-width);
  margin-inline: auto;
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-radius);
  overflow: hidden;
}

.story-card {
  padding: clamp(1.5rem, 4vw, 2.25rem);
  text-align: center;
  background: #0a0a0a;
  transition: background 0.2s var(--sf-ease);
}

.story-card.is-active {
  background: rgba(200, 242, 100, 0.04);
}

.story-card__label {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sf-lime-dim);
}

.story-card__title {
  margin: 0.75rem 0 0;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--sf-text);
}

@media (min-width: 768px) {
  .stories__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .story-card + .story-card {
    border-left: 1px solid var(--sf-border);
  }
}

.stories__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
}

.stories__divider {
  width: 1px;
  height: 1rem;
  background: var(--sf-border);
}

/* Full-bleed interlude bands (GitHub rhythm) */
.interlude {
  position: relative;
  padding: clamp(3.5rem, 9vh, 6rem) 0;
  text-align: center;
  background: #0a0a0a;
  border-top: 1px solid var(--sf-border);
  border-bottom: 1px solid var(--sf-border);
  overflow: hidden;
}

.interlude__inner {
  max-width: var(--sf-prose);
  margin-inline: auto;
}

.interlude__title {
  margin: 0;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--sf-text);
}

.interlude--spotlight {
  z-index: 2;
  padding-block: clamp(4rem, 10vh, 6.5rem);
  border: none;
  overflow: visible;
}

.platform-wrap:has(+ .interlude--spotlight) .platform__three {
  border-bottom: none;
}

.interlude--spotlight + .builtin {
  border-top: none;
}

.interlude__glow {
  position: absolute;
  pointer-events: none;
}

.interlude__glow--spotlight {
  inset: -42% -6%;
  background:
    radial-gradient(ellipse 90% 55% at 50% 42%, rgba(200, 242, 100, 0.16) 0%, transparent 58%),
    radial-gradient(ellipse 70% 45% at 18% 58%, rgba(200, 242, 100, 0.09) 0%, transparent 52%),
    radial-gradient(ellipse 70% 45% at 82% 52%, rgba(168, 212, 74, 0.08) 0%, transparent 52%);
}

.interlude__inner--spotlight {
  position: relative;
  z-index: 1;
  max-width: min(46rem, 100%);
}

.interlude__inner--spotlight .section-head__eyebrow {
  margin-bottom: 1rem;
  color: var(--sf-lime-dim);
}

.interlude__title--spotlight {
  font-size: clamp(1.875rem, 4.25vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.interlude__title--spotlight .title-split--muted {
  margin-top: 0.2em;
  font-size: 0.92em;
  color: #d4d4d4;
}

.interlude__lead {
  margin: 1.25rem auto 0;
  max-width: min(38rem, 100%);
  font-size: 1rem;
  line-height: 1.7;
  color: #8a8a8a;
}

.interlude__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.125rem;
  margin-top: 2rem;
}

@media (min-width: 480px) {
  .interlude__actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Platform wrap */
.platform-wrap {
  background: var(--sf-bg-dark);
  padding-block: clamp(2rem, 5vh, 3rem) clamp(1.5rem, 4vh, 2.5rem);
}

.platform-wrap__inner {
  padding-inline: clamp(0.75rem, 2vw, 1.5rem);
}

/* Section headers */
.section-head {
  margin-bottom: 2rem;
}

.section-head--center {
  text-align: center;
  max-width: var(--sf-prose);
  margin-inline: auto;
  margin-bottom: 2.5rem;
}

.section-head__eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sf-lime-dim);
}

.section-head__title {
  margin: 0.5rem 0 0;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--sf-text);
}

.section-head__title--lg {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  max-width: var(--sf-prose);
  margin-inline: auto;
}

.section-head__lead {
  margin: 0.875rem auto 0;
  max-width: min(44rem, 100%);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--sf-text-muted);
}

/* Buttons: solid backgrounds only */
a.btn,
button.btn {
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25;
  border-radius: var(--sf-radius);
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  color: #0a0a0a;
  background-color: #ffffff;
  transition: background 0.15s var(--sf-ease), border-color 0.15s var(--sf-ease), color 0.15s;
}

.btn--primary {
  background: var(--sf-brand);
  border-color: var(--sf-brand);
  color: #fff;
}

.btn--primary:hover {
  background: var(--sf-brand-hover);
  border-color: var(--sf-brand-hover);
}

.btn--secondary {
  color: var(--sf-charcoal);
  background: #e5e5e5;
  border-color: #d4d4d4;
}

.btn--secondary:hover {
  background: #d4d4d4;
  border-color: #a3a3a3;
}

.btn--surface {
  color: #0a0a0a;
  background: #f5f5f5;
  border-color: #e5e5e5;
}

.btn--surface:hover {
  color: #0a0a0a;
  background: #e5e5e5;
  border-color: #d4d4d4;
}

.btn--on-dark,
a.btn--on-dark,
button.btn--on-dark {
  color: #0a0a0a;
  background: #ffffff;
  border-color: #ffffff;
}

.btn--on-dark:hover,
a.btn--on-dark:hover,
button.btn--on-dark:hover {
  color: #0a0a0a;
  background: #f5f5f5;
  border-color: #f5f5f5;
}

.btn--muted {
  color: #f5f5f5;
  background: #262626;
  border-color: #404040;
}

.btn--muted:hover {
  background: #404040;
  border-color: #525252;
}

.btn--ghost,
a.btn--ghost,
button.btn--ghost {
  color: #f5f5f5;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--ghost:hover,
a.btn--ghost:hover,
button.btn--ghost:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.55);
}

.header .btn--header,
.header a.btn--header {
  padding: 0.5rem 1.15rem;
  min-height: 2.25rem;
  max-height: 2.25rem;
  min-width: auto;
  max-width: none;
  width: auto;
  font-size: 0.875rem;
  font-weight: 400;
}

.btn--cta {
  min-height: var(--sf-btn-height);
  max-height: var(--sf-btn-height);
  min-width: var(--sf-btn-min-width);
  max-width: var(--sf-btn-max-width);
  width: 100%;
  padding-inline: 1.25rem;
}

@media (min-width: 480px) {
  .btn--cta {
    width: var(--sf-btn-min-width);
  }
}

/* Platform bento */
.platform {
  background: var(--sf-bg-dark);
}

.platform__frame {
  max-width: var(--sf-max-width);
  margin-inline: auto;
  border-inline: 1px solid var(--sf-border);
}

.platform__duo {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--sf-border);
}

.platform__cell--half {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.platform__cell {
  padding: clamp(2rem, 4vw, 3rem);
  color: var(--sf-text);
}

.platform__stack {
  display: grid;
}

.platform__stack .platform__cell + .platform__cell {
  border-top: 1px solid var(--sf-border);
}

.platform__heading {
  margin: 0;
  max-width: none;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.platform__heading--sm {
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  max-width: none;
}

.platform__body {
  margin: 1rem 0 0;
  max-width: none;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--sf-text-muted);
}

.platform__body--sm {
  margin-top: 0.75rem;
  font-size: 1rem;
  max-width: none;
}

.platform__link {
  margin-top: 1.5rem;
  color: var(--sf-text-muted);
}

.platform__link:hover {
  color: #fff;
}

.platform__cell--col .platform__link {
  margin-top: auto;
  padding-top: 0;
}

.platform__mark {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  color: var(--sf-lime-dim);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.platform__three {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--sf-border);
}

.platform__cell--col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: clamp(1.5rem, 4vw, 2rem);
}

.platform__cell--col + .platform__cell--col {
  border-top: 1px solid var(--sf-border);
}

.platform__quote {
  margin: 0;
  flex: 1;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--sf-text-muted);
}

@media (min-width: 768px) {
  .platform__duo {
    grid-template-columns: repeat(2, 1fr);
    align-items: stretch;
  }

  .platform__cell--half + .platform__cell--half {
    border-left: 1px solid var(--sf-border);
  }

  .platform__three {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }

  .platform__cell--col + .platform__cell--col {
    border-top: none;
    border-left: 1px solid var(--sf-border);
  }
}

@media (max-width: 767px) {
  .platform__frame {
    border-inline: none;
  }

  .platform__cell + .platform__cell {
    border-top: 1px solid var(--sf-border);
  }
}

/* Built-in systems */
.builtin {
  background: var(--sf-bg-dark);
  color: var(--sf-text);
  border-top: 1px solid var(--sf-border);
}

.builtin__inner {
  padding-block: clamp(3rem, 8vh, 5rem);
}

.pipeline-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}

.pipeline-flow__step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background: var(--sf-bg-dark);
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-radius);
}

.pipeline-flow__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.7rem;
  font-weight: 400;
  background: #171717;
  border-radius: 50%;
  color: var(--sf-lime);
}

.pipeline-flow__label {
  font-size: 0.8125rem;
  font-weight: 400;
}

.pipeline-flow__arrow {
  width: 1.25rem;
  height: 1px;
  background: #525252;
}

@media (max-width: 479px) {
  .pipeline-flow__arrow {
    display: none;
  }

  .pipeline-flow__step {
    flex: 1 1 calc(50% - 0.35rem);
    justify-content: center;
  }
}

.builtin__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--sf-border);
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-radius);
  overflow: hidden;
}

.sys-card {
  position: relative;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--sf-bg-dark);
  transition: background 0.15s var(--sf-ease);
}

.sys-card:hover {
  background: #0a0a0a;
}

.sys-card--accent {
  background: var(--sf-bg-dark);
}

.sys-card__index {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #525252;
  font-variant-numeric: tabular-nums;
}

.sys-card--accent .sys-card__index {
  color: var(--sf-accent-dim);
}

.sys-card__mark {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sf-lime-dim);
}

.sys-card__title {
  margin: 0.5rem 0 0;
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.sys-card__body {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--sf-text-muted);
}

@media (min-width: 640px) {
  .builtin__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.builtin__grid--4 {
  max-width: 56rem;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .builtin__grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .builtin__grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.power-grid--4 {
  max-width: 56rem;
  margin-inline: auto;
}

/* No AI */
.no-ai {
  background: #0a0a0a;
  border-top: 1px solid var(--sf-border);
}

.no-ai__inner {
  padding-block: clamp(3rem, 8vh, 5rem);
}

.no-ai .section-head__title {
  color: #fff;
}

.power-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin-top: 2rem;
  background: var(--sf-border);
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-radius);
  overflow: hidden;
}

.power-card {
  padding: 1.15rem 1.25rem;
  background: var(--sf-bg-dark);
  transition: background 0.15s var(--sf-ease);
}

.power-card:hover {
  background: #0a0a0a;
}

.power-card__name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.01em;
}

.power-card__desc {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--sf-text-muted);
}

@media (min-width: 640px) {
  .power-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .power-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Apply */
.apply {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
  background: var(--sf-bg-dark);
}

.no-ai:has(+ .apply) {
  border-bottom: none;
}

.apply + .footer {
  border-top: none;
}

.apply__glow {
  position: absolute;
  top: -32%;
  bottom: -32%;
  left: 50%;
  width: min(56rem, 94vw);
  transform: translateX(-50%);
  pointer-events: none;
  background:
    radial-gradient(ellipse 52% 46% at 50% 46%, rgba(200, 242, 100, 0.08) 0%, transparent 74%),
    radial-gradient(ellipse 40% 38% at 47% 54%, rgba(200, 242, 100, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 36% 32% at 53% 50%, rgba(168, 212, 74, 0.04) 0%, transparent 68%);
  filter: blur(24px);
  -webkit-mask-image:
    linear-gradient(180deg, transparent 0%, #000 16%, #000 82%, transparent 100%),
    linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image:
    linear-gradient(180deg, transparent 0%, #000 16%, #000 82%, transparent 100%),
    linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.apply__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(46rem, 100%);
  padding: clamp(4rem, 10vh, 6rem) clamp(1.75rem, 4vw, 3rem);
  text-align: center;
  color: var(--sf-text);
}

.apply__title {
  margin: 0;
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.apply__lead {
  margin: 1.25rem auto 0;
  max-width: min(38rem, 100%);
  font-size: 1rem;
  line-height: 1.7;
  color: #8a8a8a;
}

.apply__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
  width: 100%;
}

@media (min-width: 480px) {
  .apply__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
}

/* Footer */
.footer {
  margin-top: auto;
  padding: clamp(2.5rem, 7vh, 4.5rem) clamp(1rem, 4vw, 2rem) clamp(3rem, 9vh, 5.5rem);
  background: var(--sf-bg-dark);
  overflow: hidden;
}

.footer__mark {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: var(--sf-max-width);
  margin-inline: auto;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.footer__mark img {
  display: block;
  width: min(38rem, 92vw);
  height: auto;
  margin-inline: auto;
  opacity: 0.72;
  object-fit: contain;
}

/* Apply modal */
.apply-modal__overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
}

.apply-panel {
  display: flex;
  flex-direction: column;
  width: min(22rem, calc(100vw - 2rem));
  background: #f5f5f5;
  border: 1px solid #d4d4d4;
  border-radius: 10px;
  color: var(--sf-text-dark);
}

@media (min-width: 640px) {
  .apply-panel {
    width: min(36rem, calc(100vw - 4rem));
    border-radius: 12px;
  }
}

.apply-panel__header {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 0.625rem 0;
}

.apply-panel__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0.875rem 0.75rem;
  text-align: center;
}

.apply-panel__logo {
  width: auto;
  height: 2rem;
  max-width: 10rem;
  margin-bottom: 0.75rem;
  object-fit: contain;
}

.apply-panel__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.apply-panel__help {
  margin: 0.5rem 0 0;
  font-size: 0.6875rem;
  line-height: 1.45;
  color: #525252;
}

.apply-panel__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem 1rem;
  background: #fff;
  border-top: 1px solid #d4d4d4;
}

.apply-panel__field {
  width: 100%;
}

.apply-panel__field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: #404040;
}

.apply-panel__field input,
.apply-panel__field select,
.apply-panel__field textarea {
  width: 100%;
  padding: 0.5rem 0.625rem;
  font-size: 0.875rem;
  border: 1px solid #d4d4d4;
  border-radius: var(--sf-radius);
  background: #fff;
}

.apply-panel__field textarea {
  min-height: 5rem;
  resize: vertical;
}

.apply-panel__success {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
}

.apply-panel__success.is-visible {
  display: flex;
}

.apply-panel__success-title {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  font-weight: 400;
}

.apply-panel__success-text {
  margin: 0.375rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #525252;
}

.apply-panel__form.is-hidden {
  display: none;
}

/* Mobile polish */
@media (max-width: 767px) {
  :root {
    --sf-nav-height: 3.75rem;
  }

  .header__brand img {
    height: 1.75rem;
  }

  .header__inner {
    gap: 0.5rem;
  }

  .platform-wrap__inner {
    padding-inline: 0;
  }

  .platform__cell {
    padding: 1.5rem 1.25rem;
  }

  .showcase--hero {
    padding: 2.5rem 0 2rem;
  }

  .showcase__frame {
    margin-top: 1.75rem;
    padding-inline: 0;
  }

  .stories__grid {
    border-inline: none;
    border-radius: 0;
  }

  .story-card + .story-card {
    border-top: 1px solid var(--sf-border);
  }

  .platform__cell .btn--cta,
  .platform a.btn--cta,
  .platform button.btn--cta {
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .builtin__inner,
  .no-ai__inner {
    padding-block: 2.5rem;
  }

  .section-head--center {
    margin-bottom: 1.75rem;
  }

  .section-head__lead {
    font-size: 1rem;
  }

  .apply__inner {
    padding: 2.5rem 1.25rem;
  }

  .apply__actions {
    max-width: 100%;
  }

  .apply__actions .btn {
    width: 100%;
  }

  .footer__mark img {
    width: min(32rem, 94vw);
    opacity: 0.65;
  }
}

@media (max-width: 479px) {
  .header .btn--header {
    display: none;
  }

  .mobile-menu {
    width: min(16rem, 88vw);
  }
}

