.letter-glitch {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

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

.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;
  background: 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-bg) 0%, transparent 18%, transparent 82%, 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 */
.td-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--td-delay, 0ms);
}

.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;
  }
}

.td-cta__panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(194, 255, 38, 0.22);
  border-radius: 28px;
  background:
    radial-gradient(ellipse 70% 80% at 50% 120%, rgba(33, 163, 0, 0.35), transparent 70%),
    linear-gradient(180deg, #01332a, #021a16);
  box-shadow: 0 40px 120px -40px rgba(194, 255, 38, 0.25);
}

.td-cta__glitch {
  opacity: 0.9;
}

.td-cta__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: 60%;
  height: 70%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(2, 26, 22, 0.95), rgba(2, 26, 22, 0.6) 60%, transparent);
  pointer-events: none;
}

.td-cta__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) 24px;
  text-align: center;
}

.td-cta__title {
  justify-content: center;
}

.td-cta__actions {
  justify-content: center;
  margin-top: 10px;
}

