/* ─────────────────────────────────────────────────────────────────────────────
   Thermotec Plastics Ltd — Global Stylesheet
   ──────────────────────────────────────────────────────────────────────────── */

/* ── Root variables ──────────────────────────────── */
:root {
    --brand-purple:      #9b2586;
    --brand-purple-dark: #751c66;
    --brand-blue:        #2b82c9;
    --brand-dark:        #141318;
    --brand-grey:        #f8f9fa;
    --hairline:          rgba(0,0,0,0.08);
    --hairline-dark:     rgba(255,255,255,0.07);
    --container:         1480px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #ffffff;
    color: #212529;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--brand-blue); color: #fff; }

/* ── Scroll progress bar ─────────────────────────── */
#scroll-bar {
    position: fixed; top: 0; left: 0;
    height: 2px; width: 0%;
    background: linear-gradient(to right, var(--brand-purple), var(--brand-blue));
    z-index: 300;
    transition: width 0.06s linear;
    pointer-events: none;
}

/* ── Nav ─────────────────────────────────────────── */
.nav-link {
    position: relative; font-size: 0.78rem;
    font-weight: 600; color: #1a1a1a;
    text-decoration: none; padding: 4px 0;
    letter-spacing: 0.05em; text-transform: uppercase;
    transition: color 0.25s; white-space: nowrap;
}
.nav-link::after {
    content: ""; position: absolute;
    bottom: -4px; left: 0; width: 0; height: 1.5px;
    background: var(--brand-purple); transition: width 0.3s ease;
}
.nav-link:hover        { color: var(--brand-purple); }
.nav-link:hover::after { width: 100%; }
.nav-link.active       { color: var(--brand-purple); }
.nav-link.active::after{ width: 100%; }

.nav-item { position: relative; display: flex; align-items: center; }
.nav-item:hover .dropdown {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown {
    position: absolute; top: calc(100% + 20px); left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #fff;
    border-radius: 4px 4px 14px 14px;
    border-top: 2px solid var(--brand-purple);
    box-shadow: 0 32px 80px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.04);
    padding: 10px; min-width: 220px;
    opacity: 0; visibility: hidden;
    transition: all 0.22s cubic-bezier(.2,.7,.2,1);
    z-index: 100;
}
.dropdown a {
    display: block;
    padding: 9px 16px; font-size: 0.82rem;
    color: #333; text-decoration: none;
    border-radius: 8px; font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.15s;
}
.dropdown a:hover { background: #f8f9fa; color: var(--brand-purple); padding-left: 20px; }

/* ── Mobile menu ─────────────────────────────────── */
#mobile-menu {
    display: none; position: fixed;
    top: 84px; left: 0; right: 0; bottom: 0;
    background: #fff; z-index: 48;
    overflow-y: auto; padding: 16px 20px 40px;
}
#mobile-menu.open { display: block; }

/* ── Hero ────────────────────────────────────────── */
.slide-bg { position: absolute; inset: 0; z-index: 0; }
.slide-bg .slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.8s ease;
}
.slide-bg .slide.active {
    opacity: 1;
    animation: kenBurns 14s ease-out forwards;
}
@keyframes kenBurns {
    from { transform: scale(1.06); }
    to   { transform: scale(1.00); }
}

.hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(to right,
            rgba(11,10,15,0.96) 0%,
            rgba(11,10,15,0.84) 28%,
            rgba(11,10,15,0.38) 55%,
            rgba(11,10,15,0.03) 100%),
        radial-gradient(52% 70% at 0% 100%, rgba(155,37,134,0.22) 0%, transparent 65%);
}
#hero-glow {
    position: absolute; inset: 0; z-index: 2;
    pointer-events: none;
}
.hero-noise::after {
    content: ""; position: absolute; inset: 0; z-index: 3;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.038 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    mix-blend-mode: overlay; opacity: 0.65;
}

/* ── Section kicker ──────────────────────────────── */
.section-kicker {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 0.7rem; letter-spacing: 3.8px;
    text-transform: uppercase; font-weight: 600;
    color: var(--brand-purple); margin-bottom: 18px;
}
.section-kicker.kicker-dark { color: #7CC7F2; }

/* ── Ticker strip ────────────────────────────────── */
.ticker-outer { overflow: hidden; cursor: default; }
.ticker-track {
    display: flex; gap: 0;
    animation: tickerRoll 24s linear infinite;
    width: max-content; will-change: transform;
}
.ticker-outer:hover .ticker-track { animation-play-state: paused; }
@keyframes tickerRoll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── Scroll reveal ───────────────────────────────── */
.fade-up {
    opacity: 0; transform: translateY(32px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.22s; }
.delay-3 { transition-delay: 0.34s; }
.delay-4 { transition-delay: 0.46s; }
.delay-5 { transition-delay: 0.58s; }
.delay-6 { transition-delay: 0.70s; }

/* ── Capability tabs ─────────────────────────────── */
.cap-tab {
    position: relative; padding: 16px 0;
    font-size: 0.88rem; font-weight: 500;
    color: rgba(255,255,255,0.38);
    cursor: pointer; white-space: nowrap;
    border: none; background: none;
    transition: color 0.25s; flex-shrink: 0;
}
.cap-tab::after {
    content: ""; position: absolute;
    bottom: -1px; left: 0; width: 0; height: 2px;
    background: var(--brand-purple); transition: width 0.35s ease;
}
.cap-tab:hover { color: rgba(255,255,255,0.72); }
.cap-tab.active { color: #fff; font-weight: 600; }
.cap-tab.active::after { width: 100%; }

.cap-panel { display: none; }
.cap-panel.active {
    display: grid;
    animation: panelFade 0.5s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes panelFade {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Capability panel grid ───────────────────────── */
.cap-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 24px 70px rgba(0,0,0,0.25);
}
@media (max-width: 1023px) { .cap-grid { grid-template-columns: 1fr; } }

/* ── Industry cards ──────────────────────────────── */
.industry-card {
    position: relative; overflow: hidden;
    border-radius: 22px; display: block;
    text-decoration: none; cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.industry-card img {
    width: 100%; display: block; object-fit: cover;
    transition: transform 0.75s cubic-bezier(.25,.46,.45,.94);
}
.industry-card:hover img { transform: scale(1.08); }
.ic-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.20) 50%, rgba(0,0,0,0.0) 100%);
    transition: background 0.4s ease;
}
.industry-card:hover .ic-overlay {
    background: linear-gradient(to top, rgba(155,37,134,0.85) 0%, rgba(155,37,134,0.25) 55%, rgba(0,0,0,0.02) 100%);
}
.ic-content {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    justify-content: flex-end; padding: 28px;
}
.ic-arrow {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0); border: 1px solid rgba(255,255,255,0);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.82rem; color: white; margin-bottom: 10px;
    transition: all 0.35s ease; opacity: 0; transform: translateY(6px);
}
.industry-card:hover .ic-arrow {
    background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4);
    opacity: 1; transform: translateY(0);
}

/* ── Accred badge ────────────────────────────────── */
.accred-v3 {
    display: flex; align-items: center; gap: 16px;
    background: #ffffff; border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px; padding: 22px 26px;
    transition: all 0.3s ease; cursor: default;
    box-shadow: 0 4px 12px rgba(0,0,0,0.01);
}
.accred-v3:hover {
    border-color: rgba(155,37,134,0.2);
    background: rgba(155,37,134,0.01);
    transform: translateX(5px);
    box-shadow: 0 8px 24px rgba(155,37,134,0.04);
}

/* ── Client marquee ──────────────────────────────── */
.marquee-wrap {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
}
.marquee-track {
    display: flex; align-items: center; gap: 64px;
    animation: marqueeRoll 34s linear infinite;
    width: max-content;
}
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
.marquee-track img {
    height: 40px; width: auto; object-fit: contain; flex-shrink: 0;
    filter: brightness(0.2) opacity(0.25);
    transition: filter 0.4s, transform 0.4s;
}
.marquee-track img:hover { filter: brightness(0) opacity(0.85); transform: scale(1.06); }
@keyframes marqueeRoll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── CTA section ─────────────────────────────────── */
.cta-v3 {
    position: relative;
    background: linear-gradient(140deg, var(--brand-purple) 0%, var(--brand-purple-dark) 100%);
    overflow: hidden;
}
.cta-v3::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(70% 90% at 90% 5%, rgba(255,255,255,0.15) 0%, transparent 55%),
        radial-gradient(45% 65% at 5% 95%, rgba(0,0,0,0.18) 0%, transparent 60%);
    pointer-events: none;
}

/* ── Decorative bg text ──────────────────────────── */
.deco-text {
    position: absolute; font-family: 'Inter Tight', sans-serif;
    font-weight: 800; color: rgba(0,0,0,0.02);
    line-height: 1; pointer-events: none; user-select: none; white-space: nowrap;
}
.deco-text.deco-dark { color: rgba(255,255,255,0.03); }

/* ── Magnetic button hover ───────────────────────── */
.btn-m { transition: transform 0.3s cubic-bezier(.2,.7,.2,1), box-shadow 0.3s ease; }
.btn-m:hover  { transform: translateY(-3px); }
.btn-m:active { transform: translateY(0) scale(0.98); }

/* ── Scroll line animation ───────────────────────── */
@keyframes scrollLine {
    0%, 100% { opacity: 0.3; transform: scaleY(0.65); }
    50%       { opacity: 1;   transform: scaleY(1);    }
}

/* ── Responsive tweaks ───────────────────────────── */
@media (max-width: 1024px) { .dropdown { display: none; } }
@media (max-width: 768px)  { .cap-tab  { font-size: 0.8rem; } }
