:root {
    --doc-bg: #010101;
    --doc-text: #ffffff;
    --doc-subtext: #ffffff;
    --doc-accent: #5C9BF3;
    --doc-accent-2: #7c6cff;
    --nav-height: 60px;
    --font-heading: var(--font-google-sans-flex);
    --font-body: var(--font-google-sans-flex);
}

html[data-page-bg="#010101"] {
    --navbar-black: var(--doc-bg);
    --navbar-bg: var(--doc-bg);
    --page-fade-bg: var(--doc-bg);
}

body {
    background-color: var(--doc-bg);
    color: var(--doc-text);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding-top: var(--nav-height);
}

html[data-page-bg="#010101"] .navbar {
    background-color: var(--doc-bg);
}

.navbar.is-najima-video-hidden {
    transform: translateY(-110%);
    pointer-events: none;
}

.footer-stars-bg {
    position: relative;
    background: #030303;
    overflow: hidden;
}

.footer-stars-layer {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at center, rgba(3, 3, 3, 0.64) 0%, rgba(3, 3, 3, 0.36) 46%, transparent 64%),
        url("../images/star-background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    pointer-events: none;
}

#stars-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.doc-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 5% 8rem;
}

.doc-hero-stage {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 5%;
}

.doc-section {
    margin-bottom: 18rem;
    opacity: 0;
    transform: translate3d(0, 16px, 0);
    animation: docRevealUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    will-change: opacity, transform;
}

.doc-section:nth-child(2) { animation-delay: 0.15s; }
.doc-section:nth-child(3) { animation-delay: 0.3s; }
.doc-section:nth-child(4) { animation-delay: 0.45s; }

@keyframes docRevealUp {
    from {
        opacity: 0;
        transform: translate3d(0, 16px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.doc-title {
    font-size: clamp(2rem, 3.2vw, 2.6rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 2rem;
    font-family: var(--font-heading);
    color: #ffffff;
    -webkit-text-fill-color: currentColor;
    text-align: center;
}

.doc-hero {
    position: relative;
    isolation: isolate;
    width: min(75vw, 1416px);
    max-width: none;
    aspect-ratio: 16 / 9;
    min-height: 0;
    box-sizing: border-box;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 3rem 0 8rem 50%;
    border-radius: 20px;
    overflow: hidden;
    background: #060b13 url("../images/najima-collage-poster.webp?v=forest-four-20260925") center / cover no-repeat;
    opacity: 1;
    transform: translateX(-50%);
    animation: najimaHeroReveal 1.15s cubic-bezier(0.22, 1, 0.36, 1) 100ms both;
    will-change: auto;
}

.has-scroll-hero body {
    padding-top: 0;
    overflow-x: clip;
}

.has-scroll-hero .doc-hero-stage {
    max-width: none;
    height: 185vh;
    height: 185dvh;
    padding: 0;
    margin-bottom: 8rem;
}

.has-scroll-hero .doc-hero-pin {
    position: sticky;
    top: 0;
    display: grid;
    place-items: center;
    height: 100vh;
    height: 100dvh;
}

.has-scroll-hero .doc-section.doc-hero {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    margin: 0;
    border-radius: 0;
    opacity: 1;
    animation: none;
}

@keyframes najimaHeroReveal {
    from {
        opacity: 0;
        filter: blur(18px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

.doc-hero-video,
.doc-hero::before {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.doc-hero-video {
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
}

.doc-hero::before {
    content: "";
    background: rgba(0, 0, 0, 0.42);
    z-index: 1;
    pointer-events: none;
}

.doc-hero > :not(.doc-hero-video) {
    position: relative;
    z-index: 2;
}

.doc-hero .doc-title {
    font-size: clamp(2.25rem, 3.6vw, 4rem);
    line-height: 1.1;
    max-width: min(100%, 1100px);
    margin-top: 1.5rem;
    margin-bottom: 0;
    white-space: nowrap;
    opacity: 0;
    animation: najimaTextReveal 1.25s cubic-bezier(0.25, 1, 0.5, 1) 1.15s both;
}

@keyframes najimaTextReveal {
    from {
        opacity: 0;
        filter: blur(26px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

.doc-najima-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    left: -18px;
    gap: 0.7rem;
    margin-bottom: 0;
}

.najima-logo-img {
    height: clamp(128px, 8vw, 160px);
    width: auto;
    opacity: 0;
    animation: najimaTextReveal 1.25s cubic-bezier(0.25, 1, 0.5, 1) 650ms both;
}

.najima-brand-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: clamp(4rem, 4.6vw, 5.25rem);
    color: #ffffff;
    letter-spacing: 0.02em;
    opacity: 0;
    animation: najimaTextReveal 1.25s cubic-bezier(0.25, 1, 0.5, 1) 650ms both;
}

@media (prefers-reduced-motion: reduce) {
    .doc-section,
    .najima-logo-img,
    .najima-brand-text,
    .doc-hero .doc-title {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .doc-section.doc-hero {
        transform: translateX(-50%);
    }
}

.doc-list {
    list-style: none;
    margin: 6rem 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 2rem;
    align-items: start;
}

.doc-capabilities-section {
    margin-bottom: 16rem;
}

.diagram-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: transparent;
    border: none;
    padding: 0 0 1rem 0;
    box-sizing: border-box;
    margin-top: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(92, 155, 243, 0.3) transparent;
}

.diagram-wrapper::-webkit-scrollbar {
    height: 6px;
}

.diagram-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.diagram-wrapper::-webkit-scrollbar-thumb {
    background: rgba(92, 155, 243, 0.3);
    border-radius: 3px;
}

.diagram-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(92, 155, 243, 0.6);
}

.diagram-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.mobile-diagram {
    display: none;
}

@media (max-width: 1024px) {
    .desktop-diagram {
        min-width: 960px; /* Keep desktop diagram scrollable on tablets */
    }
}

@media (max-width: 768px) {
    .desktop-diagram {
        display: none !important;
    }
    .mobile-diagram {
        display: block !important;
        min-width: 0 !important;
        max-width: 100%;
    }
    .diagram-wrapper {
        overflow-x: hidden;
    }
    .diagram-container.mobile-diagram text {
        font-size: 11px;
    }
    .diagram-container.mobile-diagram .central-node-text {
        font-size: 14px !important;
    }
}

.diagram-container svg {
    width: 100%;
    height: auto;
    background-color: transparent;
    display: block;
}

.node-group {
    cursor: default;
}

.node {
    fill: #111111;
    stroke: #111111;
    stroke-width: 1;
    rx: 12px;
    ry: 12px;
    transition: fill 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                stroke 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.node-group.active .node {
    fill: #121a2b;
    stroke: #5C9BF3;
}

.node-group.connected-active .node {
    stroke: rgba(92, 155, 243, 0.55);
    fill: #0e1420;
}

/* Central node specific */
.node-group.central-node-group.active .node.central-node {
    fill: #121a2b;
    filter: drop-shadow(0 0 12px rgba(92, 155, 243, 0.6));
}

/* Lines styling */
.line {
    fill: none;
    stroke: #111111;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: stroke 0.35s ease, stroke-width 0.35s ease, filter 0.35s ease;
}

.line.active-glow {
    stroke: #5C9BF3;
    stroke-width: 2.2;
}

/* Text inside SVG */
.diagram-container text {
    fill: #ffffff;
    font-size: 13px;
    font-weight: 500;
    text-anchor: middle;
    user-select: none;
    pointer-events: none;
    font-family: var(--font-body), sans-serif;
    transition: fill 0.3s ease;
}

.node-group.active text,
.node-group.connected-active text {
    fill: #ffffff;
}

.central-node-text {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 400 !important;
    font-size: 20px !important;
    letter-spacing: 0.04em;
    text-anchor: start !important;
    fill: #ffffff !important;
    transition: fill 0.3s ease;
}

.node-group.active .central-node-text,
.node-group.connected-active .central-node-text {
    fill: #ffffff !important;
}

.doc-matrix-title {
    max-width: 760px;
    margin: 0 auto 1.5rem;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.1vw, 2.7rem);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.01em;
    text-align: center;
    text-wrap: balance;
}

.doc-text,
.doc-matrix-lead {
    max-width: 680px;
    color: var(--doc-text);
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    font-weight: 300;
    line-height: 1.6;
    text-align: center;
    text-wrap: balance;
}

.doc-text {
    margin: 0 auto 5rem;
}

.doc-matrix-lead {
    margin: 0 auto 4.8rem;
}

.doc-capabilities-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    min-height: 25rem;
    margin-bottom: 5rem;
}

.doc-capabilities-copy .doc-matrix-title {
    margin: 0 0 1.75rem;
    font-size: clamp(3.5rem, 6.5vw, 5.5rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
    text-align: left;
}

.doc-capabilities-copy .doc-matrix-lead {
    max-width: 32ch;
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    line-height: 1.5;
    text-align: left;
    text-wrap: pretty;
}

.doc-capabilities-animation {
    min-width: 0;
    min-height: 25rem;
}

.doc-capabilities-section .doc-list {
    margin-top: 0;
}

/* Task Simulator Styling */
.task-simulator {
    width: 100%;
    max-width: 520px;
    margin: 0.5rem auto 0;
    font-family: var(--font-body), sans-serif;
}

.simulator-inner {
    background: #050508;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.simulator-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1.2rem;
}

.simulator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.simulator-dot.red { background-color: #ff5f56; }
.simulator-dot.yellow { background-color: #ffbd2e; }
.simulator-dot.green { background-color: #27c93f; }

.simulator-title {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-left: 8px;
    font-weight: 600;
}

.simulator-prompt-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 4px 10px;
    margin-bottom: 1.2rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.simulator-prompt-row:focus-within {
    border-color: rgba(92, 155, 243, 0.5);
    box-shadow: 0 0 10px rgba(92, 155, 243, 0.15);
}

.simulator-prompt {
    color: #5C9BF3;
    font-weight: 700;
    font-size: 13px;
    user-select: none;
}

#simulator-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 13px;
    font-family: inherit;
    padding: 6px 0;
}

#simulator-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

#simulator-send-btn {
    background: #5C9BF3;
    color: #010101;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#simulator-send-btn:hover {
    background: #7cb3f7;
}

#simulator-send-btn:active {
    transform: scale(0.97);
}

.simulator-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.simulator-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.simulator-chip:hover {
    background: rgba(92, 155, 243, 0.08);
    border-color: rgba(92, 155, 243, 0.3);
    color: #5C9BF3;
}

.simulator-chip.active {
    background: rgba(92, 155, 243, 0.15);
    border-color: rgba(92, 155, 243, 0.5);
    color: #5C9BF3;
}

.doc-list li {
    position: relative;
    padding-left: 0;
    font-size: 1.05rem;
    color: var(--doc-text);
    line-height: 1.5;
    text-align: center;
}

.doc-box {
    background: #030303;
    border: none;
    border-radius: 16px;
    padding: 2.5rem;
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: none;
}

.doc-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #ffffff;
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

/* Polar Mesh Visual Component */
.doc-box--visual {
    padding: 0;
    overflow: hidden;
    background: #030303; /* Solid black background */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 480px;
    border: none;
}

.polar-mesh-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.polar-mesh {
    width: 420px;
    height: 420px;
    stroke: #5C9BF3; /* Match interface blue */
    fill: none;
    opacity: 1; /* Maximum opacity */
}

.polar-mesh line {
    stroke-width: 1px;
    vector-effect: non-scaling-stroke;
    opacity: 0.15; /* Uniform subtle grid */
}

.polar-mesh image {
    opacity: 1; /* Keep logo at max visibility */
}

/* Animations for Grid Cells */
.mesh-cell {
    fill: #5C9BF3;
    opacity: 0;
}

.mesh-cell--glow {
    animation: cell-glow 8s ease-in-out infinite;
}

.mesh-cell--pulse {
    animation: cell-pulse 6s ease-in-out infinite;
}

/* Randomize delays to make it look organic */
.mesh-cell:nth-of-type(2n) { animation-delay: 2s; }
.mesh-cell:nth-of-type(3n) { animation-delay: 4.5s; }
.mesh-cell:nth-of-type(4n) { animation-delay: 1s; }
.mesh-cell:nth-of-type(5n) { animation-delay: 3.2s; }

@keyframes cell-glow {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.12; }
}

@keyframes cell-pulse {
    0%, 10%, 100% { opacity: 0; }
    5% { opacity: 0.2; }
}

/* Agent Workspace Demo Styles */
.agent-demo-container {
    --aw-bg: #030303;
    --aw-line: #5C9BF3;
    --aw-fill-dim: rgba(92, 155, 243, 0.10);
    --aw-fill-mid: rgba(92, 155, 243, 0.22);
    --aw-fill-sub: rgba(92, 155, 243, 0.05);
    --aw-fill-active: rgba(92, 155, 243, 0.04);
    --aw-radius: 6px;
    --aw-lw: 2px;
    --aw-cube: 90px;
    --aw-half: 45px;
    
    width: 100%;
    display: flex;
    justify-content: center;
}

.agent-demo-app {
    box-sizing: border-box;
    width: 100%;
    max-width: 680px;
    height: 400px;
    background: var(--aw-bg);
    border: var(--aw-lw) solid var(--aw-line);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.agent-demo-top {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    position: relative;
}

.agent-demo-top::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    height: var(--aw-lw);
    background: var(--aw-line);
}

.agent-demo-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.agent-demo-nav-icon {
    width: 18px;
    height: 18px;
    border: var(--aw-lw) solid var(--aw-line);
    flex-shrink: 0;
}

.agent-demo-nav-icon.circle { border-radius: 50%; }

.agent-demo-nav-icon.grid {
    border: none;
    display: grid;
    grid-template: 1fr 1fr / 1fr 1fr;
    gap: 2px;
}

.agent-demo-nav-icon.grid span { border: var(--aw-lw) solid var(--aw-line); }

.agent-demo-nav-icon.bubble {
    border-radius: 50%;
    position: relative;
}

.agent-demo-nav-icon.bubble::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 4px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--aw-line);
}

.agent-demo-nav-icon.bell {
    border: none;
    position: relative;
}

.agent-demo-nav-icon.bell::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 3px;
    width: 12px;
    height: 10px;
    border: var(--aw-lw) solid var(--aw-line);
    border-radius: 6px 6px 0 0;
    border-bottom: none;
}

.agent-demo-nav-icon.bell::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: 14px;
    height: var(--aw-lw);
    background: var(--aw-line);
    border-radius: 1px;
}

.agent-demo-nav-icon.gear {
    border: none;
    position: relative;
}

.agent-demo-nav-icon.gear::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border: var(--aw-lw) solid var(--aw-line);
    border-radius: 50%;
}

.agent-demo-nav-icon.gear::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    border: var(--aw-lw) solid var(--aw-line);
    border-radius: 3px;
    clip-path: polygon(
      20% 0%, 80% 0%, 80% 20%, 100% 20%, 100% 80%, 80% 80%, 80% 100%,
      20% 100%, 20% 80%, 0% 80%, 0% 20%, 20% 20%
    );
}

.agent-demo-body {
    flex: 1;
    display: flex;
    min-height: 0;
}

.agent-demo-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.agent-demo-chat-body {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-end;
}

.agent-demo-turn {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agent-demo-turn.left { align-items: flex-start; }
.agent-demo-turn.right { align-items: flex-end; }

.agent-demo-bubble {
    border: var(--aw-lw) solid var(--aw-line);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    background: transparent;
}

.agent-demo-bubble-line {
    height: 5px;
    border-radius: 2px;
    background: var(--aw-fill-dim);
}

.agent-demo-turn.left .agent-demo-bubble::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 7px solid var(--aw-line);
}

.agent-demo-turn.right .agent-demo-bubble::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: -8px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid #5C9BF3;
}

.agent-demo-chat-input {
    padding: 12px 18px;
}

.agent-demo-input-box {
    height: 56px;
    border: var(--aw-lw) solid var(--aw-line);
    border-radius: var(--aw-radius);
    display: flex;
    align-items: center;
    padding: 0 8px 0 14px; /* Added left padding for the line */
}

.agent-demo-input-line {
    width: var(--aw-lw);
    height: 24px;
    background: var(--aw-line);
    border-radius: 2px;
    animation: aw-blink 1s step-end infinite;
}

@keyframes aw-blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.agent-demo-input-spacer { flex: 1; }

.agent-demo-arrow-box {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: var(--aw-lw) solid var(--aw-line);
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-demo-arrow-shape {
    width: 8px;
    height: var(--aw-lw);
    background: var(--aw-line);
    position: relative;
}

.agent-demo-arrow-shape::after {
    content: '';
    position: absolute;
    right: -1px;
    top: -3px;
    width: var(--aw-lw);
    height: 6px;
    background: var(--aw-line);
    transform: rotate(-45deg);
}

.agent-demo-agent {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-demo-cube-wrap {
    perspective: 500px;
    perspective-origin: 50% 50%;
}

.agent-demo-cube {
    width: var(--aw-cube);
    height: var(--aw-cube);
    position: relative;
    transform-style: preserve-3d;
    animation: aw-spin 8s linear infinite;
}

.agent-demo-face {
    position: absolute;
    width: var(--aw-cube);
    height: var(--aw-cube);
    border: var(--aw-lw) solid var(--aw-line);
    backface-visibility: hidden;
    background: #030303;
}

.agent-demo-face.f-front  { transform: translateZ(var(--aw-half)); }
.agent-demo-face.f-back   { transform: rotateY(180deg) translateZ(var(--aw-half)); }
.agent-demo-face.f-left   { transform: rotateY(-90deg) translateZ(var(--aw-half)); }
.agent-demo-face.f-right  { transform: rotateY(90deg) translateZ(var(--aw-half)); }
.agent-demo-face.f-top    { transform: rotateX(90deg) translateZ(var(--aw-half)); }
.agent-demo-face.f-bottom { transform: rotateX(-90deg) translateZ(var(--aw-half)); }

@keyframes aw-spin {
    0%   { transform: rotateX(-25deg) rotateY(0deg); }
    100% { transform: rotateX(-25deg) rotateY(360deg); }
}

@media (max-width: 720px) {
    .agent-demo-app {
      height: 480px;
    }
    .agent-demo-body { flex-direction: column-reverse; }
    .agent-demo-agent { flex: none; height: 120px; }
    .agent-demo-nav { gap: 10px; }
    .agent-demo-nav-icon { width: 16px; height: 16px; }
}
@media (max-width: 900px) {
    .doc-hero {
        width: calc(100vw - 2rem);
        min-height: 34rem;
        aspect-ratio: auto;
    }

    .doc-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .doc-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .doc-container {
        padding: 0 4.5% 6rem;
    }

    .doc-hero-stage {
        padding: 0 4.5%;
    }

    .doc-section {
        margin-bottom: 8rem;
        text-align: center;
    }

    .doc-section.doc-hero {
        width: calc(100vw - 2rem);
        min-height: 34rem;
        aspect-ratio: auto;
        padding: 2rem 1.25rem;
        margin-top: 1.5rem;
        margin-bottom: 5.5rem;
        border-radius: 16px;
    }

    .doc-hero .doc-title {
        font-size: min(4vw, 2.1rem);
        max-width: min(100%, 25ch);
        margin-top: 0.75rem;
    }

    .doc-najima-branding {
        left: -10px;
        gap: 0.45rem;
        margin-bottom: 0.5rem;
    }

    .najima-logo-img {
        height: 100px;
    }

    .najima-brand-text {
        font-size: 3rem;
    }

    .doc-title {
        font-size: clamp(1.35rem, 5vw, 1.75rem);
        line-height: 1.15;
        max-width: min(100%, 30ch);
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .doc-text,
    .doc-matrix-lead {
        max-width: min(100%, 54ch);
        font-size: 0.95rem;
        line-height: 1.55;
        text-align: center;
    }

    .doc-text {
        margin-bottom: 2.75rem;
    }

    .doc-list {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 3rem 0 0;
        justify-items: stretch;
        max-width: min(100%, 54ch);
        margin-left: auto;
        margin-right: auto;
    }

    .doc-list li {
        max-width: none;
        padding-left: 1rem;
        font-size: 0.88rem;
        line-height: 1.52;
        text-align: left;
    }

    .doc-list li::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0.72em;
        width: 0.22rem;
        height: 0.22rem;
        border-radius: 999px;
        background: currentColor;
    }

    .doc-capabilities-section {
        margin-bottom: 8rem;
    }

    .doc-matrix-title {
        max-width: min(100%, 26ch);
        margin-bottom: 1rem;
        font-size: clamp(1.45rem, 6.2vw, 1.9rem);
    }

    .doc-matrix-lead {
        margin-bottom: 3rem;
    }

    .doc-capabilities-intro {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 0;
        margin-bottom: 3.5rem;
    }

    .doc-capabilities-copy .doc-matrix-title {
        max-width: 11ch;
        font-size: clamp(3rem, 9vw, 4.5rem);
        margin-bottom: 1.5rem;
    }

    .doc-capabilities-copy .doc-matrix-lead {
        font-size: clamp(1.15rem, 3.5vw, 1.4rem);
    }

    .doc-capabilities-animation:empty {
        display: none;
    }

    .doc-box {
        padding: 1rem;
        margin-top: 2rem;
        overflow: hidden;
    }

    .doc-box--visual {
        min-height: auto;
        padding: 1rem;
    }

    .agent-demo-container {
        --agent-demo-base-width: 680;
        --agent-demo-base-height: 400;
        --agent-demo-scale: 1;
        --agent-demo-stroke-width: 2px;
        position: relative;
        width: 100%;
        aspect-ratio: 680 / 400;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        --aw-lw: var(--agent-demo-stroke-width);
    }

    .agent-demo-app {
        width: calc(var(--agent-demo-base-width) * 1px);
        max-width: none;
        height: calc(var(--agent-demo-base-height) * 1px);
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(var(--agent-demo-scale));
        transform-origin: center;
        flex: none;
    }

    .agent-demo-app::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: var(--aw-lw);
        background: var(--aw-line);
        pointer-events: none;
        z-index: 3;
    }

    .agent-demo-body {
        flex-direction: row;
    }

    .agent-demo-agent {
        flex: 1;
        height: auto;
    }

    .agent-demo-nav {
        gap: 14px;
    }

    .agent-demo-nav-icon {
        width: 18px;
        height: 18px;
    }

    .agent-demo-turn.left .agent-demo-bubble::after {
        border-top-width: 6px;
        border-bottom-width: 6px;
        border-right-width: 8px;
    }

    .agent-demo-turn.right .agent-demo-bubble::after {
        border-top-width: 6px;
        border-bottom-width: 6px;
        border-left-width: 8px;
    }

    .polar-mesh-container {
        padding: 0.5rem;
    }

    .polar-mesh {
        width: min(100%, 260px);
        height: auto;
        aspect-ratio: 1 / 1;
    }
}
