/* =========================================
   Kids Mini Games - Dark Theme with Brand Accents
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Bungee&family=Nunito:wght@400;600;700;800&display=swap');


@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Bungee&family=Nunito:wght@400;600;700;800&display=swap');


/* ------------------------------------------
   Design Tokens
   ------------------------------------------ */
:root {
    /* Brand Accent Colors */
    --sky: #3aaed8;
    --sky-light: #7dd3f0;
    --sun: #ffb703;
    --sun-light: #ffd166;
    --mint: #64d6b6;
    --coral: #ff6b6b;
    --purple: #a78bfa;

    /* Dark Theme Backgrounds */
    --bg-dark: #0a0e1a;
    --bg-card: #12172a;
    --bg-card-hover: #1a2038;
    --bg-elevated: #1e2442;

    /* Text Colors */
    --text-primary: #f8fbff;
    --text-secondary: #9ca8c7;
    --text-muted: #6b7594;

    /* Borders & Strokes */
    --stroke: rgba(255, 255, 255, 0.08);
    --stroke-hover: rgba(255, 255, 255, 0.15);

    /* Shadows & Glows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow-sky: 0 0 40px rgba(58, 174, 216, 0.15);
    --shadow-glow-sun: 0 0 40px rgba(255, 183, 3, 0.15);
    --glow-sky: rgba(58, 174, 216, 0.4);
    --glow-purple: rgba(167, 139, 250, 0.4);
    --glow-sun: rgba(255, 183, 3, 0.4);

    /* Layout */
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 999px;
    --max-width: 1120px;

    /* Animation */
    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ------------------------------------------
   Base Reset & Typography
   ------------------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--bg-dark);
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: 'Baloo 2', 'Nunito', 'Arial Rounded MT Bold', sans-serif;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

h2 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    text-align: center;
    margin-bottom: 4rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff, var(--sky-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    width: fit-content;
    margin-inline: auto;
}

h2::after {
    display: none;
}

h3 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: -0.01em;
}

p {
    margin: 0;
}

a {
    color: var(--sky);
    text-decoration: none;
    transition: color 0.2s var(--smooth);
}

a:hover {
    color: var(--sky-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* ------------------------------------------
   Layout Utilities
   ------------------------------------------ */
.container {
    width: min(100% - 2rem, var(--max-width));
    margin: 0 auto;
}

.narrow {
    width: min(100% - 2rem, 760px);
}

/* ------------------------------------------
   Site Header (Radical Pill)
   ------------------------------------------ */
.site-header {
    position: fixed;
    top: 1.5rem;
    left: 0;
    right: 0;
    z-index: 2000;
    pointer-events: none;
    display: flex;
    justify-content: center;
}

.nav-pill {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.75rem 2rem;
    background: rgba(18, 23, 42, 0.6);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: all 0.4s var(--bounce);
}

.nav-pill:hover {
    transform: translateY(-2px);
    background: rgba(18, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    transition: all 0.3s var(--smooth);
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.brand {
    text-decoration: none;
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--sky), var(--sun));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s var(--bounce);
}

.brand:hover {
    transform: scale(1.05) rotate(-2deg);
}

/* ------------------------------------------
   Hero Impact & Background
   ------------------------------------------ */
.hero-impact {
    position: relative;
    padding: 10rem 0 6rem;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-bottom: 0;
    z-index: 1;
    background:
        radial-gradient(110% 120% at 18% 8%, rgba(58, 174, 216, 0.2), transparent 58%),
        radial-gradient(95% 115% at 84% 12%, rgba(167, 139, 250, 0.16), transparent 60%);
}

.mesh-bg {
    display: none;
}

.glow-orb {
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.2;
    mix-blend-mode: screen;
    animation: orb-drift 20s infinite alternate linear;
}

.orb-1 {
    background: var(--sky);
    top: -20%;
    left: -10%;
}

.orb-2 {
    background: var(--purple);
    top: 10%;
    right: -20%;
    animation-delay: -5s;
}

.orb-3 {
    background: var(--sun);
    bottom: 40%;
    left: 20%;
    animation-delay: -10s;
}

.orb-4 {
    background: var(--mint);
    bottom: 10%;
    right: 10%;
    animation-delay: -15s;
}

.orb-5 {
    background: var(--sky);
    top: 30%;
    left: -10%;
    opacity: 0.1;
}

.orb-6 {
    background: var(--purple);
    bottom: 20%;
    right: -10%;
    opacity: 0.1;
    animation-delay: -8s;
}

.orb-4 {
    background: var(--mint);
    bottom: 10%;
    right: 10%;
    animation-delay: -15s;
}

@keyframes orb-drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 50px) scale(1.1);
    }
}

.hero-impact-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content-left {
    text-align: left;
}

.mega-logo {
    height: 120px;
    width: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 40px rgba(255, 183, 3, 0.4));
    animation: float-mega 6s ease-in-out infinite;
}

.impact-title {
    font-size: clamp(3rem, 10vw, 6rem);
    line-height: 0.85;
    letter-spacing: -0.04em;
    font-weight: 800;
    margin: 0 0 2rem;
}

.lead-impact {
    font-size: 1.35rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 3rem;
    max-width: 45ch;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
}

.hero-visual-right {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-visual-impact {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.big-llama {
    width: min(80vw, 600px);
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.6));
    animation: big-float 8s ease-in-out infinite;
}

@keyframes big-float {

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

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

.llama-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    z-index: -1;
    opacity: 0.4;
    animation: pulse-halo 4s infinite alternate;
}

@keyframes pulse-halo {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.3;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.6;
    }
}

.float-item {
    position: absolute;
    font-size: 3.5rem;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    z-index: 20;
    animation: random-float 10s infinite ease-in-out;
}

.item-1 {
    top: 0%;
    left: 10%;
    animation-delay: 0s;
}

.item-2 {
    top: 30%;
    right: 5%;
    animation-delay: -2s;
    font-size: 4.5rem;
}

.item-3 {
    bottom: 20%;
    left: 0%;
    animation-delay: -4s;
}

.item-4 {
    bottom: 40%;
    right: 15%;
    animation-delay: -6s;
}

@keyframes random-float {

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

    33% {
        transform: translate(20px, -40px) rotate(10deg);
    }

    66% {
        transform: translate(-30px, 20px) rotate(-10deg);
    }
}

/* ------------------------------------------
   Buttons
   ------------------------------------------ */
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-full);
    padding: 0.875rem 1.5rem;
    transition: all 0.3s var(--bounce);
    border: none;
    cursor: pointer;
}

.button:hover {
    transform: translateY(-3px) scale(1.02);
}

.button:active {
    transform: translateY(0) scale(0.98);
}

.button-primary {
    color: #1a1a2e;
    background: linear-gradient(135deg, var(--sun), var(--sun-light));
    box-shadow:
        0 4px 20px rgba(255, 183, 3, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.button-primary:hover {
    box-shadow:
        0 8px 30px rgba(255, 183, 3, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.button-ghost {
    color: var(--text-primary);
    background: transparent;
    border: 2px solid var(--stroke-hover);
}

.button-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--sky);
    color: var(--sky);
}

.micro {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ------------------------------------------
   Baby Mode Layout
   ------------------------------------------ */
.baby-mode-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.baby-mode-visual {
    position: relative;
    padding: 2rem;
}

.baby-mode-visual img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 50px rgba(167, 139, 250, 0.3));
    animation: floating 6s ease-in-out infinite;
}

.baby-mode-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}


.baby-features {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.baby-features li {
    background: var(--bg-card);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

@keyframes floating {

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

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

@media (max-width: 900px) {
    .baby-mode-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .baby-mode-visual {
        order: -1;
        max-width: 400px;
        margin: 0 auto;
    }

    .baby-features {
        justify-content: center;
    }
}

/* ------------------------------------------
   Hero Visual Image
   ------------------------------------------ */
.hero-visual {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.6));
    transition: transform 0.5s var(--bounce);
}

.hero-visual::before {
    content: '';
    position: absolute;
    inset: -10%;
    background: radial-gradient(circle at center, var(--glow-sky), transparent 70%);
    z-index: -1;
    border-radius: 50%;
    animation: pulse-glow 8s ease-in-out infinite;
}

@keyframes pulse-glow {

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

    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

.hero-visual img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

.hero-visual:hover {
    transform: translateY(-8px) scale(1.02);
}

/* ------------------------------------------
   Section Base
   ------------------------------------------ */
.section {
    padding: 4rem 0;
}

.game-menu {
    position: relative;
    z-index: 2;
    background: transparent;
    margin-top: -1px;
}

.game-menu::before {
    content: none;
}

.section-alt {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--stroke);
    border-bottom: 1px solid var(--stroke);
}

/* ------------------------------------------
   Game Tiles - Portrait Mode for Phone Screenshots
   ------------------------------------------ */
.tile-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.game-tile {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 9 / 16;
    padding: 1.5rem;
    display: flex;
    align-items: flex-end;
    cursor: pointer;
    transition: all 0.5s var(--bounce);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-card);
    background-size: cover;
    background-position: center top;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.9));
    z-index: 1;
    transition: opacity 0.3s var(--smooth);
}

.game-tile:hover {
    transform: translateY(-12px) scale(1.03);
    border-color: var(--sky);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), var(--shadow-glow-sky);
}

.game-tile:hover::before {
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.95));
}

.game-tile h2 {
    position: relative;
    z-index: 2;
    color: white;
    font-size: 1.75rem;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8);
    margin: 0;
    text-align: left;
    background: none;
    -webkit-text-fill-color: initial;
    width: auto;
}

.game-tile h2::after {
    display: none;
}

/* Game tile backgrounds with screenshots */
.tile-balloon-popper {
    background-image: url('../images/ss-balloon-popper.jpeg');
}

.tile-blast-pattern {
    background-image: url('../images/ss-blast-pattern.jpeg');
}

.tile-fish-catch {
    background-image: url('../images/ss-fish-catch.jpeg');
}

.tile-hackeysack {
    background-image: url('../images/ss-hackeysack.jpeg');
}

.tile-lane-shifter {
    background-image: url('../images/ss-lane-shifter.jpeg');
}

.tile-llama-hop {
    background-image: url('../images/ss-llama-hop.jpeg');
}

.tile-memory-match {
    background-image: url('../images/ss-memory-match.jpeg');
}

.tile-trace-letters {
    background-image: url('../images/ss-trace-letters.jpeg');
}

.tile-color-critters {
    background-image: url('../images/ss-color-critters.png');
}

.tile-memory-match-2 {
    background-image: url('../images/ss-memory-match.jpeg');
}

/* ------------------------------------------
   About Grid / Stats
   ------------------------------------------ */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
}

.about-panel,
.stat-card {
    background: rgba(18, 23, 42, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.4s var(--smooth);
}

.about-panel:hover,
.stat-card:hover {
    transform: translateY(-8px);
    border-color: var(--sky);
    background: rgba(18, 23, 42, 0.7);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
}

.about-panel {
    padding: 1.5rem;
}

.about-panel h2 {
    background: linear-gradient(135deg, var(--sky), var(--sky-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

.about-panel p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.stat-card {
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.stat-card strong {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-size: 2.25rem;
    background: linear-gradient(135deg, var(--sun), var(--coral));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card span {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
}

/* ------------------------------------------
   Features Grid
   ------------------------------------------ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: rgba(18, 23, 42, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem;
    transition: all 0.4s var(--bounce);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(18, 23, 42, 0.6);
    border-color: var(--purple);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(167, 139, 250, 0.15);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ------------------------------------------
   FAQ Section
   ------------------------------------------ */
.faq h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.faq details {
    background: var(--bg-card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    padding: 0;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s var(--smooth);
}

.faq details:hover {
    border-color: var(--stroke-hover);
}

.faq details[open] {
    border-color: var(--sky);
    box-shadow: var(--shadow-md), 0 0 20px rgba(58, 174, 216, 0.1);
}

.faq summary {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    transition: background 0.2s var(--smooth);
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--sky);
    font-weight: 400;
    transition: transform 0.3s var(--bounce);
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq summary:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq p {
    color: var(--text-secondary);
    padding: 0 1.25rem 1rem;
    line-height: 1.7;
}

/* ------------------------------------------
   Legal Pages
   ------------------------------------------ */
.legal .narrow {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.updated {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.legal-note {
    margin-top: 1.5rem;
    background: rgba(255, 183, 3, 0.1);
    border-left: 3px solid var(--sun);
    padding: 1rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-primary);
}

/* ------------------------------------------
   Footer
   ------------------------------------------ */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--stroke);
    margin-top: 2rem;
}

.footer-grid {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-grid p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.875rem;
    transition: color 0.2s var(--smooth);
}

.footer-links a:hover {
    color: var(--sky);
}

/* ------------------------------------------
   Animations
   ------------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s var(--bounce);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ------------------------------------------
   Responsive Design
   ------------------------------------------ */
@media (max-width: 960px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .nav-pill {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
        border-radius: var(--radius-lg);
    }

    .nav-links {
        gap: 0.25rem;
    }

    .nav-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }

    .impact-title {
        font-size: clamp(2.5rem, 15vw, 4rem);
    }

    .lead-impact {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }

    .cta-group {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .button-impact,
    .button-ghost-impact {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

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

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

    .footer-grid {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 0;
    }
}

@media (max-width: 540px) {
    .tile-list {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 3rem 0;
    }

    .hero {
        padding: 2rem 0;
    }
}

/* ------------------------------------------
   Legal Page Typography Fixes
   ------------------------------------------ */
.legal .narrow {
    max-width: 860px;
}

.legal h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.35rem;
}

.legal h2 {
    width: auto;
    margin: 1.4rem 0 0.55rem;
    text-align: left;
    letter-spacing: 0;
    font-size: clamp(1.25rem, 2.2vw, 1.8rem);
    line-height: 1.2;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.legal p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-primary);
}

/* ------------------------------------------
   Contact Form
   ------------------------------------------ */
.contact-wrap {
    max-width: 680px !important;
    /* Override narrow width for better focus */
    position: relative;
    z-index: 5;
    margin-top: 8rem;
    /* Push down to clear fixed nav */
}

/* Ensure the wrapper (which might have .legal .narrow styles) looks distinct or enhanced */
.legal .contact-wrap {
    background: linear-gradient(180deg, rgba(18, 23, 42, 0.8), rgba(18, 23, 42, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg), 0 0 50px rgba(58, 174, 216, 0.1);
    backdrop-filter: blur(20px);
}

.contact-card h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, var(--sky-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-card .updated {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
    margin-top: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-group label {
    font-family: 'Baloo 2', 'Nunito', sans-serif;
    font-weight: 700;
    color: var(--sky-light);
    font-size: 1.1rem;
    margin-left: 0.25rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border-radius: var(--radius-md);
    border: 2px solid var(--stroke);
    background: rgba(10, 14, 26, 0.6);
    color: var(--text-primary);
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    padding: 1rem 1.25rem;
    transition: all 0.3s var(--smooth);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(156, 168, 199, 0.5);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--sky);
    background: rgba(10, 14, 26, 0.9);
    box-shadow: 0 0 0 4px rgba(58, 174, 216, 0.15);
    transform: translateY(-2px);
}

.contact-form button {
    margin-top: 1rem;
    justify-content: center;
    width: 100%;
    font-size: 1.25rem;
    padding: 1rem;
}

.form-alert {
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
    animation: slide-in 0.4s var(--bounce);
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-alert-success {
    background: rgba(100, 214, 182, 0.15);
    border: 1px solid rgba(100, 214, 182, 0.3);
    color: #8affd6;
}

.form-alert-error {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ffb8b8;
}

.contact-alt {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.hp-field {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

@media (min-width: 768px) {
    .contact-card {
        padding: 1rem;
    }
}