/* ============================================================
   AIIN home page (index.html) — visual system "v4 combined"
   Loaded after style.css + aiin.css, only on the home page.
   Dark is default; light overrides live at the END of the file.
   ============================================================ */

:root {
  --bg: #07080D;
  --card: #10131D;
  --card2: rgba(255, 255, 255, 0.03);
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text: #F4F6FB;
  --muted: #8B93A7;
  --dots: rgba(255, 255, 255, 0.045);
  --blob-op: 0.5;
  --card-shadow: 0 22px 55px rgba(0, 0, 0, 0.4);
  --chip-bg: rgba(13, 17, 28, 0.85);
  --glow1: rgba(139, 92, 246, 0.15);
  --glow2: rgba(6, 182, 212, 0.1);
  --glow3: rgba(244, 114, 182, 0.07);
  --grad: linear-gradient(120deg, var(--primary), var(--secondary));
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  /* product "screens" (demo, dashboard, code) stay dark in both themes */
  --scr-bg: #0B0E17;
  --scr-card: #121624;
  --scr-line: rgba(255, 255, 255, 0.09);
  --scr-soft: rgba(255, 255, 255, 0.05);
  --scr-text: #C9D3E8;
  --scr-muted: #7C85A0;
}

/* ---------- content gate until i18n dict lands ---------- */
main.home {
  transition: opacity 0.4s ease;
}
body:not(.i18n-ready) main.home {
  opacity: 0;
}

/* ---------- backdrop: aurora + dots + faint cursor grid ---------- */
#homeGridCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(52% 38% at 18% 0%, var(--glow1), transparent 70%),
    radial-gradient(46% 36% at 85% 8%, var(--glow2), transparent 70%),
    radial-gradient(40% 30% at 50% 105%, var(--glow3), transparent 70%);
}
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: var(--blob-op);
  transition: opacity 0.45s;
}
.bg-aurora .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}
.bg-aurora .b1 { width: 46vw; height: 46vw; top: -22%; left: -12%; background: radial-gradient(circle, rgba(139,92,246,.5), transparent 65%); animation: drift1 30s ease-in-out infinite alternate; }
.bg-aurora .b2 { width: 38vw; height: 38vw; top: -8%; right: -14%; background: radial-gradient(circle, rgba(6,182,212,.38), transparent 65%); animation: drift2 36s ease-in-out infinite alternate; }
.bg-aurora .b3 { width: 32vw; height: 32vw; bottom: -20%; left: 26%; background: radial-gradient(circle, rgba(244,114,182,.28), transparent 65%); animation: drift3 42s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(8vw, 6vh) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-7vw, 8vh) scale(1.07); } }
@keyframes drift3 { to { transform: translate(6vw, -7vh) scale(1.12); } }
.bg-dots {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 70%, transparent);
}
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 1001;
  background: var(--grad);
}

/* ---------- shared bits ---------- */
.home section {
  position: relative;
  padding: 108px 0;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.28);
  font: 600 0.76rem var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-glow);
  margin-bottom: 20px;
}
.home h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 16px;
}
.section-lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 720px;
  margin: 0 0 44px;
}
.section-lead a {
  color: var(--secondary-glow);
  border-bottom: 1px solid rgba(103, 232, 249, 0.35);
}
.grad-text {
  background: linear-gradient(100deg, var(--primary-glow), var(--secondary-glow) 60%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.reveal {
  opacity: 0;
  transform: translateY(34px);
  filter: blur(6px);
  transition: opacity 0.85s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.85s cubic-bezier(0.2, 0.6, 0.2, 1), filter 0.85s;
}
.reveal.in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
.home .btn {
  border-radius: 999px;
}
.home code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(139, 92, 246, 0.13);
  color: var(--primary-glow);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(139, 92, 246, 0.22);
}

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 150px 0 90px;
  background: none; /* old .hero background override */
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.06fr;
  gap: 60px;
  align-items: center;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.08);
  font: 600 0.76rem var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-glow);
  margin-bottom: 28px;
}
.hero-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 10px #4ADE80;
  animation: blink-dot 2s infinite;
}
@keyframes blink-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero-copy h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.8rem, 5.4vw, 4.9rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}
.hero-copy h1 .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  filter: blur(8px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.65, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.65, 0.2, 1), filter 0.7s;
}
.hero-copy h1.play .w {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
.subheadline {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 520px;
  margin: 0 0 38px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 42px;
  flex-wrap: wrap;
}
.providers {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}
.providers-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-right: 4px;
}
.provider-badge {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font: 600 0.85rem 'Manrope', sans-serif;
  color: var(--text);
  transition: 0.25s;
  cursor: default;
}
.provider-badge:hover {
  border-color: var(--primary-glow);
  transform: translateY(-2px);
}

/* ---------- hero live demo (product screen, always dark) ---------- */
.demo {
  position: relative;
}
.demo-glow {
  position: absolute;
  inset: -8% -6%;
  background: radial-gradient(50% 50% at 50% 40%, rgba(139, 92, 246, 0.2), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.demo-win {
  position: relative;
  border-radius: 22px;
  background: var(--scr-bg);
  border: 1px solid var(--scr-line);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transform: rotate(1.1deg);
  transition: transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
  color: var(--scr-text);
}
.demo:hover .demo-win {
  transform: rotate(0);
}
.demo-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--scr-soft);
  background: rgba(255, 255, 255, 0.02);
}
.demo-head .tl { width: 11px; height: 11px; border-radius: 50%; }
.demo-head .tl:nth-child(1) { background: #FF5F57; }
.demo-head .tl:nth-child(2) { background: #FEBC2E; }
.demo-head .tl:nth-child(3) { background: #28C840; }
.demo-tabs {
  display: flex;
  gap: 4px;
  margin-left: 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 3px;
}
.demo-tabs button {
  border: 0;
  background: transparent;
  color: var(--scr-muted);
  font: 600 0.78rem 'Manrope', sans-serif;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.25s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.demo-tabs button.active {
  background: var(--grad);
  color: #fff;
}
.demo-replay {
  margin-left: auto;
  background: none;
  border: 1px solid var(--scr-line);
  color: var(--scr-muted);
  width: 30px;
  height: 30px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s;
}
.demo-replay:hover {
  color: var(--secondary-glow);
  border-color: var(--secondary);
  transform: rotate(-30deg);
}
.demo-replay svg { width: 14px; height: 14px; }
.demo-body {
  height: 380px;
  position: relative;
}
.demo-pane {
  position: absolute;
  inset: 0;
  padding: 22px;
  display: none;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.demo-pane.active { display: flex; }
.msg {
  max-width: 82%;
  padding: 13px 17px;
  border-radius: 19px;
  font-size: 0.94rem;
  line-height: 1.55;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s, transform 0.35s;
}
.msg.show { opacity: 1; transform: none; }
.msg-user {
  align-self: flex-end;
  background: var(--grad);
  border-bottom-right-radius: 6px;
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.3);
}
.msg-ai {
  align-self: flex-start;
  background: var(--scr-card);
  border: 1px solid var(--scr-line);
  border-bottom-left-radius: 6px;
  color: var(--scr-text);
}
.msg-ai .caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--secondary-glow);
  vertical-align: -2px;
  margin-left: 2px;
  animation: caret-b 1s step-end infinite;
}
@keyframes caret-b { 50% { opacity: 0; } }
.typing {
  align-self: flex-start;
  display: none;
  gap: 5px;
  padding: 14px 18px;
  background: var(--scr-card);
  border: 1px solid var(--scr-line);
  border-radius: 19px;
  border-bottom-left-radius: 6px;
}
.typing.show { display: flex; }
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--scr-muted);
  animation: tp 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes tp { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }
.msg-meta {
  align-self: flex-start;
  font: 500 0.72rem var(--mono);
  color: var(--scr-muted);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.msg-meta.show { opacity: 1; }
.msg-meta .ok { color: #4ADE80; }
.demo-input {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 11px 12px 11px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--scr-line);
}
.demo-input .ph {
  color: var(--scr-muted);
  font-size: 0.88rem;
  flex: 1;
}
.demo-input .send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
  flex-shrink: 0;
}
.demo-input .send svg { width: 15px; height: 15px; color: #fff; }
.pane-api {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--scr-text);
}
.pane-api .ln {
  opacity: 0;
  transform: translateX(-6px);
  transition: 0.3s;
  white-space: pre-wrap;
  word-break: break-all;
}
.pane-api .ln.show { opacity: 1; transform: none; }
.tok-c { color: var(--secondary-glow); }
.tok-s { color: #A3E635; }
.tok-k { color: var(--primary-glow); }
.tok-m { color: var(--scr-muted); }
.tok-ok { color: #4ADE80; }
.sse {
  border-left: 2px solid rgba(6, 182, 212, 0.4);
  padding-left: 12px;
  margin-left: 2px;
}

/* ---------- how: orbit + steps ---------- */
.how-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 70px;
  align-items: center;
  margin-top: 30px;
}
.orbit-visual {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  margin: 0 auto;
}
.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(139, 92, 246, 0.25);
}
.orbit-ring.r1 { inset: 4%; animation: spin 42s linear infinite; }
.orbit-ring.r2 { inset: 18%; border-color: rgba(6, 182, 212, 0.2); animation: spin 30s linear infinite reverse; }
.orbit-ring.r1::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-glow);
  box-shadow: 0 0 14px var(--primary);
}
.orbit-ring.r2::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary-glow);
  box-shadow: 0 0 12px var(--secondary);
}
@keyframes spin { to { transform: rotate(360deg); } }
.links-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.links-svg line {
  stroke: url(#homeLineGrad);
  stroke-width: 0.35;
  stroke-dasharray: 2 2.4;
  opacity: 0.5;
  animation: dash 3s linear infinite;
}
@keyframes dash { to { stroke-dashoffset: -22; } }
.core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.13));
  border: 1px solid rgba(139, 92, 246, 0.4);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 80px rgba(139, 92, 246, 0.3), inset 0 0 40px rgba(255, 255, 255, 0.05);
  animation: core-breathe 5s ease-in-out infinite;
}
@keyframes core-breathe {
  0%, 100% { box-shadow: 0 0 60px rgba(139, 92, 246, 0.26), inset 0 0 40px rgba(255, 255, 255, 0.05); }
  50% { box-shadow: 0 0 110px rgba(139, 92, 246, 0.45), inset 0 0 50px rgba(255, 255, 255, 0.08); }
}
.core .brand-wordmark { font-size: 1.42rem; }
.chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 17px;
  border-radius: 16px;
  background: var(--chip-bg);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font: 600 0.84rem 'Manrope', sans-serif;
  color: var(--text);
  box-shadow: var(--card-shadow);
  animation: float 7s ease-in-out infinite;
  transition: border-color 0.3s;
}
.chip:hover { border-color: var(--secondary); }
.chip svg { width: 17px; height: 17px; }
.chip.c1 { top: 7%; left: 0; color: var(--primary-glow); }
.chip.c2 { top: 2%; right: 5%; color: var(--secondary-glow); animation-delay: -1.6s; }
.chip.c3 { top: 47%; right: -6%; color: var(--accent); animation-delay: -3.2s; }
.chip.c4 { bottom: 14%; left: -5%; color: var(--secondary-glow); animation-delay: -4.8s; }
.chip.c5 { bottom: 0; right: 13%; color: var(--primary-glow); animation-delay: -6s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.steps-list {
  display: flex;
  flex-direction: column;
}
.step-row {
  display: flex;
  gap: 26px;
  padding: 30px 10px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.3s, padding 0.3s;
  border-radius: 14px;
}
.step-row:first-child { border-top: 1px solid var(--line-soft); }
.step-row:hover { background: var(--card2); padding-left: 20px; }
.step-num {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(139, 92, 246, 0.6);
  flex-shrink: 0;
  width: 80px;
  transition: 0.3s;
}
.step-row:hover .step-num {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px transparent;
}
.step-row h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.24rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.step-row p {
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 480px;
  margin: 0;
}

/* ---------- features bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.b-card {
  position: relative;
  padding: 32px 29px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line-soft);
  box-shadow: var(--card-shadow);
  transition: transform 0.35s, border-color 0.35s, background 0.45s;
  transform-style: preserve-3d;
}
.b-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(139, 92, 246, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.b-card:hover::before { opacity: 1; }
.b-card:hover { border-color: rgba(139, 92, 246, 0.4); }
.b-card.wide { grid-column: span 2; }
.b-ico {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.b-ico svg { width: 23px; height: 23px; color: var(--primary-glow); }
.b-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.17rem;
  font-weight: 700;
  margin: 0 0 9px;
}
.b-card p {
  color: var(--muted);
  font-size: 0.94rem;
  margin: 0;
}

/* ---------- dashboard mock (product screen, always dark) ---------- */
.stage {
  position: relative;
  max-width: 880px;
  margin: 0 auto 70px;
  perspective: 1400px;
}
.stage-floaters {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.f-chip {
  position: absolute;
  padding: 12px 18px;
  border-radius: 16px;
  font: 600 0.83rem 'Manrope', sans-serif;
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(16, 17, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  color: #fff;
  animation: float 8s ease-in-out infinite;
}
.f-chip svg { width: 16px; height: 16px; }
.f-chip.f1 { top: -24px; left: -30px; color: var(--secondary-glow); }
.f-chip.f2 { bottom: -20px; right: -24px; color: var(--primary-glow); animation-delay: -4s; }
.dash {
  border-radius: 26px;
  overflow: hidden;
  background: var(--scr-bg);
  border: 1px solid var(--scr-line);
  box-shadow: 0 50px 110px rgba(0, 0, 0, 0.5);
  text-align: left;
  color: var(--scr-text);
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
}
.dash-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--scr-soft);
}
.dash-head .tl { width: 11px; height: 11px; border-radius: 50%; }
.dash-head .tl:nth-child(1) { background: #FF5F57; }
.dash-head .tl:nth-child(2) { background: #FEBC2E; }
.dash-head .tl:nth-child(3) { background: #28C840; }
.dash-head .url {
  margin-left: 14px;
  font: 500 0.78rem var(--mono);
  color: var(--scr-muted);
  padding: 5px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--scr-soft);
}
.dash-head .live {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  font: 600 0.72rem var(--mono);
  color: #4ADE80;
}
.dash-head .live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 10px #4ADE80;
  animation: blink-dot 1.6s infinite;
}
.dash-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.dash-col { padding: 26px 28px; }
.dash-col + .dash-col { border-left: 1px solid var(--scr-soft); }
.dash-label {
  font: 600 0.72rem var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--scr-muted);
  margin-bottom: 10px;
}
.dash-balance {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 3.3rem;
  letter-spacing: -0.02em;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dash-balance small { font-size: 1.15rem; }
.dash-sub {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.09);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ADE80;
  font: 600 0.8rem 'Manrope', sans-serif;
}
.usage-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.usage-row .u-name { width: 82px; font: 600 0.8rem 'Manrope', sans-serif; color: var(--scr-muted); }
.usage-row .u-bar { flex: 1; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.usage-row .u-fill { height: 100%; width: 0; border-radius: 999px; background: var(--grad); transition: width 1.2s cubic-bezier(0.2, 0.6, 0.2, 1); }
.usage-row .u-val { width: 38px; text-align: right; font: 500 0.74rem var(--mono); color: var(--scr-muted); }
.key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--scr-soft);
  font: 500 0.8rem var(--mono);
  color: var(--scr-muted);
}
.key-row .k { flex: 1; letter-spacing: 0.04em; }
.key-row svg { width: 15px; height: 15px; color: var(--primary-glow); }
.req-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 16px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--scr-soft);
  font: 500 0.76rem var(--mono);
  color: var(--scr-text);
}
.req-row .m { color: var(--secondary-glow); }
.req-row .code200 { color: #4ADE80; }
.req-row .t { margin-left: auto; color: var(--scr-muted); }

/* ---------- pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 0 0 54px;
  align-items: stretch;
}
.p-card {
  position: relative;
  padding: 36px 30px;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--card-shadow);
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s, background 0.45s;
}
.p-card:hover {
  transform: translateY(-8px);
  border-color: var(--line);
}
.p-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.13rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0;
}
.p-price {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.9rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
.p-price small {
  font-size: 1.05rem;
  color: var(--muted);
  font-weight: 700;
}
.p-muted {
  color: var(--muted);
  font-size: 0.93rem;
  margin: 0 0 22px;
}
.p-card .btn { margin-top: auto; }
.p-card.featured {
  background: linear-gradient(165deg, rgba(139, 92, 246, 0.13), rgba(6, 182, 212, 0.06));
  transform: translateY(-10px);
  box-shadow: 0 28px 70px rgba(139, 92, 246, 0.22);
}
.p-card.featured:hover { transform: translateY(-16px); }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.p-card.featured::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 26px;
  padding: 1.5px;
  background: conic-gradient(from var(--ang), var(--primary), var(--secondary), var(--accent), var(--primary));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rot-ang 5s linear infinite;
  pointer-events: none;
}
@keyframes rot-ang { to { --ang: 360deg; } }
.p-card.featured .p-price {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- code (product screen, always dark) ---------- */
.code-wrap {
  border-radius: 22px;
  overflow: hidden;
  background: var(--scr-bg);
  border: 1px solid var(--scr-line);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}
.code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--scr-soft);
  background: rgba(255, 255, 255, 0.02);
}
.code-head .tl { width: 11px; height: 11px; border-radius: 50%; }
.code-head .tl:nth-child(1) { background: #FF5F57; }
.code-head .tl:nth-child(2) { background: #FEBC2E; }
.code-head .tl:nth-child(3) { background: #28C840; }
.code-head span {
  margin-left: 10px;
  font: 500 0.8rem var(--mono);
  color: var(--scr-muted);
}
.copy-btn {
  margin-left: auto;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--primary-glow);
  font: 600 0.75rem var(--mono);
  padding: 6px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}
.copy-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  color: #fff;
}
.code-wrap pre {
  padding: 24px 26px;
  overflow-x: auto;
  font: 400 0.88rem/1.75 var(--mono);
  color: var(--scr-text);
  margin: 0;
}

/* ---------- faq ---------- */
.faq-list { max-width: 820px; }
.faq-item {
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--card);
  margin-bottom: 13px;
  overflow: hidden;
  transition: border-color 0.3s, background 0.45s;
}
.faq-item.open { border-color: rgba(139, 92, 246, 0.45); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 25px;
  background: none;
  border: 0;
  color: var(--text);
  font: 600 1.03rem 'Manrope', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}
.faq-q:hover { color: var(--primary-glow); }
.faq-x {
  flex-shrink: 0;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: 0.35s;
  background: var(--card2);
}
.faq-x::before, .faq-x::after {
  content: '';
  position: absolute;
  background: var(--primary-glow);
  transition: 0.35s;
}
.faq-x::before { width: 11px; height: 1.6px; }
.faq-x::after { width: 1.6px; height: 11px; }
.faq-item.open .faq-x {
  background: var(--grad);
  border-color: transparent;
  transform: rotate(135deg);
}
.faq-item.open .faq-x::before, .faq-item.open .faq-x::after { background: #fff; }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-a-in {
  padding: 0 25px 23px;
  color: var(--muted);
  font-size: 0.96rem;
}
.faq-a-in a {
  color: var(--secondary-glow);
  border-bottom: 1px solid rgba(103, 232, 249, 0.3);
}

/* ---------- cta ---------- */
.cta-panel {
  position: relative;
  border-radius: 32px;
  padding: 92px 40px;
  text-align: center;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: linear-gradient(140deg, rgba(139, 92, 246, 0.16), rgba(6, 182, 212, 0.08));
}
.cta-panel::before {
  content: '';
  position: absolute;
  top: -60%;
  left: 20%;
  width: 60%;
  height: 220%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.08), transparent);
  transform: rotate(20deg);
  pointer-events: none;
}
.cta-panel h2 {
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  margin: 0 0 14px;
}
.cta-panel p {
  color: var(--muted);
  font-size: 1.12rem;
  margin: 0 0 36px;
}
.cta-panel .btn { position: relative; z-index: 2; }

/* ---------- footer (overrides shared .footer for the new look) ---------- */
.home-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line-soft);
  background: var(--card2);
  backdrop-filter: blur(10px);
  transition: background 0.45s;
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .how-grid { grid-template-columns: 1fr; gap: 56px; }
  .orbit-visual { max-width: 400px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .b-card.wide { grid-column: span 2; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; margin-bottom: 48px; }
  .p-card.featured { transform: none; }
  .p-card.featured:hover { transform: translateY(-8px); }
  .dash-body { grid-template-columns: 1fr; }
  .dash-col + .dash-col { border-left: 0; border-top: 1px solid var(--scr-soft); }
  .f-chip.f1 { left: 0; }
  .f-chip.f2 { right: 0; }
}
@media (max-width: 640px) {
  .home section { padding: 74px 0; }
  .bento { grid-template-columns: 1fr; }
  .b-card.wide { grid-column: span 1; }
  .hero { padding-top: 118px; }
  .demo-body { height: 340px; }
  .f-chip { display: none; }
  .step-num { width: 66px; font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .bg-aurora .blob, .orbit-ring, .chip, .f-chip, .core, .p-card.featured::before { animation: none; }
}

/* ============================================================
   ---- light theme overrides (keep at the END of the file) ----
   ============================================================ */
[data-theme="light"] {
  --bg: #F3F5FA;
  --card: #FFFFFF;
  --card2: rgba(13, 17, 32, 0.025);
  --line: rgba(13, 17, 32, 0.1);
  --line-soft: rgba(13, 17, 32, 0.06);
  --text: #0D1220;
  --muted: #5B6379;
  --dots: rgba(13, 17, 32, 0.055);
  --blob-op: 0.3;
  --card-shadow: 0 20px 50px rgba(30, 41, 82, 0.12);
  --chip-bg: rgba(255, 255, 255, 0.9);
  --glow1: rgba(139, 92, 246, 0.13);
  --glow2: rgba(6, 182, 212, 0.1);
  --glow3: rgba(244, 114, 182, 0.08);
}
[data-theme="light"] .section-tag,
[data-theme="light"] .hero-pill { color: #7C3AED; }
[data-theme="light"] .grad-text {
  background: linear-gradient(100deg, #7C3AED, #0891B2 60%, #DB2777);
  -webkit-background-clip: text;
  background-clip: text;
}
[data-theme="light"] .section-lead a,
[data-theme="light"] .faq-a-in a { color: #0891B2; }
[data-theme="light"] .home code { color: #7C3AED; }
