/* AICO R04 shared page system.
   Page-specific compositions live in r04-overviews.css, r04-software.css and
   r04-scenes.css. This layer owns tokens, page rhythm, shared controls and the
   R04 header/footer treatment. */

.page-r04 {
    --r04-navy: #06284d;
    --r04-navy-deep: #031a34;
    --r04-navy-950: #021329;
    --r04-blue: #1568d6;
    --r04-blue-bright: #2c85ec;
    --r04-orange: #c94a12;
    --r04-orange-bright: #ed5b18;
    --r04-teal: #0d6268;
    --r04-ink: #082a4d;
    --r04-text: #354f69;
    --r04-muted: #697e92;
    --r04-line: #dce6ee;
    --r04-line-strong: #c9d6e2;
    --r04-ice: #f4f8fb;
    --r04-ice-blue: #edf5fa;
    --r04-white: #ffffff;
    --r04-shell: 1240px;
    --r04-radius: 14px;
    overflow-x: clip;
    color: var(--r04-ink);
    background: var(--r04-white);
    font-size: 16px;
}

.page-r04 main {
    min-height: 70vh;
    background: var(--r04-white);
}

.page-r04 .site-header {
    height: 72px;
    color: var(--r04-ink);
    background: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(8, 42, 77, 0.1);
    box-shadow: 0 8px 28px rgba(8, 42, 77, 0.025);
    backdrop-filter: blur(18px) saturate(1.15);
}

.page-r04 .site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.97);
    border-bottom-color: rgba(8, 42, 77, 0.14);
}

.page-r04 .nav-shell {
    width: min(calc(100% - 96px), var(--r04-shell));
}

.page-r04 .brand-name {
    color: currentColor;
    font-size: 23px;
    font-weight: 760;
}

.page-r04 .brand-cn {
    font-weight: 650;
}

.page-r04 .nav-link {
    color: rgba(8, 42, 77, 0.82);
    font-size: 14px;
    font-weight: 560;
}

.page-r04 .nav-link:hover,
.page-r04 .nav-link:focus-visible,
.page-r04 .nav-link.is-current {
    color: var(--r04-ink);
}

.page-r04 .nav-contact,
.page-r04 .nav-contact:hover,
.page-r04 .nav-contact:focus-visible {
    color: #fff;
    background: var(--r04-orange);
}

.page-r04 :focus-visible {
    outline-color: var(--r04-orange-bright);
}

.r04-page {
    position: relative;
    overflow: clip;
    color: var(--r04-ink);
    background: var(--r04-white);
}

.r04-page *,
.r04-page *::before,
.r04-page *::after {
    min-width: 0;
}

.r04-page h1,
.r04-page h2,
.r04-page h3,
.r04-page h4 {
    color: inherit;
    font-weight: 650;
    letter-spacing: -0.035em;
}

.r04-page h1 {
    max-width: 12em;
    font-size: clamp(46px, 4.8vw, 68px);
    line-height: 1.08;
}

.r04-page h2 {
    font-size: clamp(34px, 3.25vw, 48px);
    line-height: 1.14;
}

.r04-page h3 {
    font-size: clamp(21px, 1.8vw, 28px);
    line-height: 1.24;
}

.r04-page p {
    color: var(--r04-text);
}

.r04-page picture,
.r04-page picture img {
    width: 100%;
}

.r04-shell {
    width: min(calc(100% - 96px), var(--r04-shell));
    margin-inline: auto;
}

.r04-hero {
    position: relative;
    display: flex;
    min-height: clamp(680px, 76vh, 820px);
    align-items: center;
    padding: calc(72px + clamp(58px, 6vw, 92px)) 0 clamp(72px, 7vw, 108px);
    background: var(--r04-white);
}

.r04-hero-layout {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(44px, 6vw, 88px);
}

.r04-hero-copy {
    position: relative;
    z-index: 3;
    display: grid;
    justify-items: start;
    gap: 24px;
}

.r04-hero-lead {
    max-width: 34em;
    color: var(--r04-text);
    font-size: clamp(17px, 1.35vw, 20px);
    line-height: 1.78;
}

.r04-kicker {
    margin: 0;
    color: var(--r04-orange);
    font-size: 13px;
    font-weight: 760;
    letter-spacing: 0.09em;
    line-height: 1.5;
}

.r04-section {
    position: relative;
    padding: clamp(88px, 8vw, 128px) 0;
    background: var(--r04-white);
}

.r04-section-heading {
    display: grid;
    max-width: 760px;
    gap: 18px;
    margin-bottom: clamp(42px, 5vw, 70px);
}

.r04-section-heading > p:last-child {
    max-width: 48em;
    color: var(--r04-muted);
    font-size: 17px;
    line-height: 1.8;
}

.r04-section-heading-wide {
    max-width: 920px;
}

.r04-section-split,
.r04-media-story {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(48px, 7vw, 108px);
}

.r04-section-split > .r04-section-heading,
.r04-media-story .r04-section-heading {
    margin-bottom: 0;
}

.r04-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.r04-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 24px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    transition: transform 180ms ease, color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.r04-button-primary {
    color: #fff;
    background: var(--r04-orange);
    box-shadow: 0 12px 28px rgba(201, 74, 18, 0.18);
}

.r04-button-primary:hover,
.r04-button-primary:focus-visible {
    color: #fff;
    background: #ad3d0c;
    box-shadow: 0 16px 34px rgba(201, 74, 18, 0.24);
    transform: translateY(-2px);
}

.r04-button-secondary {
    color: var(--r04-ink);
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--r04-line-strong);
}

.r04-button-secondary:hover,
.r04-button-secondary:focus-visible {
    color: var(--r04-blue);
    border-color: var(--r04-blue);
    transform: translateY(-2px);
}

.r04-text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--r04-orange);
    font-size: 15px;
    font-weight: 720;
}

.r04-text-link span,
.r04-button span {
    transition: transform 180ms ease;
}

.r04-text-link:hover span,
.r04-text-link:focus-visible span,
.r04-button:hover span,
.r04-button:focus-visible span {
    transform: translateX(4px);
}

.r04-concept-label {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: var(--r04-muted);
    background: var(--r04-ice);
    border: 1px solid var(--r04-line);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.r04-question-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 64px;
}

.r04-question-list li {
    min-height: 96px;
    padding: 26px 0;
    color: var(--r04-ink);
    border-bottom: 1px solid var(--r04-line);
    font-size: clamp(19px, 1.65vw, 24px);
    font-weight: 620;
    line-height: 1.48;
}

.r04-tab-list,
.r04-tour__tabs,
.r04-scope-switcher__tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
}

.r04-tab-list button,
.r04-tour__tabs button,
.r04-scope-switcher__tabs button {
    flex: 0 0 auto;
    margin: 0;
    padding: 16px 22px;
    color: var(--r04-muted);
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 680;
    cursor: pointer;
}

.r04-tab-list button.r04-is-active,
.r04-tab-list button[aria-selected="true"],
.r04-tour__tabs button.r04-is-active,
.r04-tour__tabs button[aria-selected="true"],
.r04-scope-switcher__tabs button.r04-is-active,
.r04-scope-switcher__tabs button[aria-selected="true"] {
    color: var(--r04-ink);
    border-bottom-color: var(--r04-blue);
}

[data-r04-panel][hidden] {
    display: none !important;
}

.r04-accordion,
.r04-faq {
    border-top: 1px solid var(--r04-line);
}

.r04-accordion details,
.r04-faq details {
    border-bottom: 1px solid var(--r04-line);
}

.r04-accordion summary,
.r04-faq summary {
    position: relative;
    padding: 23px 52px 23px 2px;
    color: inherit;
    font-size: 17px;
    font-weight: 640;
    cursor: pointer;
    list-style: none;
}

.r04-accordion summary::-webkit-details-marker,
.r04-faq summary::-webkit-details-marker {
    display: none;
}

.r04-accordion summary::after,
.r04-faq summary::after {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 10px;
    height: 10px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    content: "";
    transform: translateY(-70%) rotate(45deg);
    transition: transform 180ms ease;
}

.r04-accordion details[open] summary::after,
.r04-faq details[open] summary::after {
    transform: translateY(-30%) rotate(225deg);
}

.r04-accordion details > p,
.r04-faq details > p {
    max-width: 58em;
    padding: 0 52px 24px 2px;
    color: var(--r04-muted);
    line-height: 1.75;
}

.r04-cta {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 88% 0%, rgba(31, 113, 220, 0.42), transparent 36%),
        linear-gradient(112deg, var(--r04-navy-deep), #052f61 62%, #062247);
}

.r04-cta::after {
    position: absolute;
    right: -4%;
    bottom: -88px;
    width: min(44vw, 600px);
    height: 230px;
    background: repeating-radial-gradient(ellipse at center, transparent 0 20px, rgba(69, 151, 255, 0.2) 21px 22px, transparent 23px 40px);
    content: "";
    opacity: 0.75;
    pointer-events: none;
    transform: rotate(-8deg);
}

.r04-cta .r04-kicker {
    color: #ff9164;
}

.r04-cta h2,
.r04-cta p,
.r04-cta span {
    color: inherit;
}

.r04-cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 310px;
    align-items: center;
    justify-content: space-between;
    gap: 56px;
    padding-block: 68px;
}

.r04-cta-inner > div:first-child {
    display: grid;
    max-width: 760px;
    gap: 18px;
}

.r04-cta-inner > div:first-child > span,
.r04-cta-inner > div:first-child > p:last-child {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

.page-r04 .site-footer {
    padding: 0;
    color: rgba(255, 255, 255, 0.72);
    background: #031d3b;
}

.page-r04 .site-footer > .shell {
    width: min(calc(100% - 96px), var(--r04-shell));
}

.r04-footer-main {
    display: flex;
    min-height: 122px;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.r04-footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 20px 34px;
    font-size: 13px;
}

.r04-footer-nav a:hover,
.r04-footer-nav a:focus-visible {
    color: #fff;
}

.page-r04 .footer-bottom {
    min-height: 64px;
    padding-block: 20px;
}

.page-r04-world-model .site-header:not(.mega-open) {
    color: #fff;
    background: rgba(2, 15, 31, 0.84);
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.page-r04-world-model .site-header:not(.mega-open) .nav-link {
    color: rgba(255, 255, 255, 0.78);
}

.page-r04-world-model .site-header:not(.mega-open) .nav-link:hover,
.page-r04-world-model .site-header:not(.mega-open) .nav-link:focus-visible,
.page-r04-world-model .site-header:not(.mega-open) .nav-link.is-current {
    color: #fff;
}

.page-r04-world-model .site-header:not(.mega-open) .menu-toggle span {
    background: #fff;
}

@media (max-width: 1120px) {
    .page-r04 .nav-shell,
    .r04-shell,
    .page-r04 .site-footer > .shell {
        width: min(calc(100% - 64px), var(--r04-shell));
    }

    .r04-hero-layout,
    .r04-section-split,
    .r04-media-story {
        gap: 48px;
    }

    .r04-cta-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
    }

    .r04-footer-main {
        align-items: flex-start;
        flex-direction: column;
        gap: 26px;
        padding-block: 38px;
    }

    .r04-footer-nav {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .page-r04 {
        font-size: 15px;
    }

    .page-r04 .site-header {
        height: 62px;
    }

    .page-r04 .nav-shell,
    .r04-shell,
    .page-r04 .site-footer > .shell {
        width: calc(100% - 40px);
    }

    .r04-hero {
        min-height: 0;
        padding: 108px 0 68px;
    }

    .r04-hero-layout,
    .r04-section-split,
    .r04-media-story {
        grid-template-columns: minmax(0, 1fr);
        gap: 42px;
    }

    .r04-page h1 {
        max-width: none;
        font-size: clamp(38px, 10vw, 52px);
    }

    .r04-page h2 {
        font-size: clamp(30px, 8vw, 40px);
    }

    .r04-page h3 {
        font-size: 22px;
    }

    .r04-hero-copy {
        gap: 19px;
    }

    .r04-hero-lead,
    .r04-section-heading > p:last-child {
        font-size: 16px;
    }

    .r04-section {
        padding: 76px 0;
    }

    .r04-section-heading {
        gap: 15px;
        margin-bottom: 38px;
    }

    .r04-question-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .r04-question-list li {
        min-height: auto;
        padding: 22px 0;
        font-size: 19px;
    }

    .r04-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .r04-button {
        width: 100%;
    }

    .r04-cta-inner {
        min-height: 360px;
        gap: 34px;
        padding-block: 58px;
    }

    .r04-cta::after {
        right: -30%;
        width: 110vw;
        opacity: 0.45;
    }

    .r04-footer-nav {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 24px;
    }

    .page-r04 .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .page-r04 .filing-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 390px) {
    .page-r04 .nav-shell,
    .r04-shell,
    .page-r04 .site-footer > .shell {
        width: calc(100% - 32px);
    }

    .page-r04 .brand-name {
        font-size: 20px;
    }

    .r04-page h1 {
        font-size: 36px;
    }

    .r04-page h2 {
        font-size: 29px;
    }

    .r04-section {
        padding: 64px 0;
    }

    .r04-tab-list button,
    .r04-tour__tabs button,
    .r04-scope-switcher__tabs button {
        padding-inline: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .r04-page *,
    .r04-page *::before,
    .r04-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
