/* the slide decks in for-teachers/slides/, for a teacher to project. each slide is
   drawn on a 1600 by 900 stage that slides.js scales to fit the window */

:root {
    --ink: #0C1230;
    --paper: #F4F5FA;
    --card: #FFFFFF;
    --text: #151A2D;
    --muted: #5A6178;
    --line: #E1E4EE;

    --blue: #3F81EA;
    --navy: #354D86;
    --pink: #EE6791;
    --turquoise: #5DCAD2;
    --yellow: #F8C463;
    --purple: #AE68F5;

    --sans: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

    /* the grade's colour, and the sizes, which are biggest for the youngest */
    --grade-color: var(--blue);
    --heading-size: 68px;
    --text-size: 38px;
    --small-size: 30px;
}

.grade-turquoise { --grade-color: var(--turquoise); --grade-ink: var(--ink); }
.grade-blue { --grade-color: var(--blue); --grade-ink: #FFFFFF; }
.grade-purple { --grade-color: var(--purple); --grade-ink: #FFFFFF; }

.deck-elementary {
    --heading-size: 78px;
    --text-size: 44px;
    --small-size: 34px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    background: #05081A;
    font-family: var(--sans);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

b { font-weight: 700; }

/* ---------- the stage ---------- */

.stage {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1600px;
    height: 900px;
    transform-origin: 50% 50%;
    transform: translate(-50%, -50%);
}

.slide {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    padding: 64px 96px 90px;
    background: var(--paper);
    overflow: hidden;
}
.slide.is-current { display: flex; }

/* a stripe of the grade's colour down the left edge */
.slide::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 16px;
    background: var(--grade-color);
}

.slide-foot {
    position: absolute;
    left: 96px;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 22px;
    color: var(--muted);
}
.slide-foot img { height: 30px; width: auto; }

.slide-kicker {
    margin: 0 0 10px;
    font-family: var(--mono);
    font-size: var(--small-size);
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.slide-kicker::before {
    content: "";
    display: inline-block;
    width: 0.6em;
    height: 0.6em;
    margin-right: 0.5em;
    border-radius: 50%;
    background: var(--grade-color);
}

.slide h2 {
    margin: 0 0 36px;
    font-size: var(--heading-size);
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.slide-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 34px;
    font-size: var(--text-size);
    line-height: 1.3;
}
.slide-body p { margin: 0; }

/* ---------- the first slide ---------- */

.slide-title {
    justify-content: center;
    padding-left: 140px;
    background: var(--ink);
    color: #FFFFFF;
}
.slide-title::after {
    content: "";
    position: absolute;
    right: -200px;
    top: -260px;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--grade-color), transparent 65%);
    opacity: 0.35;
}
.slide-title .slide-logo { height: 96px; width: auto; margin-bottom: 64px; }
.slide-title .slide-grades {
    display: inline-block;
    align-self: flex-start;
    margin: 0 0 28px;
    padding: 8px 22px;
    border: 2px solid var(--grade-color);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 28px;
    color: var(--grade-color);
}
.slide-title h1 {
    margin: 0 0 28px;
    font-size: 112px;
    line-height: 1;
    letter-spacing: -0.035em;
}
.slide-title p { margin: 0; max-width: 1100px; font-size: 44px; line-height: 1.3; color: #C9D0E6; }
.slide-day h1 { font-size: 120px; }

/* ---------- blocks ---------- */

.s-lesson {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 14px;
    margin: -14px 0 0;
    padding: 10px 22px;
    border-radius: 999px;
    background: var(--card);
    border: 2px solid var(--line);
    font-size: var(--small-size);
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}
.s-lesson span { color: var(--muted); font-weight: 500; }
/* in a column there is no room for the tab, which the slide's other column shares */
.s-columns .s-lesson { margin: 0; white-space: nowrap; }
.s-columns .s-lesson span { display: none; }

.s-list, .s-steps, .s-questions { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 22px; }
.s-list li { padding-left: 1.1em; position: relative; }
.s-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 0.42em;
    height: 0.42em;
    border-radius: 50%;
    background: var(--grade-color);
}

.s-steps { counter-reset: step; }
.s-steps li, .s-questions li {
    counter-increment: step;
    display: flex;
    align-items: flex-start;
    gap: 22px;
}
.s-steps li::before, .s-questions li::before {
    content: counter(step);
    flex: none;
    width: 1.5em;
    height: 1.5em;
    margin-top: -0.1em;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--grade-color);
    color: var(--grade-ink);
    font-family: var(--mono);
    font-size: 0.8em;
    font-weight: 700;
}
.s-questions { counter-reset: step; gap: 30px; }
.s-questions li { font-size: 1.05em; font-weight: 500; }

.s-cards {
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    gap: 28px;
}
.s-card {
    padding: 30px 32px;
    border-radius: 24px;
    background: var(--card);
    border: 2px solid var(--line);
}
.s-card-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 18px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--grade-color) 22%, white);
    font-size: 44px;
    font-family: var(--mono);
    font-weight: 700;
}
.s-card h3 { margin: 0 0 8px; font-size: 1em; letter-spacing: -0.015em; }
.s-card p { font-size: var(--small-size); color: var(--muted); }

.s-vocab {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 48px;
    font-size: var(--small-size);
    line-height: 1.25;
}
.s-vocab div { padding-left: 22px; border-left: 6px solid var(--grade-color); }
.s-vocab dt { font-weight: 700; margin-bottom: 4px; }
.s-vocab dd { margin: 0; color: var(--muted); }

.s-question {
    align-self: flex-start;
    padding: 24px 36px;
    border-radius: 24px;
    background: var(--ink);
    color: #FFFFFF;
    font-weight: 600;
}

.s-rows { display: flex; flex-direction: column; gap: 18px; font-family: var(--mono); font-size: 0.9em; }
.s-row { display: flex; align-items: baseline; gap: 0.5em; flex-wrap: wrap; }

.s-answer {
    display: inline-block;
    min-width: 1.6em;
    padding: 0 0.3em;
    border-radius: 10px;
    background: color-mix(in srgb, var(--grade-color) 25%, white);
    font-family: var(--mono);
    font-weight: 700;
    text-align: center;
}

.s-table { border-collapse: collapse; font-family: var(--mono); font-size: 0.9em; }
.s-table th, .s-table td { padding: 10px 22px; text-align: center; }
.s-table th { color: var(--muted); font-weight: 500; border-bottom: 3px solid var(--line); }
.s-table td:first-child, .s-table th:first-child { text-align: right; color: var(--muted); }

.s-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}
.s-columns > div { display: flex; flex-direction: column; gap: 30px; }

.s-network { display: block; align-self: center; max-width: 100%; height: auto; overflow: visible; }

/* ---------- revealing, a step at a time ---------- */

[data-step]:not(.is-on) { visibility: hidden; }
[data-reveal]:not(.is-on) .s-shown { display: none; }
[data-reveal].is-on .s-hidden { display: none; }

/* ---------- the controls ---------- */

.deck-controls {
    position: fixed;
    right: 18px;
    bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(12, 18, 48, 0.85);
    color: #FFFFFF;
    font-size: 14px;
    opacity: 0.35;
    transition: opacity 0.2s;
    z-index: 2;
}
.deck-controls:hover, .deck-controls:focus-within { opacity: 1; }
.deck-controls button, .deck-controls a {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
}
.deck-controls button:hover, .deck-controls a:hover { background: rgba(255, 255, 255, 0.15); }
.deck-controls > * { white-space: nowrap; }
.deck-count { font-family: var(--mono); padding: 0 6px; }
.deck-hint { color: #A8B0C9; padding: 0 8px; }

/* in a narrow window, only the buttons */
@media (max-width: 720px) {
    .deck-hint, .deck-controls a { display: none; }
}

/* ---------- printing, a slide a page with every answer shown ---------- */

@media print {
    @page { size: 16in 9in; margin: 0; }
    html, body { height: auto; overflow: visible; background: none; }
    .stage { position: static; transform: none !important; height: auto; }
    .slide { position: relative; display: flex; height: 900px; break-after: page; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    [data-step] { visibility: visible; }
    [data-reveal] .s-shown { display: inline; }
    [data-reveal] .s-hidden { display: none; }
    .deck-controls { display: none; }
}
