/* ==============================================
   COMPONENTS — Shared UI components used across pages
   Nav, Sections, Buttons, Footer, Reveal, Dropdown, Mobile Menu
   ============================================== */

/* ---- HEADER — Floating Pill Nav ---- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    padding: 16px var(--container-padding);
    transition: var(--transition-btn);
}

.nav-capsule {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
    margin-inline: auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-pill);
    padding: 12px 12px 12px 24px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: var(--transition-btn);
}

.brand-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--black);
    white-space: nowrap;
}

.nav-logo { height: 36px; width: auto; object-fit: contain; display: block; }
.nav-logo--dark  { display: none; }
.nav-logo--light { display: block; }
.site-header.scrolled .nav-logo--light { display: none; }
.site-header.scrolled .nav-logo--dark  { display: block; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    font-size: 13.6px;
    font-weight: 500;
    color: var(--text-body);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    transition: var(--transition-btn);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--black);
    background: rgba(0, 0, 0, 0.04);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2001;
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background-color: var(--black);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Scrolled state — dark glass pill */
.site-header.scrolled .nav-capsule {
    background: rgba(0, 0, 0, 0.88);
    border-color: rgba(255, 255, 255, 0.1);
}

.site-header.scrolled .brand-logo,
.site-header.scrolled .nav-link {
    color: var(--white);
}

.site-header.scrolled .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.site-header.scrolled .mobile-menu-btn span {
    background-color: var(--white);
}

/* Open menu state */
.site-header.menu-open .mobile-menu-btn span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.site-header.menu-open .mobile-menu-btn span:nth-child(2) {
    opacity: 0;
}
.site-header.menu-open .mobile-menu-btn span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-header.scrolled.menu-open .nav-capsule {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
}
.site-header.scrolled.menu-open .brand-logo,
.site-header.scrolled.menu-open .mobile-menu-btn span {
    color: var(--black);
}

/* ---- MOBILE MENU OVERLAY ---- */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-btn);
}
.mobile-close-btn:hover { background: rgba(0, 0, 0, 0.1); }

.mobile-close-btn::before,
.mobile-close-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--black);
    border-radius: 2px;
}
.mobile-close-btn::before { transform: rotate(45deg); }
.mobile-close-btn::after { transform: rotate(-45deg); }

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
}
.mobile-nav-link {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--black);
    text-decoration: none;
    transition: var(--transition-btn);
}
.mobile-nav-link:hover { opacity: 0.7; }
.mobile-nav-child {
    font-size: 1rem !important;
    color: rgba(0, 0, 0, 0.5) !important;
    padding-left: 20px;
}

/* ---- DROPDOWN NAVIGATION ---- */
.nav-item-dropdown { position: relative; }

.nav-link-arrow::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 6px;
    vertical-align: middle;
    position: relative;
    top: -1px;
    transition: transform 0.2s ease, top 0.2s ease;
}
.nav-item-dropdown:hover .nav-link-arrow::after {
    transform: rotate(-135deg);
    top: 1px;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.09);
    padding: 8px;
    min-width: 280px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.17s ease, transform 0.17s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 8px 20px rgba(0,0,0,0.09), 0 24px 40px rgba(0,0,0,0.05);
    z-index: 500;
}
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 9px;
    height: 9px;
    background: #ffffff;
    border-left: 1px solid rgba(0, 0, 0, 0.09);
    border-top: 1px solid rgba(0, 0, 0, 0.09);
}
.nav-dropdown::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: -30px;
    right: -30px;
    height: 18px;
}
.nav-item-dropdown:hover .nav-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-dd-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 10px;
    border-radius: 9px;
    text-decoration: none;
    transition: background 0.13s ease;
}
.nav-dd-item:hover { background: rgba(0, 0, 0, 0.042); }

.nav-dd-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #f2f2f3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #555;
    transition: background 0.13s ease, color 0.13s ease;
}
.nav-dd-item:hover .nav-dd-icon { background: #e7e7ea; color: #1a1a1a; }

.nav-dd-text { display: flex; flex-direction: column; gap: 2px; }
.nav-dd-label { font-size: 13.5px; font-weight: 600; color: #111; line-height: 1.3; letter-spacing: -0.01em; }
.nav-dd-desc { font-size: 11.5px; color: #999; line-height: 1.4; }

/* Dark dropdown (scrolled) */
.site-header.scrolled .nav-dropdown {
    background: #1d1d1f;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.4), 0 8px 20px rgba(0,0,0,0.45);
}
.site-header.scrolled .nav-dropdown::before { background: #1d1d1f; border-color: rgba(255, 255, 255, 0.1); }
.site-header.scrolled .nav-dd-icon { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.6); }
.site-header.scrolled .nav-dd-item:hover .nav-dd-icon { background: rgba(255, 255, 255, 0.14); color: #fff; }
.site-header.scrolled .nav-dd-item:hover { background: rgba(255, 255, 255, 0.06); }
.site-header.scrolled .nav-dd-label { color: rgba(255, 255, 255, 0.9); }
.site-header.scrolled .nav-dd-desc { color: rgba(255, 255, 255, 0.4); }

/* ---- SECTIONS — Stacking Card System ---- */
.section {
    position: sticky;
    top: 0;
    padding: 128px 0;
    clip-path: inset(0px);
    --fade-progress: 0;
}
.section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    opacity: var(--fade-progress);
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.15s ease;
}

.section--hero {
    background-color: var(--light-grey);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 100px;
    z-index: 1;
}

.section--dark {
    background-color: var(--black);
    color: var(--white);
    border-radius: var(--radius-section) var(--radius-section) 0 0;
    margin-top: calc(-1 * var(--radius-section));
    clip-path: inset(0px round var(--radius-section) var(--radius-section) 0 0);
}
.section--dark p { color: var(--text-muted); }

.section--white {
    background-color: var(--white);
    color: var(--black);
    border-radius: var(--radius-section) var(--radius-section) 0 0;
    margin-top: calc(-1 * var(--radius-section));
    clip-path: inset(0px round var(--radius-section) var(--radius-section) 0 0);
}

.section--light {
    background-color: var(--section-grey);
    color: var(--black);
    border-radius: var(--radius-section) var(--radius-section) 0 0;
    margin-top: calc(-1 * var(--radius-section));
    clip-path: inset(0px round var(--radius-section) var(--radius-section) 0 0);
}

.section--dark-solid {
    background-color: var(--black);
    color: var(--white);
    clip-path: inset(0px);
}
.section--dark-solid p { color: var(--text-muted); }

.section--stacked-white {
    background-color: var(--white);
    border-radius: var(--radius-section) var(--radius-section) 0 0;
    margin-top: calc(-1 * var(--radius-section));
    clip-path: inset(0px round var(--radius-section) var(--radius-section) 0 0);
}

.section--stacked-light {
    background-color: var(--section-grey);
    border-radius: var(--radius-section) var(--radius-section) 0 0;
    margin-top: calc(-1 * var(--radius-section));
    clip-path: inset(0px round var(--radius-section) var(--radius-section) 0 0);
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: var(--transition-btn);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-body);
}
.btn--primary { background: var(--black); color: var(--white); }
.btn--primary:hover { background: var(--hover-dark); }
.btn--white { background: var(--white); color: var(--black); }
.btn--white:hover { background: var(--light-grey); }
.btn--outline { background: transparent; color: inherit; border: 1.5px solid currentColor; }
.btn--outline:hover { background: var(--black); color: var(--white); border-color: var(--black); }

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
    transition: var(--transition-btn);
}
.btn-text:hover { opacity: 0.7; }

.btn-nav-cta { margin-left: 12px; }
.btn-outline-dark { border-color: var(--black); color: var(--black); }

/* ---- FOOTER ---- */
.site-footer {
    background: var(--black);
    color: var(--white);
    padding: 80px 0 40px;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 80px;
}
.footer-logo { font-size: 1.25rem; font-weight: 800; color: var(--white); text-decoration: none; letter-spacing: -.02em; display: inline-block; }
.footer-logo-img { height: 40px; width: auto; display: block; }
.footer-bottom-logo { display: flex; align-items: center; justify-content: center; }
.footer-bottom-logo-img { height: 35px; width: auto; opacity: 0.45; filter: brightness(0) invert(1); transition: opacity .2s; }
.footer-bottom-logo-img:hover { opacity: 0.8; }
.footer-slogan { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-top: 20px; margin-bottom: 6px; }
.footer-tagline { color: var(--text-muted); font-size: 0.875rem; line-height: 1.6; margin: 0 0 20px; }
.footer-contact { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.footer-contact-row { display: flex; align-items: flex-start; gap: 8px; font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }
.footer-contact-row svg { flex-shrink: 0; margin-top: 2px; }
.footer-contact-row a { color: inherit; transition: var(--transition-btn); }
.footer-contact-row a:hover { color: var(--white); }
.footer-socials { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social-icon { width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,.07); color: var(--text-muted); display: flex; align-items: center; justify-content: center; text-decoration: none; transition: var(--transition-btn); border: 1px solid rgba(255,255,255,.08); }
.footer-social-icon:hover { background: rgba(255,255,255,.14); color: var(--white); border-color: rgba(255,255,255,.18); }
.footer-brand p { color: var(--text-muted); font-size: 0.9375rem; margin-top: 24px; margin-bottom: 12px; }
.footer-brand .email-link { font-weight: 500; transition: var(--transition-btn); }
.footer-brand .email-link:hover { opacity: 0.7; }
.footer-column h4 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: #b0b4bb; margin-bottom: 24px; }
.footer-column ul li { margin-bottom: 12px; }
.footer-column ul li a { font-size: 0.9375rem; color: var(--text-muted); transition: var(--transition-btn); }
.footer-column ul li a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}
.back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--transition-btn);
}
.back-to-top:hover { border-color: var(--white); color: var(--white); }
.footer-address { text-align: center; font-size: 0.8125rem; color: var(--text-muted); }
.footer-copyright { text-align: right; font-size: 0.8125rem; color: var(--text-muted); }
.social-links { display: flex; gap: 16px; margin-top: 24px; }
.social-links a { color: var(--text-muted); transition: var(--transition-btn); font-size: 0.875rem; }
.social-links a:hover { color: var(--white); }

/* ---- REVEAL ANIMATIONS ---- */
.reveal-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}
.reveal-fade {
    opacity: 0;
    transition: opacity var(--transition-reveal);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}
.reveal-up.active,
.reveal-fade.active,
.reveal-scale.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 600ms var(--ease-out-expo), transform 600ms var(--ease-out-expo);
}
.reveal-stagger.active > * {
    opacity: 1;
    transform: translateY(0);
}

/* ---- COVER MEDIA UTILITIES ---- */
.cover-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cover-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}
.iframe-fill {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.placeholder-text {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .mobile-menu-btn { display: flex; }
    .nav-links { display: none; }
    .section { padding: 80px 0; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 640px) {
    .section { padding: 56px 0; }
    .footer-top { grid-template-columns: 1fr; }
    .footer-bottom { grid-template-columns: 1fr; text-align: center; }
    .footer-copyright { text-align: center; }
}
