/* ==========================================================================
   EVERADE – Global Stylesheet (no CSS variables, section-independent)
   - Base reset + common text styles
   - Components & sections (values inlined; no cross-section tokens)
   ========================================================================== */

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background-color: #000000;
    /* black */
    color: #ffffff;
    /* text on dark */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Common Text Styles (global, then section-specific overrides)
   ========================================================================== */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0;
    color: inherit;
}

/* Reasonable global heading sizes, sections can override */
h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

h3 {
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    font-weight: 700;
}

h4 {
    font-size: 1.05rem;
    font-weight: 700;
}

p {
    line-height: 1.7;
    font-size: 1rem;
    color: inherit;
}

small,
.text-sm {
    font-size: 0.95rem;
}

.text-muted {
    color: #E5E7EB;
}

/* subtitles on dark */
.text-body {
    color: #374151;
}

/* body copy on light */

/* Links */
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

/* Buttons (base) */
button,
.btn {
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.25s ease, opacity 0.25s ease;
}

/* Utility containers */
.container {
    padding-inline: 8%;
}

/* ==========================================================================
   Header
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 8%;
    background-color: #272A2C;
    /* dark surface */
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
}

/* Header buttons */
.buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 8px 22px;
}

.btn-outline:hover {
    background: #ffffff;
    color: #000000;
}

.btn-filled {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 8px 24px;
}

.btn-filled:hover {
    background: #e2e2e2;
}

/* Burger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: #ffffff;
    transition: 0.3s ease;
}

/* Mobile Nav */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #272A2C;
        text-align: center;
        padding: 20px 0;
        gap: 20px;
        border-top: 1px solid #272A2C;
    }

    .nav-links.active {
        display: flex;
    }

    .buttons {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* ==========================================================================
   HERO (section isolated)
   ========================================================================== */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-block: 12px;
    padding-inline: 15%;
    background-color: #272A2C;
    color: #ffffff;
}

.hero-content {
    flex: 1;
    min-width: 300px;
    max-width: 580px;
}

.hero-content h1 {
    margin-bottom: 16px;
}

.hero-content p {
    font-size: 1.1rem;
    color: #cccccc;
    margin-bottom: 24px;
    max-width: 900px;
    /* text-align: justify; */
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.hero-image img {
    width: 100%;
    max-width: 520px;
    border-radius: 8px;
    display: block;
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 56px 8%;
        gap: 16px;
    }

    .hero-content h1 {
        font-size: 2.3rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin: 0 auto 20px;
    }

    .hero-image {
        margin-top: 16px;
    }

    .hero-image img {
        max-width: 420px;
    }
}

/* ==========================================================================
   WBGT SECTION (image 1/3, content 2/3, 30px gap)
   ========================================================================== */
.wbgt-section {
    display: flex;
    align-items: center;          /* vertical alignment */
    justify-content: flex-start;
    gap: 10px;                    /* exactly 30px between image and content */
    padding-top: 100px;
    padding-inline: 15%;
    background-color: #E9EDF3;    /* light surface */
    color: #0B1520;               /* dark text */
}

.wbgt-image {
    flex: 0 0 25%;
    max-width: 25%;          /* lock to 1/3 */
    display: flex;                 /* enable alignment below */
    justify-content: flex-start;
    align-items: center;
    min-width: 300px;
}

.wbgt-image img {
    width: 100%;
    height: auto;
    max-height: 520px;
    display: block;
    border-radius: 25px;
    object-fit: contain;
    margin-left: 0;
}

.wbgt-content {
    flex: 0 0 75%;
    max-width: 65%;          /* lock to 2/3 */
}

.wbgt-content h2 {
    font-size: 2.5rem;
    color: #0B1520;
    margin-bottom: 10px;
}

.wbgt-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1A1D20;
    margin-bottom: 25px;
}

.wbgt-content p {
    color: #374151;
    font-size: 1.05rem;
    margin-bottom: 30px;
    text-align: justify;
    text-justify: inter-word;
}

.app-link {
    color: #0B1520;
    font-weight: 600;
    border-bottom: 2px solid #0B1520;
    padding-bottom: 2px;
}

.app-link:hover {
    color: #272A2C;
    border-color: #272A2C;
}

@media (max-width: 900px) {
    .wbgt-section {
        flex-direction: column-reverse;
        text-align: center;
        padding: 60px 8%;
    }

    .wbgt-content {
        padding-left: 0;
    }

    .wbgt-content h2 {
        font-size: 2rem;
    }

    .wbgt-content h3 {
        font-size: 1.1rem;
    }

    .wbgt-image img {
        max-width: 320px;
        max-height: 420px;
        margin-top: 20px;
    }
}

/* ==========================================================================
   ON-SITE WBGT MONITORING (section isolated)
   ========================================================================== */
.onsite-section {
    background-color: #E9EDF3;
    color: #0B1520;
    text-align: center;
    padding: 100px 8%;
}

.onsite-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.onsite-header p {
    font-size: 1.1rem;
    color: #4B5563;
    margin-bottom: 60px;
}

.onsite-features {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.feature {
    flex: 1 1 calc(25% - 40px);
    min-width: 240px;
    max-width: 300px;
    margin: 0 auto;
}

/* ===== Metric icon pill (Font Awesome) ===== */
.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}

/* Icon itself */
.icon-circle i {
    font-size: 28px;
    line-height: 1;
    color: #0B1520;
    /* dark icon for light pills */
}

/* Color utilities (use one per pill) */
.icon-bg--temp {
    background-color: #FDE4E4;
}

/* Air Temperature */
.icon-bg--hum {
    background-color: #D8F6FB;
}

/* Humidity */
.icon-bg--solar {
    background-color: #FFF2D3;
}

/* Solar Radiation */
.icon-bg--wind {
    background-color: #EAE6FF;
}

/* Wind Speed */

/* Optional: hover micro-interaction */
.feature:hover .icon-circle {
    transform: translateY(-2px);
    transition: transform .18s ease;
}

.feature h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.feature p {
    font-size: 0.95rem;
    color: #374151;
}

@media (max-width: 900px) {
    .onsite-section {
        padding: 70px 8%;
    }

    .onsite-features {
        justify-content: center;
        gap: 40px 20px;
    }

    .feature {
        flex: 1 1 45%;
    }
}

@media (max-width: 600px) {
    .onsite-header h2 {
        font-size: 2rem;
    }

    .feature {
        flex: 1 1 100%;
    }

    .icon-circle {
        width: 60px;
        height: 60px;
    }

    .icon-circle i {
        font-size: 24px;
    }
}

/* ==========================================================================
   PARTNERS (auto-rotating) (section isolated)
   ========================================================================== */
.partners {
    background-color: #E9EDF3;
    padding: 70px 8%;
    text-align: center;
    overflow: hidden;
}

.partners h2 {
    color: #0B1520;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 40px;
}

.partner-slider {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.slide-track {
    display: flex;
    gap: 70px;
    animation: scrollPartners 25s linear infinite;
    width: calc(250px * 12);
}

.slide {
    flex: 0 0 auto;
    width: 180px;
    display: grid;
    place-items: center;
    filter: grayscale(100%) brightness(90%);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.slide:hover {
    filter: none;
    opacity: 1;
    transform: scale(1.05);
}

.slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

@keyframes scrollPartners {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .slide-track {
        gap: 40px;
        animation-duration: 35s;
    }

    .slide {
        width: 130px;
    }
}

/* ==========================================================================
   API SECTION (mobile-optimized)
   ========================================================================== */
.api-section {
    background: #E9EDF3;
    color: #0B1520;
    padding-top: 4%;
    padding-bottom: 4%;
    padding-inline: 15%;
}

.api-inner {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

/* Left copy */
.api-copy h2 { font-size: clamp(2.2rem, 5vw, 4rem); margin-bottom: 14px; }
.api-copy h3 { font-size: 1.25rem; color: #1F2937; margin-bottom: 22px; }
.api-copy p  { color: #374151; line-height: 1.8; margin-bottom: 28px; max-width: 640px; }
.api-copy p:first-of-type { text-align: justify; text-justify: inter-word; }

.api-link { display: inline-flex; align-items: center; gap: 8px; color: #0B1520; font-weight: 600; padding-bottom: 2px; }
.api-link:hover { opacity: 0.85; }

/* Right visuals */
.api-visual { position: relative; min-height: 360px; }
.api-img { width: 100%; height: auto; display: block; --parallax-strength: 18; }

.api-img--back {
    position: absolute;
    right: 0;
    top: 0;
    max-width: 520px;
    filter: brightness(0.92);
    transform: translate(24px, -8px) scale(0.96);
    z-index: 1;
}

.api-img--front {
    position: relative;
    max-width: 340px;
    margin-top: 250px; /* desktop overlap effect */
    z-index: 2;
}

/* ====== Tablets & below ====== */
@media (max-width: 1000px) {
    .api-section { padding-inline: 8%; padding-top: 60px; padding-bottom: 60px; }

    .api-inner {
        grid-template-columns: 1fr;
        gap: 28px;                /* tighter gap when stacked */
        align-items: start;
    }

    .api-copy {
        text-align: center;       /* friendlier reading on small screens */
        margin-inline: auto;
        max-width: 720px;
    }
    .api-copy p { margin-left: auto; margin-right: auto; }

    .api-visual {
        order: -1;                /* visuals first on mobile */
        min-height: 0;
    }

    /* Flatten the composition so images scale nicely and don't overflow */
    .api-img--back {
        position: relative;
        right: auto; top: auto;
        max-width: 100%;
        transform: none;
        margin: 0 auto;
        z-index: 1;
    }

    .api-img--front {
        max-width: 88%;
        margin-top: 16px;         /* remove huge offset on mobile */
        margin-left: auto;
        margin-right: auto;
        z-index: 2;
    }
}

/* ====== Phones ====== */
@media (max-width: 640px) {
    .api-section { padding-inline: 24px; padding-top: 48px; padding-bottom: 48px; }
    .api-copy h2 { font-size: clamp(1.9rem, 7vw, 2.4rem); }
    .api-copy h3 { font-size: 1.05rem; }
    .api-visual { margin-top: 8px; }
}

/* Optional: very small phones to avoid horizontal scroll */
@media (max-width: 380px) {
    .api-section { padding-inline: 18px; }
    .api-img--front { max-width: 92%; }
}

/* ==========================================================================
   VALIDATION & METHODOLOGY (section isolated)
   ========================================================================== */
.validation {
    position: relative;
    background: #272A2C;
    padding-top: 8%;
    /* padding: 110px 8% 120px; */
    padding-inline: 15%;

    color: #E9EDF3;
    overflow: hidden;
}

.validation::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 82%;
    background: #E9EDF3;
    clip-path: polygon(0 0, 100% 0, 100% 0, 72% 22%, 0 50%);
    backface-visibility: hidden;
    transform: translateZ(0);
    z-index: 0;
}

.validation-inner {
    position: relative;
    z-index: 1;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 60px;
    align-items: center;
}

.val-image img {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.val-copy h2 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    margin-bottom: 16px;
}

.val-copy h3 {
    font-size: 1.15rem;
    color: #E9EDF3;
    margin-bottom: 22px;
}

.val-copy p {
    color: #E9EDF3;
    font-size: 1.02rem;
    max-width: 560px;
    text-align: justify;
    text-justify: inter-word;
}

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

    .val-copy {
        order: 2;
    }

    .val-image {
        order: 1;
    }

    .val-image img {
        margin: 0 auto 40px;
        max-width: 90%;
    }
}

@media (max-width: 700px) {
    .validation {
        padding: 80px 8% 90px;
    }

    .validation::before {
        height: 46%;
        clip-path: polygon(0 0, 100% 0, 100% 0, 72% 24%, 0 42%);
    }
}

/* ==========================================================================
   COMPLIANCE (section isolated)
   ========================================================================== */
.compliance {
    background: #272A2C;
    color: #ffffff;
    padding-top: 8%;
    text-align: center;
}

.comp-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.compliance h2 {
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    margin-bottom: 16px;
}

.comp-sub {
    color: #E5E7EB;
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    max-width: 1050px;
    margin: 0 auto 70px;
}

.comp-grid {
    display: flex;
    justify-content: center;
    gap: clamp(24px, 4vw, 80px);
    flex-wrap: wrap;
}

.comp-item {
    min-width: 240px;
    max-width: 280px;
}

.comp-item h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.comp-item p {
    color: #D1D5DB;
    font-size: 1rem;
}

@media (max-width: 700px) {
    .compliance {
        padding: 70px 8% 90px;
    }

    .comp-sub {
        margin-bottom: 50px;
    }

    .comp-item {
        max-width: 100%;
    }
}

/* ==========================================================================
   FAQ (section isolated)
   ========================================================================== */
.faq {
    background: #272A2C;
    color: #ffffff;
    padding-top: 8%;
    /* padding: 90px 8% 110px; */
    text-align: center;
}

.faq-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.faq h2 {
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    margin-bottom: 12px;
}

.faq-sub {
    color: #E5E7EB;
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    margin: 0 auto 34px;
    max-width: 1000px;
}

.faq-list {
    display: grid;
    gap: 22px;
    margin-inline: auto;
    max-width: 960px;
}

.faq-q {
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #272A2C;
    border: 2px solid #9CA3AF;
    color: #ffffff;
    padding: 22px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    font-weight: 700;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.faq-q:hover,
.faq-q[aria-expanded="true"] {
    border-color: #ffffff;
    background: #303336;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.32);
}

.faq-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: #D1D5DB;
    transition: transform .25s ease, color 0.2s ease;
}

.faq-q[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
    color: #ffffff;
}

.faq-a {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    background: #1F2224;
    border: 1px solid #272A2C;
    border-radius: 16px;
    margin-top: 12px;
    padding: 0 20px;
    transition: max-height .35s ease, opacity .25s ease, padding 0.2s ease;
    text-align: left;
}

.faq-a p {
    color: #D1D5DB;
    line-height: 1.7;
    padding: 18px 4px 20px;
    margin: 0;
}

.faq-item.open .faq-a {
    opacity: 1;
    padding: 6px 20px 16px;
}

@media (max-width: 640px) {
    .faq {
        padding: 70px 8% 90px;
    }

    .faq-q {
        border-radius: 16px;
        padding: 18px 18px;
    }

    .faq-a {
        border-radius: 12px;
    }
}

/* ==========================================================================
   FOOTER (section isolated)
   ========================================================================== */
.footer {
    background: #272A2C;
    color: #D1D5DB;
    padding: 28px 8%;
    border-top: 1px solid #272A2C;
}

.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-left p {
    font-size: 0.95rem;
    color: #9CA3AF;
}

.footer-links {
    display: flex;
    gap: 28px;
}

.footer-links a {
    color: #E5E7EB;
    font-weight: 500;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-store {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-store img {
    height: 38px;
    width: auto;
    display: block;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.footer-store img:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

@media (max-width: 800px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    .footer-store {
        justify-content: center;
    }
}

/* ==========================================================================
   Scroll Reveal (enhanced; section-agnostic but no variables)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 820ms cubic-bezier(.22, .61, .36, 1) 0ms,
        transform 820ms cubic-bezier(.22, .61, .36, 1) 0ms,
        filter 820ms cubic-bezier(.22, .61, .36, 1) 0ms;
    filter: blur(2px);
    will-change: opacity, transform, filter;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.reveal.reveal--up {
    transform: translateY(28px);
}

.reveal.reveal--left {
    transform: translateX(28px);
}

.reveal.reveal--right {
    transform: translateX(-28px);
}

.reveal.reveal--fade {
    transform: none;
}

.reveal>* {
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity calc(820ms * .92) cubic-bezier(.22, .61, .36, 1) 0ms,
        transform calc(820ms * .92) cubic-bezier(.22, .61, .36, 1) 0ms;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
    filter: blur(0);
}

.reveal.is-visible>* {
    opacity: 1;
    transform: none;
}

/* Per-section tuning */
.hero .hero-content.reveal {}

.hero .hero-image.reveal {}

.api-section .api-visual.reveal {}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {

    .reveal,
    .reveal>* {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
        filter: none !important;
    }
}

/* Subtle Parallax for API images (cooperates with JS)
   (kept custom property only for optional JS read; remove if undesired) */
.api-img {
    will-change: transform;
}

@media (max-width: 900px) {
    .api-img {}
}