
.page-ag { background: var(--deep); }
.ag { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 var(--pad) 96px; }
.ag-screen { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 104px 0 48px; }
.ag-label { font-size: 15px; font-weight: 700; color: var(--lime); }
.ag-lead { margin-top: 16px; font-size: 18px; color: var(--muted); max-width: 30em; }

.ag-hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(28px, 5vw, 72px); }
.ag-hero h1 { margin-top: 10px; font-size: clamp(56px, 7.4vw, 112px); line-height: 1.02; letter-spacing: -.01em;
  background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .12em; margin-bottom: -.12em; }
.ag-a .ag-lead { font-size: clamp(18px, 1.6vw, 22px); color: var(--text); }

.demo { margin: 0; }
.demo [hidden] { display: none !important; }
.demo-win { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); border-radius: 20px; overflow: hidden;
  background: rgba(16,18,16,.62); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--glass-edge), 0 40px 100px rgba(0,0,0,.55); font-size: 13px; line-height: 1.6; }
.demo-doc { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 22px 18px; border-right: 1px solid rgba(255,255,255,.07); }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.demo-file { font-size: 12px; font-weight: 700; color: var(--muted); }
.demo-send { position: relative; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--lime); box-shadow: 0 2px 8px rgba(133,234,4,.45); }
.demo-send > svg { width: 19px; height: 19px; }
.demo-stage { position: relative; aspect-ratio: 3 / 2; }
.demo-text { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.demo-media { position: absolute; inset: 0; border-radius: 8px; overflow: hidden; background: #f1f1f3; }
.demo-media img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.demo-after { opacity: 0; }
.demo-box { position: absolute; width: var(--w); height: var(--h); border-radius: 3px; border: 1.5px solid var(--lime); background: rgba(133,234,4,.18); opacity: 0; }
.demo-grip { position: absolute; right: -10px; bottom: -10px; width: 20px; height: 20px; opacity: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); animation: demo-grip 8s infinite; }
.demo-grip svg { display: block; width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; }
.demo-line { height: 8px; border-radius: 4px; background: rgba(255,255,255,.09); }
.demo-sel { margin: 2px 0 6px; color: var(--text); }
.demo-hl { color: inherit; border-radius: 2px; background: linear-gradient(rgba(133,234,4,.34), rgba(133,234,4,.34)) no-repeat 0 0 / 100% 100%; }
.demo-chat { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 18px; background: rgba(255,255,255,.025); }
.demo-me, .demo-ai { max-width: 92%; padding: 9px 12px; border-radius: 14px; }
.demo-me { align-self: flex-end; border-bottom-right-radius: 4px; background: rgba(255,255,255,.1); transform-origin: 100% 100%; }
.demo-me q { display: block; margin-bottom: 6px; padding-left: 8px; font-size: 12px; color: var(--muted); border-left: 2px solid var(--lime); quotes: none; }
.demo-ai { align-self: flex-start; border-bottom-left-radius: 4px; background: rgba(133,234,4,.1); box-shadow: inset 0 0 0 1px rgba(133,234,4,.22); transform-origin: 0 100%; }
.demo-typing { position: absolute; left: 18px; bottom: 18px; display: flex; gap: 4px; padding: 11px 12px; border-radius: 14px; border-bottom-left-radius: 4px;
  background: rgba(133,234,4,.1); box-shadow: inset 0 0 0 1px rgba(133,234,4,.22); opacity: 0; transform-origin: 0 100%; }
.demo-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); animation: dot 1s ease-in-out infinite; }
.demo-typing i:nth-child(2) { animation-delay: .15s; } .demo-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.demo-cursor { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; opacity: 0; z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); animation: demo-cursor 8s infinite; }
.demo-cursor svg { position: absolute; width: 20px; height: 20px; }
.demo-arrow { left: -4px; top: -3px; fill: #fff; stroke: #111; stroke-width: 1.2; stroke-linejoin: round; animation: demo-arrow 8s infinite; }
.demo-ibeam { left: -10px; top: -10px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; animation: demo-ibeam 8s infinite; }
.demo:not([data-scene="0"]) .demo-ibeam { display: none; }
.demo-hl { animation: demo-hl 8s infinite; }
.demo-box { animation: demo-box 8s infinite; }
.demo-after { animation: demo-after 8s infinite; }
.demo-stage, .demo-file { animation: demo-swap 8s infinite; }
.demo-send { animation: demo-press 8s infinite; }
.demo-send::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(133,234,4,.7); opacity: 0; animation: demo-ring 8s infinite; }
.demo-me { animation: demo-me 8s infinite; }
.demo-ai { animation: demo-ai 8s infinite; }
.demo-typing { animation: demo-typing 8s infinite; }
@keyframes demo-cursor {
  0% { opacity: 0; transform: translate(var(--x0, 18px), var(--y0, 120px)); }
  2.5% { opacity: 1; transform: translate(var(--x0, 18px), var(--y0, 120px)); animation-timing-function: linear; }
  12.5% { opacity: 1; transform: translate(var(--x1, 160px), var(--y1, 145px)); }
  14% { transform: translate(var(--x1, 160px), var(--y1, 145px)); animation-timing-function: cubic-bezier(.3,0,.1,1); }
  22% { transform: translate(var(--x2, 250px), var(--y2, 29px)); }
  24.5% { transform: translate(var(--x2, 250px), var(--y2, 29px)) scale(.82); }
  27% { opacity: 1; transform: translate(var(--x2, 250px), var(--y2, 29px)); }
  36% { opacity: 1; transform: translate(var(--x2, 250px), var(--y2, 29px)); }
  42%, 100% { opacity: 0; transform: translate(calc(var(--x2, 250px) + 8px), calc(var(--y2, 29px) + 10px)); }
}
@keyframes demo-ibeam { 0%, 13% { opacity: 1; } 13.5%, 100% { opacity: 0; } }
@keyframes demo-arrow { 0%, 13% { opacity: 0; } 13.5%, 100% { opacity: 1; } }
@keyframes demo-hl {
  0%, 2.5% { background-size: 0 100%; animation-timing-function: linear; }
  7.45% { background-size: var(--hl-a, 25%) 100%; animation-timing-function: steps(1, end); }
  7.55% { background-size: var(--hl-b, 70%) 100%; animation-timing-function: linear; }
  12.5% { background-size: 100% 100%; }
  90% { background-size: 100% 100%; opacity: 1; }
  96% { background-size: 100% 100%; opacity: 0; }
  100% { background-size: 0 100%; opacity: 0; }
}
@keyframes demo-box {
  0%, 2.5% { opacity: 1; width: 0; height: 0; animation-timing-function: cubic-bezier(.35,.1,.25,1); }
  12.5%, 58% { opacity: 1; width: var(--w); height: var(--h); }
  63%, 100% { opacity: 0; width: var(--w); height: var(--h); }
}
@keyframes demo-grip { 0% { opacity: 0; } 2.5%, 13% { opacity: 1; } 13.5%, 100% { opacity: 0; } }
@keyframes demo-after { 0%, 58% { opacity: 0; } 64%, 100% { opacity: 1; } }
@keyframes demo-swap { 0% { opacity: 0; } 3%, 93% { opacity: 1; } 99%, 100% { opacity: 0; } }
@keyframes demo-press { 0%, 23% { transform: none; } 25.5% { transform: scale(.86); } 29%, 100% { transform: none; } }
@keyframes demo-ring { 0%, 24.9% { opacity: 0; box-shadow: 0 0 0 0 rgba(133,234,4,.7); } 25% { opacity: 1; } 38%, 100% { opacity: 0; box-shadow: 0 0 0 14px rgba(133,234,4,0); } }
@keyframes demo-me {
  0%, 29% { opacity: 0; transform: translateY(14px) scale(.92); }
  34% { opacity: 1; transform: none; }
  90% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: none; }
}
@keyframes demo-ai {
  0%, 52% { opacity: 0; transform: translateY(10px) scale(.94); }
  57% { opacity: 1; transform: none; }
  90% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: none; }
}
@keyframes demo-typing {
  0%, 39% { opacity: 0; transform: translateY(10px) scale(.9); }
  43%, 51% { opacity: 1; transform: none; }
  53%, 100% { opacity: 0; transform: scale(.9); }
}

.layers { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); margin-top: clamp(36px, 7vh, 72px); }
.layers > li { display: flex; flex-direction: column; padding-top: 18px; border-top: 1px solid rgba(243,244,238,.16); transition: border-color .3s var(--ease); }
.layers h3 { font-size: clamp(22px, 2.3vw, 34px); line-height: 1.15; white-space: nowrap; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.layers > li > p { margin-top: 10px; font-size: 15px; color: var(--muted); }
.layers > li:hover { border-color: var(--lime); }
.layers > li:hover h3 { background: none; color: var(--lime); }

.eg { flex: 1; margin-top: 18px; padding: 16px; border-radius: 14px; font-size: 13px; line-height: 1.5;
  background: rgba(16,18,16,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--glass-edge); }

.eg-wall { position: relative; overflow: hidden; display: flex; align-items: center; padding: 0; border-radius: 22px; container-type: inline-size;
  background: linear-gradient(170deg, rgba(255,255,255,.12), rgba(255,255,255,.03) 40%, rgba(10,11,10,.5));
  backdrop-filter: blur(26px) saturate(1.4); -webkit-backdrop-filter: blur(26px) saturate(1.4);
  box-shadow: var(--glass-edge), 0 -20px 80px rgba(0,0,0,.45); }
.eg-wall::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 1px, transparent 1px 14px); }
.eg-wall { min-height: 200px; }
.wall-view { position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 78%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 78%, transparent 100%); }
.wall { position: relative; list-style: none; padding: .45em 0 0 .65em; font-size: clamp(16px, 1.7vw, 24px); will-change: transform; }
.wall .w { opacity: .3; transition: opacity .25s var(--ease); }
.wall .w:hover { opacity: 1; }
.wall li { height: 1.4em; display: flex; align-items: center; gap: 0 .42em; white-space: nowrap;
  font-family: var(--body); font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.wall.display li { font-family: var(--display); font-weight: 900; letter-spacing: 0; }

.eg-ask { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.ask-chat { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 16px 0 16px 12px; font-size: 12px; line-height: 1.45; }
.ask-me, .ask-ai { max-width: 100%; padding: 7px 9px; border-radius: 12px; }
.ask-me { align-self: flex-end; border-bottom-right-radius: 4px; background: rgba(255,255,255,.1); }
.ask-me b { font-weight: 700; color: var(--lime); }
.ask-ai { align-self: flex-start; border-bottom-left-radius: 4px; background: rgba(133,234,4,.1); box-shadow: inset 0 0 0 1px rgba(133,234,4,.22); }
.ask-models { position: relative; }
.ask-models .wall-view { opacity: 0; transition: opacity .45s var(--ease); }
.ask-models .wall-view.on { opacity: 1; }
.ask-models .wall { padding-left: .75em; font-size: clamp(13px, 1.05vw, 15px); }

.eg-send { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 16px; padding: 30px 16px 16px; transition: transform .25s var(--ease), box-shadow .3s var(--ease); }
.eg-send:hover { transform: translateY(-3px); box-shadow: var(--glass-edge), inset 0 0 0 1px rgba(133,234,4,.45), 0 18px 50px rgba(133,234,4,.12); }
.send-btn { position: relative; z-index: 1; display: grid;
   place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--lime); color: var(--ink);
  box-shadow: 0 8px 26px rgba(133,234,4,.35); }
.send-btn svg { width: 32px; height: 32px; }
.send-ref { position: relative; z-index: 1; max-width: 100%; padding: 6px 12px; border-radius: 9px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 15px; font-weight: 600; color: var(--lime); background: rgba(133,234,4,.1); box-shadow: inset 0 0 0 1px rgba(133,234,4,.22); }
.send-ref .loc { color: var(--text); }
.send-film { position: relative; z-index: 1; margin-top: 4px; flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); transition: color .2s; }
.send-film svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.eg-send:hover .send-film { color: var(--text); }
.eg-send:hover .send-film svg { transform: translateX(4px); }
.send-open { position: absolute; inset: 0; z-index: 2; border: 0; padding: 0; background: transparent; cursor: pointer; border-radius: inherit; }

.film { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 48px 24px; background: rgba(8,9,8,.72); }
.film[hidden] { display: none; }
.film-card { position: relative; width: min(920px, calc(100vw - 80px), (100vh - 140px) * 16 / 9); }
.film-card video { width: 100%; aspect-ratio: 16 / 9; display: block; border-radius: 22px; background: transparent; object-fit: cover; }
.film-cover { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 22px; pointer-events: none; }
.film-card.is-ready .film-cover { opacity: 0; }
.film-x { position: absolute; z-index: 2; top: -16px; right: -16px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: var(--text); cursor: pointer;
  display: grid; place-items: center; background: rgba(255,255,255,.1); box-shadow: var(--glass-edge); }
.film-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

.ag-b-head .ag-lead { max-width: 46em; }
.ag-b-head h2 { margin-top: 10px; font-size: clamp(38px, 4.6vw, 70px); line-height: 1.1; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ag-b-head h2 span { display: inline-block; }
.guards { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(28px, 5vh, 48px); }
.guards li { padding: 22px 22px 24px; border-radius: 18px; background: rgba(16,18,16,.6);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: var(--glass-edge); }
.guards h3 { font-size: 18px; }
.guards p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.guards li.guards-link { padding: 0; box-shadow: var(--glass-edge), inset 0 0 0 1px rgba(133,234,4,.4); transition: transform .25s var(--ease), box-shadow .3s var(--ease); }
.guards-link a { display: flex; flex-direction: column; height: 100%; padding: 22px 22px 20px; border-radius: inherit; }
.guards-link h3 { color: var(--lime); }
.guards-go { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--lime); }
.guards-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.guards li.guards-link:hover { transform: translateY(-3px); box-shadow: var(--glass-edge), inset 0 0 0 1px var(--lime), 0 18px 50px rgba(133,234,4,.16); }
.guards li.guards-link:hover svg { transform: translateX(4px); }

.ag-more { margin-top: 24px; }

@media (min-width: 1081px) and (max-width: 1360px) {
  .page-ag .page-bg::after { content: ""; position: absolute; inset: 0; background: rgba(16,18,16,.5); }
}
@media (max-width: 1080px) {
  .ag-hero { grid-template-columns: 1fr; }
  .ag-screen { min-height: 0; }
  .guards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .layers { grid-template-columns: 1fr; gap: 28px; }
  .layers > li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(20px, 4vw, 56px); }
  .layers h3, .layers > li > p { grid-column: 1; }
  .layers > li { grid-template-rows: auto 1fr; }
  .layers > li > p { align-self: start; }
  .eg { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
}
@media (max-width: 760px) {
  .layers > li { display: flex; }
  .eg { margin-top: 14px; }
  .guards { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .demo-win { grid-template-columns: 1fr; }
  .demo-doc { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.07); }
}
