/* The school's public website: a full photo with the motto, panels overlapping it,
   then the school's story in the crest's teal and red. */
:root {
    --ground: #ffffff;
    --pale: #eaf4f6;
    --ink: #12333a;
    --teal: #0e7480;
    --deep: #0b4650;
    --darkest: #072f36;
    --red: #c4161c;
    --on-deep: #f2fafb;
    --margin: clamp(16px, 5vw, 80px);
    --gap: clamp(72px, 8vw, 128px);
    --radius: 6px;
    --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
    --step-sub: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
    --step-head: clamp(2rem, 1.5rem + 2vw, 3.25rem);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --display: "Stack Sans Headline", "Segoe UI", Verdana, sans-serif;
    --text: "Stack Sans Text", "Segoe UI", Verdana, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font: 400 var(--step-body)/1.6 var(--text);
    overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; line-height: 1.12; }
h2 { font-size: var(--step-head); }
h3 { font-size: var(--step-sub); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 10px 26px;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: transform 180ms var(--ease), background-color 180ms var(--ease), color 180ms var(--ease);
}

.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button.red { background: var(--red); color: #fff; }
.button.red:hover { background: #a31217; }
.button.outline { border-color: #fff; color: #fff; }
.button.outline:hover { background: #fff; color: var(--deep); }
.button.light { background: #fff; color: var(--deep); }
.button.light:hover { background: var(--pale); }

/* Temporary label on stand-in photos. Turned off in users/website.py. */
.sample {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 2px 10px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 600;
}

.bar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 80px;
    padding: 8px var(--margin);
    background: var(--ground);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
    font: 600 var(--step-sub)/1.1 var(--display);
    color: var(--deep);
    text-decoration: none;
}

.wordmark img { width: 56px; height: auto; }
.wordmark small { display: block; font: 500 0.875rem/1.3 var(--text); color: var(--ink); }

.links { display: flex; gap: clamp(14px, 1.8vw, 30px); }
.links a, .menu nav a, .close-column a { text-decoration: none; }
.links a { padding: 8px 0; font-weight: 500; }
.links a:hover, .menu nav a:hover, .close-column a:hover, .credits a:hover { text-decoration: underline; text-underline-offset: 5px; }
.bar-button { min-height: 44px; padding: 6px 18px; }

.menu { display: none; position: relative; }

.menu summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: var(--radius);
    background: var(--pale);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

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

.menu nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: flex;
    flex-direction: column;
    min-width: 220px;
    padding: 8px 0;
    border-radius: var(--radius);
    background: var(--deep);
    color: var(--on-deep);
}

.menu nav a { padding: 12px 20px; font-weight: 500; }

/* The first screen: the photo fills it, with the motto on the darkened left. */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: min(calc(100svh - 200px), 760px);
    padding: 64px var(--margin) 136px;
    overflow: hidden;
    background: var(--darkest);
    color: #fff;
}

.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 60%; }

.hero::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(90deg, rgba(7, 47, 54, 0.94) 0, rgba(7, 47, 54, 0.82) 42%, rgba(7, 47, 54, 0.2) 78%); /* taste-skill-ignore */
}

.hero-words { position: relative; z-index: 2; width: min(100%, 700px); }
.hero h1 { font-size: clamp(2.75rem, 1.5rem + 5vw, 5.75rem); line-height: 1.04; letter-spacing: -0.025em; }
.hero-words > p { max-width: 34em; margin: 24px 0 32px; font-size: var(--step-sub); line-height: 1.4; font-weight: 400; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Three panels that overlap the bottom of the photo. */
.stage-panels {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: -88px var(--margin) 0;
}

.panel {
    display: block;
    padding: 28px 28px 32px;
    border-radius: var(--radius);
    background: var(--deep);
    color: var(--on-deep);
    text-decoration: none;
    transition: transform 200ms var(--ease), background-color 200ms var(--ease);
}

.panel:hover { background: var(--teal); transform: translateY(-4px); }
.panel svg { display: block; width: 40px; height: 40px; margin-bottom: 14px; fill: currentColor; }
.panel h2 { margin-bottom: 8px; font-size: var(--step-sub); }

/* About. */
.about {
    display: grid;
    grid-template-columns: 6fr 6fr;
    gap: 40px clamp(32px, 6vw, 96px);
    align-items: center;
    padding: var(--gap) var(--margin);
}

.about-photo { position: relative; }
.about-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.about-words h2 { margin-bottom: 24px; }
.about-words p + p { margin-top: 18px; }

/* Mission and vision. */
.purpose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--pale); }
.purpose div { padding: clamp(48px, 6vw, 88px) var(--margin); }
.purpose div + div { background: var(--deep); color: var(--on-deep); }
.purpose h2 { margin-bottom: 16px; font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); }
.purpose p { max-width: 34em; }

/* Our schools. */
.schools, .why { padding: var(--gap) var(--margin); }
.section-head { max-width: 44em; margin-bottom: 48px; }
.section-head p { margin-top: 14px; }

.school-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.school-card figure { position: relative; margin-bottom: 20px; overflow: hidden; border-radius: var(--radius); }
.school-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 400ms var(--ease); }
.school-card:hover img { transform: scale(1.04); }
.school-card h3 { margin-bottom: 10px; font-size: clamp(1.5rem, 1.3rem + 0.7vw, 2rem); }

/* Why choose us. */
.why { background: var(--pale); }
.why-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.why-list li { padding: 28px; border-radius: var(--radius); background: #fff; }
.why-list h3 { margin-bottom: 10px; color: var(--deep); }

/* Admissions. */
.admissions {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 40px clamp(32px, 6vw, 96px);
    padding: var(--gap) var(--margin);
    background: var(--teal);
    color: #fff;
}

.admissions-words p { margin: 16px 0 28px; }
.steps { display: grid; gap: 28px; counter-reset: step; }
.steps li { position: relative; padding-left: 68px; counter-increment: step; }

.steps li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    color: var(--deep);
    font: 600 var(--step-sub)/1 var(--display);
}

.steps h3 { margin-bottom: 4px; }

/* Contact. */
.contact {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 40px clamp(32px, 6vw, 96px);
    align-items: center;
    padding: var(--gap) var(--margin);
}

.contact h2 { margin-bottom: 20px; }
.contact address { margin-bottom: 28px; font-style: normal; font-size: var(--step-sub); line-height: 1.4; }
.contact-words p { margin-bottom: 14px; }
.contact-crest img { width: min(100%, 340px); margin-inline: auto; }

/* Footer. */
.close {
    display: grid;
    grid-template-columns: 4fr 2fr 2fr 3fr;
    gap: 32px clamp(24px, 4vw, 64px);
    padding: 64px var(--margin) 32px;
    background: var(--darkest);
    color: var(--on-deep);
}

.close-school { display: flex; align-items: flex-start; gap: 16px; }
.close-school img { flex: none; border-radius: var(--radius); background: #fff; }
.close-school strong { font-weight: 600; }
.close-column { display: flex; flex-direction: column; gap: 6px; }
.close-column h2 { margin-bottom: 8px; font: 600 var(--step-body)/1.3 var(--text); letter-spacing: 0; }
.credits { grid-column: 1 / -1; max-width: 75ch; font-size: 0.875rem; line-height: 1.5; }
.close-copy { grid-column: 1 / -1; font-size: 1rem; }

/* Motion: the photo settles once, the parts of each section rise in turn. */
@media (prefers-reduced-motion: no-preference) {
    .hero-photo { animation: settle 1600ms var(--ease) both; }
    .hero-words > * { animation: lift 800ms var(--ease) both; }
    .hero-words > :nth-child(2) { animation-delay: 90ms; }
    .hero-words > :nth-child(3) { animation-delay: 180ms; }
    .panel { animation: lift 800ms var(--ease) 240ms both; }
    .panel:nth-child(2) { animation-delay: 320ms; }
    .panel:nth-child(3) { animation-delay: 400ms; }
    @keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
    @keyframes lift { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

    .js .rise { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease) var(--delay, 0ms), transform 700ms var(--ease) var(--delay, 0ms), background-color 180ms var(--ease); }
    .js .rise.is-in { opacity: 1; transform: none; }
    .js .button.rise.is-in:hover { transform: translateY(-2px); transition-delay: 0ms; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

@media (max-width: 1120px) {
    .links { display: none; }
    .menu { display: block; }
    .bar { gap: 12px; }
}

@media (max-width: 900px) {
    .hero::before { background: rgba(7, 47, 54, 0.72); }
    .stage-panels, .about, .school-cards, .why-list, .admissions { grid-template-columns: 1fr; }
    .stage-panels { margin-top: -72px; }
    .purpose { grid-template-columns: 1fr; }
    .close { grid-template-columns: 1fr 1fr; }
    .close-school { grid-column: 1 / -1; }
    .contact { grid-template-columns: 3fr 2fr; }
}

@media (max-width: 480px) {
    .bar { min-height: 68px; }
    .wordmark img { width: 44px; }
    .bar-button { display: none; }
    .hero { padding-top: 48px; padding-bottom: 112px; }
    .hero-actions .button { flex: 1 1 100%; }
    .close { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .contact { grid-template-columns: 1fr; }
    .contact-crest img { width: min(70%, 280px); margin-inline: 0; }
}

@media (max-width: 560px) {
    .hero > .sample { top: auto; bottom: 84px; }
}
