.ai-studio-section {
  --ai-dark: #10120d;
  --ai-panel: #171a12;
  --ai-cream: #f3efe3;
  --ai-line: rgba(243, 239, 227, .16);
  --ai-muted: rgba(243, 239, 227, .58);
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(15, 16, 13, .14);
  background:
    radial-gradient(circle at 84% 6%, rgba(129, 153, 38, .13), transparent 25%),
    var(--cream);
  color: var(--ink);
  font-family: "Totteng", Arial, sans-serif;
}

.ai-studio-section::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(15, 16, 13, .11) .65px, transparent .65px);
  background-size: 9px 9px;
  opacity: .22;
  pointer-events: none;
  content: "";
}

.ai-studio-wrap {
  position: relative;
  z-index: 1;
}

.ai-studio-head {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, .62fr);
  gap: clamp(44px, 8vw, 126px);
  align-items: end;
}

.ai-studio-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.ai-studio-eyebrow::before {
  width: 38px;
  height: 2px;
  background: currentColor;
  content: "";
}

.ai-studio-head h2 {
  max-width: 850px;
  margin: 0;
  color: var(--ink);
  font-family: "Totteng", Arial, sans-serif;
  font-size: clamp(70px, 8.7vw, 132px);
  font-weight: 900;
  line-height: .78;
  letter-spacing: -.06em;
  text-wrap: balance;
}

.ai-studio-head h2 span {
  display: block;
  color: var(--orange);
}

.ai-studio-intro {
  padding-bottom: 8px;
}

.ai-studio-lead {
  max-width: 25ch;
  margin: 0;
  font-size: clamp(19px, 1.75vw, 24px);
  font-weight: 800;
  line-height: 1.4;
  text-wrap: pretty;
}

.ai-studio-principles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 0;
  margin: 26px 0 0;
  list-style: none;
  color: rgba(15, 16, 13, .6);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ai-studio-principles li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ai-studio-principles li::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--leaf);
  content: "";
}

.ai-workbench {
  --ai-core-x: 0px;
  --ai-core-y: 0px;
  position: relative;
  margin-top: clamp(56px, 7vw, 96px);
  overflow: hidden;
  border: 1px solid rgba(15, 16, 13, .88);
  border-radius: clamp(22px, 2.3vw, 34px);
  background: var(--ai-dark);
  color: var(--ai-cream);
  box-shadow: 0 32px 80px rgba(61, 50, 13, .16);
  isolation: isolate;
}

.ai-workbench::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(243, 239, 227, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 239, 227, .035) 1px, transparent 1px),
    radial-gradient(circle at 50% 46%, rgba(255, 126, 0, .12), transparent 34%);
  background-size: 34px 34px, 34px 34px, 100% 100%;
  content: "";
}

.ai-workbench-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 62px;
  padding: 0 clamp(20px, 3vw, 40px);
  border-bottom: 1px solid var(--ai-line);
  color: var(--ai-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.ai-workbench-bar p {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.ai-system-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 5px rgba(129, 153, 38, .12), 0 0 18px rgba(129, 153, 38, .78);
}

.ai-system-state {
  color: var(--ai-cream);
}

.ai-workbench-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, .75fr) minmax(330px, 1.2fr) minmax(190px, .75fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  min-height: clamp(460px, 45vw, 610px);
  padding: clamp(38px, 5vw, 76px) clamp(22px, 4vw, 58px);
  overflow: hidden;
  touch-action: pan-y;
}

.ai-workbench-stage::before,
.ai-workbench-stage::after {
  position: absolute;
  top: 50%;
  z-index: -1;
  width: 27%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: .62;
  content: "";
}

.ai-workbench-stage::before {
  left: 15%;
}

.ai-workbench-stage::after {
  right: 15%;
}

.ai-io-card {
  position: relative;
  z-index: 3;
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--ai-line);
  background: rgba(16, 18, 13, .82);
  backdrop-filter: blur(12px);
}

.ai-io-card::before {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 3px;
  background: var(--leaf);
  content: "";
}

.ai-output-card::before {
  left: auto;
  right: 0;
  background: var(--orange);
}

.ai-io-label,
.ai-io-foot {
  display: block;
  color: var(--ai-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.ai-io-card p {
  max-width: 15ch;
  margin: 28px 0 34px;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.ai-io-foot {
  position: absolute;
  left: 24px;
  bottom: 22px;
}

.ai-output-card {
  text-align: right;
}

.ai-output-card p {
  margin-left: auto;
  color: var(--orange);
}

.ai-output-card .ai-io-foot {
  left: auto;
  right: 24px;
}

.ai-core-stage {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(100%, 430px);
  aspect-ratio: 1;
  margin: auto;
  transform: translate3d(var(--ai-core-x), var(--ai-core-y), 0);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}

.ai-network {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ai-network-ring,
.ai-network-orbit,
.ai-network-link,
.ai-network-flow {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.ai-network-ring {
  stroke: rgba(243, 239, 227, .16);
  stroke-width: 1;
}

.ai-network-ring.is-dashed {
  stroke-dasharray: 3 10;
  transform-origin: 210px 210px;
  animation: ai-ring-turn 26s linear infinite;
}

.ai-network-orbit {
  stroke: rgba(129, 153, 38, .52);
  stroke-width: 1.2;
  stroke-dasharray: 5 8;
  transform-origin: 210px 210px;
  animation: ai-ring-turn-reverse 18s linear infinite;
}

.ai-network-link {
  stroke: rgba(243, 239, 227, .22);
  stroke-width: 1.15;
}

.ai-network-flow {
  stroke: var(--orange);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 2 13;
  animation: ai-signal-flow 2.8s linear infinite;
}

.ai-network-node {
  fill: var(--ai-dark);
  stroke: rgba(243, 239, 227, .62);
  stroke-width: 1.2;
  transform-box: fill-box;
  transform-origin: center;
}

.ai-network-node.is-hot {
  fill: var(--orange);
  stroke: var(--orange);
  filter: drop-shadow(0 0 8px rgba(255, 126, 0, .78));
  animation: ai-node-pulse 2.4s ease-in-out infinite;
}

.ai-network-node.is-human {
  fill: var(--leaf);
  stroke: var(--leaf);
  filter: drop-shadow(0 0 7px rgba(129, 153, 38, .62));
}

.ai-core-copy {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: clamp(142px, 15vw, 190px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(243, 239, 227, .26);
  border-radius: 50%;
  background: rgba(16, 18, 13, .86);
  box-shadow: 0 0 0 12px rgba(16, 18, 13, .46), 0 0 52px rgba(255, 126, 0, .12);
  text-align: center;
}

.ai-core-copy span,
.ai-core-copy small {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ai-core-copy span {
  color: var(--leaf);
}

.ai-core-copy strong {
  display: block;
  color: var(--ai-cream);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.035em;
}

.ai-core-copy small {
  color: var(--ai-muted);
}

.ai-mode-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ai-line);
}

.ai-mode-button {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
  min-width: 0;
  min-height: 142px;
  padding: 24px clamp(18px, 2.5vw, 32px);
  border: 0;
  border-right: 1px solid var(--ai-line);
  background: transparent;
  color: var(--ai-cream);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .24s ease, color .24s ease, transform .2s ease;
}

.ai-mode-button:last-child {
  border-right: 0;
}

.ai-mode-button::before {
  position: absolute;
  left: 0;
  right: 100%;
  top: 0;
  height: 3px;
  background: var(--orange);
  transition: right .35s cubic-bezier(.2, .8, .2, 1);
  content: "";
}

.ai-mode-button:hover,
.ai-mode-button:focus-visible {
  background: rgba(243, 239, 227, .06);
  outline: none;
}

.ai-mode-button:focus-visible {
  box-shadow: inset 0 0 0 2px var(--orange);
}

.ai-mode-button:active {
  transform: translateY(1px);
}

.ai-mode-button[aria-pressed="true"] {
  background: var(--orange);
  color: var(--ai-dark);
}

.ai-mode-button[aria-pressed="true"]::before {
  right: 0;
}

.ai-mode-number {
  margin-top: 4px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}

.ai-mode-copy strong,
.ai-mode-copy small {
  display: block;
}

.ai-mode-copy strong {
  margin-bottom: 9px;
  font-size: clamp(20px, 1.9vw, 27px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.025em;
}

.ai-mode-copy small {
  max-width: 21ch;
  color: var(--ai-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.ai-mode-button[aria-pressed="true"] .ai-mode-copy small {
  color: rgba(16, 18, 13, .7);
}

.ai-mode-arrow {
  font-size: 18px;
  line-height: 1;
}

.ai-mode-button:disabled {
  cursor: default;
  opacity: 1;
}

.ai-workbench.is-changing .ai-core-copy {
  animation: ai-core-hit .5s cubic-bezier(.2, .8, .2, 1);
}

.ai-workbench.is-changing .ai-network-node.is-hot {
  animation: ai-node-hit .5s cubic-bezier(.2, .8, .2, 1);
}

.ai-studio-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 42px;
  padding-top: clamp(54px, 7vw, 92px);
}

.ai-studio-foot p {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(42px, 5.8vw, 82px);
  font-weight: 900;
  line-height: .86;
  letter-spacing: -.05em;
}

.ai-studio-foot p span {
  display: block;
  color: var(--orange);
}

.ai-studio-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 25px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .22s ease, border-color .22s ease, color .22s ease, transform .2s ease;
}

.ai-studio-link::after {
  content: "↗";
}

.ai-studio-link:hover,
.ai-studio-link:focus-visible {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--ink);
  outline: none;
  transform: translateY(-2px);
}

@keyframes ai-ring-turn {
  to { transform: rotate(360deg); }
}

@keyframes ai-ring-turn-reverse {
  to { transform: rotate(-360deg); }
}

@keyframes ai-signal-flow {
  to { stroke-dashoffset: -60; }
}

@keyframes ai-node-pulse {
  0%, 100% { transform: scale(.88); opacity: .7; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes ai-core-hit {
  0% { transform: translate(-50%, -50%) scale(.9); }
  60% { transform: translate(-50%, -50%) scale(1.045); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes ai-node-hit {
  0% { transform: scale(.5); }
  65% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

@media (max-width: 980px) {
  .ai-studio-head {
    grid-template-columns: minmax(0, 1fr) minmax(240px, .58fr);
    gap: 42px;
  }

  .ai-workbench-stage {
    grid-template-columns: minmax(150px, .72fr) minmax(280px, 1.2fr) minmax(150px, .72fr);
    gap: 18px;
    padding-inline: 22px;
  }

  .ai-io-card {
    min-height: 172px;
    padding: 20px;
  }

  .ai-io-foot {
    left: 20px;
  }

  .ai-output-card .ai-io-foot {
    right: 20px;
  }
}

@media (max-width: 760px) {
  .ai-studio-head {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .ai-studio-head h2 {
    font-size: clamp(60px, 15.5vw, 94px);
  }

  .ai-studio-lead {
    max-width: 31ch;
  }

  .ai-workbench {
    margin-top: 48px;
    border-radius: 22px;
  }

  .ai-workbench-bar {
    min-height: 56px;
    padding-inline: 18px;
    font-size: 8px;
  }

  .ai-workbench-stage {
    grid-template-columns: 1fr;
    gap: 22px;
    min-height: 0;
    padding: 28px 18px 34px;
  }

  .ai-workbench-stage::before,
  .ai-workbench-stage::after {
    left: 50%;
    top: 17%;
    width: 1px;
    height: 66%;
    background: linear-gradient(180deg, transparent, var(--orange), transparent);
  }

  .ai-workbench-stage::after {
    display: none;
  }

  .ai-io-card {
    width: min(100%, 330px);
    min-height: 144px;
    padding: 18px;
  }

  .ai-output-card {
    justify-self: end;
  }

  .ai-io-card p {
    margin: 20px 0 31px;
    font-size: 22px;
  }

  .ai-output-card p {
    margin-left: auto;
  }

  .ai-io-foot {
    left: 18px;
    bottom: 16px;
  }

  .ai-output-card .ai-io-foot {
    right: 18px;
  }

  .ai-core-stage {
    width: min(88vw, 340px);
  }

  .ai-mode-list {
    grid-template-columns: 1fr;
  }

  .ai-mode-button {
    min-height: 112px;
    border-right: 0;
    border-bottom: 1px solid var(--ai-line);
  }

  .ai-mode-button:last-child {
    border-bottom: 0;
  }

  .ai-mode-copy small {
    max-width: none;
  }

  .ai-studio-foot {
    align-items: flex-end;
  }
}

@media (max-width: 480px) {
  .ai-studio-eyebrow {
    margin-bottom: 20px;
    font-size: 10px;
  }

  .ai-studio-head h2 {
    font-size: clamp(54px, 16vw, 72px);
    line-height: .81;
  }

  .ai-studio-lead {
    font-size: 17px;
  }

  .ai-studio-principles {
    display: grid;
    gap: 9px;
    margin-top: 22px;
  }

  .ai-system-state {
    max-width: 18ch;
    text-align: right;
  }

  .ai-core-stage {
    width: min(94vw, 310px);
  }

  .ai-core-copy {
    width: 138px;
  }

  .ai-mode-button {
    grid-template-columns: 26px 1fr auto;
    gap: 10px;
    min-height: 108px;
    padding: 20px 18px;
  }

  .ai-mode-copy strong {
    font-size: 21px;
  }

  .ai-studio-foot {
    display: grid;
    gap: 30px;
  }

  .ai-studio-foot p {
    font-size: clamp(42px, 13vw, 60px);
  }

  .ai-studio-link {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-network-ring.is-dashed,
  .ai-network-orbit,
  .ai-network-flow,
  .ai-network-node.is-hot,
  .ai-workbench.is-changing .ai-core-copy,
  .ai-workbench.is-changing .ai-network-node.is-hot {
    animation: none;
  }

  .ai-core-stage,
  .ai-mode-button,
  .ai-studio-link {
    transition: none;
  }
}
