/* ==========================================================================
   Layout: header & navigation, page heroes, section headings, footer
   ========================================================================== */

/* Header ------------------------------------------------------------------ */
.site-header {
    position: fixed; inset: 0 0 auto; z-index: 100;
    height: var(--header-h);
    color: #fff;
    transition: background .4s var(--ease), height .4s var(--ease), box-shadow .4s, transform .5s var(--ease);
}
.site-header.is-scrolled {
    --header-h: 70px;
    background: rgba(3, 3, 42, .9);
    backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }

.logo { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.logo-mark { width: 44px; height: 44px; transition: transform .8s var(--ease); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25)); }
.logo:hover .logo-mark { transform: rotate(90deg) scale(1.05); }
.logo-word { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font: 800 1.32rem/1 var(--font-display); letter-spacing: .01em; color: currentColor; }
.logo-name b { color: var(--orange); font-weight: 800; }
.logo-sub { margin-top: 4px; font: 700 .62rem/1 var(--font-display); letter-spacing: .32em; color: var(--green-400); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
    position: relative; display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 14px; border-radius: 999px;
    font-size: .92rem; font-weight: 500; color: rgba(255, 255, 255, .78);
    transition: color .25s, background .25s;
}
.nav-link:hover, .nav-link.is-active { color: #fff; background: rgba(255, 255, 255, .07); }
.nav-link.is-active::after {
    content: ''; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px;
    background: var(--orange); border-radius: 1px; transform: translateX(-50%) rotate(45deg);
}
.caret { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .3s; }
.header-cta { margin-left: 8px; }
.nav-cta-mobile { display: none; }

/* Mega menu */
.nav-item { position: relative; }
.mega {
    position: absolute; top: calc(100% + 14px); left: 50%;
    width: min(820px, 90vw);
    display: grid; grid-template-columns: 1fr 1fr 1.05fr; gap: 10px;
    padding: 14px; border-radius: var(--radius-lg);
    background: rgba(7, 7, 64, .92); border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .6);
    opacity: 0; visibility: hidden;
    transform: translateX(-50%) translateY(10px) rotateX(-8deg); transform-origin: top center;
    transition: opacity .35s var(--ease), transform .45s var(--ease), visibility .35s;
}
.mega::before { content: ''; position: absolute; inset: -16px 0 auto; height: 16px; }
.has-mega:hover .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0) rotateX(0); }
.has-mega:hover .caret { transform: rotate(225deg) translateY(-2px); }
.mega-col { display: flex; flex-direction: column; padding: 8px; }
.mega-col a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: .9rem; color: rgba(255, 255, 255, .75); transition: background .25s, color .25s, transform .25s; }
.mega-col a .icon { color: var(--orange-300); }
.mega-col a:hover { background: rgba(255, 255, 255, .06); color: #fff; transform: translateX(4px); }
.mega-col .mega-head { font: 600 .78rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: #fff; padding-bottom: 14px; }
.mega-head span { color: var(--orange); }
.mega-head.build span { color: var(--green-400); }
.mega-card {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
    padding: 22px; border-radius: 18px; min-height: 240px;
    background: radial-gradient(circle at 80% 10%, rgba(254, 102, 0, .55), transparent 55%), radial-gradient(circle at 10% 90%, rgba(0, 153, 51, .45), transparent 55%), var(--night-3);
}
.mega-card strong { font: 600 1.2rem/1.25 var(--font-display); }
.mega-card-link { display: inline-flex; align-items: center; gap: 8px; color: var(--orange-300); font-weight: 600; font-size: .9rem; }

/* Mobile toggle */
.nav-toggle { display: none; width: 46px; height: 46px; margin-left: auto; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); position: relative; }
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 2px; background: #fff; border-radius: 2px; transition: transform .4s var(--ease), opacity .3s, top .4s var(--ease); }
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; right: 19px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-open .nav-toggle span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* Page hero (inner pages) ---------------------------------------------------- */
.page-hero {
    position: relative; overflow: hidden; isolation: isolate;
    padding: calc(var(--header-h) + clamp(60px, 9vw, 120px)) 0 clamp(70px, 9vw, 120px);
    background: radial-gradient(ellipse at 85% 20%, rgba(254, 102, 0, .28), transparent 50%), radial-gradient(ellipse at 10% 100%, rgba(0, 153, 51, .25), transparent 50%), var(--night);
    color: #fff;
}
.page-hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.page-hero-grid, .hero-grid {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
}
.page-hero-inner { max-width: calc(880px + var(--gutter) * 2); margin-left: 0; margin-right: auto; }
@media (min-width: 1321px) { .page-hero-inner { margin-left: max(0px, calc((100vw - var(--container)) / 2 - var(--gutter))); } }
.page-hero .display { margin: 20px 0 22px; }
.page-hero .lead { color: rgba(255, 255, 255, .72); max-width: 640px; }
.breadcrumb { display: flex; gap: 10px; margin-bottom: 28px; font: 500 .78rem var(--font-mono); color: rgba(255, 255, 255, .5); }
.breadcrumb a:hover { color: #fff; }
.page-hero::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
    background: linear-gradient(90deg, var(--orange) 0 33.3%, #fff 33.3% 66.6%, var(--green) 66.6%);
    opacity: .9;
}

/* Section heading ---------------------------------------------------------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px 60px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head > div { max-width: 720px; }
.section-head .h1 { margin-top: 16px; }
.section-head > .lead { max-width: 420px; padding-bottom: 6px; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-head.center > div { display: flex; flex-direction: column; align-items: center; }

/* Footer -------------------------------------------------------------------- */
.site-footer { position: relative; overflow: hidden; background: var(--night); color: rgba(255, 255, 255, .7); padding-top: 90px; }
.footer-glow { position: absolute; inset: auto -20% -60% -20%; height: 80%; background: radial-gradient(ellipse at 30% 50%, rgba(254, 102, 0, .18), transparent 60%), radial-gradient(ellipse at 75% 50%, rgba(0, 153, 51, .16), transparent 60%); pointer-events: none; }
.footer-top { position: relative; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 48px; padding-bottom: 60px; }
.logo-light { color: #fff; }
.footer-brand p { margin-top: 22px; max-width: 340px; font-size: .95rem; }
.socials { display: flex; gap: 10px; margin-top: 26px; }
.socials a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); transition: background .3s, transform .3s; }
.socials a:hover { background: var(--orange); transform: translateY(-3px); }
.footer-col { display: flex; flex-direction: column; gap: 12px; font-size: .95rem; }
.footer-col a { transition: color .2s, transform .2s; width: fit-content; }
.footer-col a:hover { color: #fff; transform: translateX(3px); }
.footer-label { font: 500 .74rem var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 8px; }
.footer-contact a, .footer-contact span { display: inline-flex; align-items: center; gap: 10px; }
.footer-contact .icon { color: var(--orange-300); }
.footer-wordmark {
    position: relative; text-align: center; user-select: none;
    font: 800 clamp(5rem, 21vw, 19rem)/.8 var(--font-display); letter-spacing: -.04em;
    color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .1);
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 85%); -webkit-background-clip: text; background-clip: text;
    margin-bottom: -.06em;
}
.footer-wordmark span { -webkit-text-stroke-color: rgba(254, 102, 0, .35); }
.footer-bottom { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 26px 0 30px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; }
.footer-bottom a:hover { color: #fff; }
.tricolor { display: inline-flex; gap: 6px; }
.tricolor i { width: 28px; height: 4px; border-radius: 4px; }
.tricolor i:nth-child(1) { background: var(--orange); }
.tricolor i:nth-child(2) { background: #fff; }
.tricolor i:nth-child(3) { background: var(--green); }

/* Floating WhatsApp --------------------------------------------------------- */
.whatsapp-float {
    position: fixed; right: 22px; bottom: 22px; z-index: 90;
    width: 58px; height: 58px; display: grid; place-items: center;
    border-radius: 50%; background: var(--green); color: #fff;
    box-shadow: 0 14px 34px -8px rgba(0, 153, 51, .7);
    transition: transform .4s var(--ease);
}
.whatsapp-float .icon { width: 28px; height: 28px; }
.whatsapp-float:hover { transform: scale(1.08) rotate(-6deg); }
.whatsapp-float::before { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--green); animation: ping 2.4s var(--ease) infinite; }

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1100px) {
    .header-cta { display: none; }
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed; inset: 0; z-index: -1;
        flex-direction: column; align-items: stretch; justify-content: center; gap: 4px;
        padding: calc(var(--header-h) + 20px) var(--gutter) 40px;
        background: radial-gradient(circle at 90% 10%, rgba(254, 102, 0, .3), transparent 50%), radial-gradient(circle at 0 100%, rgba(0, 153, 51, .3), transparent 50%), rgba(3, 3, 42, .98);
        clip-path: circle(0 at calc(100% - 44px) 42px);
        transition: clip-path .7s var(--ease);
        overflow-y: auto;
    }
    .nav-open .main-nav { clip-path: circle(150% at calc(100% - 44px) 42px); }
    .nav-link { font: 600 clamp(1.6rem, 6vw, 2.2rem)/1.2 var(--font-display); padding: 12px 4px; border-radius: 0; color: rgba(255, 255, 255, .85); background: none !important; }
    .nav-link.is-active::after { left: auto; right: 0; top: 50%; bottom: auto; transform: translateY(-50%) rotate(45deg); width: 8px; height: 8px; }
    .caret { display: none; }
    .mega { display: none; }
    .nav-cta-mobile { display: inline-flex; margin-top: 24px; align-self: flex-start; }
    .nav-open { overflow: hidden; }
    /* backdrop-filter/transform would make the fixed menu size itself to the header */
    .nav-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; box-shadow: none; transform: none; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    :root { --header-h: 72px; }
    .logo-mark { width: 38px; height: 38px; }
    .logo-name { font-size: 1.15rem; }
    .section-head { flex-direction: column; align-items: flex-start; }
    .footer-top { grid-template-columns: 1fr; gap: 36px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .whatsapp-float { width: 52px; height: 52px; right: 16px; bottom: 16px; }
}
