/* Copied from legacy site */

/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: #ffffff;
    background-color: #000;
}

/* App wrapper (was inline style) */
.app-contents { display: contents; }

/* Accessibility: visible focus + skip link */
:focus-visible {
    outline: 2px solid #ff6a00;
    outline-offset: 2px;
}
.skip-link {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    left: 16px;
    top: 12px;
    width: auto;
    height: auto;
    padding: 8px 12px;
    background: #ff6a00;
    color: #111;
    border-radius: 8px;
    z-index: 50;
}

/* Header / Navigation */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 40; /* above hero overlays */
    background: transparent; /* start transparent so hero shows on initial load */
    -webkit-backdrop-filter: saturate(120%) blur(6px);
    backdrop-filter: saturate(120%) blur(6px);
    transition: background 200ms ease;
}
/* When over the hero, use subtle translucent gradient so video shows through */
.site-header.over-hero {
    background: linear-gradient(180deg, rgba(0,0,0,0.28), rgba(0,0,0,0));
}
/* Solid background variant for scrolled/non-hero pages */
.site-header.solid {
    background: rgba(0,0,0,0.85);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.brand { --brand-height: 32px; --mark-scale: 0.55; --mark-offset: 0px; display: inline-flex; align-items: center; gap: 8px; }
.brand-logo {
    height: var(--brand-height);
    width: auto;
    filter: drop-shadow(0 0 6px rgba(0,0,0,0.35));
}
.brand-mark {
    height: calc(var(--brand-height) * var(--mark-scale));
    width: auto;
    opacity: 0.95; /* gently off-white */
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.35));
    transform: translateY(var(--mark-offset));
}
.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: 0;
    padding: 8px;
    color: #fff;
}
.nav-toggle-bar { display:block; width: 22px; height: 2px; background: #fff; border-radius: 2px; }
.primary-nav { position: absolute; left: 0; right: 0; top: 100%; background: rgba(0,0,0,0.9); display: none; }
.primary-nav.open { display: block; }
.primary-nav ul { list-style: none; padding: 10px 16px; margin: 0; display: grid; gap: 6px; }
.primary-nav a { color: #fff; text-decoration: none; opacity: 0.95; padding: 8px 6px; display: block; border-bottom: 2px solid transparent; transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.primary-nav a:hover { opacity: 1; border-bottom-color: rgba(255,106,0,0.6); transform: translateY(-1px); }
.primary-nav a.active { opacity: 1; border-bottom-color: #ff6a00; }
.primary-nav a:focus-visible { border-bottom-color: #ff6a00; }
.primary-nav .order-link { color: #ff6a00; text-decoration: none; display: block; border-bottom: 2px solid transparent; }
.primary-nav .order-link:hover { opacity: 1; border-bottom-color: rgba(255,106,0,0.5); transform: translateY(-1px); }
.primary-nav .order-link:focus-visible { border-bottom-color: #ff6a00; outline: none; }

@media (min-width: 900px) {
    .nav-toggle { display: none; }
    .primary-nav { position: static; display: block; background: transparent; }
    .primary-nav ul { display: flex; align-items: center; gap: 18px; padding: 0; }
    .primary-nav a { padding: 6px 4px; }
}

@media (min-width: 900px) {
    .brand { --brand-height: 36px; }
}

/* Hero */
.hero-logo {
    width: min(84vw, 1100px);
    filter: drop-shadow(0 0 22px rgba(255,255,255,0.28));
    transition: transform 0.6s ease, filter 0.6s ease, opacity 150ms ease;
}
.hero-logo:hover { filter: drop-shadow(0 0 28px rgba(255,255,255,0.4)); }

.hero-subtitle {
    font-size: clamp(1rem, 2.3vw, 1.5rem);
    line-height: 1.35;
    color: rgba(255,255,255,0.92);
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    transition: opacity 150ms ease;
}

.scroll-cue {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    opacity: 0.9;
    padding: 10px;
    border-radius: 9999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.scroll-cue:hover { opacity: 1; transform: translateX(-50%) translateY(2px); }

/* Hero video fade-in */
.hero-video { opacity: 0; transition: opacity 0.7s ease; }
.hero-video.is-ready { opacity: 1; }
.hero::after {
    /* subtle shimmering placeholder over poster while video buffers */
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.35));
    pointer-events: none;
    opacity: 1; transition: opacity 0.6s ease;
}
.hero-ready .hero::after { opacity: 0; }
/* In clean mode, remove any extra overlay entirely */
.hero.clean::after { opacity: 0; background: transparent; }

/* Hero clean mode: no dim overlay, no logo/subtitle/scroll cue */
.hero-dim { background: rgba(0,0,0,0.25); transition: background 180ms ease; pointer-events: none; }
.hero.clean .hero-dim { background: transparent; }
.hero.peek .hero-dim { background: rgba(0,0,0,0.075); }
.hero.clean .hero-logo,
.hero.clean .hero-subtitle,
.hero.clean .scroll-cue { display: none !important; }
.hero.peek .hero-logo,
.hero.peek .hero-subtitle { opacity: 0; transition: opacity 150ms ease; }
/* Scroll-to-fade: when --reveal increases 0->1, fade out logo/subtitle */
.hero .hero-logo { opacity: calc(1 - var(--reveal, 0)); }
.hero .hero-subtitle { opacity: calc(1 - var(--reveal, 0)); }
.hero.clean .hero-logo, .hero.clean .hero-subtitle { opacity: 0; }
/* Body-level fallback for video-only mode */
body.video-only .hero::after { opacity: 0; background: transparent; }
body.video-only .hero .hero-dim { background: transparent !important; opacity: 0 !important; }
body.video-only .hero .hero-logo,
body.video-only .hero .hero-subtitle,
body.video-only .hero .scroll-cue { display: none !important; }

/* Icon-only hero clean toggle */
.hero-clean-icon {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    color: rgba(255,255,255,0.9);
    background: rgba(0,0,0,0.32);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 9999px;
    z-index: 20;
    transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
}
.hero-clean-icon:hover { background: rgba(0,0,0,0.5); transform: translateY(1px); }
.hero-clean-icon:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,0.35); outline: none; }
.hero.clean .hero-clean-icon { color: rgba(255,255,255,0.95); background: rgba(0,0,0,0.22); }

/* Sections */
.section {
    background: #050505;
}
.section.alt { background: #0b0b0b; }

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 20px;
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 24px;
    grid-auto-flow: row;
}
/* Full-bleed variant for sections that should span wider */
.section-inner.full-bleed {
    max-width: 1400px;
}
@media (min-width: 1024px) {
    .section-inner {
        grid-template-columns: 1.1fr 1fr;
        align-items: center;
        padding: 96px 28px;
        grid-gap: 32px;
    }
}

.section-inner.single {
    grid-template-columns: 1fr !important;
}

/* Compact spacing variant for dense pages */
.section.tight .section-inner {
    padding: 44px 18px;
    grid-gap: 18px;
}
@media (min-width: 1024px) {
    .section.tight .section-inner {
        padding: 70px 24px;
        grid-gap: 24px;
    }
}

/* Densest spacing for long item lists */
.section.dense .section-inner {
    padding: 18px 14px;
    grid-gap: 12px;
}
@media (min-width: 1024px) {
    .section.dense .section-inner {
        padding: 24px 18px;
        grid-gap: 14px;
    }
}
/* Tighter text rhythm in dense sections */
.section.dense .section-title { margin: 0 0 6px; }
.section.dense .section-subtitle { margin: 0 0 4px; }
.section.dense .section-lead { margin: 4px 0 0; line-height: 1.45; }
.section.dense p { margin: 4px 0; }
.section.dense .feature-list { margin-top: 6px; }
.section.dense .feature-list li { margin: 4px 0; }

.section-title {
    font-size: clamp(1.5rem, 2.8vw, 2.25rem);
    font-weight: 700;
    margin: 2px 0 10px;
}
.section-title.big {
    font-size: clamp(2rem, 4.5vw, 3rem);
}
.section-subtitle {
    font-size: clamp(1.125rem, 2.2vw, 1.375rem);
    font-weight: 600;
    margin: 4px 0 8px;
}
.muted-number { opacity: 0.7; margin-right: 6px; }
.section-lead {
    font-size: clamp(1rem, 2.1vw, 1.125rem);
    color: rgba(255,255,255,0.9);
}

.feature-list {
    margin-top: 16px;
    padding-left: 20px;
    list-style: disc;
    color: rgba(255,255,255,0.92);
}
.feature-list li { margin: 6px 0; }
/* Slightly looser lists for readability */
.section .feature-list li { margin: 8px 0; }

.section-media { min-height: 220px; }
.section-media { margin: 0; }
.section-media.tight { margin: 8px 0; }
.section-text, .section-media { min-width: 0; }
.media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 28px;
}
.media-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    /* No border or background to avoid a boxed look over transparency */
    background: transparent;
    border: 0;
}
.media-narrow {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.media-caption {
    margin-top: 6px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}
.media-full {
    width: 100%;
    min-height: 260px;
}
.tech-hero.media-placeholder { min-height: 380px; }
.media-placeholder.emphasis {
    position: relative;
    min-height: 280px;
}
.emphasis-number {
    font-size: clamp(4rem, 18vw, 12rem);
    line-height: 0.9;
    font-weight: 800;
}
.emphasis-label { font-size: clamp(1rem, 4vw, 2rem); opacity: 0.9; }

/* At-a-glance stats band */
.stats-band .section-inner { padding-top: 26px; padding-bottom: 26px; }
.stats-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 780px) { .stats-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 16px; } }
.stat.card {
    display: grid; gap: 10px;
    padding: 16px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.12);
}
.stat.card.small { align-content: start; padding: 12px; gap: 8px; }
.stat.card.autopilot { align-content: center; }
.xp-head { font-size: 0.95rem; opacity: 0.85; font-weight: 650; letter-spacing: 0.02em; }
.stat-row { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 10px; }
.stat-value { font-size: clamp(1.6rem, 6vw, 2.3rem); font-weight: 800; letter-spacing: -0.01em; }
.stat-label { font-size: clamp(0.95rem, 2.2vw, 1.05rem); opacity: 0.9; }

/* Skill indicators (tiny bars) */
.stats-skills {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
@media (min-width: 680px) {
    .stats-skills { grid-template-columns: 1fr; }
}
.skill { display: flex; flex-direction: column; gap: 4px; }
.skill-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.skill-role { font-weight: 700; letter-spacing: 0.02em; font-size: 0.95rem; }
.skill-range { font-size: 0.85rem; opacity: 0.85; }
.meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.meter .seg {
    height: 4px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.14);
    border: 0;
}
.meter .seg.active {
    /* solid green for accessibility emphasis */
    background: #49d17e;
}
.meter .seg.pro { display: none; }
.meter-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 0.75rem; opacity: 0.5; text-transform: lowercase; letter-spacing: 0.02em; }

/* Quote card */
.quote-card {
    margin: 0;
    padding: 28px 28px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.12);
}
.quote-text {
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    line-height: 1.5;
    color: rgba(255,255,255,0.92);
}
.quote-footer {
    margin-top: 12px;
    font-size: 0.95rem;
    opacity: 0.8;
}

/* CTA link button */
.cta-link {
    display: inline-block;
    color: #111;
    background: #ff6a00;
    padding: 10px 16px;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}
.cta-link:hover { transform: translateY(1px); opacity: 0.98; }
.cta-link:focus-visible { box-shadow: 0 0 0 3px rgba(255,106,0,0.35); outline: none; }

/* Footer / Imprint */
.footer {
    background: #0a0a0a;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}
.footer-content { display: flex; align-items: center; justify-content: space-between; gap: 16px; opacity: 0.85; font-size: 0.95rem; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: rgba(255,255,255,0.8); text-decoration: none; border-bottom: 1px solid transparent; }
.footer-links a:hover { color: rgba(255,255,255,0.95); border-bottom-color: rgba(255,255,255,0.2); }
.footer-right { color: rgba(255,255,255,0.8); white-space: nowrap; }
.imprint-content { display: none; }

/* Spec Table */
.spec-table { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
.spec-row {
    display: grid; grid-template-columns: 1fr; gap: 4px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
}
.spec-label {
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    font-weight: 700;
}
.spec-value {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.95);
    font-weight: 550;
}
@media (min-width: 640px) {
    .spec-row { grid-template-columns: 0.9fr 1.1fr; align-items: baseline; }
    .spec-label { font-size: 0.95rem; }
    .spec-value { font-size: 1.05rem; }
}

/* Cards grid (order page) */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 700px) {
    .cards-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
    .cards-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.videos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
}
.card-title {
    margin: 0 0 8px;
    font-weight: 650;
}
.card-list { 
    margin: 0; 
    padding-left: 18px; 
    list-style: disc; 
}
.card-list li { margin: 6px 0; }

/* Reduce motion: pause background animation if any (future-proof) */
@media (prefers-reduced-motion: reduce) {
    .hero-logo { transition: none; }
}

/* Responsive video embeds */
.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    overflow: hidden;
}
.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Videos page layout */
.videos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}
@media (min-width: 820px) {
    .videos-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1240px) {
    .videos-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.video-card {
    display: grid;
    gap: 12px;
}
.video-full { grid-column: 1 / -1; }
.video-meta .card-title {
    margin-top: 6px;
    margin-bottom: 8px;
}

/* Story page goals grid */
.goals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 10px;
}
@media (min-width: 680px) {
    .goals-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
    .goals-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.goal-card {
    padding: 14px 16px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.92);
    font-weight: 520;
}

/* Story page enhancements */
.story-page .section-subtitle { color: #ff8a33; }
.accent { color: #ff8a33; }
.subtle-divider {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, rgba(255,138,51,0), rgba(255,138,51,0.5), rgba(255,138,51,0));
    border: 0;
    margin: 14px 0 8px;
}
/* Very subtle carbon twill pattern overlay */
.section.carbon { position: relative; overflow: hidden; }
.section.carbon::before {
    content: "";
    position: absolute; inset: 0;
    pointer-events: none;
    background-image:
      repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 10px),
      repeating-linear-gradient(135deg, rgba(0,0,0,0.15) 0 1px, transparent 1px 10px);
    opacity: 0.2; /* slightly stronger so it’s visible on modern displays */
}

/* Technology page: consistent dense layout and subtle separators */
/* Technology page visual tweaks */
.tech-page .section .section-subtitle { display: flex; align-items: baseline; gap: 8px; color: #ff8a33; }
/* Offset the fixed header so the first title isn't covered */
.tech-page { padding-top: 64px; }
/* Number badge */
.tech-page .section .muted-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 2px 10px;
    margin-right: 8px;
    border-radius: 9999px;
    background: rgba(255,106,0,0.16);
    border: 1px solid rgba(255,106,0,0.32);
    color: #ff8a33;
}
/* Two-column layout for headings vs. body on wide screens */
@media (min-width: 980px) {
    .tech-page .section .section-text {
        display: grid;
        grid-template-columns: 0.38fr 1fr;
        gap: 14px 22px;
        align-items: start;
    }
    .tech-page .section .section-text > h2 { grid-column: 1; }
    .tech-page .section .section-text > :not(h2) { grid-column: 2; }
}
/* Local TOC removed */

/* Partners strip */
.partners-section .section-inner { padding-top: 28px; padding-bottom: 36px; }
.partners {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 16px 22px;
    align-items: center;
}
@media (min-width: 580px) {
    .partners { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}
@media (min-width: 880px) {
    .partners { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
}
.partner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 23 / 9; /* wider pill for more consistent logo presence */
    min-height: 52px; /* keep a floor for very narrow viewports */
    padding: 8px 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, opacity 0.2s ease;
}
.partner:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.18); opacity: 1; }
.partner:focus-visible { outline: 2px solid #ff6a00; outline-offset: 2px; }
.partner-logo {
    /* scale relative to the box height for consistent visual size across aspect ratios */
    max-height: 65%;
    max-width: 75%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(1.05) contrast(1.0);
    opacity: 0.96;
}
.partner-name { font-weight: 650; letter-spacing: 0.02em; font-size: 0.95rem; opacity: 0.9; }

/* Autopilot page: extra-tight vertical rhythm */
.autopilot-page .section.dense .section-inner {
    padding-top: 30px;
    padding-bottom: 30px;
    grid-gap: 14px;
}
@media (min-width: 1024px) {
    .autopilot-page .section.dense .section-inner {
        padding-top: 36px;
        padding-bottom: 36px;
        grid-gap: 16px;
    }
}
