/* AiShield: one page. Dark only, one accent (the lavender of the Nebula family), one radius system:
   panels 32 / 26 (a shell and its core), controls and chips pill, small marks 8. */

:root {
    --bg: #0e0f21;
    --panel: #14162a;
    --ink: #eceaff;
    --mute: #a9a6c9;
    --faint: #6f6d93;
    --accent: #b8abf7;
    --accent-deep: #9b8bf4;
    --line: rgba(255, 255, 255, 0.08);
    --color-primary-light: #b8abf7;           /* read by the scenario styles */
    --display: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
    --body: 'DM Sans', system-ui, sans-serif;
    --ease: cubic-bezier(0.32, 0.72, 0, 1);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
em { font-style: normal; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.wrap { width: min(1320px, 100% - clamp(32px, 7vw, 120px)); margin-inline: auto; }

/* a fine grain on a fixed layer, never on content that scrolls */
.grain { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0.045;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ---------- reveal on entry ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(44px); filter: blur(10px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* ---------- type ---------- */
h1, h2, h3, .say { font-family: var(--display); font-weight: 600; letter-spacing: -0.035em; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.9rem); line-height: 1.03; }
h2 em, h1 em, .say em { color: var(--accent); }
h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.15; letter-spacing: -0.025em; margin-bottom: 14px; }
p { color: var(--mute); }

/* ---------- buttons: pills, the arrow in its own circle ---------- */
.btn { display: inline-flex; align-items: center; gap: 16px; border-radius: 999px; font-weight: 600; font-size: 1rem; white-space: nowrap; cursor: pointer;
    transition: transform 0.6s var(--ease), background-color 0.4s var(--ease), border-color 0.4s var(--ease); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #14162a; padding: 8px 8px 8px 28px; box-shadow: 0 18px 50px -18px rgba(155, 139, 244, 0.7); }
.btn-primary:hover { background: #cbc1fb; }
.btn .ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(20, 22, 42, 0.14); font-style: normal; font-size: 1.1rem; transition: transform 0.6s var(--ease); }
.btn:hover .ico { transform: translate(3px, -2px) scale(1.06); }
.btn-ghost { padding: 17px 28px; border: 1px solid rgba(255, 255, 255, 0.18); color: var(--ink); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.3); }
.btn-lg { font-size: 1.1rem; padding-left: 34px; }
.btn-lg .ico { width: 50px; height: 50px; }

/* ---------- hero: the field fills the page, the words sit on its left ---------- */
.hero { position: relative; min-height: 100dvh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.field { position: absolute; inset: 0; z-index: 0; }
.field canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.field.no-3d { background: radial-gradient(60% 60% at 70% 45%, rgba(155, 139, 244, 0.28), transparent 70%); }
.hero-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(90deg, rgba(14, 15, 33, 0.94) 0%, rgba(14, 15, 33, 0.6) 32%, transparent 60%), linear-gradient(0deg, var(--bg) 0%, transparent 24%); }
.wordmark { position: absolute; z-index: 3; top: clamp(20px, 3.4vw, 36px); left: clamp(20px, 3.6vw, 48px); display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.02em; }
.wordmark img { height: 32px; width: auto; }
.hero-grid { position: relative; z-index: 2; padding-top: 140px; padding-bottom: clamp(48px, 11vh, 128px); }
.hero-copy { max-width: 41rem; }
.hero h1 { font-size: clamp(3.1rem, 7.6vw, 7.2rem); line-height: 0.94; letter-spacing: -0.05em; }
.lede { margin-top: clamp(20px, 3vh, 32px); font-size: clamp(1.05rem, 1.5vw, 1.28rem); line-height: 1.55; max-width: 34ch; color: #c4c1e2; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(28px, 4.4vh, 44px); }

/* the labels that follow the spy tags in 3D */
.fl-layer { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.fl { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: rgba(14, 15, 33, 0.78);
    border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); font-size: 0.78rem; font-weight: 600; line-height: 1; white-space: nowrap; transition: opacity 0.4s var(--ease); will-change: transform; }
.fl b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #14162a; font-size: 0.72rem; }
.fl span { font-variant-numeric: tabular-nums; color: var(--mute); min-width: 1.4ch; text-align: right; }
.fl.full span { color: var(--ink); }

/* ---------- the statement ---------- */
.statement { padding: clamp(120px, 26vh, 280px) 0; }
.say { font-size: clamp(2.5rem, 6.8vw, 6.4rem); line-height: 1.0; letter-spacing: -0.045em; max-width: 14em; }
.say .dim, .say .lit { display: block; }
.say .dim { color: #55537c; }
.say .lit { margin-top: 0.12em; }
.js .say .w { display: inline-block; opacity: 0; transform: translateY(0.45em); filter: blur(10px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); transition-delay: calc(var(--i) * 75ms); }
.js .say.is-in .w { opacity: 1; transform: none; filter: none; }

/* ---------- the three steps: a heading that stays, panels that pass ---------- */
.steps { padding: clamp(40px, 8vh, 100px) 0 clamp(100px, 18vh, 200px); }
.steps-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 7vw, 110px); align-items: start; }
.steps-head { position: sticky; top: 18vh; }
.steps-head p { margin-top: 22px; max-width: 36ch; font-size: 1.08rem; }
.steps-list { display: grid; gap: 18px; }
.steps-list h3 { margin-bottom: 12px; }
.steps-list p { max-width: 56ch; line-height: 1.68; }

/* the shell and its core: a plate seated in a tray */
.shell { display: flex; padding: 6px; border-radius: 32px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.07); }
.core { flex: 1; position: relative; border-radius: 26px; padding: clamp(24px, 2.6vw, 38px); background: linear-gradient(180deg, #181a37, #12142a); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.84rem; font-weight: 500; color: var(--ink); line-height: 1; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.8rem; color: #cfcce9; }
.chip.win { border-color: rgba(184, 171, 247, 0.5); color: var(--accent); }

/* ---------- the scenario ---------- */
.at-work-head { padding: clamp(40px, 8vh, 90px) 0 clamp(32px, 6vh, 64px); }
.at-work-head p { margin-top: 18px; font-size: 1.08rem; }
.sc-block { position: relative; }

/* ---------- what you need: a bento that is exactly five cells ---------- */
.needs { padding: clamp(100px, 20vh, 220px) 0 clamp(80px, 14vh, 160px); }
.needs-head p { margin-top: 18px; font-size: 1.08rem; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-top: clamp(40px, 7vh, 72px); }
.c-zero { grid-column: 1 / 6; grid-row: 1 / 3; }
.c-spy { grid-column: 6 / 13; grid-row: 1; }
.c-cluster { grid-column: 6 / 10; grid-row: 2; }
.c-keep { grid-column: 10 / 13; grid-row: 2; }
.c-api { grid-column: 1 / -1; }
.bento p { font-size: 0.98rem; line-height: 1.65; max-width: 52ch; }

.c-zero .core { overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 440px;
    background: radial-gradient(120% 80% at 18% 0%, rgba(155, 139, 244, 0.46), transparent 62%), linear-gradient(180deg, #181a37, #12142a); }
.c-zero .core::after { content: ''; position: absolute; right: -90px; top: -90px; width: 420px; height: 420px; border-radius: 50%; pointer-events: none;
    background: repeating-radial-gradient(circle at center, transparent 0 34px, rgba(255, 255, 255, 0.07) 35px 36px); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 70%); mask-image: radial-gradient(circle, #000 20%, transparent 70%); }
.zero { position: relative; z-index: 1; font-family: var(--display); font-weight: 600; font-size: clamp(9rem, 17vw, 15.5rem); line-height: 0.78; letter-spacing: -0.06em; color: var(--ink); margin-bottom: 28px; }
.c-zero h3, .c-zero p { position: relative; z-index: 1; }

.hexes { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.hx { --h: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); position: relative; display: grid; place-items: center; width: 62px; height: 56px; clip-path: var(--h); background: var(--c); font-size: 0.78rem; font-weight: 700; color: var(--c);
    transition: transform 0.7s var(--ease); transition-delay: calc(var(--i) * 45ms); }
.hx::before { content: ''; position: absolute; inset: 2px; clip-path: var(--h); background: #12142a; z-index: 0; }
.hx b { position: relative; z-index: 1; font-weight: 700; }
.shell:hover .hx { transform: translateY(-6px); }

.bays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 26px; max-width: 280px; }
.bay { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 7px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 0.18); }
.bay i { aspect-ratio: 1; border-radius: 2px; background: var(--c); opacity: 0.88; transition: transform 0.6s var(--ease); }
.bay i.s { background: transparent; border: 1.5px solid var(--c); border-radius: 50%; opacity: 1; }
.shell:hover .bay i { transform: scale(1.18); }

.keeps { display: grid; gap: 16px; margin-top: 8px; }
.keeps li { position: relative; padding-left: 34px; color: var(--ink); font-size: 1rem; font-weight: 500; }
.keeps li::before { content: ''; position: absolute; left: 2px; top: 0.34em; width: 15px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

.api { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.code { background: #0a0b1a; border-radius: 20px; padding: 22px 26px; border: 1px solid rgba(255, 255, 255, 0.06); min-width: 0; }
.code figcaption { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.code pre { margin: 0; overflow-x: auto; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.86rem; line-height: 1.75; color: #d8d5f2; }
.code code { font: inherit; }
.code .k { color: var(--accent); } .code .s { color: #7ee2a8; } .code .n { color: #ff9f43; } .code .p { color: var(--faint); }

/* ---------- the close ---------- */
.finale { position: relative; padding: clamp(120px, 24vh, 260px) 0; overflow: hidden;
    background: radial-gradient(70% 90% at 12% 110%, rgba(155, 139, 244, 0.3), transparent 70%), radial-gradient(40% 60% at 95% 0%, rgba(79, 174, 224, 0.1), transparent 70%); }
.finale h2 { font-size: clamp(2.8rem, 7.4vw, 6.8rem); line-height: 0.96; letter-spacing: -0.05em; max-width: 11em; margin-bottom: clamp(32px, 5vh, 52px); }

/* ---------- foot ---------- */
.foot { padding: 52px 0 64px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 7vw; align-items: start; }
.foot-brand p { margin-top: 14px; font-size: 0.86rem; color: var(--faint); }
.r4i { width: 92px; height: auto; aspect-ratio: 831 / 419; }
.fine { max-width: 66ch; font-size: 0.84rem; line-height: 1.75; color: var(--faint); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
    .hero-shade { background: linear-gradient(0deg, var(--bg) 0%, rgba(14, 15, 33, 0.9) 30%, transparent 64%); }
    .hero-grid { padding-top: 0; }
    .hero { align-items: flex-end; }
    .steps-grid { grid-template-columns: 1fr; }
    .steps-head { position: static; }
    .bento { grid-template-columns: 1fr; }
    .c-zero, .c-spy, .c-cluster, .c-keep, .c-api { grid-column: 1; grid-row: auto; }
    .c-zero .core { min-height: 340px; }
    .api { grid-template-columns: 1fr; }
    .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .btn { width: 100%; justify-content: space-between; }
    .btn-ghost { justify-content: center; }
    .actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js [data-reveal], .js .say .w { opacity: 1; transform: none; filter: none; transition: none; }
    .btn, .btn .ico, .hx, .bay i { transition: none; }
}
