/* =========================================================
   ALYSTRA — thème clair bleu / violet
   ========================================================= */
:root {
  --bg: #ffffff;
  --soft: #f5f6ff;
  --soft-2: #eef0ff;
  --ink: #0f1533;
  --ink-2: #2a3157;
  --muted: #5e6687;
  --line: #e4e7f5;
  --blue: #2563eb;
  --indigo: #4f46e5;
  --violet: #7c3aed;
  --pink: #c026d3;
  --navy: #14213d;
  --grad: linear-gradient(120deg, #2563eb 0%, #4f46e5 45%, #7c3aed 100%);
  --grad-soft: linear-gradient(120deg, rgba(37,99,235,.10), rgba(124,58,237,.10));
  --shadow-sm: 0 2px 10px -4px rgba(31, 41, 99, .12);
  --shadow: 0 24px 60px -28px rgba(49, 46, 129, .35);
  --shadow-lg: 0 40px 90px -40px rgba(49, 46, 129, .45);
  --radius: 22px;
  --max: 1240px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.65;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--violet); color: #fff; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }

h1, h2, h3, .wordmark { font-family: "Sora", "Inter", sans-serif; letter-spacing: -.025em; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 6vw, 5.1rem); line-height: 1.04; font-weight: 700; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.1; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.3; }

.grad {
  background: linear-gradient(100deg, #2563eb, #4f46e5 25%, #7c3aed 50%, #c026d3 70%, #2563eb);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 7s linear infinite;
}
@keyframes shine { to { background-position: -250% 0; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .74rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--indigo); padding: 8px 16px; border-radius: 999px;
  background: var(--grad-soft); border: 1px solid rgba(79,70,229,.18);
}
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 4px rgba(124,58,237,.18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(124,58,237,0); } }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; border-radius: 999px; font-weight: 600; font-size: .95rem; font-family: inherit;
  border: 1px solid transparent; cursor: pointer; overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), box-shadow .4s, color .3s, border-color .3s, background .3s;
}
.btn svg { transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: #121318; color: #fff; }
.btn-primary:hover { background: #3a3fd4; transform: translateY(-2px); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: rgba(79,70,229,.45); color: var(--indigo); }
.btn-white { background: #fff; color: var(--indigo); }
.btn-white:hover { box-shadow: 0 16px 40px -12px rgba(0,0,0,.35); }
.btn-outline-white { border-color: rgba(255,255,255,.45); color: #fff; }
.btn-outline-white:hover { background: rgba(255,255,255,.12); }

/* ---------- Global effects ---------- */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100; background: var(--grad); }
.cursor-glow { position: fixed; width: 560px; height: 560px; border-radius: 50%; pointer-events: none; z-index: 0; background: radial-gradient(circle, rgba(124,58,237,.07), transparent 60%); transform: translate(-50%, -50%); left: -700px; top: -700px; }
main, header, footer, section { position: relative; }
main { z-index: 2; }

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 300; background: #fff; display: grid; place-items: center; transition: opacity .7s var(--ease), visibility .7s; }
.loader.done { opacity: 0; visibility: hidden; }
.loader svg { width: 84px; height: 84px; overflow: visible; }
.loader .l0 { transform-origin: 32px 32px; transform: scale(0) rotate(-30deg); animation: tilein .7s var(--ease) forwards; }
.loader .l1, .loader .l2 { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; }
.loader .l1 { stroke-width: 6; animation: draw .7s .35s var(--ease) forwards; }
.loader .l2 { stroke-width: 3.2; animation: draw .6s .7s var(--ease) forwards; }
.loader .l3 { opacity: 0; transform-origin: 51.5px 25.2px; animation: spark .5s 1.1s var(--ease) forwards; }
@keyframes tilein { to { transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spark { 0% { opacity: 0; transform: scale(0); } 60% { opacity: 1; transform: scale(1.8); } 100% { opacity: 1; transform: scale(1); } }

/* ---------- Header ---------- */
.header { position: fixed; top: 14px; left: 0; right: 0; z-index: 80; transition: transform .5s var(--ease); }
.header.hide { transform: translateY(-140%); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 10px 10px 10px 20px; border-radius: 999px; border: 1px solid transparent;
  transition: background .4s, border-color .4s, box-shadow .4s;
}
.header.scrolled .header-inner { background: rgba(255,255,255,.82); border-color: var(--line); box-shadow: var(--shadow-sm); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand svg { width: 38px; height: 38px; transition: transform .6s var(--ease); filter: drop-shadow(0 6px 12px rgba(79,70,229,.35)); }
.brand:hover svg { transform: rotate(-8deg) scale(1.06); }
.wordmark { font-weight: 700; letter-spacing: .2em; font-size: 1.08rem; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav > a, .dd > button { padding: 10px 15px; border-radius: 999px; font-size: .9rem; font-weight: 500; color: var(--ink-2); transition: color .3s, background .3s; background: none; border: 0; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 6px; }
.nav > a:hover, .dd > button:hover, .nav > a.active { color: var(--indigo); background: var(--soft-2); }
.nav .btn { margin-left: 8px; padding: 12px 22px; color: #fff; }
.nav > a.btn-primary { background: #121318; color: #fff; }
.nav > a.btn-primary:hover { background: #3a3fd4; color: #fff; }
.dd { position: relative; }
.dd-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; width: 340px; padding: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: all .35s var(--ease);
}
.dd:hover .dd-menu, .dd:focus-within .dd-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dd-menu a { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: 14px; transition: background .25s; }
.dd-menu a:hover { background: var(--soft); }
.dd-menu .ic { flex: 0 0 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); color: var(--indigo); }
.dd-menu .ic svg { width: 20px; height: 20px; }
.dd-menu b { display: block; font-size: .92rem; color: var(--ink); }
.dd-menu small { color: var(--muted); font-size: .8rem; line-height: 1.4; display: block; }

.burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; position: relative; flex-shrink: 0; }
.burger span { position: absolute; left: 14px; right: 14px; height: 2px; border-radius: 2px; background: var(--ink); transition: .4s var(--ease); }
.burger span:nth-child(1) { top: 18px; } .burger span:nth-child(2) { top: 26px; }
.burger.open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

/* Mobile menu (hors du header pour éviter les bugs d'affichage) */
.mmenu {
  position: fixed; inset: 0; z-index: 75; background: #fff;
  display: flex; flex-direction: column; justify-content: center; padding: 100px 28px 40px; gap: 6px;
  opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility .45s; overflow-y: auto;
}
.mmenu.open { opacity: 1; visibility: visible; }
.mmenu a:not(.btn) { font-family: "Sora"; font-size: 1.55rem; font-weight: 600; color: var(--ink); padding: 8px 0; opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease), color .3s; }
.mmenu a.sub { font-size: 1.05rem; font-weight: 500; color: var(--muted); padding: 4px 0 4px 16px; }
.mmenu.open a { opacity: 1; transform: none; }
.mmenu a:hover { color: var(--indigo); }
.mmenu .btn { margin-top: 22px; align-self: flex-start; }
.mmenu .m-contact { margin-top: 26px; color: var(--muted); font-size: .9rem; display: grid; gap: 4px; }
.mmenu .m-contact a:not(.btn) { font-family: "Inter"; font-size: 1rem; font-weight: 500; color: var(--indigo); padding: 2px 0; }
body.menu-open .header .header-inner { background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 150px 0 100px; overflow: hidden; background: linear-gradient(180deg, #f7f8ff 0%, #fff 100%); }
#net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); z-index: 0; animation: float 18s ease-in-out infinite; }
.blob.b1 { width: 540px; height: 540px; background: rgba(124,58,237,.22); top: -160px; right: -120px; }
.blob.b2 { width: 460px; height: 460px; background: rgba(37,99,235,.18); bottom: -180px; left: -140px; animation-delay: -6s; }
.blob.b3 { width: 320px; height: 320px; background: rgba(192,38,211,.12); top: 35%; left: 42%; animation-delay: -12s; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(60px,-40px) scale(1.08); } 66% { transform: translate(-40px,50px) scale(.95); } }

.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 { margin: 24px 0; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero h1 .line > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease); }
body.loaded .hero h1 .line > span { transform: none; }
.hero h1 .line:nth-child(2) > span { transition-delay: .1s; }
.hero h1 .line:nth-child(3) > span { transition-delay: .2s; }
.rotator { display: inline-grid !important; justify-items: start; text-align: left; vertical-align: bottom; }
.rotator > span { grid-area: 1/1; opacity: 0; transform: translateY(45%); filter: blur(6px); transition: opacity .6s, transform .8s var(--ease), filter .6s; white-space: nowrap; }
.rotator > span.on { opacity: 1; transform: none; filter: none; }
.hero .lead { font-size: 1.13rem; color: var(--muted); max-width: 560px; margin-bottom: 36px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 40px; color: var(--muted); font-size: .9rem; }
.hero-points span { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { color: var(--violet); }

.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
body.loaded .fade-up { opacity: 1; transform: none; }
body.loaded .fade-up.d1 { transition-delay: .3s; } body.loaded .fade-up.d2 { transition-delay: .45s; } body.loaded .fade-up.d3 { transition-delay: .6s; }

.hero-visual { position: relative; height: 580px; }
.hv-main { position: absolute; inset: 0 40px 60px 40px; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-lg); }
.hv-main img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); transition: transform 1.6s var(--ease); }
body.loaded .hv-main img { transform: scale(1); }
.hv-main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(37,99,235,.12), rgba(124,58,237,.28)); mix-blend-mode: multiply; }
.hv-second { position: absolute; width: 210px; height: 240px; right: 0; bottom: 0; border-radius: 24px; overflow: hidden; border: 6px solid #fff; box-shadow: var(--shadow-lg); animation: bob 6s ease-in-out infinite; }
.hv-second img { width: 100%; height: 100%; object-fit: cover; }
.chip {
  position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 14px; border-radius: 10px;
  background: #fff; border: 1px solid #e3e1da; box-shadow: 0 12px 30px -18px rgba(18,19,24,.35);
  font-size: .84rem; animation: bob 7s ease-in-out infinite;
}
.chip b { display: block; font-family: "Inter", sans-serif; font-weight: 600; font-size: .9rem; color: #121318; letter-spacing: -.01em; }
.chip small { color: #6b6c72; font-size: .78rem; }
.chip .live { position: relative; flex: 0 0 10px; height: 10px; border-radius: 50%; background: #16a34a; margin: 0 4px; }
.chip .live::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid #16a34a; animation: livepulse 2s ease-out infinite; }
@keyframes livepulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.chip .ok { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #121318; color: #fff; }
.chip .ok svg { width: 13px; height: 13px; }
.chip.c1 { top: 40px; left: 0; animation-delay: -2s; }
.chip.c2 { bottom: 110px; left: 8px; animation-delay: -4s; }
.chip .bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.chip .bars i { width: 5px; background: var(--grad); border-radius: 2px; animation: eq 1.2s ease-in-out infinite; }
.chip .bars i:nth-child(2) { animation-delay: -.3s; } .chip .bars i:nth-child(3) { animation-delay: -.6s; } .chip .bars i:nth-child(4) { animation-delay: -.9s; }
@keyframes eq { 0%,100% { height: 30%; } 50% { height: 100%; } }
@keyframes bob { 50% { transform: translateY(-14px); } }

/* ---------- Marquee ---------- */
.marquee { padding: 26px 0; overflow: hidden; background: var(--ink); }
.marquee-track { display: flex; gap: 50px; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-family: "Sora"; font-size: clamp(1.2rem, 2.4vw, 1.8rem); font-weight: 600; color: #fff; white-space: nowrap; display: flex; align-items: center; gap: 50px; }
.marquee span:nth-child(even) { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.5); }
.marquee span::after { content: "✦"; color: #a78bfa; -webkit-text-stroke: 0; font-size: .7em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section.block { padding: 130px 0; }
section.alt { background: var(--soft); }
.head { max-width: 760px; margin-bottom: 64px; }
.head h2 { margin: 20px 0 16px; }
.head p { color: var(--muted); font-size: 1.08rem; }
.head.center { text-align: center; margin-inline: auto; }

.reveal { opacity: 0; transform: translateY(46px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-img { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease); }
.reveal-img.in { clip-path: inset(0 0 0 0); }
.split .w { display: inline-block; opacity: .2; transition: opacity .4s; }
.split .w.lit { opacity: 1; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-media { position: relative; height: 600px; }
.about-media .m1 { position: absolute; inset: 0 90px 90px 0; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); }
.about-media .m2 { position: absolute; right: 0; bottom: 0; width: 55%; height: 48%; border-radius: 24px; overflow: hidden; border: 6px solid #fff; box-shadow: var(--shadow-lg); }
.about-media img { width: 100%; height: 120%; object-fit: cover; will-change: transform; }
.about-text .big { font-family: "Sora"; font-size: clamp(1.35rem, 2.2vw, 1.9rem); line-height: 1.4; font-weight: 600; margin: 24px 0; color: var(--ink); }
.about-text p.muted { color: var(--muted); margin-bottom: 32px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { padding: 22px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.stat b { font-family: "Sora"; font-size: 2.1rem; font-weight: 700; display: block; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat small { color: var(--muted); font-size: .82rem; }

/* ---------- Expertise cards (photo) ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pillar { position: relative; display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .5s var(--ease), box-shadow .5s, border-color .4s; transform-style: preserve-3d; }
.pillar:hover { box-shadow: var(--shadow-lg); border-color: rgba(79,70,229,.3); }
.pillar .ph { position: relative; height: 240px; overflow: hidden; }
.pillar .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.pillar:hover .ph img { transform: scale(1.08); }
.pillar .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(15,21,51,.35)); }
.pillar .tag { position: absolute; top: 16px; left: 16px; z-index: 2; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--indigo); }
.pillar .body { padding: 28px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.pillar h3 { font-size: 1.4rem; margin-bottom: 10px; }
.pillar p { color: var(--muted); font-size: .95rem; }
.pillar ul { list-style: none; margin: 18px 0 24px; display: grid; gap: 8px; }
.pillar li { display: flex; gap: 10px; font-size: .9rem; color: var(--ink-2); }
.pillar li::before { content: ""; flex: 0 0 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--grad-soft) center/10px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='4'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.pillar .more { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--indigo); font-size: .93rem; }
.pillar .more svg { transition: transform .4s var(--ease); }
.pillar:hover .more svg { transform: translateX(6px); }

/* ---------- 10 services IA : vitrine interactive ---------- */
.ais {
  position: relative; display: grid; grid-template-columns: 1fr 1.08fr; gap: 28px; padding: 28px;
  border-radius: 34px; overflow: hidden; color: #fff;
  background: radial-gradient(700px 500px at 0% 0%, rgba(37,99,235,.45), transparent 60%),
              radial-gradient(700px 500px at 100% 100%, rgba(147,51,234,.5), transparent 60%), #0c1033;
  box-shadow: 0 50px 110px -50px rgba(49,46,129,.8);
}
.ais-bg { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(circle at 70% 40%, #000, transparent 75%); -webkit-mask-image: radial-gradient(circle at 70% 40%, #000, transparent 75%); }
.ais-bg i { position: absolute; width: 320px; height: 320px; border-radius: 50%; filter: blur(70px); background: rgba(124,58,237,.45); animation: float 14s ease-in-out infinite; right: 10%; top: 10%; }
.ais-bg i + i { background: rgba(37,99,235,.4); left: 5%; top: auto; bottom: 0; animation-delay: -7s; }
.ais-list { position: relative; z-index: 1; list-style: none; display: grid; gap: 6px; align-content: start; counter-reset: none; }
.ais-tab {
  width: 100%; display: flex; align-items: center; gap: 16px; padding: 15px 18px; border-radius: 16px;
  background: transparent; border: 1px solid transparent; color: rgba(255,255,255,.62); cursor: pointer;
  font: inherit; text-align: left; position: relative; overflow: hidden; transition: color .35s, background .35s, border-color .35s;
}
.ais-tab::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #60a5fa, #c084fc); transform: scaleY(0); transition: transform .45s var(--ease); }
.ais-tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.ais-item.active .ais-tab { color: #fff; background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.12); }
.ais-item.active .ais-tab::before { transform: scaleY(1); }
.ais-tab .n { font-family: "Sora"; font-size: .78rem; font-weight: 600; letter-spacing: .12em; color: #a5b4fc; min-width: 22px; }
.ais-tab .t { flex: 1; font-family: "Sora"; font-weight: 600; font-size: 1rem; letter-spacing: -.01em; }
.ais-tab .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.07); color: #c7d2fe; transition: background .35s, color .35s, transform .45s var(--ease); }
.ais-tab .ic svg { width: 18px; height: 18px; }
.ais-item.active .ais-tab .ic { background: var(--grad); color: #fff; transform: rotate(-8deg) scale(1.06); }
.ais-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.ais-detail > div { overflow: hidden; }
.ais-detail p { color: rgba(255,255,255,.75); font-size: .93rem; padding: 4px 18px 0 56px; }
.ais-detail .chips { padding: 12px 18px 16px 56px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: .78rem; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); color: #e0e7ff; }

.ais-panel {
  position: relative; z-index: 1; border-radius: 26px; padding: 40px; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); min-height: 100%;
}
.ais-num { position: absolute; right: 24px; top: -10px; font-family: "Sora"; font-weight: 700; font-size: 11rem; line-height: 1; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.14); user-select: none; transition: opacity .4s, transform .6s var(--ease); }
.ais-icon { position: relative; width: 120px; height: 120px; display: grid; place-items: center; margin-bottom: 30px; }
.ais-icon .tile { width: 78px; height: 78px; border-radius: 24px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 20px 40px -12px rgba(124,58,237,.9), inset 0 1px 0 rgba(255,255,255,.35); color: #fff; position: relative; z-index: 2; transition: transform .6s var(--ease); }
.ais-icon .tile svg { width: 36px; height: 36px; }
.ais-icon .orb { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(255,255,255,.28); animation: rot 16s linear infinite; }
.ais-icon .orb::after { content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: #c4b5fd; box-shadow: 0 0 12px #c4b5fd; }
.ais-icon .o2 { inset: -18px; border-style: solid; border-color: rgba(255,255,255,.1); animation-duration: 24s; animation-direction: reverse; }
.ais-icon .o2::after { background: #93c5fd; box-shadow: 0 0 12px #93c5fd; }
@keyframes rot { to { transform: rotate(360deg); } }
.ais-content { position: relative; transition: opacity .35s, transform .5s var(--ease); }
.ais-count { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #a5b4fc; }
.ais-count b { color: #fff; }
.ais-content h3 { color: #fff; font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin: 10px 0 14px; letter-spacing: -.02em; }
.ais-content p { color: rgba(255,255,255,.8); font-size: 1.04rem; max-width: 480px; margin-bottom: 22px; }
.ais-panel.swap .ais-content, .ais-panel.swap .ais-num { opacity: 0; transform: translateY(16px); }
.ais-panel.swap .ais-icon .tile { transform: scale(.7) rotate(-20deg); }
.ais-foot { margin-top: auto; padding-top: 34px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ais-arrows { display: flex; gap: 8px; }
.ais-arrows button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .3s, transform .3s var(--ease); }
.ais-arrows button:hover { background: rgba(255,255,255,.18); transform: scale(1.06); }
.ais-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.08); }
.ais-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #60a5fa, #c084fc); }
.ais-progress i.run { animation: aisbar 6s linear forwards; }
.ais:hover .ais-progress i.run { animation-play-state: paused; }
@keyframes aisbar { to { width: 100%; } }

/* chat demo */
.demo { display: grid; grid-template-columns: .95fr 1.05fr; gap: 60px; align-items: center; margin-top: 100px; }
.chat { border-radius: 28px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.chat-top { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--soft); }
.chat-top .av { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); }
.chat-top .av svg { width: 40px; height: 40px; }
.chat-top .av { border: 0; background: none; }
.chat-top strong { font-family: "Sora"; font-size: .95rem; display: block; }
.chat-top small { color: #16a34a; font-size: .76rem; }
.chat-body { padding: 24px 22px; display: flex; flex-direction: column; gap: 12px; height: 380px; overflow: hidden; }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 18px; font-size: .92rem; line-height: 1.5; animation: pop .5s var(--ease) both; }
.msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; }
.msg.bot { align-self: flex-start; background: var(--soft); border: 1px solid var(--line); border-bottom-left-radius: 6px; color: var(--ink-2); }
.msg.bot b { color: var(--indigo); }
.typing { align-self: flex-start; display: flex; gap: 5px; padding: 14px 16px; border-radius: 18px; background: var(--soft); border: 1px solid var(--line); animation: pop .4s var(--ease) both; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.chat-input { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.chat-input span { flex: 1; }
.chat-input i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-style: normal; }

/* ---------- Dev section (split) ---------- */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.device { position: relative; height: 560px; }
.device .screen { position: absolute; inset: 0 0 80px 60px; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); background: #fff; }
.device .screen .bar { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 16px; background: var(--soft); border-bottom: 1px solid var(--line); }
.device .screen .bar i { width: 11px; height: 11px; border-radius: 50%; background: #e3e6f3; }
.device .screen .bar i:nth-child(1) { background: #f87171; } .device .screen .bar i:nth-child(2) { background: #fbbf24; } .device .screen .bar i:nth-child(3) { background: #34d399; }
.device .screen img { width: 100%; height: calc(100% - 38px); object-fit: cover; }
.device .phone { position: absolute; left: 0; bottom: 0; width: 190px; height: 380px; border-radius: 34px; padding: 10px; background: var(--ink); box-shadow: var(--shadow-lg); animation: bob 7s ease-in-out infinite; }
.device .phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; }
.offer-list { display: grid; gap: 12px; margin-top: 34px; }
.offer { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); transition: transform .5s var(--ease), border-color .4s, box-shadow .4s; }
.offer:hover { transform: translateX(8px); border-color: rgba(79,70,229,.35); box-shadow: var(--shadow); }
.offer .ic { flex: 0 0 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.offer .ic svg { width: 22px; height: 22px; }
.offer h3 { font-size: 1.02rem; margin-bottom: 3px; }
.offer p { color: var(--muted); font-size: .9rem; }

/* ---------- Process ---------- */
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.timeline .track { position: absolute; top: 34px; left: 34px; right: 34px; height: 3px; border-radius: 3px; background: var(--line); }
.timeline .fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: var(--grad); transition: width .2s linear; }
.step .dot { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); font-family: "Sora"; font-weight: 700; color: var(--muted); position: relative; z-index: 2; transition: all .6s var(--ease); }
.step.on .dot { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 12px 30px -8px rgba(124,58,237,.6); }
.step h3 { margin: 24px 0 10px; }
.step p { color: var(--muted); font-size: .94rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 0 24px; transition: border-color .3s, box-shadow .3s; }
.faq details[open] { border-color: rgba(79,70,229,.35); box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 0; font-family: "Sora"; font-weight: 600; font-size: 1.02rem; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-soft); color: var(--indigo); font-size: 1.3rem; font-weight: 400; transition: transform .4s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 22px; }

/* ---------- CTA ---------- */
.cta { padding: 0 0 130px; }
.cta-box { position: relative; border-radius: 6px; overflow: hidden; padding: 0; text-align: left; background: #121318; color: #f6f4ef; display: grid; grid-template-columns: 1.15fr .85fr; min-height: 460px; }
.cta-box .inner { margin: 0 !important; max-width: none !important; padding: 80px 56px; align-self: center; }
.cta-photo { position: relative; overflow: hidden; min-height: 100%; }
.cta-photo img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; filter: grayscale(.2); }
.cta-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #121318 0%, rgba(18,19,24,0) 35%); }
@media (max-width: 900px) {
  .cta-box { grid-template-columns: 1fr; min-height: 0; }
  .cta-photo { order: -1; height: 240px; min-height: 0; }
  .cta-photo::after { background: linear-gradient(0deg, #121318 0%, rgba(18,19,24,0) 45%); }
  .cta-box .inner { padding: 36px 26px 44px; }
}
.cta-box h2 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: clamp(2.4rem, 5.4vw, 4.8rem); line-height: 1.02; letter-spacing: -.015em; color: #f6f4ef !important; }
.cta-box h2 em { font-style: italic; color: #a5a8ff; }
.cta-box p { color: rgba(246,244,239,.7) !important; max-width: 560px; }
.cta-box .btns { justify-content: flex-start !important; align-items: center; gap: 26px !important; }
.cta-box .btn-white { background: #f6f4ef; color: #121318; }
.cta-box .btn-white:hover { background: #fff; box-shadow: none; transform: translateY(-2px); }
.cta-tel { font-size: .92rem; color: rgba(246,244,239,.7); border-bottom: 1px solid rgba(246,244,239,.25); padding-bottom: 2px; transition: color .3s, border-color .3s; }
.cta-tel:hover { color: #f6f4ef; border-color: #f6f4ef; }
.cta-box .rings { position: absolute; inset: 0; pointer-events: none; }
.cta-box .rings i { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; transform: translate(-50%, -50%); animation: ring 6s linear infinite; }
.cta-box .rings i:nth-child(1) { width: 300px; height: 300px; }
.cta-box .rings i:nth-child(2) { width: 300px; height: 300px; animation-delay: -2s; }
.cta-box .rings i:nth-child(3) { width: 300px; height: 300px; animation-delay: -4s; }
@keyframes ring { from { width: 200px; height: 200px; opacity: 1; } to { width: 1300px; height: 1300px; opacity: 0; } }
.cta-box .inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.cta-box h2 { color: #fff; margin-bottom: 18px; }
.cta-box p { color: rgba(255,255,255,.85); margin-bottom: 34px; font-size: 1.08rem; }
.cta-box .btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 50px; align-items: start; }
.info { display: grid; gap: 12px; }
.info-item { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); transition: border-color .4s, transform .5s var(--ease), box-shadow .4s; }
a.info-item:hover { border-color: rgba(79,70,229,.4); transform: translateY(-3px); box-shadow: var(--shadow); }
.info-item .ic { flex: 0 0 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.info-item .ic svg { width: 21px; height: 21px; }
.info-item small { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; }
.info-item span { font-weight: 600; word-break: break-word; color: var(--ink); }
form.contact { padding: 40px; border-radius: 28px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; gap: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { position: relative; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: var(--soft);
  border: 1px solid var(--line); border-radius: 14px; padding: 24px 16px 10px; transition: border-color .3s, box-shadow .3s, background .3s;
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--indigo) 50%), linear-gradient(135deg, var(--indigo) 50%, transparent 50%); background-position: calc(100% - 22px) 55%, calc(100% - 16px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.field textarea { min-height: 140px; resize: vertical; }
.field label { position: absolute; left: 17px; top: 17px; font-size: .92rem; color: var(--muted); pointer-events: none; transition: all .3s var(--ease); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--indigo); background: #fff; box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select + label { top: 7px; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--indigo); font-weight: 600; }
.form-note { font-size: .8rem; color: var(--muted); }

/* ---------- Page hero (pages expertise) ---------- */
.page-hero { padding: 170px 0 90px; overflow: hidden; background: linear-gradient(180deg, #f5f6ff, #fff); }
.page-hero .grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); margin: 22px 0; }
.page-hero .lead { color: var(--muted); font-size: 1.12rem; margin-bottom: 34px; max-width: 560px; }
.page-hero .ph { position: relative; height: 460px; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-lg); }
.page-hero .ph img { width: 100%; height: 100%; object-fit: cover; }
.page-hero .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(37,99,235,.1), rgba(124,58,237,.3)); mix-blend-mode: multiply; }
.crumbs { font-size: .85rem; color: var(--muted); }
.crumbs a:hover { color: var(--indigo); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat-grid.two { grid-template-columns: repeat(2, 1fr); }
.box { padding: 30px 28px; border-radius: 22px; background: #fff; border: 1px solid var(--line); transition: transform .5s var(--ease), box-shadow .5s, border-color .4s; }
.box:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(79,70,229,.3); }
.box .ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 18px; }
.box .ic svg { width: 24px; height: 24px; }
.box h3 { margin-bottom: 8px; }
.box p { color: var(--muted); font-size: .94rem; }
.box ul { list-style: none; margin-top: 14px; display: grid; gap: 6px; }
.box li { font-size: .88rem; color: var(--ink-2); padding-left: 18px; position: relative; }
.box li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.usecases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.usecase { padding: 24px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.usecase b { display: block; font-family: "Sora"; margin-bottom: 6px; }
.usecase p { color: var(--muted); font-size: .88rem; }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: rgba(255,255,255,.65); padding: 90px 0 30px; overflow: hidden; z-index: 2; }
.foot-big { font-family: "Sora"; font-weight: 700; font-size: clamp(3.2rem, 15vw, 12.5rem); line-height: .9; letter-spacing: .04em; text-align: center; background: linear-gradient(180deg, rgba(167,139,250,.35), rgba(167,139,250,0)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 60px; user-select: none; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; font-size: .9rem; }
footer h4 { color: #fff; font-family: "Sora"; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 18px; font-weight: 600; }
footer ul { list-style: none; display: grid; gap: 9px; }
footer a { transition: color .3s; }
footer a:hover { color: #c4b5fd; }
footer .brand svg { color: #fff; }
footer .wordmark { color: #fff; }
.foot-legal { margin-top: 60px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: .8rem; color: rgba(255,255,255,.4); }

/* ---------- Legal ---------- */
.legal { padding: 170px 0 100px; }
.legal h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin: 20px 0 40px; }
.legal h2 { font-size: 1.3rem; margin: 40px 0 14px; }
.legal p, .legal li { color: var(--muted); margin-bottom: 8px; }
.legal a { color: var(--indigo); }
.legal .box p { color: var(--ink); margin: 5px 0; }
.legal .box:hover { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .ais { grid-template-columns: 1fr; padding: 14px; border-radius: 28px; }
  .ais-panel { display: none; }
  .ais-item.active .ais-detail { grid-template-rows: 1fr; }
  .ais-tab { padding: 16px 14px; }
}
@media (min-width: 1081px) {
  .ais-detail { display: none; }
}
@media (max-width: 1180px) {
  .nav > a, .dd > button { padding: 10px 11px; }
}
@media (max-width: 1080px) {
  .pillars { grid-template-columns: 1fr 1fr; }
  .usecases { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .nav { display: none; }
  .burger { display: block; z-index: 90; }
  .hero-grid, .about-grid, .demo, .split-grid, .contact-grid, .page-hero .grid { grid-template-columns: 1fr; }
  .hero-visual { height: 460px; }
  .about-media { height: 480px; }
  .device { height: 480px; }
  .timeline { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .timeline .track { display: none; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  section.block { padding: 96px 0; }
  .demo { margin-top: 70px; }
  .page-hero .ph { height: 340px; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .header { top: 10px; }
  .header-inner { padding-left: 14px; }
  .wordmark { font-size: .92rem; letter-spacing: .26em; }
  .hero { padding: 120px 0 70px; min-height: auto; }
  .hero-visual { height: 380px; }
  .hv-main { inset: 0 0 50px 0; }
  .hv-second { width: 140px; height: 160px; }
  .chip { padding: 10px 13px; font-size: .76rem; }
  .chip.c1 { left: -4px; top: 16px; }
  .chip.c2 { bottom: 70px; left: -4px; }
  .pillars, .ai-grid, .stats, .row, .timeline, .foot-grid, .feat-grid, .feat-grid.two, .usecases { grid-template-columns: 1fr; }
  .about-media { height: 400px; }
  .about-media .m1 { inset: 0 40px 70px 0; }
  .device { height: 400px; }
  .device .screen { inset: 0 0 60px 40px; }
  .device .phone { width: 140px; height: 280px; border-radius: 26px; padding: 7px; }
  .device .phone img { border-radius: 20px; }
  form.contact { padding: 22px; }
  .cta-box { border-radius: 6px; }
  .page-hero { padding: 130px 0 70px; }
  .cursor-glow { display: none; }
  .faq details { padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .fade-up { opacity: 1; transform: none; }
  .reveal-img { clip-path: none; }
  .hero h1 .line > span { transform: none; }
}
