/* ─── Fonts ─────────────────────────────────────────────────────────────── */
@font-face {
    font-family: "Alliance No.1";
    src: url("../fonts/AllianceNo1-Light.otf") format("opentype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Alliance No.1";
    src: url("../fonts/AllianceNo1-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Alliance No.1";
    src: url("../fonts/AllianceNo1-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ─── Tokens ─────────────────────────────────────────────────────────────── */
:root {
    --bg:      #0a0a0a;
    --surface: #111111;
    --text:    #e8ebf0;
    --muted:   #8a8f99;
    --border:  #1f2128;
    --accent:  #00d4ff;
    --ink:     #0a0a0a;
    --paper:   #f0f1f3;

    --max-w:   1320px;
    --gutter:  clamp(1.25rem, 4vw, 3rem);
    --section: clamp(80px, 12vw, 160px);
    --nav-h:   68px;

    --f-display: clamp(2.5rem, 6vw, 5.5rem);
    --f-h2:      clamp(1.75rem, 3.5vw, 2.75rem);
    --f-h3:      clamp(1.1rem, 2vw, 1.5rem);
    --f-body:    1rem;
    --f-small:   0.8125rem;
    --f-eyebrow: 0.6875rem;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: "Alliance No.1", system-ui, sans-serif;
    font-weight: 300;
    font-size: var(--f-body);
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ─── Typography ──────────────────────────────────────────────────────────── */
.t-eyebrow {
    font-size: var(--f-eyebrow);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
}
.t-display {
    font-size: var(--f-display);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -0.02em;
}
.t-h2 {
    font-size: var(--f-h2);
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: -0.015em;
}
.t-h3 {
    font-size: var(--f-h3);
    font-weight: 300;
    line-height: 1.3;
    letter-spacing: -0.005em;
}
.t-body {
    font-size: var(--f-body);
    font-weight: 300;
    line-height: 1.7;
    color: var(--muted);
}
.t-small {
    font-size: var(--f-small);
    font-weight: 300;
    color: var(--muted);
}

/* ─── Layout helpers ─────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.section {
    padding-block: var(--section);
}
.section--dark  { background: var(--bg); }
.section--surface { background: var(--surface); }
.section--light {
    background: var(--paper);
    color: var(--ink);
}
.section--light .t-body  { color: #4a4f5a; }
.section--light .t-eyebrow { color: #0a0a0a; }
.section--light .t-muted { color: #4a4f5a; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--f-small);
    font-weight: 300;
    letter-spacing: 0.04em;
    padding: 0.85rem 1.75rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn--primary {
    color: var(--ink);
    background: var(--accent);
    border-color: var(--accent);
}
.btn--primary:hover {
    background: #1de5ff;
    border-color: #1de5ff;
}
.btn--outline {
    color: var(--text);
    background: transparent;
    border-color: var(--border);
}
.btn--outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.btn--outline-dark {
    color: var(--ink);
    background: transparent;
    border-color: #b0b5c0;
}
.btn--outline-dark:hover {
    border-color: var(--ink);
}

/* ─── Nav ────────────────────────────────────────────────────────────────── */
.site-nav {
    --nav-h: 62px;
    position: fixed;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    background: rgba(20, 22, 28, 0.18);
    backdrop-filter: blur(2px) saturate(130%);
    -webkit-backdrop-filter: blur(2px) saturate(130%);
    border: none;
    border-radius: 18px;
    transition: background 0.3s var(--ease);
}
.site-nav.scrolled {
    background: rgba(12, 13, 17, 0.40);
}
.nav__inner {
    width: 100%;
    margin-inline: auto;
    padding-inline: clamp(0.75rem, 2vw, 1.25rem);
    padding-left: clamp(1rem, 2vw, 1.5rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}
.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    justify-self: start;
}
.nav__logo img {
    height: 26px;
    width: 26px;
    object-fit: contain;
}
.nav-logo-mount {
    width: 110px;
    height: 36px;
    flex-shrink: 0;
    pointer-events: none;
    overflow: hidden;
    align-self: center;
}
.nav-logo-mount .aquila-wrapper {
    --aquila-node-r: 2.4px;
    --aquila-edge-w: 1px;
}
.nav__wordmark {
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1;
    letter-spacing: 0.04em;
    color: var(--text);
    white-space: nowrap;
    align-self: center;
}
.nav__links {
    display: flex;
    align-items: center;
    justify-self: center;
    gap: clamp(1.25rem, 2.4vw, 2.75rem);
    white-space: nowrap;
}
.nav__links a,
.nav__links .nav__label {
    padding-block: 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text);
    letter-spacing: 0.01em;
    transition: color 0.15s;
}
.nav__links a:hover { color: #fff; }
.nav__links a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 0.45rem;
    text-decoration-thickness: 1px;
}
.site-nav a:focus-visible,
.site-nav button:focus-visible,
.mobile-menu a:focus-visible,
.mobile-menu button:focus-visible {
    outline: 1px solid var(--text);
    outline-offset: 5px;
}
.nav__actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
    justify-self: end;
}
.nav__icon-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav__icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}
.nav__icon-btn svg { width: 14px; height: 14px; }

/* Mobile nav */
.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
    margin-left: auto;
}
.nav__hamburger span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--text);
    transition: transform 0.25s var(--ease), opacity 0.25s;
}
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 101;
    background: var(--bg);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 2rem var(--gutter);
    gap: 2rem;
    overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu__links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}
.mobile-menu a,
.mobile-menu .nav__label {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    font-weight: 400;
    letter-spacing: -0.015em;
    color: var(--text);
}
.mobile-menu a:hover { color: var(--accent); }
.mobile-menu__close { align-self: flex-end; }
.mobile-menu .mobile-menu__company {
    font-size: var(--f-body);
    color: var(--muted);
}

@media (max-width: 1023px) {
    .nav__inner { grid-template-columns: minmax(0, 1fr) auto; }
    .nav__links { display: none; }
}
@media (max-width: 768px) {
    .nav__icon-btn[data-nav-icon="search"] { display: none; }
    .nav__hamburger { display: flex; }
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    background: var(--bg);
}
.hero--brand {
    background: radial-gradient(
        ellipse 65% 50% at 50% 24%,
        #141b21 0%,
        #0d1115 45%,
        var(--bg) 80%
    );
}
.hero__media {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}
/* The logo mount fills the full zone, centered, with subtle scale for drama */
.hero__media > * {
    width: 100%;
    max-width: 1100px;
    opacity: 0.72;
}
/* 3D hero canvas: occupies the upper portion of the hero so it sits ABOVE
   the headline rather than behind it. */
.hero__media:has(#hero-3d-mount) {
    align-items: flex-start;
    justify-content: center;
}
#hero-3d-mount {
    width: 100%;
    height: 62%;
    max-width: none;
    opacity: 1;
    margin-top: clamp(70px, 9vh, 120px);
}
#hero-3d-mount canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}
.hero__content {
    position: relative;
    z-index: 2;
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: var(--gutter);
    padding-bottom: clamp(60px, 10vw, 120px);
}
.hero__content .t-eyebrow { margin-bottom: 1.5rem; }
.hero__content .t-display { max-width: 16ch; margin-bottom: 1.5rem; }
.hero__content .t-body    { max-width: 44ch; margin-bottom: 2.5rem; }
.hero:not(.hero--product) .hero__content { text-align: center; }
.hero:not(.hero--product) .hero__content .t-display,
.hero:not(.hero--product) .hero__content .t-body { margin-inline: auto; }
.hero__fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 40%,
        rgba(10,10,10,0.7) 70%,
        rgba(10,10,10,0.97) 95%
    );
    pointer-events: none;
    z-index: 1;
}

/* Product-page hero (no full-viewport animation) */
.hero--product {
    min-height: 78svh;
    justify-content: center;
    padding-top: 100px;
}
.hero--product .hero__content {
    padding-bottom: 0;
    padding-top: clamp(80px, 10vw, 140px);
}
.hero--product .t-display { max-width: 20ch; }

/* ─── Platforms strip ─────────────────────────────────────────────────────── */
.platforms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
}
.platform-card {
    position: relative;
    background: var(--surface);
    padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 64px);
    overflow: hidden;
    transition: background 0.25s var(--ease);
}
.platform-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    pointer-events: none;
    transition: border-color 0.25s var(--ease);
}
.platform-card:hover { background: #131313; }
.platform-card:hover::after { border-color: var(--accent); }
.platform-card .t-eyebrow { margin-bottom: 1.5rem; }
.platform-card .t-h2 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
}
.platform-card .t-body { max-width: 42ch; margin-bottom: 2rem; }
.platform-card__arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--f-small);
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--accent);
    transition: gap 0.2s var(--ease);
}
.platform-card:hover .platform-card__arrow { gap: 0.85rem; }

@media (max-width: 640px) {
    .platforms { grid-template-columns: 1fr; }
}

/* ─── Feature rows ────────────────────────────────────────────────────────── */
.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
}
.feature-row--reverse .feature-row__media { order: -1; }
.feature-row__text .t-eyebrow { margin-bottom: 1.25rem; }
.feature-row__text .t-h2      { margin-bottom: 1.25rem; }
.feature-row__text .t-body    { max-width: 38ch; margin-bottom: 2rem; }
.feature-row__media {
    aspect-ratio: 16/10;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.feature-row__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.feature-placeholder {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(0, 212, 255, 0.08), transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(0, 212, 255, 0.05), transparent 65%),
        linear-gradient(135deg, #0e1014 0%, #15181f 100%);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}
.feature-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: -1px -1px;
    pointer-events: none;
}
.feature-placeholder::after {
    content: '';
    position: absolute;
    inset: 16% 12% 14% 10%;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%),
        repeating-linear-gradient(
            180deg,
            transparent 0,
            transparent 28px,
            rgba(255,255,255,0.04) 28px,
            rgba(255,255,255,0.04) 29px
        );
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 4px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 20px 60px -20px rgba(0,0,0,0.6);
}
.feature-placeholder span {
    position: absolute;
    bottom: 8%;
    left: 12%;
    font-size: 0.625rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(232, 235, 240, 0.45);
    z-index: 2;
}

@media (max-width: 768px) {
    .feature-row { grid-template-columns: 1fr; }
    .feature-row--reverse .feature-row__media { order: 0; }
}

/* ─── Capability grid ─────────────────────────────────────────────────────── */
.cap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
}
.cap-card {
    background: var(--surface);
    padding: clamp(1.5rem, 4vw, 2.5rem);
}
.cap-card__icon {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--accent);
}
.cap-card__icon svg { width: 16px; height: 16px; }
.cap-card .t-h3 { margin-bottom: 0.75rem; }

@media (max-width: 900px) { .cap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cap-grid { grid-template-columns: 1fr; } }

/* ─── Industries grid ────────────────────────────────────────────────────── */
.industry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
}
.industry-tile {
    background: var(--surface);
    padding: clamp(2rem, 4vw, 3rem);
    transition: background 0.2s;
}
.industry-tile:hover { background: #131313; }
.industry-tile .t-eyebrow { margin-bottom: 0.75rem; }
.industry-tile .t-h3 { margin-bottom: 0.5rem; }

@media (max-width: 900px) { .industry-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .industry-grid { grid-template-columns: 1fr; } }

/* ─── CTA band ────────────────────────────────────────────────────────────── */
.cta-band {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding-block: clamp(60px, 8vw, 100px);
    text-align: center;
}
.cta-band .t-h2 { margin-bottom: 1.25rem; max-width: 22ch; margin-inline: auto; }
.cta-band .t-body { max-width: 40ch; margin-inline: auto; margin-bottom: 2.5rem; }

/* ─── Cross-link band ────────────────────────────────────────────────────── */
.cross-band {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
}
.cross-card {
    background: var(--bg);
    padding: clamp(2.5rem, 5vw, 4rem) var(--gutter);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: background 0.2s;
}
.cross-card:hover { background: var(--surface); }
.cross-card .t-h3 { font-size: var(--f-h3); font-weight: 400; letter-spacing: -0.01em; }
.cross-card .t-body { max-width: 36ch; }

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

/* ─── Positioning (centered text block) ──────────────────────────────────── */
.position-block {
    max-width: 820px;
    margin-inline: auto;
    text-align: center;
}
.position-block .t-h2 { margin-bottom: 1.5rem; }

/* ─── Section header ─────────────────────────────────────────────────────── */
.section-header { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-header .t-eyebrow { margin-bottom: 0.875rem; }
.section-header .t-h2 { max-width: 22ch; }

/* ─── Divider ────────────────────────────────────────────────────────────── */
.divider {
    height: 1px;
    background: var(--border);
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding-top: clamp(48px, 8vw, 96px);
}
.footer__top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: clamp(48px, 7vw, 80px);
}
.footer__brand .nav__logo { margin-bottom: 1.25rem; }
.footer__brand .t-small { max-width: 28ch; line-height: 1.6; }
.footer__col h4 {
    font-size: var(--f-small);
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 1.25rem;
}
.footer__col ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer__col a, .footer__col .footer__label {
    font-size: var(--f-small);
    color: var(--muted);
    transition: color 0.15s;
}
.footer__col a:hover { color: var(--text); }
.footer__bottom {
    border-top: 1px solid var(--border);
    padding-block: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer__legal {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.footer__legal a, .footer__legal span {
    font-size: var(--f-small);
    color: var(--muted);
}
.footer__legal a:hover { color: var(--text); }

@media (max-width: 1024px) {
    .footer__top { grid-template-columns: 1fr 1fr 1fr; }
    .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .footer__top { grid-template-columns: 1fr 1fr; }
}

/* ─── Reveal animation ───────────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Misc utilities ─────────────────────────────────────────────────────── */
.text-accent { color: var(--accent); }
.gap-stack-sm > * + * { margin-top: 0.75rem; }
.gap-stack-md > * + * { margin-top: 1.5rem; }
.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap;
}

/* ─── Hero scroll prompt ─────────────────────────────────────────────────── */
.hero__scroll-prompt {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: var(--f-small, 0.85rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--fg, #e8ebf0);
    text-decoration: none;
    opacity: 0.85;
    animation: hero-scroll-pulse 3.2s ease-in-out infinite;
}
.hero__scroll-prompt:hover { opacity: 1; }
@keyframes hero-scroll-pulse {
    0%, 100% { opacity: 0.35; }
    50%      { opacity: 0.95; }
}
@media (prefers-reduced-motion: reduce) {
    .hero__scroll-prompt { animation: none; opacity: 0.85; }
}
