.floating-lines-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.floating-lines-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* design tokens for the dark-first rebuild, lime and green come from the site's brand variables */
.td-section {
  --td-bg: #021a16;
  --td-bg-2: #01332a;
  --td-green: #21a300;
  --td-lime: #c2ff26;
  --td-lime-soft: rgba(194, 255, 38, 0.12);
  --td-text: #e6efe9;
  --td-muted: #9fb5ad;
  --td-faint: rgba(230, 239, 233, 0.5);
  --td-line: rgba(255, 255, 255, 0.08);
  --td-line-strong: rgba(255, 255, 255, 0.14);
  --td-radius: 20px;
  --td-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* --td-section-bg goes transparent when a page level grainient sits behind everything */
  background: var(--td-section-bg, var(--td-bg));
  color: var(--td-text);
  font-family: inherit;
  /* every section pads both edges, so two in a row stack into double this, kept modest so the stacked gap doesn't read as dead space */
  padding: clamp(48px, 5.5vw, 80px) 0;
  -webkit-font-smoothing: antialiased;
}

.td-section *,
.td-section *::before,
.td-section *::after {
  box-sizing: border-box;
}

.td-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* absolute layer for animated backgrounds, sits under the container */
.td-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* faint lime grid that fades out from the center through a radial mask */
.td-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(194, 255, 38, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(194, 255, 38, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 100%);
}

/* top and bottom fades so neighboring sections blend into each other */
.td-fade-edges::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--td-fade-bg, var(--td-bg)) 0%, transparent 18%, transparent 82%, var(--td-fade-bg, var(--td-bg)) 100%);
}

/* section header */
.td-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 760px;
}

.td-header--center {
  align-items: center;
  text-align: center;
  margin: 0 auto;
}

.td-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid rgba(194, 255, 38, 0.25);
  border-radius: 999px;
  background: rgba(194, 255, 38, 0.06);
  color: var(--td-lime);
  font-family: var(--td-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.td-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--td-lime);
  box-shadow: 0 0 12px var(--td-lime);
}

.td-h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 1.25rem + 3vw, 3.5rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.td-header--center .td-h2 {
  justify-content: center;
}

.td-lead {
  margin: 0;
  color: var(--td-muted);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.6;
}

.td-mono-label {
  font-family: var(--td-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--td-lime);
}

/* buttons */
.td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.td-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

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

.td-btn--primary {
  background: var(--td-lime);
  color: #021a16;
  box-shadow:
    0 0 0 1px rgba(194, 255, 38, 0.5),
    0 10px 40px -10px rgba(194, 255, 38, 0.7);
}

.td-btn--primary:hover {
  background: #d4ff63;
  box-shadow:
    0 0 0 1px rgba(194, 255, 38, 0.7),
    0 14px 48px -10px rgba(194, 255, 38, 0.9);
}

.td-btn--ghost {
  border: 1px solid var(--td-line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
}

.td-btn--ghost:hover {
  border-color: rgba(194, 255, 38, 0.4);
  background: rgba(194, 255, 38, 0.06);
}

.td-btn svg {
  transition: transform 0.2s ease;
}

.td-btn:hover svg {
  transform: translateX(3px);
}

/* glass card with a cursor-following spotlight, position comes from --mx and --my set by useSpotlight */
.td-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--td-line);
  border-radius: var(--td-radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  transition:
    border-color 0.3s ease,
    transform 0.3s ease;
}

.td-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(194, 255, 38, 0.12), transparent 45%);
  transition: opacity 0.3s ease;
}

.td-card:hover {
  border-color: rgba(194, 255, 38, 0.3);
}

.td-card:hover::before {
  opacity: 1;
}

.td-card > * {
  position: relative;
  z-index: 1;
}

.td-icon-tile {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(194, 255, 38, 0.25);
  border-radius: 12px;
  background: rgba(194, 255, 38, 0.07);
  color: var(--td-lime);
}

/* rotating conic beam around a frame, done with a spinning pseudo element since @property is ignored in shadow roots */
.td-beam-frame {
  position: relative;
  padding: 1px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--td-line-strong);
}

.td-beam-frame::before {
  content: '';
  position: absolute;
  inset: -60%;
  background: conic-gradient(from 0deg, transparent 0deg 290deg, rgba(194, 255, 38, 0.15) 310deg, var(--td-lime) 350deg, transparent 360deg);
  animation: td-spin 7s linear infinite;
}

.td-beam-frame__inner {
  position: relative;
  border-radius: 17px;
  overflow: hidden;
  background: var(--td-bg);
}

.td-beam-frame__inner img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes td-spin {
  to {
    transform: rotate(1turn);
  }
}

/* scroll reveal toggled by useReveal */
/* reveals start just before content reaches the screen, a shorter fade and stagger delays at 40% of what components pass keep the order but stop content from waiting on screen */
.td-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--td-delay, 0ms) * 0.4);
}

.td-reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .td-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .td-beam-frame::before {
    animation: none;
  }
}

/* large screens step the layout up instead of leaving a small column in the middle of a wide monitor,
   text measure stays capped by the header and lead max-widths, backgrounds were already full bleed */
@media (min-width: 1680px) {
  .td-container {
    max-width: 1360px;
  }

  .td-header {
    max-width: 840px;
  }

  .td-h2 {
    font-size: 3.9rem;
  }

  .td-lead {
    font-size: 1.35rem;
  }
}

@media (min-width: 1920px) {
  .td-container {
    max-width: 1440px;
  }

  .td-h2 {
    font-size: 4.2rem;
  }
}

.td-code__card {
  margin-top: clamp(40px, 5vw, 64px);
  border: 1px solid var(--td-line);
  border-radius: var(--td-radius);
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(33, 163, 0, 0.08), transparent 60%),
    rgba(255, 255, 255, 0.02);
}

/* tab strip scrolls sideways on phones instead of wrapping */
.td-code__tabs {
  display: flex;
  gap: 4px;
  padding: 10px;
  overflow-x: auto;
  border-bottom: 1px solid var(--td-line);
  scrollbar-width: none;
}

.td-code__tabs::-webkit-scrollbar {
  display: none;
}

.td-code__tab {
  flex: none;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: var(--td-faint);
  font-family: var(--td-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.td-code__tab:hover {
  color: var(--td-text);
}

.td-code__tab.is-active {
  border-color: rgba(194, 255, 38, 0.35);
  background: rgba(194, 255, 38, 0.08);
  color: var(--td-lime);
}

.td-code__tab:focus-visible {
  outline: 2px solid var(--td-lime);
  outline-offset: 2px;
}

.td-code__body {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(20px, 3vw, 40px);
}

.td-code__copy,
.td-code__pre {
  animation: td-code-in 0.35s ease both;
}

@keyframes td-code-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.td-code__title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.3rem, 1rem + 0.8vw, 1.7rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.td-code__text {
  margin: 14px 0 0;
  color: var(--td-muted);
  font-size: 16px;
  line-height: 1.65;
}

.td-code__editor {
  overflow: hidden;
  border: 1px solid var(--td-line-strong);
  border-radius: 14px;
  background: #06110d;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9);
}

.td-code__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--td-line);
  background: rgba(255, 255, 255, 0.02);
}

.td-code__dots {
  display: flex;
  gap: 6px;
}

.td-code__dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.td-code__file {
  color: var(--td-faint);
  font-family: var(--td-mono);
  font-size: 12px;
}

.td-code__copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid var(--td-line);
  border-radius: 8px;
  background: none;
  color: var(--td-muted);
  font-family: var(--td-mono);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.td-code__copy-btn:hover {
  border-color: rgba(194, 255, 38, 0.4);
  color: var(--td-lime);
}

.td-code__pre {
  margin: 0;
  padding: 18px 20px 22px;
  overflow-x: auto;
  color: #d7e3dd;
  font-family: var(--td-mono);
  font-size: 13.5px;
  line-height: 1.7;
  tab-size: 4;
}

.td-code__line {
  display: block;
  white-space: pre;
}

/* token colors from the site palette, lime for decorators since they're the tabsdata part */
.td-code__t-decorator {
  color: var(--td-lime);
}

.td-code__t-keyword {
  color: #7fd1ff;
}

.td-code__t-string {
  color: #f6c27a;
}

.td-code__t-comment {
  color: rgba(230, 239, 233, 0.4);
  font-style: italic;
}

.td-code__t-call {
  color: #ffffff;
}

.td-code__t-number {
  color: #f6c27a;
}

@media (max-width: 860px) {
  .td-code__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .td-code__pre {
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .td-code__copy,
  .td-code__pre {
    animation: none;
  }
}

/* each tab reads as a short chat, the prompt someone gives the agent sits on the right like a sent message and the code it writes back sits on the left */
.td-code__chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.td-code__ask {
  align-self: flex-end;
  max-width: 82%;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(194, 255, 38, 0.32);
  border-radius: 16px 16px 4px 16px;
  background: rgba(194, 255, 38, 0.12);
  color: var(--td-text);
  font-family: var(--td-mono);
  font-size: 13px;
  line-height: 1.55;
  animation: td-code-in 0.35s ease both;
}

.td-code__chat .td-code__editor {
  align-self: flex-start;
  width: 94%;
}

@media (max-width: 640px) {
  .td-code__ask {
    max-width: 90%;
  }

  .td-code__chat .td-code__editor {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .td-code__ask {
    animation: none;
  }
}

/* large screens, a touch more size for the tab copy and the code */
@media (min-width: 1680px) {
  .td-code__text {
    font-size: 17px;
  }

  .td-code__pre {
    font-size: 14.5px;
  }
}

