@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&family=Space+Mono:wght@400;700&display=swap");

:root {
  --tb-bg: #ffffff;
  --tb-surface: #f7f6fa;
  --tb-surface-2: #f0eef5;
  --tb-line: #e8e7ed;
  --tb-line-2: #dedce6;
  --tb-ink: #161320;
  --tb-ink-2: #39354a;
  --tb-muted: #6e6a7c;
  --tb-faint: #9a96a8;
  --tb-accent: #5b27d6;
  --tb-accent-press: #4a1fb0;
  --tb-accent-100: #e6dcfb;
  --tb-accent-50: #f2ecfd;
  --tb-display: "Space Grotesk", system-ui, sans-serif;
  --tb-sans: "Hanken Grotesk", system-ui, sans-serif;
  --tb-mono: "Space Mono", ui-monospace, monospace;
  --tb-radius: 14px;
  --tb-shadow: 0 24px 60px rgba(40, 20, 90, 0.12), 0 6px 18px rgba(22, 19, 32, 0.06);
  --background: 0 0% 100%;
  --foreground: 252 25% 10%;
  --card: 0 0% 100%;
  --card-foreground: 252 25% 10%;
  --muted: 270 17% 96%;
  --muted-foreground: 258 9% 45%;
  --primary: 260 70% 50%;
  --primary-foreground: 0 0% 100%;
  --secondary: 265 75% 42%;
  --secondary-foreground: 0 0% 100%;
  --accent: 260 70% 50%;
  --accent-foreground: 0 0% 100%;
  --border: 260 16% 90%;
  --ring: 260 70% 50%;
}

html {
  scroll-behavior: smooth;
}

html.tb-ultrium-theme-root {
  max-width: 100%;
  overflow-x: hidden;
}

body.tb-ultrium-theme {
  background:
    radial-gradient(900px 480px at 88% 4%, rgba(91, 39, 214, 0.08), transparent 64%),
    linear-gradient(180deg, #fff 0%, #fbfaff 54%, #f7f6fa 100%) !important;
  color: var(--tb-ink);
  font-family: var(--tb-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.tb-ultrium-theme :where(p, li, span, a, button, input, label, td, th) {
  font-family: var(--tb-sans);
}

body.tb-ultrium-theme :where(h1, h2, h3, h4) {
  font-family: var(--tb-display) !important;
  letter-spacing: -0.025em;
}

body.tb-ultrium-theme #lovable-badge {
  display: none !important;
}

body.tb-ultrium-theme :where(.rounded-lg.bg-card, .shadow-sm.bg-card, .tb-outbound-links__card) {
  border: 1px solid var(--tb-line) !important;
  border-radius: var(--tb-radius) !important;
  box-shadow: 0 8px 28px rgba(22, 19, 32, 0.06) !important;
}

body.tb-ultrium-theme :where(.bg-muted, .bg-muted\/30) {
  background: var(--tb-surface) !important;
}

body.tb-ultrium-theme :where(.text-primary, .text-accent, .hover\:text-primary:hover) {
  color: var(--tb-accent) !important;
}

body.tb-ultrium-theme :where(.bg-primary, .bg-accent, .bg-secondary) {
  background: var(--tb-accent) !important;
}

body.tb-ultrium-theme :where(.border-primary, .border-accent, .border-secondary) {
  border-color: var(--tb-accent) !important;
}

.tb-home-redesign {
  background: var(--tb-bg);
  color: var(--tb-ink);
  max-width: 100%;
  overflow-x: hidden;
}

.tb-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.tb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--tb-accent);
  font-family: var(--tb-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tb-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--tb-accent);
}

.tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.tb-btn:hover {
  transform: translateY(-1px);
}

.tb-btn-primary {
  background: var(--tb-accent);
  color: #fff;
  box-shadow: 0 10px 28px rgba(91, 39, 214, 0.22);
}

.tb-btn-primary:hover {
  background: var(--tb-accent-press);
  color: #fff;
}

.tb-btn-ghost {
  background: #fff;
  color: var(--tb-ink);
  border-color: var(--tb-line-2);
}

.tb-btn-ghost:hover {
  border-color: var(--tb-accent);
  color: var(--tb-accent);
}

.tb-hero {
  position: relative;
  min-height: clamp(680px, 78vh, 840px);
  overflow: hidden;
  border-bottom: 1px solid var(--tb-line);
  background:
    radial-gradient(74% 94% at 72% 48%, rgba(91, 39, 214, 0.16), transparent 58%),
    radial-gradient(62% 68% at 86% 50%, rgba(255, 137, 49, 0.2), transparent 54%),
    linear-gradient(90deg, #fff 0%, #faf8ff 58%, #eef9ff 100%);
}

.tb-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background:
    linear-gradient(115deg, transparent 10%, rgba(91, 39, 214, 0.16) 42%, rgba(255, 255, 255, 0.9) 55%, transparent 68%),
    repeating-linear-gradient(112deg, transparent 0 24px, rgba(91, 39, 214, 0.045) 25px 27px);
  pointer-events: none;
}

.tb-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(70px, 9vw, 118px) 0;
}

.tb-hero-copy {
  min-width: 0;
  max-width: 610px;
}

.tb-hero h1 {
  margin: 22px 0 0;
  color: var(--tb-ink);
  font-size: clamp(3.1rem, 7vw, 6.4rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.tb-hero h1 span {
  color: var(--tb-accent);
}

.tb-hero-sub {
  max-width: 520px;
  margin: 26px 0 34px;
  color: var(--tb-muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.58;
}

.tb-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.tb-hero-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 46px;
}

.tb-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tb-line-2);
}

.tb-dot.is-active {
  width: 30px;
  border-radius: 999px;
  background: var(--tb-accent);
}

.tb-slide-count {
  color: var(--tb-faint);
  font-family: var(--tb-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.tb-slide-count strong {
  color: var(--tb-ink);
}

.tb-cart-stage {
  position: relative;
  display: grid;
  place-items: center;
  max-width: 100%;
  min-height: 480px;
  overflow: hidden;
}

.tb-cart-halo,
.tb-cart-rings {
  position: absolute;
  border-radius: 999px;
}

.tb-cart-halo {
  width: min(36vw, 430px);
  height: min(36vw, 430px);
  min-width: 300px;
  min-height: 300px;
  background: radial-gradient(circle, rgba(230, 220, 251, 0.95), transparent 66%);
  filter: blur(8px);
}

.tb-cart-rings {
  width: min(42vw, 510px);
  height: min(42vw, 510px);
  min-width: 340px;
  min-height: 340px;
  border: 1px solid var(--tb-line);
}

.tb-cart-rings::before,
.tb-cart-rings::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  border: 1px solid var(--tb-line);
}

.tb-cart-rings::before {
  inset: 46px;
}

.tb-cart-rings::after {
  inset: 92px;
}

.tb-cartridge {
  position: relative;
  width: min(76vw, 330px);
  aspect-ratio: 1;
  border-radius: 19px;
  background: linear-gradient(155deg, #2b2738 0%, #211d2c 55%, #171320 100%);
  box-shadow: var(--tb-shadow);
  transform: rotate(-7deg);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tb-hero:hover .tb-cartridge {
  transform: rotate(-4deg) translateY(-4px);
}

.tb-cartridge::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 66px;
  height: 66px;
  border-top-right-radius: 19px;
  background: linear-gradient(135deg, #fff 0 50%, transparent 50%);
}

.tb-cart-window {
  position: absolute;
  top: 28px;
  left: 28px;
  width: 128px;
  height: 78px;
  border-radius: 7px;
  background: linear-gradient(150deg, #46c0d6, #2a86b8);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4);
}

.tb-cart-chip {
  position: absolute;
  left: 28px;
  top: 126px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: #8d85a6;
  font-family: var(--tb-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.tb-cart-grip {
  position: absolute;
  left: 28px;
  bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tb-cart-grip i {
  display: block;
  width: 152px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.tb-cart-label {
  position: absolute;
  right: 25px;
  bottom: 27px;
  text-align: right;
  line-height: 1;
}

.tb-cart-label span {
  display: block;
  color: #bbb4d2;
  font-family: var(--tb-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
}

.tb-cart-label strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-family: var(--tb-display);
  font-size: 56px;
  letter-spacing: -0.04em;
}

.tb-stats {
  border-bottom: 1px solid var(--tb-line);
  background: #fff;
}

.tb-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.tb-stat {
  padding: 34px 28px;
  border-left: 1px solid var(--tb-line);
}

.tb-stat:first-child {
  border-left: 0;
  padding-left: 0;
}

.tb-stat strong {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--tb-ink);
  font-family: var(--tb-display);
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  letter-spacing: -0.03em;
}

.tb-stat strong span {
  color: var(--tb-accent);
  font-family: var(--tb-mono);
  font-size: 15px;
  letter-spacing: 0;
}

.tb-stat p {
  margin: 6px 0 0;
  color: var(--tb-muted);
  font-size: 14.5px;
}

.tb-block {
  padding: clamp(68px, 9vw, 100px) 0;
}

.tb-block-muted {
  background: var(--tb-surface);
}

.tb-section-head {
  max-width: 700px;
  margin-bottom: 48px;
}

.tb-section-head.center {
  margin-inline: auto;
  text-align: center;
}

.tb-section-head h2 {
  margin: 16px 0 0;
  color: var(--tb-ink);
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  line-height: 1.06;
}

.tb-section-head p {
  margin: 18px 0 0;
  color: var(--tb-muted);
  font-size: 18px;
  line-height: 1.55;
}

.tb-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.tb-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 32px 30px 30px;
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tb-card:hover {
  transform: translateY(-4px);
  border-color: var(--tb-accent-100);
  box-shadow: 0 8px 30px rgba(22, 19, 32, 0.08);
}

.tb-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 22px;
  border-radius: 12px;
  background: var(--tb-accent-50);
  color: var(--tb-accent);
}

.tb-card h3 {
  margin: 0 0 10px;
  color: var(--tb-ink);
  font-size: 22px;
}

.tb-card p {
  margin: 0 0 20px;
  color: var(--tb-muted);
  line-height: 1.58;
}

.tb-card ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tb-card li {
  color: var(--tb-ink-2);
  font-size: 14px;
}

.tb-card li::before {
  content: "✓";
  margin-right: 10px;
  color: var(--tb-accent);
  font-weight: 800;
}

.tb-roadmap {
  overflow-x: auto;
  padding: 58px 0 26px;
}

.tb-roadmap-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(9, 118px);
}

.tb-roadmap-track::before {
  content: "";
  position: absolute;
  top: 58px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--tb-accent) 0 50%, var(--tb-line) 50% 100%);
}

.tb-node {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  color: var(--tb-muted);
  font-family: var(--tb-display);
  font-weight: 700;
}

.tb-node small {
  height: 32px;
  color: var(--tb-faint);
  font-family: var(--tb-mono);
  font-size: 12px;
}

.tb-node i {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  border: 2px solid var(--tb-line-2);
  border-radius: 999px;
  background: #fff;
}

.tb-node.is-done i {
  border-color: var(--tb-accent);
  background: var(--tb-accent);
}

.tb-node.is-current {
  color: var(--tb-accent);
}

.tb-node.is-current small {
  color: var(--tb-accent);
}

.tb-node.is-current i {
  width: 18px;
  height: 18px;
  border-color: var(--tb-accent);
  box-shadow: 0 0 0 7px var(--tb-accent-50);
}

.tb-news-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}

.tb-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.tb-news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
  background: #fff;
  color: var(--tb-ink);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tb-news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(22, 19, 32, 0.08);
}

.tb-news-art {
  position: relative;
  height: 172px;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 12%, rgba(91, 39, 214, 0.16), transparent 44%),
    linear-gradient(135deg, var(--tb-surface-2), #e9e6f2);
}

.tb-news-art::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -28px;
  width: 126px;
  height: 126px;
  border-radius: 14px;
  background: linear-gradient(155deg, #2b2738, #171320);
  transform: rotate(-10deg);
  box-shadow: var(--tb-shadow);
}

.tb-news-art span {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--tb-accent);
  font-family: var(--tb-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tb-news-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 22px 24px;
}

.tb-news-body small {
  color: var(--tb-faint);
  font-family: var(--tb-mono);
  font-size: 12px;
}

.tb-news-body h3 {
  margin: 10px 0 0;
  color: var(--tb-ink);
  font-size: 19px;
  line-height: 1.24;
}

.tb-link {
  margin-top: auto;
  padding-top: 18px;
  color: var(--tb-accent);
  font-weight: 800;
}

.tb-cta {
  padding: 0 0 clamp(72px, 10vw, 108px);
  background: var(--tb-surface);
}

.tb-cta-panel {
  display: grid;
  grid-template-columns: 1.4fr auto;
  align-items: center;
  gap: 40px;
  padding: clamp(38px, 5vw, 64px);
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #1c1730, #241a44 55%, #2e2056);
  overflow: hidden;
}

.tb-cta-panel h2 {
  margin: 14px 0 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.08;
}

.tb-cta-panel p {
  max-width: 580px;
  margin: 16px 0 0;
  color: #cabfe6;
  font-size: 17px;
}

.tb-cta-panel .tb-eyebrow {
  color: #b69cf2;
}

.tb-cta-panel .tb-eyebrow::before {
  background: #b69cf2;
}

.tb-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.tb-cta-actions .tb-btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.tb-cta-actions .tb-btn-primary {
  background: #fff;
  color: var(--tb-ink);
  box-shadow: none;
}

body.tb-ultrium-theme .tb-outbound-links {
  max-width: 100%;
  overflow-x: hidden;
  background: var(--tb-surface) !important;
}

body.tb-ultrium-theme .tb-outbound-links__inner {
  max-width: calc(100vw - 32px) !important;
  border-color: var(--tb-line) !important;
  background: #fff !important;
}

body.tb-ultrium-theme .tb-outbound-links__grid,
body.tb-ultrium-theme .tb-outbound-links__card {
  min-width: 0;
  max-width: 100%;
}

body.tb-ultrium-theme .tb-outbound-links__card :where(span, p),
body.tb-ultrium-theme .tb-outbound-links__copy {
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .tb-hero-grid,
  .tb-cta-panel {
    grid-template-columns: 1fr;
  }

  .tb-cart-stage {
    width: 100%;
    min-height: 360px;
    order: -1;
  }

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

  .tb-stat {
    border-left: 0;
    border-top: 1px solid var(--tb-line);
  }

  .tb-card-grid,
  .tb-news-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .tb-wrap {
    width: min(100% - 32px, 1180px);
  }

  .tb-hero {
    min-height: auto;
  }

  .tb-hero-grid {
    padding: 48px 0 60px;
  }

  .tb-hero h1 {
    font-size: clamp(2.25rem, 10.4vw, 3rem);
    line-height: 0.96;
    overflow-wrap: normal;
  }

  .tb-hero-copy,
  .tb-hero-sub {
    width: 100%;
    max-width: calc(100vw - 32px);
  }

  .tb-hero h1 span {
    display: block;
  }

  .tb-hero-actions,
  .tb-news-head,
  .tb-cta-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .tb-btn {
    width: 100%;
  }

  .tb-stats-grid {
    grid-template-columns: 1fr;
  }

  .tb-stat {
    padding: 24px 0;
  }
}
