/* ===============================
   Cyber-PARK public website
   Shared styles for the public pages (Figma: Cybr PARK UI):
   landing page (Home/Index) and About Us (Home/About)
   =============================== */

/* Design tokens from the Figma :root panel */
:root {
    --primary-color: #2e4c2e;
    --secondary-color: #a5b04e;
    --background-color: #fffaf3;
    --text-color-dark: #132239;
    --text-color-light: #fffaf3;
    --button-dark: #3f5172;
    --button-dark-hover: #1c6699; /* 5.9:1 with --text-color-light, AA at any text size */
    --button-light: #eb9660;
    --button-action: #b55844;
    --hover-color: #2980b9;
    --warning-color: #f39c12;
    --warning-bg: #fef5e7;
    --warning-border: #f4d03f;

    /* Shared accent palette: About Us cards and banner, curriculum topics and transcript button */
    --mint: #cde5d9;
    --peach: #f0b78a;
    --yellow: #ffd47a;
    --yellow-border: #e3a940;

    /* Type scale: Heading 48 / Subheading 36 / Button+Text 28 / Small 20 */
    --fs-heading: 3rem;
    --fs-subheading: 2.25rem;
    --fs-text: 1.75rem;
    --fs-small: 1.25rem;

    --page-width: 90rem;
    --gutter: 2.625rem;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    color: var(--text-color-dark);
    background: var(--background-color);
    -webkit-font-smoothing: antialiased;
}

/* Resets apply to the page body only (_Layout's .content), not the shared header, footer, or modals.
   :where() adds no specificity, so single-class rules below still win. */
:where(.content) :where(h1, h2, p) { margin: 0; font-weight: 400; }

:where(.content) img { max-width: 100%; display: block; }

/* ===============================
   LANDING PAGE
   =============================== */

/* ---------- Circuit-board background ---------- */
.circuit-bg {
    background-color: var(--primary-color);
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    opacity: 0.25; /* keep the pattern subtle so hero text stays readable */
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    color: var(--text-color-light);
    padding: 10.625rem var(--gutter) 2.75rem;
    box-shadow: inset 0 -12px 24px -12px rgba(0, 0, 0, 0.35);
}

.hero-inner {
    position: relative;
    max-width: calc(var(--page-width) - 2 * var(--gutter));
    margin: 0 auto;
}

.hero-grid {
    display: grid;
    /* Proportional columns (≈700px video at 1440) so the right column never runs past the viewport */
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 3.75rem;
    align-items: start;
}

.hero-title {
    /* Shrinks with the narrower video column on small laptops; never exceeds the breakpoint heading size */
    font-size: min(var(--fs-heading), max(2.25rem, 3.4vw));
    line-height: 1.5;
    text-align: center;
    margin-bottom: 0.75rem;
}

/* Promo video (YouTube embed); 16:9 so the player isn't letterboxed */
.hero-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 0;
}

.hero-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1.25rem;
}

.hero-mascots {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1.25rem;
    width: 100%; /* constrain to the column so the mascots shrink instead of overflowing */
    min-height: 29.5rem;
}

/* Hero mascots may shrink to fit a narrow right column */
.hero-mascots .mascot { flex-shrink: 1; min-width: 0; }
.hero-mascots .mascot:first-child { width: 14.875rem; }
.hero-mascots .mascot:last-child  { width: 19.5rem; margin-top: 5.5rem; }

.hero-tagline {
    font-size: var(--fs-text);
    line-height: 1.7;
    text-align: center;
    max-width: 27.5rem;
    margin-top: 0.625rem;
}

.hero-features {
    display: flex;
    justify-content: space-between;
    gap: 2.125rem;
    list-style: none;
    margin: 3.5rem 0 0;
    padding: 0;
}

.hero-features li {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Scale with the viewport so "Safe Learning Environment" stays on one line
       until the pills stack at 768px; caps at the design's 28px */
    font-size: clamp(0.875rem, 2.5vw - 0.5rem, var(--fs-text));
    color: var(--text-color-dark);
    background: var(--secondary-color);
    border-radius: 999px;
    padding: 0.625rem 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ---------- Mascot images ---------- */
.mascot { flex-shrink: 0; }

.mascot img {
    width: 100%;
    height: auto;
}

/* ---------- Content sections ---------- */
.landing-content {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 3.75rem var(--gutter) 2rem; /* the shared demo call-to-action follows */
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
}

.feature + .feature { margin-top: 5.625rem; }

.feature-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.feature-title {
    font-size: var(--fs-heading);
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.feature-text {
    font-size: var(--fs-text);
    line-height: 1.7;
}

.feature--kids .feature-body { max-width: 65.625rem; }
.feature--kids .mascot { width: 19.5rem; margin-top: 1.875rem; }

.feature--educators .feature-body {
    align-items: flex-end;
    text-align: right;
}
.feature--educators .mascot { width: 22rem; margin-top: -1.25rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    align-self: center;
    width: min(40.9375rem, 100%);
    margin-top: 2.125rem;
    padding: 1.125rem 1.5rem;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: var(--fs-text);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}

.btn:active { transform: translateY(4px); }

.btn-dark {
    background: var(--button-dark);
    color: var(--text-color-light);
    box-shadow: 0 6px 0 var(--text-color-dark), 0 8px 12px rgba(0, 0, 0, 0.25);
}
.btn-dark:hover,
.btn-dark:focus-visible { background: var(--button-dark-hover); }
.btn-dark:active { box-shadow: 0 2px 0 var(--text-color-dark); }

.btn-light {
    background: var(--button-light);
    color: var(--text-color-dark);
    box-shadow: 0 6px 0 var(--button-action), 0 8px 12px rgba(0, 0, 0, 0.2);
}
.btn-light:hover,
.btn-light:focus-visible { filter: brightness(1.06); }
.btn-light:active { box-shadow: 0 2px 0 var(--button-action); }

/* ===============================
   ABOUT US PAGE
   =============================== */

.about-page {
    --about-mint-shadow: #8aa682;
    --about-peach-shadow: #e08d4f;
    --about-slate-shadow: #3e4a63;
    --about-placeholder: #d9d9d9;

    background-color: var(--background-color);
    color: var(--text-color-dark);
    padding: 5rem 7rem 6rem;
}

.about-page > section {
    max-width: 76rem;
    margin-left: auto;
    margin-right: auto;
}

/* Placeholders */
/* Mission */
.about-mission {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding: 0 2rem;
}

.about-mission-text {
    flex: 1;
    max-width: 42rem;
}

.about-heading {
    font-size: 2.5rem;
    font-weight: 400;
    margin: 0 0 1.5rem;
}

.about-mission-text p {
    font-size: 1.25rem;
    line-height: 1.6;
    margin: 0 0 0 0.75rem;
}

.about-mission-art {
    flex-shrink: 0;
    width: 23rem;
    height: auto;
}

/* Meet the Team */
.about-team {
    margin-top: 8rem;
    text-align: center;
}

.about-banner {
    display: inline-block;
    width: min(54rem, 100%);
    box-sizing: border-box;
    margin: 0 0 3.5rem;
    padding: 1.25rem 2rem;
    background-color: var(--yellow);
    border: 2px solid var(--yellow-border);
    border-radius: 8px;
    font-size: 2.25rem;
    font-weight: 400;
}

.team-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4.5rem 5rem;
}

.team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 24rem;
    padding: 2.5rem 1.5rem 2rem;
    box-sizing: border-box;
    border-radius: 12px;
}

.team-card--mint {
    background-color: var(--mint);
    box-shadow: 6px 6px 0 var(--about-mint-shadow);
}

.team-card--peach {
    background-color: var(--peach);
    box-shadow: 6px 6px 0 var(--about-peach-shadow);
}

.team-photo-placeholder {
    width: 12.5rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: var(--about-placeholder);
    margin-bottom: 1.75rem;
}

.team-name {
    font-size: 1.75rem;
    font-weight: 400;
    margin: 0 0 0.25rem;
}

.team-role {
    font-size: 1.25rem;
    margin: 0;
    max-width: 18rem;
}

/* Contact */
.about-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 5rem;
}

/* Sized by height so the two differently shaped characters stand equally tall */
.about-contact-art {
    height: 23rem;
    width: auto;
}

.about-contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-contact-heading {
    width: 37.5rem;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 0 2rem;
    padding: 0.75rem 2rem;
    background-color: var(--button-dark);
    box-shadow: 0 6px 0 var(--about-slate-shadow);
    border-radius: 999px;
    color: #ffffff;
    font-size: 2.25rem;
    font-weight: 400;
    text-align: center;
}

.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 1.5rem;
}

.contact-list a {
    color: var(--text-color-dark);
    text-decoration: none;
}

.contact-list a:hover,
.contact-list a:focus-visible {
    text-decoration: underline;
}

.contact-icon {
    width: 2rem;
    height: 2rem;
    fill: none;
    stroke: var(--text-color-dark);
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===============================
   CURRICULUM PAGE
   =============================== */

.curriculum-page {
    --topic-size: 12.25rem;

    display: block;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 5rem var(--gutter) 6rem;
    color: var(--text-color-dark);
}

.curriculum-heading {
    font-size: var(--fs-heading);
    margin-bottom: 2rem;
}

.curriculum-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 40rem) minmax(0, 1fr);
    gap: 3rem;
}

.curriculum-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    background-color: #000;
}

.curriculum-intro-side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
}

.curriculum-intro-text {
    font-size: var(--fs-text);
    line-height: 1.6;
    text-align: center;
}

.curriculum-transcript-btn {
    align-self: center;
    padding: 0.875rem 1.5rem;
    background-color: var(--yellow);
    border: 2px solid var(--yellow-border);
    border-radius: 0.5rem;
    color: var(--text-color-dark);
    font-family: inherit;
    font-size: var(--fs-small);
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.curriculum-transcript-btn:hover,
.curriculum-transcript-btn:focus-visible { filter: brightness(1.05); }

.curriculum-topics {
    margin-top: 4rem;
    text-align: center;
}

.curriculum-subheading {
    font-size: var(--fs-text);
    margin-bottom: 2.5rem;
}

.topic-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
}

/* The illustration circle overlaps the left half of the colored pill */
.topic-pill {
    display: flex;
    align-items: center;
}

.topic-art {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: var(--topic-size);
    aspect-ratio: 1;
    box-sizing: border-box;
    border-radius: 50%;
    border: 5px solid var(--topic-ring);
    background-color: var(--topic-fill);
    overflow: hidden;
}

.topic-art img {
    width: 70%; /* a square inside a circle must be under 1/√2 (~71%) of its width to clear the edge */
    height: auto;
}

.topic-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(var(--topic-size) * 0.8);
    margin-left: calc(var(--topic-size) / -2);
    padding: 1rem 1rem 1rem calc(var(--topic-size) / 2 + 1rem);
    background-color: var(--topic-bg);
    border-radius: 1rem;
    font-size: var(--fs-text);
    line-height: 1.4;
}

.topic-pill--peach { --topic-bg: #fcd9ad; --topic-ring: #5f7a33; --topic-fill: #a5b04e; }
.topic-pill--mint  { --topic-bg: var(--mint); --topic-ring: #e0884f; --topic-fill: var(--peach); }
.topic-pill--slate { --topic-bg: #bcc3d3; --topic-ring: var(--yellow-border); --topic-fill: var(--yellow); }

.curriculum-more {
    max-width: 16rem;
    margin: 2rem auto 0;
    font-size: var(--fs-text);
    line-height: 1.5;
}

/* ===============================
   FOR EDUCATORS PAGE
   =============================== */

.educators-page {
    display: block;
    padding: 6rem 4rem 8rem;
    color: var(--text-color-dark);
}

/* ---------- Feature rows ---------- */
.educators-feature {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    max-width: 82rem;
    margin: 0 auto;
}

.educators-feature + .educators-feature { margin-top: 11rem; }

/* Art on the left, text on the right */
.educators-feature--reverse { flex-direction: row-reverse; }

.educators-feature-text {
    flex: 1 1 0;
    min-width: 0;
    max-width: 58rem;
}

.educators-feature--reverse .educators-feature-text { max-width: 52rem; }

.educators-feature-title {
    font-size: 2rem;
    line-height: 1.5;
    margin: 0 0 0.75rem;
    max-width: 52rem;
}

.educators-feature-list {
    font-size: 1.5rem;
    line-height: 2;
    margin: 0;
    padding-left: 2.625rem;
}

.educators-art {
    flex: 0 0 auto;
    width: 23rem;
    height: auto;
}

/* ===============================
   RESPONSIVE
   =============================== */

/* Chromebook / small laptop */
@media (max-width: 1024px) {
    :root {
        --fs-heading: 2.25rem;
        --fs-text: 1.25rem;
        --fs-small: 1.0625rem;
        --gutter: 1.75rem;
    }
    .hero { padding-top: 8.75rem; }
    .hero-grid { grid-template-columns: 1.15fr 1fr; gap: 2rem; }
    .hero-mascots { min-height: 21rem; }
    .hero-mascots .mascot:first-child { width: 10.5rem; }
    .hero-mascots .mascot:last-child  { width: 13.75rem; margin-top: 3.6rem; }
    .hero-features { gap: 1.25rem; }
    .feature--kids .mascot { width: 14rem; }
    .feature--educators .mascot { width: 16rem; margin-top: 0; }

    /* About Us */
    .about-page { padding: 4rem 3rem 5rem; }
    .about-mission-art { width: 18rem; }
    .team-grid { gap: 3rem; }
    .team-photo-placeholder { width: 10rem; }
    .team-name { font-size: 1.5rem; }
    .team-role { font-size: 1.1rem; }
    .about-contact-art { height: 16rem; }
    .about-contact-heading { width: 28rem; }

    /* Curriculum */
    .curriculum-page { --topic-size: 8.5rem; padding: 4rem var(--gutter) 5rem; }
    .curriculum-intro-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .topic-list { gap: 1.25rem; }
    .topic-label { padding-right: 0.5rem; }

    /* For Educators */
    .educators-page { padding: 5rem 2.5rem 6rem; }
    .educators-feature { gap: 2.5rem; }
    .educators-feature + .educators-feature { margin-top: 7rem; }
    .educators-feature-title { font-size: 1.75rem; }
    .educators-feature-list { font-size: 1.25rem; line-height: 1.9; }
    .educators-art { width: 17rem; }
}

/* Tablet: stack the hero */
@media (max-width: 768px) {
    :root {
        --fs-heading: 2rem;
        --fs-text: 1.125rem;
        --fs-small: 1rem;
        --gutter: 1.25rem;
    }


    .hero { padding-top: 7rem; }
    .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .hero-side { padding-top: 0; }
    .hero-mascots { min-height: 0; }
    .hero-features { flex-direction: column; gap: 0.875rem; margin-top: 2rem; }
    .hero-features li { font-size: var(--fs-text); }
    .landing-content { padding: 2.5rem var(--gutter) 1rem; }
    .feature { flex-direction: column; align-items: center; gap: 1rem; }
    .feature--educators { flex-direction: column-reverse; }
    .feature--educators .feature-body { align-items: stretch; text-align: left; }
    .feature--kids .mascot,
    .feature--educators .mascot { width: 13rem; margin-top: 0; }
    .feature + .feature { margin-top: 3.5rem; }
    .btn { padding: 0.875rem 1.5rem; margin-top: 1.5rem; }

    /* About Us */
    .about-page { padding: 3rem 2rem 4rem; }

    .about-mission {
        flex-direction: column-reverse;
        gap: 2rem;
        padding: 0;
        text-align: center;
    }

    .about-mission-text p { margin: 0; }
    .about-mission-art { width: 15rem; }
    .about-team { margin-top: 4rem; }
    .about-banner { font-size: 1.75rem; margin-bottom: 2.5rem; }
    .team-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .team-card { min-height: 0; }
    .about-contact { flex-wrap: wrap; gap: 2rem; }
    .about-contact-info { order: -1; width: 100%; }
    .about-contact-heading { font-size: 1.75rem; }

    /* Curriculum */
    .curriculum-page { --topic-size: 8rem; padding: 3.5rem var(--gutter) 4.5rem; }
    .curriculum-heading { text-align: center; }
    .curriculum-intro-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .topic-list { grid-template-columns: 1fr; max-width: 28rem; margin: 0 auto; gap: 1.5rem; }
    .curriculum-topics { margin-top: 3rem; }

    /* For Educators */
    .educators-page { padding: 4rem 2rem 5rem; }
    .educators-feature,
    .educators-feature--reverse { flex-direction: column; gap: 2rem; }
    .educators-feature + .educators-feature { margin-top: 5rem; }
    .educators-feature-text { width: 100%; }
    .educators-feature-title { text-align: center; margin-left: auto; margin-right: auto; }
    .educators-feature-list { max-width: 34rem; margin: 0 auto; }
    .educators-art { width: 15rem; }
}

/* Phone */
@media (max-width: 480px) {
    :root {
        --fs-heading: 1.625rem;
        --fs-text: 1rem;
        --fs-small: 0.875rem;
        --gutter: 1rem;
    }
    .hero-mascots .mascot:first-child { width: 8.5rem; }
    .hero-mascots .mascot:last-child  { width: 11rem; margin-top: 2.5rem; }
    .feature--kids .mascot,
    .feature--educators .mascot { width: 10.5rem; }

    /* About Us */
    .about-page { padding: 2rem 1rem 3rem; }
    .about-heading { font-size: 2rem; }
    .about-mission-text p { font-size: 1.1rem; }
    .about-mission-art { width: 12rem; }
    .about-banner { font-size: 1.5rem; padding: 1rem; }
    .team-grid { grid-template-columns: 1fr; gap: 1.5rem; }

    /* Photo on the left, name and role stacked to its right */
    .team-card {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 1.25rem;
        align-items: center;
        padding: 1rem 1.25rem;
        text-align: left;
    }

    .team-photo-placeholder {
        grid-row: 1 / span 2;
        width: 5.5rem;
        margin-bottom: 0;
    }

    .team-name { align-self: end; font-size: 1.25rem; }
    .team-role { align-self: start; font-size: 1rem; }
    .about-contact-heading { font-size: 1.5rem; }
    .contact-list li { font-size: 1.2rem; gap: 1rem; }
    .contact-icon { width: 1.5rem; height: 1.5rem; }
    .about-contact-art { height: 11rem; }

    /* Only one character fits comfortably under the contact info */
    .about-contact-art:last-child { display: none; }

    /* Curriculum */
    .curriculum-page { --topic-size: 6.5rem; padding: 2.5rem var(--gutter) 3.5rem; }
    .topic-art { border-width: 3px; }

    /* For Educators */
    .educators-page { padding: 3rem 1rem 4rem; }
    .educators-feature + .educators-feature { margin-top: 4rem; }
    .educators-feature-title { font-size: 1.375rem; }
    .educators-feature-list { font-size: 1.0625rem; line-height: 1.7; padding-left: 1.5rem; }
    .educators-feature-list li + li { margin-top: 0.375rem; }
    .educators-art { width: 12rem; }
}
