/* ============================================================
   Mueon public site — shared shell
   Typography: Inter (self-hosted) for all page content; the serif
   stack is reserved for the logo / brand lockups only.
   See STYLEGUIDE — styleguide.html for the full type + color system.
   ============================================================ */

/* Self-hosted Inter (variable) — one file covers weights 100–900. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../assets/fonts/InterVariable.woff2') format('woff2');
}

:root {
    /* Page content — Inter, with system-sans fallbacks. */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    /* Logos / brand lockups only (Mueon wordmark, hero, stand-in logos). */
    --font-brand: Georgia, 'Times New Roman', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: #000;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

/* ---------- Header / nav ---------- */

.site-header {
    border-bottom: 1px solid #eee;
}

.site-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-family: var(--font-brand);
    font-size: 1.75rem;
    text-decoration: none;
    color: #000;
    display: inline-flex;
    align-items: baseline;
    gap: 0.3em;
    white-space: nowrap;
}

.site-logo .pipe {
    font-weight: 300;
}

.site-logo .mu sup {
    font-size: 0.55em;
    font-style: italic;
    position: relative;
    top: -0.15em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    font-family: var(--font-sans);
}

.nav-link {
    background: none;
    border: none;
    font: inherit;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
}

.nav-link:hover,
.nav-link-active {
    color: #000;
    font-weight: 700;
}

/* Reserve each text link's bold width up front (via a hidden bold copy)
   so hover/active weight changes don't reflow the rest of the nav.
   The dropdown button is last in the row, so it doesn't need this. */
a.nav-link {
    flex-direction: column;
    gap: 0;
}

a.nav-link::after {
    content: attr(data-text);
    font-weight: 700;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    user-select: none;
}

.chevron {
    width: 0.85em;
    height: 0.85em;
    stroke-width: 2.5;
    transition: transform 0.2s ease;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown.open .chevron {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    min-width: 160px;
    padding: 0.5rem 0;
    z-index: 100;
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #333;
    text-decoration: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.nav-link-active {
    font-weight: 700;
    color: #000;
}

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

@media (max-width: 860px) {
    .site-header-inner {
        padding: 1.25rem 1.5rem;
    }

    .site-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        border-bottom: 1px solid #eee;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0.5rem 0;
        overflow-y: auto;
        z-index: 200;
    }

    .site-header {
        position: relative;
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav > .nav-link,
    .nav-dropdown {
        width: 100%;
    }

    .site-nav > .nav-link {
        padding: 0.9rem 1.5rem;
    }

    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 0.9rem 1.5rem;
    }

    .nav-dropdown-menu {
        position: static;
        border: none;
        box-shadow: none;
        min-width: 0;
        padding: 0 0 0 2.5rem;
        display: none;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
    }

    .nav-hamburger {
        display: block;
    }
}

/* ---------- Section header pattern (flanking rules) ---------- */

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 3rem 2.5rem;
}

.section-header .line {
    flex: 1 1 auto;
    height: 1px;
    background: #ccc;
}

.section-header h2 {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 2rem;
    white-space: nowrap;
    color: #000;
}

/* ---------- Footer ---------- */

.site-footer {
    text-align: center;
    padding: 2rem 1.5rem 3rem;
    color: #666;
    font-size: 0.8rem;
    line-height: 1.7;
    font-family: var(--font-sans);
}

.site-footer .footer-rule {
    width: 60px;
    height: 1px;
    background: #ddd;
    margin: 1.5rem auto 0;
}

/* ---------- Home hero ---------- */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 4rem;
    gap: 0;
}

.hero-lockup {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
}

.hero-title {
    display: flex;
    align-items: baseline;
    gap: 0;
    font-family: var(--font-brand);
    font-size: clamp(72px, 20vw, 180px);
    font-weight: 400;
    color: #000;
    letter-spacing: -0.5px;
    line-height: 1;
}

.hero-title .pipe {
    margin: 0 0.225em;
    font-weight: 300;
}

.hero-title .mu {
    position: relative;
    display: inline-block;
}

.hero-title .mu sup {
    font-size: 0.5em;
    position: relative;
    top: -0.1em;
    font-style: italic;
}

.hero-subtitle {
    font-family: var(--font-brand);
    font-size: clamp(24px, 5vw, 40px);
    font-weight: 400;
    color: #000;
    letter-spacing: 0.08em;
    margin: 1.2rem 0 0;
}

.hero-tagline {
    font-family: var(--font-sans);
    font-size: clamp(16px, 2.25vw, 21px);
    font-weight: 400;
    color: #000;
    letter-spacing: 0.03em;
    margin: 8rem 0 0;
    max-width: 900px;
    text-align: center;
}

/* ---------- Technology (Coming Soon) ---------- */

.coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.coming-soon h1 {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: clamp(48px, 9vw, 96px);
    color: #000;
}

/* ---------- Investors ---------- */

.investors-grid {
    max-width: 1400px;
    margin: 0 auto 4rem;
    padding: 0 3rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
}

.investor-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 2;
    padding: 1.5rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.investor-tile img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    display: block;
}

.investor-tile--zoom {
    padding: 0.75rem;
}

.investor-tile--shrink {
    padding: 2.75rem;
}

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

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

/* ---------- Contact ---------- */

.contact-grid {
    max-width: 1400px;
    margin: 0 auto 4rem;
    padding: 0 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.contact-details p {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #333;
}

.contact-cta {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.9rem 2rem;
    background: #14171f;
    color: #fff;
    border: none;
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: var(--font-sans);
    font-weight: 600;
    cursor: pointer;
}

.contact-cta:hover {
    background: #000;
}

.contact-form-panel {
    max-width: 420px;
}

.contact-form-label {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
}

.contact-form-cancel {
    display: block;
    margin-top: 1rem;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: #555;
    text-decoration: underline;
    cursor: pointer;
}

.contact-form-cancel:hover {
    color: #000;
}

.contact-wordmark {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.3em;
    font-family: var(--font-brand);
    font-size: clamp(36px, 6vw, 64px);
    color: #000;
}

.contact-wordmark .mu sup {
    font-size: 0.55em;
    font-style: italic;
    position: relative;
    top: -0.15em;
}

@media (max-width: 720px) {
    .contact-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding-bottom: 4rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    text-decoration: none;
}

.social-icons svg {
    width: 24px;
    height: 24px;
}

.social-linkedin {
    background: #0a66c2;
    color: #fff;
}

.social-x {
    background: #000;
    color: #fff;
}

/* ============================================================
   Widget content (Careers / News / Videos) — folded in from
   web/widgets/*.html, kept close to source for parity.
   ============================================================ */

.mueon-careers-widget {
    font-family: var(--font-sans);
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 20px 5rem;
}

.mcw-header {
    text-align: center;
    margin-bottom: 40px;
}

.mcw-header h2 {
    font-size: 48px;
    font-weight: normal;
    margin-bottom: 10px;
}

.mcw-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
}

.mcw-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 220px;
}

.mcw-search-icon {
    width: 18px;
    height: 18px;
    color: #999;
    flex-shrink: 0;
}

.mcw-search input {
    border: none;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    flex: 1;
    min-width: 120px;
}

.mcw-location-filter {
    position: relative;
    flex-shrink: 0;
}

.mcw-location-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    padding: 4px 2px;
}

.mcw-location-toggle:focus-visible {
    outline: 2px solid #000;
    outline-offset: 4px;
    border-radius: 2px;
}

.mcw-location-filter.open .mcw-location-toggle .chevron {
    transform: rotate(180deg);
}

.mcw-location-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0;
    z-index: 100;
}

.mcw-location-filter.open .mcw-location-menu {
    display: block;
}

.mcw-location-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}

.mcw-location-option:hover {
    background-color: #fafafa;
}

.mcw-location-option input[type="radio"] {
    accent-color: #000;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.mcw-empty-state {
    text-align: center;
    color: #999;
    font-size: 15px;
    padding: 40px 0;
}

.mcw-job-list {
    display: flex;
    flex-direction: column;
}

.mcw-job {
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.mcw-job:hover {
    background-color: #fafafa;
}

.mcw-job-header:focus-visible {
    outline: 2px solid #000;
    outline-offset: 4px;
}

.mcw-job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.mcw-job-title-group {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.mcw-job-title {
    font-size: 15px;
    font-weight: 400;
}

.mcw-job-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.mcw-badge {
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 3px;
    font-size: 13px;
    white-space: nowrap;
}

.mcw-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
}

.mcw-chevron {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.mcw-job.expanded .mcw-chevron {
    transform: rotate(180deg);
}

.mcw-job-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.mcw-job.expanded .mcw-job-details {
    max-height: 3000px;
}

.mcw-details-content {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #000;
}

.mcw-detail-section {
    margin-bottom: 25px;
}

.mcw-detail-section h3 {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 12px;
}

.mcw-detail-section p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 10px;
    color: #333;
}

.mcw-detail-section ul {
    margin-left: 25px;
    font-size: 15px;
    line-height: 1.8;
}

.mcw-detail-section ul li {
    margin-bottom: 8px;
    color: #333;
}

.mcw-apply-section {
    margin-top: 25px;
    margin-bottom: 30px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.mcw-apply-btn {
    padding: 12px 30px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-family: var(--font-sans);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease;
    margin-top: 20px;
}

.mcw-apply-btn:hover {
    background-color: #333;
}

.mcw-apply-form {
    margin-top: 20px;
}

.mcw-close-btn {
    padding: 8px 20px;
    background-color: #f0f0f0;
    color: #000;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: var(--font-sans);
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.mcw-close-btn:hover {
    background-color: #e0e0e0;
}

@media (max-width: 768px) {
    .mcw-header h2 {
        font-size: 36px;
    }

    .mcw-job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .mcw-job-meta {
        width: 100%;
        justify-content: space-between;
    }

    .mcw-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ============================================================
   News & Media — bento layout (news.html)
   Feature video (native 16:9) + rail of news tiles, then a
   uniform 3-column grid of the remaining articles.
   ============================================================ */

.bento-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem 5rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 190px;
    grid-auto-flow: dense;
    gap: 1.25rem;
}

.bento-tile {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.bento-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    border-color: #d4d4d4;
}

/* Feature row: video (native 16:9, never clipped) beside a rail of
   news tiles that stretch to match the video's natural height. */
.bento-feature {
    display: flex;
    align-items: stretch;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.bento-feature .bento-video {
    flex: 2 1 0;
    padding: 0;
    cursor: default;
}

.bento-video:hover {
    transform: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border-color: #e5e5e5;
}

.bento-rail {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Rail cards share the video's height equally, so the column of
   news tiles lines up flush with the top and bottom of the video. */
.bento-rail .bento-tile {
    flex: 1 1 0;
    min-height: 0;
}

.bento-video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.bento-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.bento-video-info {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Standard article tile — all news tiles use this, uniform size */
.bento-tile.bento-standard {
    grid-column: span 1;
    grid-row: span 1;
    justify-content: space-between;
}

.bento-source {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #000;
    margin-bottom: 0.6rem;
}

.bento-title {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bento-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: #868e96;
    margin-top: 0.9rem;
}

.bento-meta .external-link-icon {
    width: 14px;
    height: 14px;
    opacity: 0.55;
    transition: opacity 0.25s ease;
}

.bento-tile:hover .bento-meta .external-link-icon {
    opacity: 1;
}

@media (max-width: 900px) {
    /* Stack the video above the rail; rail becomes a row of cards. */
    .bento-feature {
        flex-direction: column;
    }

    .bento-rail {
        flex-direction: row;
    }

    .bento-rail .bento-tile {
        min-height: 170px;
    }

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

@media (max-width: 560px) {
    .bento-rail {
        flex-direction: column;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .bento-tile.bento-standard {
        grid-column: span 1;
        grid-row: auto;
    }
}

/* ============================================================
   Mega menu — "Company" nav dropdown (OpenAI-style).
   Desktop: nav sits left of the logo; the Company dropdown is a
   full-width panel flush against the header (zero gap) so the
   whitespace between the nav bar and the panel is part of the
   hoverable area — the cursor can travel straight down into the
   panel without the menu closing. Mobile keeps the original
   tap-to-open compact dropdown defined above.
   ============================================================ */
@media (min-width: 861px) {
    .site-header {
        position: relative;
        z-index: 300;
    }

    /* Nav links sit right after the logo (left-aligned) so they line
       up with the left-anchored dropdown content. */
    .site-header-inner {
        justify-content: flex-start;
        gap: 3.5rem;
    }

    /* Invisible bridge over the gap between the "Company" button and
       the panel — keeps the pointer inside a hoverable area the whole
       way down, so the menu never closes mid-transit. */
    .nav-dropdown::after {
        content: '';
        position: absolute;
        top: 100%;
        left: -1.5rem;
        right: -1.5rem;
        height: 2.5rem;
        display: none;
    }

    .nav-dropdown:hover::after,
    .nav-dropdown.open::after {
        display: block;
    }

    .nav-dropdown-menu.mega {
        display: block;
        position: fixed;
        top: var(--header-h, 84px);
        left: 0;
        right: 0;
        min-width: 0;
        margin: 0;
        padding: 3rem;
        border: none;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
        background: #fff;
        z-index: 250;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-6px);
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    }

    .nav-dropdown:hover .nav-dropdown-menu.mega,
    .nav-dropdown.open .nav-dropdown-menu.mega {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-dropdown:hover .chevron,
    .nav-dropdown.open .chevron {
        transform: rotate(180deg);
    }

    .mega-inner {
        max-width: 1400px;
        margin: 0 auto;
        display: flex;
        gap: 4.5rem;
    }

    .mega-col {
        flex: 1 1 auto;
    }

    .mega-col h3 {
        font-family: var(--font-sans);
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #999;
        margin-bottom: 1.25rem;
    }

    .mega-col a.mega-link {
        display: block;
        font-family: var(--font-sans);
        font-size: 1.6rem;
        font-weight: 500;
        color: #111;
        text-decoration: none;
        padding: 0.5rem 0;
        transition: color 0.15s ease;
    }

    .mega-col a.mega-link:hover {
        color: #666;
    }

}
