/* =====================================
   ROOT / GLOBAL
===================================== */

:root {
    --primary: #1f4e78;
    --primary-dark: #153a5b;
    --primary-light: #eaf2f8;

    --background: #f4f7fb;
    --surface: #ffffff;

    --text: #1e293b;
    --text-soft: #64748b;
    --border: #e2e8f0;

    --normal: #2e7d32;
    --normal-soft: #e8f5e9;

    --moderate: #d97706;
    --moderate-soft: #fff7e6;

    --high: #c62828;
    --high-soft: #ffeaea;

    --cyan: #0891b2;

    --environment-green: #1f7a58;
    --environment-green-dark: #14523d;
    --environment-mint: #e7f6ef;

    --shadow-sm:
        0 4px 14px rgba(15, 23, 42, 0.06);

    --shadow-md:
        0 10px 30px rgba(15, 23, 42, 0.10);

    --shadow-lg:
        0 20px 55px rgba(15, 23, 42, 0.16);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    background:
        linear-gradient(
            180deg,
            #f8fafc 0%,
            var(--background) 100%
        );

    color: var(--text);

    font-family:
        "Inter",
        Arial,
        sans-serif;

    overflow-x: hidden;
}


button,
input,
textarea,
select {
    font: inherit;
}


button {
    -webkit-tap-highlight-color: transparent;
}


a {
    color: inherit;
}


img {
    display: block;
    max-width: 100%;
}


body.popup-open {
    overflow: hidden;
}



/* =====================================
   TOP NAVIGATION BAR
===================================== */

.topbar {
    position: sticky;
    top: 0;

    width: 100%;

    background:
        rgba(255, 255, 255, 0.96);

    backdrop-filter:
        blur(14px);

    -webkit-backdrop-filter:
        blur(14px);

    border-bottom:
        1px solid rgba(226, 232, 240, 0.9);

    z-index: 1000;

    box-shadow:
        0 4px 18px rgba(15, 23, 42, 0.04);

    transform:
        translateY(0);

    will-change:
        transform;

    transition:
        transform 0.34s
        cubic-bezier(
            0.2,
            0.8,
            0.2,
            1
        ),
        box-shadow 0.25s ease;
}


.topbar.header-hidden {
    transform:
        translateY(
            calc(-100% - 8px)
        );

    box-shadow: none;
}


.topbar-inner {
    max-width: 1200px;

    margin: 0 auto;

    min-height: 76px;

    padding: 12px 24px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 24px;
}



/* =====================================
   BRAND
===================================== */

.brand-area {
    display: flex;

    align-items: center;

    gap: 12px;

    min-width: 0;
}


.brand-logo {
    width: 48px;
    height: 48px;

    flex-shrink: 0;

    display: grid;

    place-items: center;

    border-radius: 15px;

    background:
        linear-gradient(
            145deg,
            #1f4e78,
            #0f6b91
        );

    box-shadow:
        0 7px 20px
        rgba(31, 78, 120, 0.25);

    animation:
        logoFloat 3.5s
        ease-in-out
        infinite;
}


.brand-logo svg {
    width: 34px;
    height: 34px;
}


.logo-ring {
    fill: none;

    stroke:
        rgba(255, 255, 255, 0.45);

    stroke-width: 2;
}


.logo-sensor {
    fill: #ffffff;

    animation:
        sensorPulse 2s
        ease-in-out
        infinite;
}


.logo-wave {
    fill: none;

    stroke: #ffffff;

    stroke-width: 2.5;

    stroke-linecap: round;
}


.logo-stem {
    fill: none;

    stroke: #ffffff;

    stroke-width: 2.5;

    stroke-linecap: round;
}


.brand-text {
    display: flex;

    flex-direction: column;

    min-width: 0;
}


.brand-title {
    display: inline-block;

    width: fit-content;

    font-size: 19px;

    line-height: 1.2;

    font-weight: 800;

    color: #172033;

    white-space: nowrap;

    letter-spacing: -0.4px;

    transform-origin: center;

    animation:
        brandSlideForward 5.2s
        cubic-bezier(0.45, 0, 0.3, 1)
        infinite;
}


.brand-caption {
    margin-top: 4px;

    font-size: 11px;

    color: var(--text-soft);

    font-weight: 600;

    letter-spacing: 0.5px;

    text-transform: uppercase;
}



/* =====================================
   TOPBAR ACTIONS
===================================== */

.topbar-actions {
    display: flex;

    align-items: center;

    gap: 14px;
}


.live-indicator {
    display: flex;

    align-items: center;

    gap: 8px;

    padding: 9px 13px;

    border-radius: 999px;

    background: #f0fdf4;

    border:
        1px solid
        #dcfce7;

    transition:
        background 0.25s ease,
        border-color 0.25s ease;
}


.live-indicator.offline {
    background: #f1f5f9;

    border-color: #e2e8f0;
}


.live-dot {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #22c55e;

    box-shadow:
        0 0 0
        rgba(34, 197, 94, 0.5);

    animation:
        livePulse 1.8s
        infinite;
}


.live-dot.offline {
    background: #94a3b8;

    animation: none;

    box-shadow: none;
}


.live-text {
    font-size: 11px;

    font-weight: 800;

    letter-spacing: 0.8px;

    color: #166534;
}


.live-indicator.offline
.live-text {
    color: #64748b;
}



/* =====================================
   DROPDOWN MENU
===================================== */

.menu-wrapper {
    position: relative;
}


.menu-toggle {
    height: 42px;

    display: flex;

    align-items: center;

    gap: 9px;

    padding: 0 17px;

    border: none;

    border-radius: 999px;

    background:
        var(--primary);

    color: #ffffff;

    font-weight: 700;

    font-size: 13px;

    cursor: pointer;

    box-shadow:
        0 6px 17px
        rgba(31, 78, 120, 0.20);

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


.menu-toggle:hover {
    background:
        var(--primary-dark);

    transform:
        translateY(-1px);

    box-shadow:
        0 8px 22px
        rgba(31, 78, 120, 0.25);
}


.menu-arrow {
    width: 17px;
    height: 17px;

    transition:
        transform 0.25s ease;
}


.menu-toggle.open
.menu-arrow {
    transform:
        rotate(180deg);
}


.section-menu {
    position: absolute;

    top:
        calc(100% + 13px);

    right: 0;

    width: 245px;

    padding: 9px;

    background:
        rgba(255, 255, 255, 0.98);

    backdrop-filter:
        blur(15px);

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    box-shadow:
        var(--shadow-lg);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transform:
        translateY(-8px)
        scale(0.97);

    transform-origin:
        top right;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s;
}


.section-menu.open {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform:
        translateY(0)
        scale(1);
}


.nav-btn {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 11px;

    position: relative;

    padding: 12px 13px;

    margin: 2px 0;

    border: none;

    border-radius: 11px;

    background: transparent;

    color: #334155;

    font-size: 13px;

    font-weight: 650;

    text-align: left;

    cursor: pointer;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}


.nav-btn:hover {
    background: #f1f5f9;

    transform:
        translateX(3px);
}


.nav-btn.active {
    color:
        var(--primary);

    background:
        var(--primary-light);
}


.menu-icon {
    width: 25px;

    display: inline-flex;

    justify-content: center;

    font-size: 16px;
}


.alert-badge {
    margin-left: auto;

    min-width: 24px;
    height: 24px;

    padding: 0 7px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border-radius: 999px;

    background:
        var(--high);

    color: #ffffff;

    font-size: 10px;

    font-weight: 800;
}



/* =====================================
   HERO
===================================== */

.hero-section {
    position: relative;

    overflow: hidden;

    padding:
        74px 24px
        80px;

    color: #ffffff;

    text-align: center;

    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(8, 145, 178, 0.42),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(59, 130, 246, 0.25),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #102f4d 0%,
            #1f4e78 50%,
            #0e7490 100%
        );
}


.hero-section::before {
    content: "";

    position: absolute;

    width: 290px;
    height: 290px;

    top: -150px;
    right: -100px;

    border-radius: 50%;

    border:
        1px solid
        rgba(255, 255, 255, 0.16);

    box-shadow:
        0 0 0 35px
        rgba(255, 255, 255, 0.025),
        0 0 0 70px
        rgba(255, 255, 255, 0.018);
}


.hero-section::after {
    content: "";

    position: absolute;

    width: 380px;
    height: 380px;

    left: -240px;
    bottom: -300px;

    border-radius: 50%;

    border:
        1px solid
        rgba(255, 255, 255, 0.10);
}


.hero-content {
    position: relative;

    max-width: 900px;

    margin: 0 auto;

    z-index: 2;

    animation:
        heroEnter 0.7s
        ease both;
}


.hero-eyebrow {
    margin-bottom: 18px;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 2.3px;

    color:
        rgba(255, 255, 255, 0.73);
}


.hero-title {
    max-width: 860px;

    margin: 0 auto;

    font-size:
        clamp(
            34px,
            5vw,
            57px
        );

    line-height: 1.08;

    letter-spacing: -2px;

    font-weight: 800;
}


.hero-title span {
    display: block;

    margin-top: 7px;

    color: #bfe8f3;
}


.hero-description {
    max-width: 690px;

    margin:
        23px auto
        0;

    font-size: 15px;

    line-height: 1.7;

    color:
        rgba(255, 255, 255, 0.78);
}


.hero-actions {
    margin-top: 29px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-wrap: wrap;

    gap: 11px;
}


.hero-btn {
    min-height: 44px;

    padding: 0 18px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border-radius: 999px;

    font-size: 11px;

    font-weight: 750;

    text-decoration: none;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}


.hero-btn:hover {
    transform:
        translateY(-2px);
}


.hero-btn-light {
    background: #ffffff;

    color:
        var(--primary-dark);

    border:
        1px solid #ffffff;
}


.hero-btn-outline {
    color: #ffffff;

    border:
        1px solid
        rgba(255, 255, 255, 0.38);

    background:
        rgba(255, 255, 255, 0.07);
}


.hero-btn-outline:hover {
    background:
        rgba(255, 255, 255, 0.13);
}



/* =====================================
   NEW PROJECT SHOWCASE
===================================== */

.project-showcase {
    width: 92%;

    max-width: 1180px;

    margin:
        70px auto
        18px;
}


.showcase-heading {
    margin-bottom: 30px;

    display: grid;

    grid-template-columns:
        minmax(0, 1.3fr)
        minmax(280px, 0.7fr);

    align-items: end;

    gap: 50px;
}


.showcase-kicker {
    margin-bottom: 10px;

    color:
        var(--environment-green);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.8px;
}


.showcase-heading h2,
.hardware-heading h2,
.monitoring-bridge h2 {
    max-width: 760px;

    color: #172033;

    font-size:
        clamp(
            27px,
            4vw,
            43px
        );

    line-height: 1.09;

    letter-spacing: -1.8px;
}


.showcase-lead {
    color:
        var(--text-soft);

    font-size: 13px;

    line-height: 1.75;
}



/* =====================================
   ASYMMETRICAL ENVIRONMENTAL GRID
===================================== */

.environment-editorial {
    display: grid;

    grid-template-columns:
        repeat(12, minmax(0, 1fr));

    grid-template-rows:
        300px
        230px
        275px;

    gap: 18px;
}


.environment-card,
.environment-note {
    position: relative;

    overflow: hidden;

    border-radius: 25px;

    box-shadow:
        var(--shadow-sm);

    border:
        1px solid
        rgba(226, 232, 240, 0.72);
}


.environment-card {
    background: #d9e7df;

    isolation: isolate;
}


.environment-card img {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.7s
        cubic-bezier(
            0.2,
            0.8,
            0.2,
            1
        );
}


.environment-card:hover img {
    transform:
        scale(1.055);
}


.environment-overlay {
    position: absolute;

    inset: 0;

    z-index: 1;

    background:
        linear-gradient(
            180deg,
            rgba(15, 23, 42, 0.04) 10%,
            rgba(15, 23, 42, 0.72) 100%
        );
}


.environment-copy {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 2;

    padding: 30px;

    color: #ffffff;
}


.environment-copy.compact-copy {
    padding: 23px;
}


.environment-copy h3 {
    max-width: 660px;

    font-size:
        clamp(
            20px,
            2.6vw,
            32px
        );

    line-height: 1.14;

    letter-spacing: -1px;
}


.compact-copy h3 {
    font-size:
        clamp(
            17px,
            2vw,
            24px
        );
}


.environment-copy > p:last-child {
    max-width: 600px;

    margin-top: 12px;

    color:
        rgba(255, 255, 255, 0.83);

    font-size: 11px;

    line-height: 1.65;
}


.environment-number {
    position: absolute;

    right: 28px;
    bottom: 24px;

    font-size: 72px;

    line-height: 0.8;

    font-weight: 800;

    color:
        rgba(255, 255, 255, 0.12);

    pointer-events: none;
}


.environment-tag {
    margin-bottom: 9px;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.7px;

    color:
        rgba(255, 255, 255, 0.74);
}


.environment-feature {
    grid-column:
        1 / 8;

    grid-row:
        1 / 3;
}


.environment-green {
    grid-column:
        8 / 13;

    grid-row:
        1 / 2;
}


.environment-city {
    grid-column:
        8 / 11;

    grid-row:
        2 / 3;
}


.environment-note {
    grid-column:
        11 / 13;

    grid-row:
        2 / 3;

    padding: 18px;

    display: flex;

    flex-direction: column;

    justify-content: flex-start;

    gap: 4px;

    background:
        linear-gradient(
            145deg,
            #153a5b,
            #1f7a58
        );

    color: #ffffff;
}


.environment-note-icon {
    width: 36px;
    height: 36px;

    display: grid;

    place-items: center;

    align-self: flex-end;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.12);

    border:
        1px solid
        rgba(255, 255, 255, 0.15);

    font-size: 16px;
}


.environment-note .environment-tag {
    margin-bottom: 1px;
}


.environment-note h3 {
    margin:
        2px 0
        4px;

    font-size:
        clamp(
            21px,
            2.5vw,
            30px
        );

    line-height: 1;

    letter-spacing: -0.8px;
}


.environment-note > p:last-child {
    margin-top: auto;

    color:
        rgba(255, 255, 255, 0.76);

    font-size: 8px;

    line-height: 1.4;
}


.environment-clean {
    grid-column:
        1 / 5;

    grid-row:
        3 / 4;
}


.environment-awareness {
    grid-column:
        5 / 13;

    grid-row:
        3 / 4;
}



/* =====================================
   HARDWARE SHOWCASE
===================================== */

.hardware-showcase {
    margin-top: 88px;
}


.hardware-heading {
    max-width: 760px;

    margin:
        0 auto
        30px;

    text-align: center;
}


.hardware-heading .showcase-kicker {
    margin-bottom: 9px;
}


.hardware-heading h2 {
    margin: 0 auto;
}


.hardware-heading > p:last-child {
    max-width: 620px;

    margin:
        14px auto
        0;

    color:
        var(--text-soft);

    font-size: 12px;

    line-height: 1.7;
}


/*
   Modern asymmetric bento layout:
   one large feature card + two smaller cards.
   No clipping/overlap, but it still avoids a basic
   equal three-column layout.
*/
.hardware-stage {
    position: relative;

    display: grid;

    grid-template-columns:
        repeat(12, minmax(0, 1fr));

    grid-template-rows:
        repeat(2, minmax(245px, auto));

    gap: 20px;

    padding: 26px;

    overflow: visible;

    margin-top: 4px;

    border-radius: 34px;

    background:
        radial-gradient(
            circle at 70% 22%,
            rgba(8, 145, 178, 0.10),
            transparent 24%
        ),
        radial-gradient(
            circle at 12% 88%,
            rgba(31, 122, 88, 0.09),
            transparent 25%
        ),
        linear-gradient(
            145deg,
            #edf5f8,
            #fbfcfd
        );

    border:
        1px solid
        var(--border);
}


.hardware-stage::before {
    content: "";

    position: absolute;

    width: 360px;
    height: 360px;

    right: 9%;
    top: 50%;

    transform:
        translateY(-50%);

    border-radius: 50%;

    border:
        1px dashed
        rgba(31, 78, 120, 0.10);

    box-shadow:
        0 0 0 55px
        rgba(31, 78, 120, 0.025);

    pointer-events: none;
}


.hardware-card {
    position: relative;

    width: 100%;
    height: 100%;

    min-height: 245px;

    border: none;

    border-radius: 27px;

    background: transparent;

    cursor: pointer;

    perspective: 1500px;

    outline: none;

    isolation: isolate;

    transition:
        transform 0.30s
        cubic-bezier(
            0.2,
            0.8,
            0.2,
            1
        ),
        filter 0.30s ease;
}


.hardware-card:focus-visible {
    outline:
        3px solid
        rgba(8, 145, 178, 0.38);

    outline-offset: 5px;
}


.hardware-card:hover {
    z-index: 5;

    transform:
        translateY(-6px);

    filter:
        drop-shadow(
            0 18px 24px
            rgba(15, 23, 42, 0.10)
        );
}


.hardware-card-inner {
    position: relative;

    width: 100%;
    height: 100%;

    min-height: inherit;

    border-radius: inherit;

    transform-style: preserve-3d;

    transition:
        transform 0.70s
        cubic-bezier(
            0.2,
            0.8,
            0.2,
            1
        );
}


.hardware-card.flipped
.hardware-card-inner {
    transform:
        rotateY(180deg);
}


.hardware-card-face {
    position: absolute;

    inset: 0;

    overflow: hidden;

    border-radius: inherit;

    background:
        rgba(255, 255, 255, 0.98);

    border:
        1px solid
        rgba(226, 232, 240, 0.98);

    box-shadow:
        0 16px 42px
        rgba(15, 23, 42, 0.11);

    backface-visibility: hidden;

    -webkit-backface-visibility: hidden;
}


.hardware-card-front {
    display: grid;

    grid-template-rows:
        minmax(0, 1fr)
        auto;
}


.hardware-card-back {
    padding:
        32px 30px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    background:
        radial-gradient(
            circle at 88% 12%,
            rgba(8, 145, 178, 0.12),
            transparent 28%
        ),
        radial-gradient(
            circle at 5% 100%,
            rgba(31, 122, 88, 0.10),
            transparent 32%
        ),
        linear-gradient(
            145deg,
            #ffffff,
            #eef7f4
        );

    transform:
        rotateY(180deg);
}


.hardware-card-back h3 {
    margin-top: 9px;

    color: #172033;

    font-size:
        clamp(
            24px,
            3vw,
            34px
        );

    letter-spacing: -1px;
}


.hardware-card-back p {
    max-width: 540px;

    margin-top: 15px;

    color:
        #526173;

    font-size: 12px;

    line-height: 1.75;
}


/* Large feature card */
.hardware-card-esp {
    grid-column:
        1 / 8;

    grid-row:
        1 / 3;

    min-height: 530px;
}


/* Smaller upper card */
.hardware-card-mq {
    grid-column:
        8 / 13;

    grid-row:
        1 / 2;

    min-height: 255px;
}


/* Smaller lower card */
.hardware-card-dht {
    grid-column:
        8 / 13;

    grid-row:
        2 / 3;

    min-height: 255px;
}


.hardware-image-wrap {
    position: relative;

    min-height: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    padding: 20px;

    background:
        linear-gradient(
            145deg,
            #f5f8fa,
            #ffffff
        );
}


.hardware-image-wrap::after {
    content: "";

    position: absolute;

    width: 160px;
    height: 160px;

    right: -70px;
    top: -70px;

    border-radius: 50%;

    background:
        rgba(8, 145, 178, 0.035);

    pointer-events: none;
}


.hardware-image-wrap img {
    position: relative;

    z-index: 1;

    width: 100%;
    height: 100%;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;

    transition:
        transform 0.55s ease;
}


.hardware-card:hover
.hardware-card-front
.hardware-image-wrap img {
    transform:
        scale(1.035);
}


.hardware-card-esp
.hardware-image-wrap {
    padding: 34px;
}


.hardware-card-mq
.hardware-image-wrap {
    padding: 22px 28px;
}


.hardware-card-dht
.hardware-image-wrap {
    padding: 20px 30px;
}


.hardware-front-content {
    position: relative;

    min-height: 118px;

    padding:
        19px 23px
        21px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    background:
        rgba(255, 255, 255, 0.98);

    border-top:
        1px solid
        rgba(226, 232, 240, 0.72);
}


.hardware-card-esp
.hardware-front-content {
    min-height: 132px;

    padding:
        22px 27px
        25px;
}


.hardware-index {
    display: block;

    margin-bottom: 7px;

    color:
        var(--environment-green);

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1.5px;
}


.hardware-front-content h3 {
    color: #172033;

    font-size:
        clamp(
            18px,
            2.2vw,
            25px
        );

    letter-spacing: -0.7px;
}


.hardware-card-esp
.hardware-front-content h3 {
    font-size:
        clamp(
            24px,
            3vw,
            34px
        );
}


.flip-hint {
    width: fit-content;

    margin-top: 11px;

    display: inline-flex;

    align-items: center;

    gap: 7px;

    color:
        var(--primary);

    font-size: 9px;

    font-weight: 750;
}


.flip-hint > span {
    width: 25px;
    height: 25px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        var(--primary-light);

    transition:
        transform 0.25s ease;
}


.hardware-card:hover
.flip-hint > span {
    transform:
        rotate(35deg);
}


.back-hint {
    margin-top: 20px;
}


.hardware-orbit {
    display: none;
}

/* =====================================
   MONITORING BRIDGE
===================================== */

.monitoring-bridge {
    margin-top: 62px;

    padding: 34px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 34px;

    border-radius: 28px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #eef7f4
        );

    border:
        1px solid
        #dbe9e3;

    box-shadow:
        var(--shadow-sm);
}


.monitoring-bridge > div {
    max-width: 760px;
}


.monitoring-bridge h2 {
    font-size:
        clamp(
            25px,
            3.8vw,
            39px
        );
}


.monitoring-bridge > div > p:last-child {
    max-width: 680px;

    margin-top: 11px;

    color:
        var(--text-soft);

    font-size: 11px;

    line-height: 1.65;
}


.monitoring-bridge-button {
    min-width: 190px;
    min-height: 50px;

    padding: 0 18px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    border-radius: 999px;

    background:
        var(--primary);

    color: #ffffff;

    text-decoration: none;

    font-size: 11px;

    font-weight: 750;

    box-shadow:
        0 8px 20px
        rgba(31, 78, 120, 0.20);

    transition:
        transform 0.22s ease,
        background 0.22s ease;
}


.monitoring-bridge-button:hover {
    background:
        var(--primary-dark);

    transform:
        translateY(-3px);
}


.monitoring-bridge-button span {
    animation:
        bridgeArrow 1.7s
        ease-in-out
        infinite;
}



/* =====================================
   IMAGE CREDITS
===================================== */

.image-credits {
    margin-top: 16px;

    padding: 12px 15px;

    border:
        1px solid
        var(--border);

    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.75);

    color:
        var(--text-soft);
}


.image-credits summary {
    cursor: pointer;

    font-size: 9px;

    font-weight: 700;
}


.image-credits p {
    margin-top: 8px;

    font-size: 8px;

    line-height: 1.6;
}



/* =====================================
   SCROLL / VIEW REVEAL
===================================== */

.reveal-section {
    transform:
        translateY(0);

    opacity: 1;
}


@supports (
    animation-timeline:
    view()
) {

    .reveal-section {
        animation:
            revealOnView
            linear
            both;

        animation-timeline:
            view();

        animation-range:
            entry 8%
            cover 28%;
    }
}



.project-showcase.home-only-hidden {
    display: none;
}


/* =====================================
   MAIN
===================================== */

main {
    width: 92%;

    max-width: 1180px;

    margin:
        58px auto
        70px;
}



/* =====================================
   PAGE CONTROL
===================================== */

.page {
    display: none;
}


.page.active-page {
    display: block;

    animation:
        pageFade 0.38s
        ease both;
}



/* =====================================
   PAGE HEADING
===================================== */

.page-heading {
    margin-bottom: 27px;

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 24px;
}


.page-heading h2 {
    margin-top: 4px;

    font-size:
        clamp(
            25px,
            4vw,
            35px
        );

    letter-spacing: -1px;

    color: #172033;
}


.section-label {
    font-size: 10px;

    font-weight: 800;

    color:
        var(--primary);

    letter-spacing: 1.7px;
}


.page-description {
    max-width: 650px;

    margin-top: 8px;

    color: var(--text-soft);

    font-size: 14px;

    line-height: 1.6;
}



/* =====================================
   MONITORING CHIP
===================================== */

.monitoring-chip {
    flex-shrink: 0;

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 10px 14px;

    border-radius: 999px;

    background:
        var(--normal-soft);

    color:
        var(--normal);

    border:
        1px solid #d7efda;

    font-size: 11px;

    font-weight: 750;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}


.monitoring-chip.offline {
    background: #f1f5f9;

    color: #64748b;

    border-color: #e2e8f0;
}


.monitoring-dot {
    width: 8px;
    height: 8px;

    background: #22c55e;

    border-radius: 50%;

    animation:
        livePulse 1.8s
        infinite;
}


.monitoring-dot.offline {
    background: #94a3b8;

    animation: none;

    box-shadow: none;
}



/* =====================================
   STATUS PANEL
===================================== */

.status-panel {
    min-height: 220px;

    position: relative;

    overflow: hidden;

    padding: 34px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;

    border-radius: 22px;

    background:
        linear-gradient(
            140deg,
            #ffffff,
            #f8fbfe
        );

    border:
        1px solid
        var(--border);

    box-shadow:
        var(--shadow-md);
}


.status-panel::after {
    content: "";

    position: absolute;

    width: 210px;
    height: 210px;

    right: -70px;
    top: -85px;

    border-radius: 50%;

    background:
        rgba(31, 78, 120, 0.05);
}


.status-content {
    position: relative;

    z-index: 2;
}


.status-label {
    margin-bottom: 14px;

    color:
        var(--text-soft);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.8px;
}


.status {
    width: fit-content;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding:
        12px 27px;

    border-radius: 999px;

    background: #64748b;

    color: #ffffff;

    font-size: 18px;

    font-weight: 800;

    letter-spacing: 0.8px;

    box-shadow:
        0 7px 18px
        rgba(100, 116, 139, 0.17);
}


.status.normal {
    background:
        var(--normal);

    box-shadow:
        0 7px 20px
        rgba(46, 125, 50, 0.20);
}


.status.moderate {
    background:
        var(--moderate);

    box-shadow:
        0 7px 20px
        rgba(217, 119, 6, 0.22);
}


.status.high {
    background:
        var(--high);

    animation:
        highStatusPulse 1.6s
        ease-in-out
        infinite;

    box-shadow:
        0 7px 24px
        rgba(198, 40, 40, 0.27);
}


.status-message {
    max-width: 500px;

    margin-top: 16px;

    color:
        var(--text-soft);

    line-height: 1.6;

    font-size: 14px;
}


.status-reading {
    position: relative;

    min-width: 210px;

    padding: 23px;

    z-index: 2;

    text-align: center;

    border-radius: 18px;

    background:
        var(--primary-light);

    border:
        1px solid
        #dbeaf4;
}


.status-reading-label {
    display: block;

    margin-bottom: 8px;

    color: var(--text-soft);

    font-size: 11px;

    font-weight: 650;
}


.status-reading strong {
    display: block;

    color:
        var(--primary);

    font-size: 40px;

    line-height: 1;

    font-weight: 800;

    letter-spacing: -1.5px;
}


.status-reading > span:last-child {
    display: block;

    margin-top: 9px;

    color:
        var(--text-soft);

    font-size: 10px;

    font-weight: 600;
}



/* =====================================
   SENSOR CARDS
===================================== */

.sensor-container {
    margin-top: 24px;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}


.sensor-card {
    position: relative;

    overflow: hidden;

    min-height: 205px;

    padding: 25px;

    border-radius: 19px;

    background:
        var(--surface);

    border:
        1px solid
        var(--border);

    box-shadow:
        var(--shadow-sm);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


.sensor-card:hover {
    transform:
        translateY(-6px);

    box-shadow:
        var(--shadow-md);

    border-color:
        #cbd5e1;
}


.sensor-card::after {
    content: "";

    position: absolute;

    width: 90px;
    height: 90px;

    right: -35px;
    bottom: -35px;

    border-radius: 50%;

    background:
        rgba(31, 78, 120, 0.035);
}


.sensor-card-top {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 22px;
}


.sensor-icon {
    width: 43px;
    height: 43px;

    display: grid;

    place-items: center;

    border-radius: 13px;
}


.sensor-icon svg {
    width: 23px;
    height: 23px;
}


.temperature-icon {
    color: #dc2626;

    background: #fef2f2;
}


.humidity-icon {
    color: #0891b2;

    background: #ecfeff;
}


.gas-icon {
    color:
        var(--moderate);

    background:
        var(--moderate-soft);
}


.sensor-live-label {
    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1px;

    color:
        var(--normal);

    background:
        var(--normal-soft);

    border-radius: 999px;

    padding: 6px 8px;

    transition:
        background 0.25s ease,
        color 0.25s ease;
}


.sensor-live-label.offline {
    background: #f1f5f9;

    color: #64748b;
}


.sensor-card h3 {
    margin-bottom: 8px;

    color:
        var(--text-soft);

    font-size: 13px;

    font-weight: 650;
}


.sensor-value {
    display: flex;

    align-items: baseline;

    gap: 5px;

    color: #172033;

    font-size: 35px;

    line-height: 1.1;

    font-weight: 800;

    letter-spacing: -1.4px;
}


.sensor-value small {
    font-size: 17px;

    font-weight: 650;

    color:
        var(--text-soft);
}


.sensor-description {
    display: block;

    margin-top: 11px;

    color:
        var(--text-soft);

    font-size: 10px;
}



/* =====================================
   SYSTEM STATUS
===================================== */

.system-status-row {
    margin-top: 22px;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 13px;
}


.system-status-item {
    min-height: 72px;

    padding: 15px 17px;

    display: flex;

    align-items: center;

    gap: 12px;

    border:
        1px solid
        var(--border);

    border-radius: 15px;

    background:
        rgba(255, 255, 255, 0.82);

    box-shadow:
        var(--shadow-sm);
}


.connection-dot {
    width: 10px;
    height: 10px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #94a3b8;
}


.connection-dot.online {
    background: #22c55e;

    box-shadow:
        0 0 0
        5px
        rgba(34, 197, 94, 0.10);
}


.connection-dot.offline {
    background: #94a3b8;

    box-shadow:
        0 0 0
        5px
        rgba(148, 163, 184, 0.10);
}


.system-status-item strong {
    display: block;

    margin-bottom: 3px;

    font-size: 12px;

    color: #172033;
}


.system-status-item span:not(.connection-dot) {
    font-size: 10px;

    color:
        var(--text-soft);
}



/* =====================================
   MODERATE
===================================== */

.moderate-advisory {
    display: none;

    margin-top: 24px;

    padding: 20px 22px;

    align-items: center;

    gap: 16px;

    border-radius: 17px;

    background:
        var(--moderate-soft);

    color: #92400e;

    border:
        1px solid #f8dbab;

    animation:
        noticeEnter 0.35s
        ease both;
}


.advisory-icon {
    width: 39px;
    height: 39px;

    flex-shrink: 0;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        var(--moderate);

    color: #ffffff;

    font-size: 20px;

    font-weight: 800;
}


.moderate-advisory h3 {
    margin-bottom: 4px;

    font-size: 14px;
}


.moderate-advisory p {
    font-size: 12px;

    line-height: 1.55;
}



/* =====================================
   HIGH WARNING
===================================== */

.warning {
    display: none;

    margin-top: 24px;

    padding: 22px;

    align-items: center;

    gap: 17px;

    border-radius: 17px;

    background:
        var(--high-soft);

    color: #991b1b;

    border:
        1px solid #fecaca;

    box-shadow:
        0 7px 22px
        rgba(198, 40, 40, 0.09);

    animation:
        noticeEnter 0.35s
        ease both;
}


.warning-icon {
    width: 45px;
    height: 45px;

    flex-shrink: 0;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        var(--high);

    color: #ffffff;

    font-size: 21px;

    animation:
        warningPulse 1.5s
        ease-in-out
        infinite;
}


.warning h2 {
    margin-bottom: 4px;

    font-size: 15px;
}


.warning p {
    font-size: 12px;

    line-height: 1.55;
}



/* =====================================
   LAST UPDATED
===================================== */

.updated {
    margin-top: 22px;

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 6px;

    color:
        var(--text-soft);

    font-size: 10px;
}


.updated strong {
    color: #475569;

    font-weight: 650;
}


.update-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background:
        var(--primary);
}



/* =====================================
   HISTORY
===================================== */

.history-section {
    display: grid;

    gap: 22px;
}


.chart-card {
    padding: 24px;

    border-radius: 19px;

    background:
        var(--surface);

    border:
        1px solid
        var(--border);

    box-shadow:
        var(--shadow-sm);

    transition:
        box-shadow 0.25s ease,
        transform 0.25s ease;
}


.chart-card:hover {
    transform:
        translateY(-3px);

    box-shadow:
        var(--shadow-md);
}


.chart-header {
    margin-bottom: 19px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;
}


.chart-header > div {
    display: flex;

    align-items: center;

    gap: 9px;
}


.chart-header h3 {
    font-size: 14px;

    color: #253044;
}


.chart-icon {
    font-size: 17px;
}


.chart-tag {
    padding: 7px 10px;

    border-radius: 999px;

    background: #f1f5f9;

    color:
        var(--text-soft);

    font-size: 9px;

    font-weight: 650;
}


.chart-wrapper {
    position: relative;

    width: 100%;

    min-height: 270px;
}


.chart-wrapper canvas {
    width: 100% !important;

    max-height: 350px;
}



/* =====================================
   ALERT SUMMARY
===================================== */

.alert-summary {
    min-width: 120px;

    padding: 14px 20px;

    text-align: center;

    border-radius: 15px;

    background:
        var(--high-soft);

    border:
        1px solid #fecaca;
}


.alert-summary span {
    display: block;

    color: #991b1b;

    font-size: 9px;

    font-weight: 650;
}


.alert-summary strong {
    display: block;

    margin-top: 4px;

    color:
        var(--high);

    font-size: 26px;

    line-height: 1;

    font-weight: 800;
}



/* =====================================
   ALERT HISTORY
===================================== */

.alerts-section {
    margin-top: 3px;
}


.alert-list {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.alert-item {
    padding: 22px;

    border-radius: 18px;

    background:
        var(--surface);

    border:
        1px solid
        var(--border);

    border-left:
        5px solid
        var(--high);

    box-shadow:
        var(--shadow-sm);

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease;
}


.alert-item:hover {
    transform:
        translateY(-4px);

    box-shadow:
        var(--shadow-md);
}


.alert-item-header {
    margin-bottom: 16px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;
}


.severity-badge {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 6px 9px;

    border-radius: 999px;

    background:
        var(--high);

    color: #ffffff;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 0.7px;
}


.alert-time {
    color:
        var(--text-soft);

    font-size: 9px;

    text-align: right;
}


.alert-item h3 {
    margin-bottom: 16px;

    color: #991b1b;

    font-size: 15px;
}


.alert-metrics {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 9px;
}


.alert-metrics > div {
    padding: 11px;

    border-radius: 11px;

    background: #f8fafc;
}


.alert-metrics span {
    display: block;

    color:
        var(--text-soft);

    font-size: 8px;
}


.alert-metrics strong {
    display: block;

    margin-top: 4px;

    color: #334155;

    font-size: 11px;
}


.alert-message {
    margin-top: 15px;

    color:
        var(--text-soft);

    font-size: 10px;

    line-height: 1.5;
}


.no-alerts {
    grid-column: 1 / -1;

    min-height: 230px;

    padding: 30px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    border-radius: 18px;

    background:
        var(--surface);

    border:
        1px solid
        var(--border);

    box-shadow:
        var(--shadow-sm);
}


.no-alert-icon {
    width: 47px;
    height: 47px;

    margin-bottom: 13px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        var(--normal-soft);

    color:
        var(--normal);

    font-size: 18px;

    font-weight: 800;
}


.no-alerts h3 {
    margin-bottom: 5px;

    font-size: 14px;
}


.no-alerts p {
    color:
        var(--text-soft);

    font-size: 11px;
}



/* =====================================
   PREDICTION
===================================== */

.prediction-section {
    margin-top: 4px;
}


.prediction-comparison {
    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    gap: 19px;
}


.prediction-main-card {
    min-height: 220px;

    padding: 30px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    border-radius: 20px;

    background:
        var(--surface);

    border:
        1px solid
        var(--border);

    box-shadow:
        var(--shadow-sm);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.prediction-main-card:hover {
    transform:
        translateY(-5px);

    box-shadow:
        var(--shadow-md);
}


.predicted-card {
    background:
        linear-gradient(
            145deg,
            #f0f7fb,
            #ffffff
        );

    border-color:
        #d7e7f1;
}


.prediction-card-label {
    margin-bottom: 9px;

    color:
        var(--primary);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.5px;
}


.prediction-main-card h3 {
    color:
        var(--text-soft);

    font-size: 12px;
}


.prediction-main-card p {
    margin: 12px 0 6px;

    color: #172033;

    font-size: 42px;

    line-height: 1;

    font-weight: 800;

    letter-spacing: -1.7px;
}


.prediction-main-card small {
    color:
        var(--text-soft);

    font-size: 9px;
}


.prediction-arrow {
    width: 46px;
    height: 46px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        var(--primary);

    color: #ffffff;

    font-size: 20px;

    box-shadow:
        0 7px 18px
        rgba(31, 78, 120, 0.21);

    animation:
        arrowDrift 2s
        ease-in-out
        infinite;
}


.prediction-grid {
    margin-top: 20px;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 20px;
}


.prediction-card {
    padding: 27px;

    text-align: center;

    border-radius: 18px;

    background:
        var(--surface);

    border:
        1px solid
        var(--border);

    box-shadow:
        var(--shadow-sm);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.prediction-card:hover {
    transform:
        translateY(-4px);

    box-shadow:
        var(--shadow-md);
}


.prediction-card h3 {
    margin-bottom: 13px;

    color:
        var(--text-soft);

    font-size: 12px;
}


.prediction-card p {
    font-size: 24px;

    font-weight: 800;
}


.trend-rising {
    color:
        var(--moderate);
}


.trend-falling {
    color:
        var(--normal);
}


.trend-stable {
    color:
        var(--primary);
}


.prediction-normal {
    color:
        var(--normal);
}


.prediction-moderate {
    color:
        var(--moderate);
}


.prediction-high {
    color:
        var(--high);
}


.prediction-message {
    margin-top: 20px;

    padding: 20px 23px;

    border-radius: 16px;

    text-align: center;

    color:
        var(--text-soft);

    background:
        var(--surface);

    border:
        1px solid
        var(--border);

    box-shadow:
        var(--shadow-sm);

    font-size: 12px;

    line-height: 1.6;
}


.prediction-message.high-risk {
    background:
        var(--high-soft);

    color: #991b1b;

    border:
        1px solid #fecaca;

    font-weight: 700;

    animation:
        warningPulseSoft 1.8s
        ease-in-out
        infinite;
}



/* =====================================
   ABOUT
===================================== */

.about-section {
    margin-top: 4px;
}


.about-intro {
    max-width: 850px;

    margin:
        0 auto
        29px;

    text-align: center;

    color:
        var(--text-soft);

    font-size: 13px;

    line-height: 1.75;
}


.about-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 18px;
}


.about-card {
    min-height: 200px;

    padding: 25px;

    border-radius: 18px;

    background:
        var(--surface);

    border:
        1px solid
        var(--border);

    box-shadow:
        var(--shadow-sm);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.about-card:hover {
    transform:
        translateY(-5px);

    box-shadow:
        var(--shadow-md);
}


.about-card-icon {
    width: 40px;
    height: 40px;

    margin-bottom: 16px;

    display: grid;

    place-items: center;

    border-radius: 12px;

    background:
        var(--primary-light);

    font-size: 18px;
}


.about-card h3 {
    margin-bottom: 12px;

    color:
        var(--primary);

    font-size: 14px;
}


.about-card p {
    margin: 7px 0;

    color: #475569;

    font-size: 11px;

    line-height: 1.6;
}


.about-normal {
    color:
        var(--normal) !important;
}


.about-moderate {
    color:
        var(--moderate) !important;
}


.about-high {
    color:
        var(--high) !important;
}



/* =====================================
   ABOUT NOTE
===================================== */

.about-note {
    margin-top: 22px;

    padding: 22px;

    display: flex;

    gap: 16px;

    align-items: flex-start;

    border-radius: 17px;

    background:
        #fffbea;

    border:
        1px solid
        #fde7a8;
}


.about-note-icon {
    width: 35px;
    height: 35px;

    flex-shrink: 0;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        var(--moderate);

    color: #ffffff;

    font-size: 15px;

    font-weight: 800;
}


.about-note h3 {
    margin-bottom: 6px;

    color: #92400e;

    font-size: 13px;
}


.about-note p {
    color: #7c5d28;

    font-size: 10px;

    line-height: 1.6;
}



/* =====================================
   ARCHITECTURE
===================================== */

.architecture-box {
    margin-top: 22px;

    padding: 27px;

    border-radius: 19px;

    background:
        var(--surface);

    border:
        1px solid
        var(--border);

    box-shadow:
        var(--shadow-sm);
}


.architecture-box > h3 {
    margin-bottom: 23px;

    text-align: center;

    color:
        var(--primary);

    font-size: 14px;
}


.architecture-flow {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 11px;

    flex-wrap: wrap;
}


.architecture-item {
    width: 128px;
    min-height: 105px;

    padding: 15px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    border-radius: 14px;

    background: #f8fafc;

    border:
        1px solid
        var(--border);

    transition:
        transform 0.22s ease,
        border-color 0.22s ease;
}


.architecture-item:hover {
    transform:
        translateY(-3px);

    border-color:
        #bfd3e2;
}


.architecture-item > span {
    margin-bottom: 7px;

    font-size: 19px;
}


.architecture-item strong {
    font-size: 11px;
}


.architecture-item small {
    margin-top: 4px;

    color:
        var(--text-soft);

    font-size: 8px;
}


.architecture-arrow {
    color:
        var(--primary);

    font-weight: 800;
}


.telegram-flow {
    width: fit-content;

    max-width: 100%;

    margin:
        22px auto
        0;

    padding:
        11px 16px;

    border-radius: 999px;

    background:
        var(--primary-light);

    color:
        var(--primary);

    font-size: 10px;

    font-weight: 650;

    text-align: center;
}


.telegram-flow span {
    margin:
        0 8px;
}



/* =====================================
   HIGH ALERT POPUP
===================================== */

.alert-popup {
    position: fixed;

    inset: 0;

    z-index: 5000;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s;
}


.alert-popup.show {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


.alert-popup-backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(15, 23, 42, 0.62);

    backdrop-filter:
        blur(5px);

    -webkit-backdrop-filter:
        blur(5px);
}


.alert-popup-card {
    position: relative;

    width: min(
        480px,
        100%
    );

    padding:
        34px 30px
        28px;

    z-index: 2;

    text-align: center;

    border-radius: 24px;

    background:
        var(--surface);

    border-top:
        6px solid
        var(--high);

    box-shadow:
        0 30px 80px
        rgba(15, 23, 42, 0.35);

    transform:
        translateY(20px)
        scale(0.94);

    transition:
        transform 0.3s
        cubic-bezier(
            0.2,
            0.8,
            0.2,
            1
        );
}


.alert-popup.show
.alert-popup-card {
    transform:
        translateY(0)
        scale(1);
}


.popup-close {
    position: absolute;

    top: 14px;
    right: 14px;

    width: 34px;
    height: 34px;

    display: grid;

    place-items: center;

    border: none;

    border-radius: 50%;

    background: #f1f5f9;

    color:
        var(--text-soft);

    font-size: 22px;

    cursor: pointer;
}


.popup-warning-icon {
    width: 66px;
    height: 66px;

    margin:
        0 auto
        16px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        var(--high-soft);

    color:
        var(--high);

    font-size: 30px;

    animation:
        warningPulse 1.5s
        ease-in-out
        infinite;
}


.popup-label {
    margin-bottom: 7px;

    color:
        var(--high);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.7px;
}


.alert-popup-card h2 {
    color: #991b1b;

    font-size: 24px;

    letter-spacing: -0.7px;
}


.popup-description {
    margin:
        12px auto
        20px;

    max-width: 385px;

    color:
        var(--text-soft);

    font-size: 11px;

    line-height: 1.65;
}


.popup-readings {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 9px;

    margin-bottom: 20px;
}


.popup-readings > div {
    padding: 13px 8px;

    border-radius: 13px;

    background: #f8fafc;

    border:
        1px solid
        var(--border);
}


.popup-readings span {
    display: block;

    color:
        var(--text-soft);

    font-size: 8px;
}


.popup-readings strong {
    display: block;

    margin-top: 5px;

    color: #172033;

    font-size: 14px;
}


.popup-dismiss {
    width: 100%;

    height: 46px;

    border: none;

    border-radius: 13px;

    background:
        var(--high);

    color: #ffffff;

    font-size: 12px;

    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 7px 20px
        rgba(198, 40, 40, 0.23);
}



/* =====================================
   FOOTER
===================================== */

.site-footer {
    max-width: 1180px;

    width: 92%;

    margin:
        0 auto
        30px;

    padding:
        24px 2px
        10px;

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 20px;

    border-top:
        1px solid
        var(--border);

    color:
        var(--text-soft);
}


.footer-brand {
    display: flex;

    align-items: center;

    gap: 8px;

    color: #334155;

    font-size: 12px;

    font-weight: 750;
}


.footer-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background:
        var(--primary);
}


.site-footer p {
    margin-top: 7px;

    font-size: 9px;
}

.footer-year {
    font-size: 9px;
    white-space: nowrap;

    display: flex;
    flex-direction: column;
    align-items: flex-end;

    gap: 2px;
    line-height: 1.5;

    color: inherit;
}



/* =====================================
   ANIMATIONS
===================================== */

@keyframes brandSlideForward {

    0% {
        opacity: 0;

        transform:
            translateX(-24px);
    }

    10% {
        opacity: 1;

        transform:
            translateX(-14px);
    }

    66% {
        opacity: 1;

        transform:
            translateX(18px);
    }

    84% {
        opacity: 0;

        transform:
            translateX(42px);
    }

    100% {
        opacity: 0;

        transform:
            translateX(-24px);
    }
}


@keyframes logoFloat {

    0%,
    100% {
        transform:
            translateY(0);
    }

    50% {
        transform:
            translateY(-3px);
    }
}


@keyframes sensorPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}


@keyframes livePulse {

    0% {
        box-shadow:
            0 0 0 0
            rgba(34, 197, 94, 0.48);
    }

    70% {
        box-shadow:
            0 0 0 8px
            rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow:
            0 0 0 0
            rgba(34, 197, 94, 0);
    }
}


@keyframes heroEnter {

    from {
        opacity: 0;

        transform:
            translateY(15px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


@keyframes revealOnView {

    from {
        opacity: 0;

        transform:
            translateY(30px)
            scale(0.985);
    }


    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


@keyframes slowRotate {

    from {
        transform:
            translateX(-50%)
            rotate(0deg);
    }

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


@keyframes slowRotateReverse {

    from {
        transform:
            translateX(-50%)
            rotate(360deg);
    }

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


@keyframes bridgeArrow {

    0%,
    100% {
        transform:
            translateY(0);
    }

    50% {
        transform:
            translateY(4px);
    }
}


@keyframes pageFade {

    from {
        opacity: 0;

        transform:
            translateY(8px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


@keyframes noticeEnter {

    from {
        opacity: 0;

        transform:
            translateY(-5px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


@keyframes highStatusPulse {

    0%,
    100% {
        transform:
            scale(1);
    }

    50% {
        transform:
            scale(1.035);
    }
}


@keyframes warningPulse {

    0%,
    100% {
        transform:
            scale(1);
    }

    50% {
        transform:
            scale(1.07);
    }
}


@keyframes warningPulseSoft {

    0%,
    100% {
        box-shadow:
            var(--shadow-sm);
    }

    50% {
        box-shadow:
            0 8px 25px
            rgba(198, 40, 40, 0.13);
    }
}


@keyframes arrowDrift {

    0%,
    100% {
        transform:
            translateX(0);
    }

    50% {
        transform:
            translateX(5px);
    }
}



/* =====================================
   TABLET
===================================== */

@media (max-width: 1000px) {

    .environment-editorial {
        grid-template-rows:
            270px
            220px
            245px;
    }


    .hardware-card-esp {
        width: 390px;
        height: 440px;
    }


    .hardware-card-mq {
        width: 315px;
        height: 400px;

        left: 18px;
    }


    .hardware-card-dht {
        width: 300px;
        height: 390px;

        right: 18px;
    }
}


@media (max-width: 900px) {


    /* Modern hardware bento becomes more compact on tablet */
    .hardware-stage {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        grid-template-rows:
            auto auto;

        padding: 20px;
    }


    .hardware-card-esp {
        grid-column:
            1 / 3;

        grid-row:
            1 / 2;

        min-height: 440px;
    }


    .hardware-card-mq {
        grid-column:
            1 / 2;

        grid-row:
            2 / 3;

        min-height: 300px;
    }


    .hardware-card-dht {
        grid-column:
            2 / 3;

        grid-row:
            2 / 3;

        min-height: 300px;
    }


    .topbar-inner {
        padding:
            11px 18px;
    }


    .hero-section {
        padding:
            58px 20px
            62px;
    }


    .showcase-heading {
        grid-template-columns:
            1fr;

        align-items: start;

        gap: 15px;
    }


    .showcase-lead {
        max-width: 700px;
    }


    .environment-editorial {
        grid-template-columns:
            repeat(6, minmax(0, 1fr));

        grid-template-rows:
            330px
            230px
            230px
            260px;
    }


    .environment-feature {
        grid-column:
            1 / 7;

        grid-row:
            1 / 2;
    }


    .environment-green {
        grid-column:
            1 / 4;

        grid-row:
            2 / 3;
    }


    .environment-city {
        grid-column:
            4 / 7;

        grid-row:
            2 / 3;
    }


    .environment-note {
        grid-column:
            1 / 3;

        grid-row:
            3 / 4;
    }


    .environment-clean {
        grid-column:
            3 / 7;

        grid-row:
            3 / 4;
    }


    .environment-awareness {
        grid-column:
            1 / 7;

        grid-row:
            4 / 5;
    }


    .hardware-stage {
        min-height: 820px;
    }


    .hardware-card-esp {
        width: min(
            440px,
            64%
        );

        height: 440px;

        top: 55px;
    }


    .hardware-card-mq {
        width: 330px;
        height: 400px;

        left: 35px;
        top: 365px;
    }


    .hardware-card-dht {
        width: 310px;
        height: 390px;

        right: 35px;
        top: 430px;
    }


    .monitoring-bridge {
        align-items: flex-start;

        flex-direction: column;
    }


    .status-panel {
        padding: 27px;
    }


    .sensor-container {
        grid-template-columns:
            repeat(2, 1fr);
    }


    .sensor-card:last-child {
        grid-column:
            1 / -1;
    }


    .alert-list {
        grid-template-columns:
            1fr;
    }
}



/* =====================================
   MOBILE
===================================== */

@media (max-width: 700px) {


    .hardware-stage {
        display: flex;

        flex-direction: column;

        gap: 16px;

        padding: 16px;

        overflow: visible;
    }


    .hardware-card,
    .hardware-card-esp,
    .hardware-card-mq,
    .hardware-card-dht {
        width: 100%;

        min-height: 360px;

        grid-column: auto;

        grid-row: auto;

        transform: none;
    }


    .hardware-card-esp {
        min-height: 430px;
    }


    .hardware-card:hover,
    .hardware-card-esp:hover,
    .hardware-card-mq:hover,
    .hardware-card-dht:hover {
        transform:
            translateY(-4px);
    }


    .hardware-stage::before {
        display: none;
    }


    .hardware-image-wrap,
    .hardware-card-esp
    .hardware-image-wrap {
        min-height: 240px;

        padding: 24px;
    }


    .topbar-inner {
        min-height: 66px;

        padding:
            9px 12px;

        gap: 8px;
    }


    .brand-area {
        gap: 8px;
    }


    .brand-logo {
        width: 40px;
        height: 40px;

        border-radius: 12px;
    }


    .brand-logo svg {
        width: 28px;
        height: 28px;
    }


    .brand-title {
        font-size: 14px;

        animation:
            brandSlideForwardMobile
            5.2s
            cubic-bezier(
                0.45,
                0,
                0.3,
                1
            )
            infinite;
    }


    .brand-caption {
        display: none;
    }


    .topbar-actions {
        gap: 6px;
    }


    .live-indicator {
        padding:
            7px 8px;

        gap: 5px;
    }


    .live-text {
        font-size: 8px;
    }


    .live-dot {
        width: 7px;
        height: 7px;
    }


    .menu-toggle {
        height: 38px;

        padding:
            0 11px;

        font-size: 10px;
    }


    .menu-arrow {
        width: 14px;
        height: 14px;
    }


    .section-menu {
        position: fixed;

        top: 73px;

        left: 12px;
        right: 12px;

        width: auto;

        transform-origin:
            top center;
    }


    .hero-section {
        padding:
            48px 16px
            52px;
    }


    .hero-eyebrow {
        font-size: 8px;

        letter-spacing: 1.6px;
    }


    .hero-title {
        font-size: 32px;

        letter-spacing: -1.2px;
    }


    .hero-description {
        margin-top: 17px;

        font-size: 11px;
    }


    .hero-actions {
        margin-top: 23px;
    }


    .hero-btn {
        min-height: 41px;

        font-size: 10px;
    }


    .project-showcase {
        width: 93%;

        margin-top: 46px;
    }


    .showcase-heading {
        margin-bottom: 22px;
    }


    .showcase-heading h2,
    .hardware-heading h2 {
        font-size: 29px;

        letter-spacing: -1.1px;
    }


    .showcase-lead {
        font-size: 11px;
    }


    .environment-editorial {
        display: flex;

        flex-direction: column;

        gap: 14px;
    }


    .environment-card,
    .environment-note {
        width: 100%;

        min-height: 260px;

        border-radius: 20px;
    }


    .environment-feature {
        min-height: 360px;
    }


    .environment-note {
        min-height: 220px;
    }


    .environment-awareness {
        min-height: 330px;
    }


    .environment-copy {
        padding: 22px;
    }


    .environment-copy.compact-copy {
        padding: 20px;
    }


    .environment-copy h3 {
        font-size: 23px;
    }


    .compact-copy h3 {
        font-size: 20px;
    }


    .environment-number {
        right: 18px;
        bottom: 18px;

        font-size: 58px;
    }


    .hardware-showcase {
        margin-top: 62px;
    }


    .hardware-heading {
        margin-bottom: 22px;
    }


    .hardware-heading > p:last-child {
        font-size: 10px;
    }


    .hardware-stage {
        min-height: unset;

        padding: 22px;

        display: flex;

        flex-direction: column;

        gap: 18px;

        border-radius: 25px;
    }


    .hardware-stage::before,
    .hardware-orbit {
        display: none;
    }


    .hardware-card,
    .hardware-card-esp,
    .hardware-card-mq,
    .hardware-card-dht {
        position: relative;

        width: 100%;
        height: 410px;

        left: auto;
        right: auto;
        top: auto;

        transform: none;

        border-radius: 20px;
    }


    .hardware-card:hover,
    .hardware-card-esp:hover,
    .hardware-card-mq:hover,
    .hardware-card-dht:hover {
        transform:
            translateY(-4px);
    }


    .hardware-image-wrap,
    .hardware-card-esp
    .hardware-image-wrap {
        height: 70%;
    }


    .monitoring-bridge {
        margin-top: 44px;

        padding: 25px 21px;

        border-radius: 22px;
    }


    .monitoring-bridge h2 {
        font-size: 28px;

        letter-spacing: -1px;
    }


    .monitoring-bridge-button {
        width: 100%;
    }


    main {
        width: 93%;

        margin:
            38px auto
            55px;
    }


    .page-heading {
        align-items: flex-start;

        flex-direction: column;

        gap: 14px;
    }


    .page-heading h2 {
        font-size: 27px;
    }


    .status-panel {
        min-height: unset;

        padding: 24px 20px;

        flex-direction: column;

        align-items: stretch;
    }


    .status-content {
        text-align: center;
    }


    .status {
        margin:
            0 auto;
    }


    .status-message {
        margin:
            14px auto
            0;
    }


    .status-reading {
        width: 100%;

        min-width: 0;
    }


    .sensor-container {
        grid-template-columns:
            1fr;
    }


    .sensor-card:last-child {
        grid-column:
            auto;
    }


    .sensor-card {
        min-height: 190px;
    }


    .system-status-row {
        grid-template-columns:
            1fr;
    }


    .moderate-advisory,
    .warning {
        align-items: flex-start;
    }


    .chart-card {
        padding: 17px;
    }


    .chart-header {
        align-items: flex-start;

        flex-direction: column;
    }


    .chart-wrapper {
        min-height: 225px;
    }


    .alert-metrics {
        grid-template-columns:
            1fr;
    }


    .prediction-comparison {
        grid-template-columns:
            1fr;

        gap: 13px;
    }


    .prediction-arrow {
        margin:
            0 auto;

        transform:
            rotate(90deg);

        animation:
            arrowDriftMobile 2s
            ease-in-out
            infinite;
    }


    .prediction-grid {
        grid-template-columns:
            1fr;
    }


    .about-grid {
        grid-template-columns:
            1fr;
    }


    .architecture-flow {
        flex-direction: column;
    }


    .architecture-arrow {
        transform:
            rotate(90deg);
    }


    .architecture-item {
        width: 100%;

        max-width: 220px;
    }


    .popup-readings {
        grid-template-columns:
            1fr;
    }


    .alert-popup-card {
        max-height:
            calc(100vh - 30px);

        overflow-y: auto;

        padding:
            30px 20px
            22px;
    }


    .site-footer {
        align-items: flex-start;

        flex-direction: column;
    }

    .footer-year {
    align-self: flex-end;
    text-align: right;
}
}



/* =====================================
   EXTRA SMALL PHONE
===================================== */

@media (max-width: 390px) {

    .topbar-inner {
        padding:
            8px 9px;
    }


    .brand-logo {
        width: 36px;
        height: 36px;
    }


    .brand-title {
        font-size: 12px;
    }


    .live-text {
        display: none;
    }


    .live-indicator {
        padding: 7px;
    }


    .menu-toggle {
        padding:
            0 9px;

        font-size: 9px;
    }


    .hero-title {
        font-size: 28px;
    }


    .hero-actions {
        flex-direction: column;
    }


    .hero-btn {
        width: 100%;
    }


    .environment-feature {
        min-height: 330px;
    }


    .environment-card,
    .environment-note {
        min-height: 240px;
    }


    .environment-awareness {
        min-height: 320px;
    }


    .status-panel {
        padding:
            22px 16px;
    }


    .sensor-card {
        padding: 21px;
    }


    .sensor-value {
        font-size: 32px;
    }
}



/* =====================================
   MOBILE ANIMATIONS
===================================== */

@keyframes brandSlideForwardMobile {

    0% {
        opacity: 0;

        transform:
            translateX(-12px);
    }

    10% {
        opacity: 1;

        transform:
            translateX(-7px);
    }

    66% {
        opacity: 1;

        transform:
            translateX(8px);
    }

    84% {
        opacity: 0;

        transform:
            translateX(18px);
    }

    100% {
        opacity: 0;

        transform:
            translateX(-12px);
    }
}


@keyframes arrowDriftMobile {

    0%,
    100% {
        transform:
            rotate(90deg)
            translateX(0);
    }

    50% {
        transform:
            rotate(90deg)
            translateX(5px);
    }
}





/* =====================================
   FINAL HARDWARE RESPONSIVE OVERRIDES
   (kept at the end so older layout rules
   cannot override the new bento design)
===================================== */

@media (max-width: 900px) {

    .hardware-stage {
        min-height: unset;

        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        grid-template-rows:
            auto auto;

        gap: 18px;

        padding: 20px;

        overflow: visible;
    }


    .hardware-card,
    .hardware-card-esp,
    .hardware-card-mq,
    .hardware-card-dht {
        position: relative;

        width: 100%;

        left: auto;
        right: auto;
        top: auto;

        transform: none;
    }


    .hardware-card-esp {
        grid-column:
            1 / 3;

        grid-row:
            1 / 2;

        min-height: 440px;
    }


    .hardware-card-mq {
        grid-column:
            1 / 2;

        grid-row:
            2 / 3;

        min-height: 300px;
    }


    .hardware-card-dht {
        grid-column:
            2 / 3;

        grid-row:
            2 / 3;

        min-height: 300px;
    }


    .hardware-card:hover,
    .hardware-card-esp:hover,
    .hardware-card-mq:hover,
    .hardware-card-dht:hover {
        transform:
            translateY(-5px);
    }
}


@media (max-width: 700px) {

    .hardware-stage {
        display: flex;

        flex-direction: column;

        gap: 16px;

        padding: 16px;

        overflow: visible;
    }


    .hardware-card,
    .hardware-card-esp,
    .hardware-card-mq,
    .hardware-card-dht {
        width: 100%;

        min-height: 360px;

        grid-column: auto;

        grid-row: auto;

        transform: none;
    }


    .hardware-card-esp {
        min-height: 430px;
    }


    .hardware-card:hover,
    .hardware-card-esp:hover,
    .hardware-card-mq:hover,
    .hardware-card-dht:hover {
        transform:
            translateY(-4px);
    }


    .hardware-stage::before {
        display: none;
    }


    .hardware-image-wrap,
    .hardware-card-esp
    .hardware-image-wrap {
        min-height: 235px;

        padding: 23px;
    }
}


/* =====================================
   REDUCED MOTION
===================================== */

@media (
    prefers-reduced-motion:
    reduce
) {

    *,
    *::before,
    *::after {
        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        scroll-behavior:
            auto !important;

        transition-duration:
            0.01ms !important;
    }
}
 


/* ========================================
   HISTORY CONTROLS
======================================== */

.history-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.history-control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-control-group label {
    font-size: 0.9rem;
    font-weight: 600;
}

#historyRange {
    padding: 10px 36px 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    font: inherit;
    cursor: pointer;
    outline: none;
}

#historyRange:focus {
    border-color: rgba(45, 212, 191, 0.7);
}

#historyRange option {
    color: #111827;
    background: #ffffff;
}

.history-download-btn {
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    background: #14b8a6;
    color: #ffffff;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.history-download-btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.history-download-btn:active {
    transform: translateY(0);
}

/* Mobile */
@media (max-width: 640px) {
    .history-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .history-control-group {
        justify-content: space-between;
    }

    .history-download-btn {
        width: 100%;
    }
}


/* ========================================
   HISTORY SUMMARY CARDS
======================================== */

.history-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.history-summary-card {
    padding: 18px 20px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.history-summary-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.history-summary-card strong {
    font-size: 1.35rem;
    color: #0f172a;
}

@media (max-width: 700px) {
    .history-summary {
        grid-template-columns: 1fr;
    }
}
/* ========================================
   MOBILE SAFARI HARDWARE CARD FIX
======================================== */

@media (max-width: 768px) {

    .hardware-card-inner {
        transform: none !important;
        -webkit-transform: none !important;
        transform-style: flat !important;
        -webkit-transform-style: flat !important;
    }

    .hardware-card-face {
        position: absolute;
        inset: 0;
        backface-visibility: visible;
        -webkit-backface-visibility: visible;
    }

    /* Normal state: show image side only */
    .hardware-card-front {
        display: grid;
        opacity: 1;
        visibility: visible;
        transform: none !important;
        -webkit-transform: none !important;
    }

    .hardware-card-back {
        display: none;
        opacity: 0;
        visibility: hidden;
        transform: none !important;
        -webkit-transform: none !important;
    }

    /* Flipped state: show text side only */
    .hardware-card.flipped .hardware-card-front {
        display: none;
        opacity: 0;
        visibility: hidden;
    }

    .hardware-card.flipped .hardware-card-back {
        display: flex;
        opacity: 1;
        visibility: visible;
        transform: none !important;
        -webkit-transform: none !important;
    }
}