/* ==========================================================
   Interactive Brain Anatomy Game — tool page
   Self-contained styling (does not import the main site's
   assets/css/style.css, and shares nothing with the other
   tools) so this tool can be updated or removed on its own.
   Brand tokens are copied from the main site's :root.
==========================================================*/

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

:root{
    --primary:#1E3A8A;
    --secondary:#2563EB;
    --gold:#D4AF37;
    --white:#ffffff;
    --light:#F8FAFC;
    --gray:#6B7280;
    --dark:#111827;
    --shadow:0 12px 40px rgba(0,0,0,.08);
    --radius:18px;
    --transition:.35s ease;
    --max-width:1100px;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Inter',sans-serif;
    background:var(--light);
    color:var(--dark);
    line-height:1.7;
}

h1,h2,h3{
    font-family:'Poppins',sans-serif;
    font-weight:700;
    color:var(--dark);
    line-height:1.25;
}

p{
    color:var(--gray);
    font-size:1.05rem;
}

a{
    color:var(--secondary);
    text-decoration:none;
    transition:var(--transition);
}

a:hover{
    color:var(--primary);
    text-decoration:underline;
}

a:focus-visible{
    outline:3px solid var(--secondary);
    outline-offset:3px;
    border-radius:4px;
}

.container{
    width:min(92%,var(--max-width));
    margin:auto;
}

/* ---------- Brand bar ---------- */

.brand-bar{
    background:var(--white);
    border-bottom:1px solid rgba(30,58,138,.08);
    padding:18px 0;
}

.brand-bar .container{
    display:flex;
    align-items:center;
    gap:14px;
}

.brand-bar img{
    width:44px;
    height:44px;
    border-radius:50%;
    object-fit:contain;
}

.brand-bar .brand-name{
    display:block;
    font-weight:700;
    color:var(--dark);
    font-size:1.05rem;
    line-height:1.3;
}

.brand-bar .brand-tagline{
    display:block;
    color:var(--gold);
    font-size:.78rem;
    font-weight:600;
}

/* ---------- Page hero ---------- */

.tool-hero{
    padding:60px 0 40px;
    background:linear-gradient(135deg,#0F172A 0%,#1E3A8A 55%,#2563EB 100%);
    color:var(--white);
}

.tool-hero .back-home{
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-weight:600;
    margin-bottom:14px;
    color:rgba(255,255,255,.85);
}

.tool-hero .back-home:hover{
    color:var(--white);
}

.tool-hero .page-badge{
    display:inline-block;
    padding:8px 18px;
    border-radius:30px;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.25);
    font-size:14px;
    font-weight:600;
    margin:0 0 22px 12px;
}

.tool-hero h1{
    color:var(--white);
    font-size:2.25rem;
    margin-bottom:18px;
    max-width:760px;
}

.tool-hero p{
    color:rgba(255,255,255,.85);
    max-width:700px;
}

/* ---------- Game frame ---------- */

.viewer-section{
    padding:40px 0 10px;
}

.viewer-frame{
    width:100%;
    height:min(84vh,820px);
    min-height:560px;
    border:1px solid rgba(30,58,138,.18);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    overflow:hidden;
    background:#0b1020;
}

.viewer-frame iframe{
    width:100%;
    height:100%;
    border:0;
    display:block;
}

.viewer-note{
    margin-top:14px;
    font-size:.85rem;
    color:var(--gray);
    text-align:center;
}

/* ---------- Content sections ---------- */

.tool-content{
    padding:60px 0;
}

.tool-content + .tool-content{
    padding-top:0;
}

.tool-content h2{
    font-size:1.6rem;
    margin-bottom:16px;
}

.tool-content-inner{
    max-width:800px;
}

.tool-content-inner.wide{
    max-width:none;
}

.tool-content ul{
    margin:10px 0 0 22px;
    color:var(--gray);
}

.tool-content li{
    margin-bottom:10px;
    font-size:1.05rem;
}

/* ---------- Learning modes ---------- */

.mode-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
    gap:22px;
    margin-top:22px;
}

.mode-card{
    background:var(--white);
    border:1px solid rgba(30,58,138,.1);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    padding:26px 24px;
}

.mode-card .mode-icon{
    width:46px;
    height:46px;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    color:var(--white);
    font-size:1.2rem;
    margin-bottom:14px;
}

.mode-card h3{
    font-size:1.15rem;
    margin-bottom:8px;
}

.mode-card p{
    font-size:.95rem;
    line-height:1.6;
}

/* ---------- Credits ---------- */

.attribution-box{
    background:var(--white);
    border:1px solid rgba(30,58,138,.1);
    border-radius:var(--radius);
    padding:28px 30px;
    box-shadow:var(--shadow);
}

.attribution-box h3{
    font-size:1.05rem;
    margin:24px 0 10px;
    color:var(--primary);
}

.attribution-box h3:first-child{
    margin-top:0;
}

.attribution-box p{
    font-size:.95rem;
    margin-bottom:12px;
}

.attribution-box p:last-child{
    margin-bottom:0;
}

.attribution-box a{
    word-break:break-word;
    /* inline links need a cue other than colour (WCAG 1.4.1) */
    text-decoration:underline;
    text-underline-offset:2px;
}

.attribution-credit{
    border-left:4px solid var(--gold);
    background:var(--light);
    border-radius:0 10px 10px 0;
    padding:12px 16px;
    color:var(--dark);
    font-weight:500;
}

/* ---------- Disclaimer ---------- */

.disclaimer-note{
    display:flex;
    gap:10px;
    align-items:flex-start;
    background:var(--light);
    border:1px solid rgba(107,114,128,.2);
    border-radius:12px;
    padding:14px 18px;
    font-size:.88rem;
    color:var(--gray);
    max-width:800px;
}

.disclaimer-note i{
    color:var(--gold);
    margin-top:3px;
}

/* ---------- Footer ---------- */

.tool-footer{
    padding:30px 0 50px;
    text-align:center;
    color:var(--gray);
    font-size:.85rem;
}

/* ---------- Responsive ---------- */

@media (max-width:768px){

    .tool-hero{
        padding:45px 0 32px;
    }

    .tool-hero h1{
        font-size:1.7rem;
    }

    .tool-hero .page-badge{
        margin-left:0;
    }

    .viewer-frame{
        height:min(86vh,760px);
        min-height:520px;
        border-radius:12px;
    }

    .tool-content{
        padding:45px 0;
    }

    .attribution-box{
        padding:22px 20px;
    }
}
