/* ==== Base (HilSec palette) ==== */
:root {
    --bg: #001820;
    --bg-2: #003545;
    --ink: #e0fdfb;
    --muted: #9fe9e6;
    --teal: #00fff3;
    --teal-2: #00ffd1;
    --glass: rgba(0, 255, 243, 0.08);
    --edge: #00fff3aa;
    --card: #01222c;
    --accent: #00e5db;
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    padding: 0
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg), var(--bg-2));
    color: var(--ink);
}

/* ==== Layout ==== */
.section {
    padding: 5rem 1.5rem;
    position: relative
}

.section.narrow {
    max-width: 1100px;
    margin: 0 auto
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin: 0 0 2rem;
    color: var(--teal-2);
    text-shadow: 0 0 18px var(--teal-2)
}

.lead {
    max-width: 900px;
    margin: 0.5rem auto 2.5rem;
    text-align: center;
    color: var(--muted)
}

/* ==== Navbar ==== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--bg), #022d3b);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid #00fff333
}

.nav-inner {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.8rem;
    justify-content: space-between;



}

.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--teal);
    font-weight: 800;
    letter-spacing: .02em
}

.brand img {
    height: 30px
}

.brand em {
    color: #fff;
    font-style: normal
}

.nav-toggle {
    display: none;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 0;
    cursor: pointer
}

.nav-toggle span {
    display: block;
    height: 3px;
    margin: 6px 0;
    background: var(--teal)
}

.nav-menu {
    margin-left: auto;
    display: flex;
    gap: 1rem;
    align-items: center
}

.nav-menu a {
    color: var(--teal);
    text-decoration: none;
    font-weight: 600;
    padding: .4rem .6rem;
    border-radius: 999px
}

.nav-menu a:hover {
    background: #022a36
}

.nav-menu .pill {
    border: 0.5px solid var(--edge)
}

@media (max-width:900px) {
    .nav-toggle {
        display: block
    }

    .nav-menu {
        position: absolute;
        inset: auto 0 auto 0;
        top: 64px;
        margin: 0;
        padding: 1rem;
        display: none;
        flex-direction: column;
        background: #001f29;
        border-top: 0.5px solid #00fff333
    }

    .nav-menu.show {
        display: flex
    }
}

/* ==== Hero ==== */
.hero {
    min-height: 92vh;
    display: grid;
    place-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #001820, #003545);
    /* new animated bg base */
}

/* overlay glow */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 40%, #00fff322 0%, transparent 70%);
    animation: pulseGlow 6s infinite ease-in-out;
    z-index: 1;
}

/* floating gradient overlay */
.hero::after {
    content: "";
    position: absolute;
    inset: -30%;
    background: conic-gradient(from 180deg at 50% 50%, #00fff311, transparent, #00fff322, transparent);
    animation: floatMove 18s linear infinite;
    z-index: 1;
    mix-blend-mode: overlay;
}

/* animations */
@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.2;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes floatMove {
    0% {
        transform: rotate(0deg) translateY(0px);
    }

    50% {
        transform: rotate(180deg) translateY(20px);
    }

    100% {
        transform: rotate(360deg) translateY(0px);
    }
}

.hero-content {
    max-width: 920px;
    padding: 1rem;
    position: relative;
    z-index: 2;
    /* keeps text above overlays */

}

.typing {
    font-size: 3rem;
    font-weight: 800;
    color: var(--teal-2);
    text-shadow: 0 0 20px var(--teal-2);
    height: 4rem;



}

.sub {
    color: #bafcfc;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    margin-top: 6rem;

}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: .9rem 1.6rem;
    border-radius: 40px;
    font-weight: 800;
    letter-spacing: .02em;
    cursor: pointer;
    text-decoration: none;
    transition: .25s;
}

.btn.primary {
    background: var(--teal);
    color: #00222e;
    box-shadow: 0 0 16px #00fff3aa;
}

.btn.primary:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn.outline {
    border: 2px solid var(--teal);
    color: var(--teal);
    background: transparent;
}

.btn.outline:hover {
    background: #022d3b;
}

.hero-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.hstat {
    background: var(--glass);
    border: 1px solid var(--edge);
    border-radius: 14px;
    padding: 0.9rem 1.2rem;
    min-width: 160px;
}

.hstat small {
    display: block;
    color: var(--muted);
}

.scroll-hint {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--teal);
    opacity: .7;
    text-decoration: none;
}


/* ==== Cards / Pills ==== */
.pill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem
}

.pill-card {
    background: var(--glass);
    border: 1px solid var(--edge);
    border-radius: 18px;
    padding: 1.2rem;
    transform: translateY(10px);
    opacity: 0
}

.pill-card[data-inview] {
    opacity: 1;
    transform: translateY(0);
    transition: .6s ease
}

/* ==== Tabs (Regions) ==== */
.tabs {
    max-width: 1100px;
    margin: 0 auto
}

.tablist {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem
}

.tab {
    background: transparent;
    border: 1px solid var(--edge);
    color: var(--teal);
    border-radius: 999px;
    padding: .5rem 1rem;
    cursor: pointer
}

.tab.active {
    background: var(--teal);
    color: #00222e
}

.tabpanel {
    display: none;
    background: var(--card);
    border: 1px solid var(--edge);
    border-radius: 16px;
    padding: 1rem
}

.tabpanel.active {
    display: block
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem
}

.region-card {
    background: var(--glass);
    border: 1px solid var(--edge);
    border-radius: 14px;
    padding: 1rem
}

/* ==== Filters + Projects ==== */
.filters {
    display: flex;
    gap: .6rem;
    justify-content: center;
    margin-bottom: 1.2rem;
    flex-wrap: wrap
}

.chip {
    background: transparent;
    border: 1px solid var(--edge);
    color: var(--teal);
    border-radius: 999px;
    padding: .45rem .9rem;
    cursor: pointer
}

.chip.active,
.chip:hover {
    background: var(--teal);
    color: #00222e
}

.grid.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem
}

.card {
    background: var(--card);
    border: 1px solid var(--edge);
    border-radius: 16px;
    padding: 1rem
}

.project-card {
    position: relative;
    overflow: hidden
}

.project-card .tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #023a4a;
    border: 1px solid var(--edge);
    color: var(--teal);
    padding: .2rem .5rem;
    border-radius: 999px;
    font-size: .8rem
}

.project-actions {
    display: flex;
    gap: .6rem;
    margin-top: .8rem
}

.project-actions .ghost {
    border: 1px dashed var(--edge)
}

/* ==== Modal ==== */
.modal {
    width: min(780px, 92vw);
    border: 1px solid var(--edge);
    border-radius: 16px;
    padding: 0;
    background: #011a22;
    color: var(--ink)
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.6)
}

.modal .close {
    position: absolute;
    right: 12px;
    top: 8px;
    background: transparent;
    border: 0;
    color: var(--teal);
    font-size: 1.6rem;
    cursor: pointer
}

.modal-body {
    padding: 1.2rem
}

.modal .bullets {
    list-style: square;
    padding-left: 1.2rem;
    color: var(--muted)
}

.modal .tag {
    display: inline-block;
    margin-right: .5rem;
    background: #023a4a;
    border: 1px solid var(--edge);
    color: var(--teal);
    padding: .15rem .5rem;
    border-radius: 999px
}

.modal-actions {
    display: flex;
    gap: .6rem;
    margin-top: 1rem;
    flex-wrap: wrap
}

/* ==== Impact cards ==== */
.impact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem
}

.impact-card {
    background: var(--glass);
    border: 1px solid var(--edge);
    border-radius: 16px;
    padding: 1rem;
    transform: translateY(8px);
    opacity: 0
}

.impact-card[data-inview] {
    opacity: 1;
    transform: translateY(0);
    transition: .6s
}

.big {
    font-size: 2.4rem;
    color: var(--teal)
}

/* ==== Carousel ==== */
.carousel {
    position: relative;
    overflow: hidden;
    background: #011f27;
    border: 1px solid var(--edge);
    border-radius: 16px;
    padding: 1rem
}

.car-track {
    display: flex;
    transition: transform .6s ease
}

.slide {
    min-width: 100%;
    padding: 0 .5rem;
    text-align: center
}

.slide blockquote {
    font-size: 1.2rem;
    color: #c8ffff
}

.car-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #023a4a;
    border: 1px solid var(--edge);
    color: var(--teal);
    border-radius: 999px;
    width: 36px;
    height: 36px;
    cursor: pointer
}

.car-btn.prev {
    left: 8px
}

.car-btn.next {
    right: 8px
}

/* ==== Timeline ==== */
.timeline {
    max-width: 900px;
    margin: 0 auto;
    list-style: none;
    padding-left: 0
}

.timeline li {
    background: var(--glass);
    border: 1px solid var(--edge);
    border-radius: 16px;
    padding: 1rem;
    margin: .8rem 0;
    opacity: 0;
    transform: translateX(-10px)
}

.timeline li[data-inview] {
    opacity: 1;
    transform: translateX(0);
    transition: .6s
}

/* ==== Partners (marquee) ==== */

/* Funny partner section */
.partners-marquee {
    overflow: hidden;
    border-radius: 16px;
    background: #011f27;
    padding: 2rem 0;
    position: relative;
}

.partners-track {
    display: flex;
    gap: 3rem;
    align-items: center;
    will-change: transform;
}

.partners-track img {
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px #00fff366);
    animation: wiggle 1.5s ease-in-out infinite;
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(-5deg) scale(1.05);
    }

    50% {
        transform: rotate(5deg) scale(0.95);
    }

    75% {
        transform: rotate(-3deg) scale(1.1);
    }
}



@keyframes marq {
    from {
        transform: translateX(0)
    }

    to {
        transform: translateX(-50%)
    }
}






/* ==== Global Form Styles ==== */
form {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
    background: #011820;
    border-radius: 16px;
    border: 1px solid #00fff344;
    box-shadow: 0 0 25px #00fff322;
}

/* Labels */
.form label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0.6rem 0 0.3rem;
    color: var(--ink);
}

/* Inputs, Selects, Textareas */
input,
select,
textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid #00fff366;
    background: #001820;
    color: var(--ink);
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Focus glow */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #00fff3;
    box-shadow: 0 0 12px #00fff344;
}

/* Grid support */
.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Form actions (buttons row) */
.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

/* Inline form items (checkbox + label, etc.) */
.inline {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Newsletter box */
.newsletter {
    margin-top: 1.8rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    right: 12px;
    bottom: 12px;
    background: #012833;
    color: var(--ink);
    border: 1px solid #00fff366;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    box-shadow: 0 0 22px #00fff322;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.4s ease;
    font-size: 0.9rem;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}
















/* ==== Footer ==== */
.footer {
    background: #0b1620;
    border-top: 1px solid #00fff333;
    padding: 2rem 1rem
}

.fgrid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem
}

.copy {
    text-align: center;
    color: #80dedd;
    margin-top: 1rem
}

/* ==== Responsive ==== */
@media (max-width:780px) {
    .typing {
        font-size: 2.2rem
    }

    .grid2 {
        grid-template-columns: 1fr
    }
}

/* --- Hotfixes --- */
/* Let clicks pass through the decorative glow */
.glow-bg {
    pointer-events: none;
}

/* Dialog fallback (older Safari / iOS) */
.modal.fb-open {
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

.dlg-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 1000;
}

/* =========================
   Tech4Good — Link & Button Polish
   (scoped to .t4g to avoid bleeding site-wide)
   ========================= */

:root {
    --t4g-link: #00ffd1;
    /* primary link */
    --t4g-link-hover: #80fff7;
    /* hover */
    --t4g-link-visited: #33e6cc;
    --t4g-focus: #00ffd1;
    --t4g-text: #bafcfc;
    --t4g-bg: #001820;
    --t4g-edge: #00fff3;
    /* used for outlines & accents */
}

/* ---------- Links ---------- */
.t4g a {
    color: var(--t4g-link);
    text-decoration: none;
    display: inline-block;
    /* better hit area */
    line-height: 1.2;
    transition: color .18s ease, text-shadow .18s ease, transform .18s ease;
}

.t4g a:hover {
    color: var(--t4g-link-hover);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.t4g a:visited {
    color: var(--t4g-link-visited);
}

.t4g a:focus-visible {
    outline: 2px dashed var(--t4g-focus);
    outline-offset: 2px;
    border-radius: 8px;
}

/* Nav links inside Tech4Good header (if present) */
.t4g .nav a,
.t4g nav a {
    color: var(--t4g-link);
    font-weight: 650;
}

.t4g .nav a:hover,
.t4g nav a:hover {
    color: var(--t4g-link-hover);
}

/* ---------- Buttons (consistent padding + sizing) ---------- */
.t4g .btn {
    --pad-y: 0.8rem;
    --pad-x: 1.3rem;
    --radius: 9999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: var(--pad-y) var(--pad-x);
    min-height: 44px;
    /* accessible hit target */
    line-height: 1;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .02em;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    user-select: none;
    text-decoration: none;

    transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease, color .2s ease;
    will-change: transform;
}

/* Primary (filled) */
.t4g .btn.primary {
    background: var(--t4g-edge);
    color: #00222e;
    box-shadow: 0 0 14px rgba(0, 255, 243, .55);
}

/* Outline */
.t4g .btn.outline {
    background: transparent;
    color: var(--t4g-edge);
    border-color: var(--t4g-edge);
    box-shadow: 0 0 10px rgba(0, 255, 243, .35) inset;
}

/* Ghost */
.t4g .btn.ghost {
    background: rgba(0, 255, 243, 0.10);
    color: var(--t4g-link);
    border-color: rgba(0, 255, 243, 0.35);
}

/* Hover / Active */
.t4g .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(0, 255, 243, .35);
}

.t4g .btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 20px rgba(0, 255, 243, .25);
}

/* Focus ring */
.t4g .btn:focus-visible {
    outline: 3px solid var(--t4g-focus);
    outline-offset: 3px;
}

/* Icon alignment inside buttons */
.t4g .btn .icon,
.t4g .btn svg,
.t4g .btn img {
    width: 1.1em;
    height: 1.1em;
    display: inline-block;
    vertical-align: middle;
}

/* Button sizes (optional utility) */
.t4g .btn.sm {
    --pad-y: 0.6rem;
    --pad-x: 1rem;
    font-size: .95rem;
}

.t4g .btn.lg {
    --pad-y: 1rem;
    --pad-x: 1.6rem;
    font-size: 1.05rem;
}

/* Ensure buttons used as links look/behave like buttons */
.t4g a.btn {
    text-decoration: none;
}

/* Tighten card actions so spacing is even */
.t4g .project-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Compact buttons on very narrow screens */
@media (max-width: 420px) {
    .t4g .btn {
        --pad-y: 0.7rem;
        --pad-x: 1.05rem;
        font-size: .98rem;
    }
}

/* ---------- Misc. spacing touch-ups ---------- */
.t4g .section-cta {
    margin-top: 1.25rem;
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.t4g .card h3 {
    margin-bottom: .4rem;
}

.t4g .card p {
    margin-bottom: .9rem;
}


.cta-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    /* space above CTA row */
}