/* ===== motion + team visualization ===== */

/* scroll progress */
#progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--accent), #ffb199); transform: scaleX(0); transform-origin: left; z-index: 60; }
.nav-links a { transition: color .2s ease; position: relative; }
.nav-links a.active { color: #fff; }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 1px; background: var(--accent); }

/* hero entrance + words */
@keyframes up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero .wrap > .label { animation: up .8s cubic-bezier(.2,.7,.2,1) .05s both; }
.hero .wrap > .lead { animation: up .9s cubic-bezier(.2,.7,.2,1) .7s both; }
.hero .wrap > .hero-cta { animation: up .9s cubic-bezier(.2,.7,.2,1) .85s both; }
.hero .wrap > .hero-note { animation: up .9s cubic-bezier(.2,.7,.2,1) 1s both; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em .1em 0; margin-bottom: -.1em; }
.wi { display: inline-block; transform: translateY(110%); animation: wordup .9s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(.15s + var(--wi) * .09s); }
@keyframes wordup { to { transform: none; } }

#dots { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg::after { translate: var(--gx, 0px) var(--gy, 0px); transition: translate .8s cubic-bezier(.2,.7,.2,1); }

/* marquee */
.marquee { border-top: 1px solid var(--line); overflow: hidden; padding: 20px 0; background: var(--bg); }
.marquee-track { display: flex; gap: 34px; width: max-content; animation: marquee 38s linear infinite; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.marquee-track i { font-style: normal; color: var(--accent); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* stagger reveal */
.stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.7,.2,1), background-color .25s ease; transition-delay: calc(var(--i, 0) * 85ms); }
.rv.stagger { opacity: 1; transform: none; }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.done > * { transition-delay: 0s; }

/* spotlight on hover */
.spot { --mx: -400px; --my: -400px; }
.card.spot, .card.spot:hover, .mini.spot, .mini.spot:hover, .cell.spot, .role.spot, .role.spot:hover {
  background-image: radial-gradient(320px circle at var(--mx) var(--my), rgba(255,77,46,.13), transparent 62%);
}
.card.spot:hover, .role.spot:hover { background-color: var(--bg-2); }

/* steps line */
.steps { position: relative; }
.steps::after { content: ""; position: absolute; top: 0; left: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--accent), rgba(255,77,46,0)); transform: scaleX(0); transform-origin: left; transition: transform 2s cubic-bezier(.2,.7,.2,1) .2s; }
.steps.in::after { transform: scaleX(1); }
.step .n { display: inline-block; transition: color .3s ease; }
.steps.in .step .n { animation: numglow 1.2s ease both; animation-delay: calc(var(--i, 0) * .35s + .3s); }
@keyframes numglow { 0% { text-shadow: 0 0 0 transparent; } 40% { text-shadow: 0 0 14px var(--accent); color: #fff; } 100% { text-shadow: 0 0 0 transparent; } }

/* animated border on price card */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.price-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--ang), transparent 0 55%, var(--accent) 80%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 7s linear infinite; pointer-events: none; }
@keyframes spin { to { --ang: 360deg; } }
.ticks li { opacity: 0; transform: translateX(-10px); }
.price-card.in .ticks li { animation: tick .6s ease forwards; animation-delay: calc(var(--i, 0) * .08s + .3s); }
@keyframes tick { to { opacity: 1; transform: none; } }

/* buttons shine */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.65), transparent); transform: skewX(-20deg); animation: shine 4.5s ease-in-out infinite; pointer-events: none; }
.btn-primary:hover::after { animation: none; opacity: 0; }
@keyframes shine { 0%, 55% { left: -60%; } 100% { left: 140%; } }

/* ===== team visualization ===== */
.team { display: grid; grid-template-columns: 1.45fr 1fr; gap: 20px; }
.team-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: clamp(20px, 2.6vw, 32px); display: flex; flex-direction: column; gap: 22px; }
.team-panel.us { border-color: var(--line-2); background: linear-gradient(160deg, rgba(255,77,46,.10), transparent 55%), var(--bg-2); position: relative; overflow: hidden; }
.panel-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cost-tag { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .04em; }
.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; flex: 1; align-items: stretch; }
.role .sal { margin-top: auto; }
.role svg { margin-bottom: 8px; }
.role { border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 16px; background-color: var(--bg-2); display: flex; flex-direction: column; }
.role h3 { font-size: 18px; margin-top: 6px; }
.role p { color: var(--muted); font-size: 13.5px; line-height: 1.35; margin-top: 4px; min-height: 2.7em; }
.sal { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); display: flex; align-items: baseline; gap: 6px; }
.sal b { font-size: 26px; font-weight: 500; letter-spacing: -0.04em; color: #fff; }
.sal span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.total { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 20px; margin-top: auto; }
.total > div { display: grid; gap: 4px; }
.total strong { font-size: clamp(30px, 3.4vw, 44px); font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
.total p { color: var(--muted); font-size: 14px; max-width: 30ch; }
.us-total strong { color: var(--accent); }

/* svg drawing */
.role svg, .scene svg { width: 100%; height: auto; overflow: visible; fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.deskline { stroke: rgba(255,255,255,.28); }
.monitor rect { fill: #0a0a0a; stroke: rgba(255,255,255,.5); }
.monitor line { stroke: rgba(255,255,255,.35); }
.monitor .glyph, .monitor .code, .monitor .check, .monitor .bars { stroke: var(--accent); }
.glyph circle { fill: rgba(255,77,46,.25); animation: nodepulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.glyph circle:nth-child(2) { animation-delay: .4s; } .glyph circle:nth-child(3) { animation-delay: .8s; }
@keyframes nodepulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.5); } }
.code path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: codeflow 3.2s ease-in-out infinite; }
@keyframes codeflow { 0% { stroke-dashoffset: 60; } 40%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -60; } }
.check path { stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw 3.4s ease-in-out infinite; }
@keyframes draw { 0% { stroke-dashoffset: 80; } 35%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 80; } }
.bars path { transform-box: fill-box; transform-origin: bottom; animation: bar 2.2s ease-in-out infinite; stroke-width: 4; }
.bars path:nth-child(2) { animation-delay: .25s; } .bars path:nth-child(3) { animation-delay: .5s; } .bars path:nth-child(4) { animation-delay: .75s; } .bars path:nth-child(5) { animation-delay: 1s; }
@keyframes bar { 0%,100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
.person .body { fill: #151515; stroke: rgba(255,255,255,.5); }
.person .head, .hero-person .head { fill: #1b1b1b; stroke: rgba(255,255,255,.6); }
.person .hair, .hero-person .hair { fill: rgba(255,255,255,.14); stroke: rgba(255,255,255,.5); }
.person { animation: bob 4s ease-in-out infinite; }
.role:nth-child(2) .person { animation-delay: -1s; } .role:nth-child(3) .person { animation-delay: -2s; } .role:nth-child(4) .person { animation-delay: -3s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
.badge rect { fill: var(--accent-soft); stroke: var(--accent); }
.badge path, .badge circle, .badge ellipse { stroke: var(--accent); }
.float { animation: floaty 3.2s ease-in-out infinite; }
.float.d2 { animation-delay: -.8s; } .float.d3 { animation-delay: -1.6s; } .float.d4 { animation-delay: -2.4s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Ilarium scene */
.scene { position: relative; }
.scene svg { stroke-width: 1.6; }
.aura { animation: aura 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes aura { 0%,100% { transform: scale(.94); opacity: .8; } 50% { transform: scale(1.05); opacity: 1; } }
.orbit-line { stroke: rgba(255,255,255,.16); stroke-dasharray: 3 6; animation: dashmove 24s linear infinite; }
@keyframes dashmove { to { stroke-dashoffset: -180; } }
.agent { offset-path: path("M 305 120 A 125 88 0 1 1 55 120 A 125 88 0 1 1 305 120"); offset-rotate: 0deg; animation: orbit 22s linear infinite; }
.agent.a2 { animation-delay: -5.5s; } .agent.a3 { animation-delay: -11s; } .agent.a4 { animation-delay: -16.5s; }
@keyframes orbit { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.agent rect { fill: #0e0e0e; stroke: var(--accent); }
.agent circle { fill: #fff; stroke: none; animation: blink 4s infinite; transform-box: fill-box; transform-origin: center; }
.agent path { stroke: var(--accent); }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.hero-person .body { fill: #171717; stroke: rgba(255,255,255,.6); }
.stamp circle { fill: var(--accent); stroke: none; }
.stamp path { stroke: #fff; stroke-width: 2.2; }
.stamp { transform-box: fill-box; transform-origin: center; animation: stamp 3.6s ease-in-out infinite; }
@keyframes stamp { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.35); } 90% { transform: scale(.95); } }
.chip { position: absolute; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(5,5,5,.8); color: var(--muted); animation: floaty 4s ease-in-out infinite; }
.c-a { top: 8%; left: 4%; } .c-b { top: 14%; right: 4%; animation-delay: -1s; } .c-c { bottom: 18%; left: 2%; animation-delay: -2s; } .c-d { bottom: 12%; right: 3%; animation-delay: -3s; }
.us-text { color: #d0d0cb; font-size: 16px; }
.us-text b { color: #fff; font-weight: 500; }

@media (max-width: 1180px) {
  .team { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .roles { grid-template-columns: repeat(2, 1fr); }
  .chip { font-size: 10px; padding: 4px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .wi { transform: none; animation: none; }
  .hero .wrap > * { animation: none !important; }
  .marquee-track, .orbit-line, .agent, .aura, .float, .person, .chip, .stamp, .glyph circle, .bars path, .price-card::before, .btn-primary::after { animation: none !important; }
  .code path, .check path { stroke-dashoffset: 0; animation: none; }
  .agent { offset-distance: 0%; }
  .stagger > *, .ticks li { opacity: 1; transform: none; transition: none; }
  .steps::after { transform: none; transition: none; }
}

/* button pairs */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row .btn { flex: 0 1 auto; }
form .btn-row .btn { flex: 1 1 200px; }
@media (max-width: 560px) { .price-card .btn-row .btn { width: 100%; justify-content: center; } }

/* ===== integrations ===== */
.api-big { text-align: right; display: grid; gap: 6px; justify-items: end; }
.api-big span { font-size: clamp(64px, 9vw, 120px); font-weight: 500; letter-spacing: -0.07em; line-height: .9; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.55); transition: color .4s ease, -webkit-text-stroke-color .4s ease; }
.api-big:hover span { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.api-big small { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.pill { font-family: var(--sans); font-size: 14px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); transition: all .2s ease; }
.pill:hover { color: #fff; border-color: #fff; }
.pill.active { background: #fff; color: #050505; border-color: #fff; }
.tools { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tool { aspect-ratio: 1.15; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 14px; text-align: center; background-color: var(--bg); transition: background-color .25s ease; }
.tool img { width: 34px; height: 34px; opacity: .72; transition: opacity .25s ease, transform .35s cubic-bezier(.2,.7,.2,1); }
.tool span { font-size: 14.5px; letter-spacing: -0.01em; color: #cfcfca; }
.tool:hover { background-color: var(--bg-2); }
.tool:hover img { opacity: 1; transform: scale(1.14) translateY(-2px); }
.tool.spot, .tool.spot:hover { background-image: radial-gradient(240px circle at var(--mx) var(--my), rgba(255,77,46,.13), transparent 62%); }
.tool.show { animation: toolin .5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--k, 0) * 25ms); }
.tool.hidden { display: none; }
@keyframes toolin { from { opacity: 0; transform: scale(.92) translateY(10px); } to { opacity: 1; transform: none; } }
.tools-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); }
@media (max-width: 1080px) { .tools { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .tools { grid-template-columns: repeat(3, 1fr); } .api-big { text-align: left; justify-items: start; } .tool span { font-size: 13px; } }
@media (max-width: 480px) { .tools { grid-template-columns: repeat(2, 1fr); } .filters { flex-wrap: nowrap; overflow-x: auto; margin-right: calc(var(--pad) * -1); padding-right: var(--pad); scrollbar-width: none; } .pill { white-space: nowrap; flex: none; } }
@media (prefers-reduced-motion: reduce) { .tool.show { animation: none; } }

.tool .mono { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0; transition: color .25s ease, border-color .25s ease, transform .35s cubic-bezier(.2,.7,.2,1); }
.tool:hover .mono { color: var(--accent); border-color: var(--accent); transform: scale(1.14) translateY(-2px); }
.head > div > .lead { margin-top: 20px; }

/* ===== manifest ===== */
.statement { padding: clamp(80px, 12vw, 160px) 0; }
.manifest { margin-top: 28px; font-size: clamp(34px, 6vw, 84px); font-weight: 500; letter-spacing: -0.055em; line-height: 1.02; max-width: 20ch; }
.manifest .mw { color: #3b3b38; transition: color .35s ease; }
.manifest .mw.lit { color: #fff; }
.manifest .mw.accent.lit { color: var(--accent); }
.manifest-en { margin-top: 36px; font-family: var(--mono); font-size: clamp(12px, 1.2vw, 14px); letter-spacing: .02em; color: var(--muted); max-width: 60ch; opacity: 0; transform: translateY(10px); transition: opacity .8s ease .2s, transform .8s ease .2s; }
.manifest-en.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .manifest .mw { color: #fff; } .manifest .mw.accent { color: var(--accent); } .manifest-en { opacity: 1; transform: none; transition: none; } }
