/* ====== Base dark surface + tweaks ====== */
html.dark body {
    background: #0b0d0f;
    color: #e5e7eb;
}

html.dark .text-charcoal {
    color: #e5e7eb;
}

html.dark .sticky-header {
    background: rgba(10, 12, 14, .45);
    border-bottom-color: rgba(255, 255, 255, .12);
}

html.dark .glass-card {
    border-color: rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .08);
}

html.dark .glass-card::before {
    opacity: .25;
}

/* ===== Glass card & header ===== */
.glass-card {
    position: relative;
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, .35);
}

.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(140% 80% at 0% 0%, rgba(255, 255, 255, .28), transparent 50%);
    pointer-events: none;
    opacity: .45;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass-card {
        background: rgba(255, 255, 255, .42);
        border: 1px solid rgba(255, 255, 255, .28)
    }

    .glass-card::before {
        opacity: .30
    }
}

.sticky-header {
    background: rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .35);
    /* --- Chrome/Safari alignment + compositing fixes --- */
    isolation: isolate;
    /* force its own backdrop-filter layer */
    will-change: backdrop-filter, background;
}

html.dark .sticky-header {
    background: rgba(10, 12, 14, .45);
    border-bottom-color: rgba(255, 255, 255, .12);
    /* keep the same layer behavior in dark too */
    isolation: isolate;
    will-change: backdrop-filter, background;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease
}

.accordion-content.active {
    max-height: 200px
}

.logo-clip {
    height: 4.75rem;
    width: 9.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .45);
    box-shadow: -2px 5px 10px 0px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .35);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-clip img {
    width: auto;
    height: 135%;
    object-fit: cover;
    /* clip-path: ellipse(47% 42% at 50% 50%); */
    transform: translateY(1px);
    user-select: none;
    pointer-events: none;
}

/* Remove inline style attrs → background images as classes (CSP-friendly) */
.bg-films-yarn {
    background-image: url('./assets/829BDC6D-593F-433C-9D06-33EEC5289B54.PNG');
    background-size: cover;
    background-position: center;
}

.bg-industries {
    background-image: url('./assets/10C3658C-062D-43D9-AA07-A2F2F579DED0.PNG');
    background-size: cover;
    background-position: center;
}

/* ====== Mobile polish (≤640px) ====== */
@media (max-width: 640px) {
    .logo-clip {
        height: 3.25rem;
        width: 6.75rem;
        border-radius: 22px;
    }

    .logo-clip img {
        height: 120%;
    }

    .brand-title {
        font-size: 1.35rem;
        line-height: 1.1;
    }

    .brand-sub {
        font-size: .80rem;
    }

    .hero-img {
        height: 70vh;
        min-height: 560px;
        object-position: 60% 35%;
    }

    .cta-wrap {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        top: calc(72px + env(safe-area-inset-top, 0px));
    }

    .cta-btn {
        width: min(88vw, 360px);
    }

    .glass-card {
        background: rgba(255, 255, 255, .18);
        border: 1px solid rgba(255, 255, 255, .35);
    }

    .glass-card h1 {
        font-size: 1.6rem;
    }

    .glass-card p {
        font-size: 1rem;
    }
}

/* ===== Contact Modal (glass) ===== */
.contact-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.contact-backdrop[aria-hidden="false"] {
    display: block;
}

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: none;
    place-items: center;
    padding: 24px;
}

.contact-modal[aria-hidden="false"] {
    display: grid;
}

.contact-card {
    width: min(560px, 94vw);
    border-radius: 18px;
    position: relative;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .38);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    overflow: hidden;
}

.contact-card:before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(140% 80% at -10% -20%, rgba(255, 255, 255, .45), transparent 55%);
}

.contact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    gap: 12px;
}

.contact-title {
    font-weight: 800;
    font-size: 1.15rem
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 38px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .06);
    background: rgba(255, 255, 255, .75);
    box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .45);
}

.icon-btn:hover {
    background: #fff
}

.contact-body {
    padding: 10px 20px 20px;
}

.contact-tabs {
    display: flex;
    gap: 8px;
    padding: 0 20px 12px;
}

.tab {
    flex: 1;
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .06);
    background: rgba(255, 255, 255, .8);
    cursor: pointer;
}

.tab[aria-selected="true"] {
    background: #1F6FEB;
    color: #fff;
    border-color: transparent;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 10px;
}

.contact-row .actions {
    margin-left: auto;
    display: flex;
    gap: 8px
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, .06);
    background: #fff;
}

/* Dark variant */
html.dark .contact-card {
    background: rgba(16, 22, 28, .65);
    border-color: rgba(255, 255, 255, .15);
}

html.dark .icon-btn {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .15);
    color: #e5e7eb
}

html.dark .icon-btn:hover {
    background: rgba(255, 255, 255, .14)
}

html.dark .tab {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .12);
    color: #e5e7eb
}

html.dark .contact-row,
html.dark .chip {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .12);
    color: #e5e7eb
}

/* ====== MOBILE CONTACT SHEET POLISH (≤480px) ====== */
@media (max-width: 480px) {
    .contact-modal {
        align-items: end;
        padding: 0;
    }

    .contact-card {
        width: 100vw;
        max-width: 100vw;
        border-radius: 18px 18px 0 0;
        margin: 0;
        transform: translateZ(0);
    }

    .contact-header {
        padding: 16px 20px 12px;
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
    }

    .contact-body {
        padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        overflow: auto;
        max-height: min(72vh, 560px);
    }

    .contact-tabs {
        padding: 6px 16px 10px;
        gap: 10px;
    }

    .contact-tabs .tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 12px 10px;
        border-radius: 14px;
        font-size: 13px;
        line-height: 1.1;
        height: 74px;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .contact-tabs .tab i {
        font-size: 22px;
        margin-right: 0 !important;
    }

    .contact-tabs .tab[aria-selected="true"] {
        box-shadow: 0 6px 18px -8px rgba(31, 111, 235, .55);
    }

    .contact-row {
        padding: 12px;
        gap: 10px;
    }

    .contact-row .actions {
        gap: 6px;
        flex-shrink: 0;
    }

    .chip {
        padding: 8px 10px;
        font-size: 12.5px;
        white-space: nowrap;
    }

    .chip i {
        font-size: 12px;
    }

    #contactClose.icon-btn {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .contact-backdrop {
        background: rgba(0, 0, 0, .55);
    }
}

@media (max-width: 360px) {
    .contact-tabs .tab {
        height: 70px;
        font-size: 12px;
    }

    .contact-tabs .tab i {
        font-size: 20px;
    }

    .contact-row {
        padding: 10px;
    }

    .chip {
        padding: 7px 9px;
        font-size: 12px;
    }
}

/* Desktop hover */
@media (hover:hover) {
    .contact-tabs .tab:hover {
        background: rgba(31, 111, 235, .10);
        border-color: rgba(31, 111, 235, .28);
        box-shadow: 0 10px 26px -14px rgba(31, 111, 235, .55);
    }

    .chip:hover {
        background: #1F6FEB;
        color: #fff;
    }

    .chip:hover i {
        opacity: .95;
    }
}

.contact-tabs .tab[aria-selected="true"] {
    background: #1F6FEB;
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 28px -12px rgba(31, 111, 235, .65);
}

.contact-tabs .tab:focus-visible,
.chip:focus-visible {
    outline: 2px solid #1F6FEB;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(31, 111, 235, .20);
    border-radius: 14px;
}

.contact-tabs .tab:active {
    transform: translateY(1px);
    filter: saturate(1.05);
}

.chip:active {
    transform: translateY(1px);
    background: #1F6FEB;
    color: #fff;
}

.contact-tabs .tab,
.chip,
.icon-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* ===== Compact IST Clock chip ===== */
.clock-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
    background: rgba(255, 255, 255, .6);
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .35);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    backdrop-filter: saturate(160%) blur(10px);
    white-space: nowrap;
    user-select: none;
    font-variant-numeric: tabular-nums;
}

.clock-chip i {
    font-size: 12px;
    opacity: .85
}

.clock-chip .label {
    letter-spacing: .35px;
    opacity: .85
}

.clock-chip .dot {
    opacity: .6
}

.clock-chip .time {
    font-weight: 800;
}

@media (min-width: 640px) {
    .clock-chip {
        font-size: 13px;
        padding: 6px 10px;
        gap: 7px;
    }
}

@media (min-width: 768px) {
    .clock-chip {
        font-size: 14px;
        padding: 7px 11px;
    }
}

html.dark .clock-chip {
    background: rgba(255, 255, 255, .10);
    border-color: rgba(255, 255, 255, .14);
    color: #e5e7eb;
}

@media (hover:hover) {
    .clock-chip:hover {
        box-shadow: 0 12px 30px -12px rgba(31, 111, 235, .45);
        border-color: rgba(31, 111, 235, .25);
    }
}

/* Extra-compact override */
.clock-chip {
    padding: 4px 8px !important;
    font-size: 12px !important;
    gap: 6px !important;
}

.clock-chip i {
    font-size: 12px !important;
}

@media (max-width:380px) {
    .clock-chip {
        font-size: 11px !important;
        padding: 4px 7px !important;
    }
}