/* ===== Coursework > MIS Major: the story around the cycle ===== */

/* ===== What I can do: six big blocks at the top of the page, full toolkit folded underneath ===== */
.mis-can {
    max-width: 1100px;
    margin: 10px auto 48px;
    padding: var(--pad-card);
    border-radius: var(--r-card);
    border: var(--card-border);
    background: #FFF8F6;
    box-shadow: var(--shadow-card);
}

.mis-can-title {
    margin: 0 0 26px;
    font-family: Georgia, serif;
    font-size: 1.7em;
    font-weight: 400;
    text-align: center;
    color: #1E100A;
}

.mis-can-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mis-can-block {
    padding: 22px 22px 24px;
    border-radius: var(--r-inset);
    border: 1px solid #EBD5D0;
    background: #FFFFFF;
}

.mis-can-name {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #76344E;
}

.mis-can-num {
    font-family: Georgia, serif;
    font-size: 1.5em;
    font-weight: 400;
    letter-spacing: 0;
    color: #C9969E;
}

.mis-can-line {
    margin: 0 0 16px;
    font-family: Georgia, serif;
    font-size: 1.3em;
    line-height: 1.3;
    color: #1E100A;
}

.mis-can-pills,
.mis-toolkit-group ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mis-can-pills li,
.mis-toolkit-group li {
    padding: 4px 11px;
    border-radius: var(--r-pill);
    border: 1px solid #E2C4C0;
    background: #FAF1EF;
    font-size: 0.82em;
    color: #1E100A;
}

/* "See full technical toolkit" */
.mis-can-more {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 26px auto 0;
    padding: 9px 20px;
    border-radius: var(--r-pill);
    border: 1px solid #C9969E;
    background: transparent;
    font: inherit;
    font-size: 0.9em;
    color: #76344E;
    cursor: var(--cursor-hot, pointer);
    transition: background 0.2s ease;
}

.mis-can-more:hover {
    background: #FAF1EF;
}

.mis-can-more:focus-visible {
    outline: 2px solid #76344E;
    outline-offset: 3px;
}

.mis-can-more svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.mis-can-more[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.mis-toolkit {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 22px;
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid #EBD5D0;
}

.mis-toolkit[hidden] {
    display: none;
}

.mis-toolkit-name {
    margin: 0 0 3px;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #76344E;
}

.mis-toolkit-focus {
    margin: 0 0 10px;
    font-family: Georgia, serif;
    font-size: 0.95em;
    color: #1E100A;
}

@media (max-width: 900px) {
    .mis-can-grid,
    .mis-toolkit {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .mis-can {
        padding: 26px 16px 22px;
    }

    .mis-can-grid,
    .mis-toolkit {
        grid-template-columns: 1fr;
    }
}

/* ‹ › above the MIS charts: the loop, then the triangle */
.mis-view-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 auto 8px;
}

.mis-view-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid #D9B8B3;
    background: #FFF8F6;
    color: #76344E;
    font-size: 1.3em;
    line-height: 1;
    cursor: var(--cursor-hot, pointer);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.mis-view-btn:hover {
    border-color: #76344E;
    background: #F6E4E1;
}

.mis-view-btn:focus-visible {
    outline: 2px solid #76344E;
    outline-offset: 3px;
}

.mis-view-name {
    max-width: 640px;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-align: center;
    text-transform: uppercase;
    color: #76344E;
}

.mis-view[hidden] {
    display: none;
}

/* the chart with an arrow on each side, out past FUNCTIONAL and TECHNICAL */
.mis-chart {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.mis-chart > .mis-diagram,
.mis-chart > .story-triangle {
    flex: 1;
    min-width: 0;
}

.mis-chart > .story-triangle {
    flex: 0 1 440px;
}

.mis-view-btn.side {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    font-size: 1.5em;
}

/* on a wide screen the arrows sit beside the chart; the name above is just a label */
.mis-view-btn.top {
    display: none;
}

@media (max-width: 499px) {
    .mis-view-btn.top {
        display: inline-block;
    }

    .mis-view-btn.side {
        display: none;
    }
}

/* People, technology, business */
.story-triangle {
    width: 100%;
    max-width: 440px;
    margin: 10px auto 30px;
}

.story-triangle svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.tri-fill {
    fill: #F6E4E1;
    opacity: 0.55;
}

.tri-edge {
    stroke: #A9788A;
    stroke-width: 2;
    stroke-linecap: round;
    marker-start: url(#tri-head);
    marker-end: url(#tri-head);
}

.tri-center {
    font-family: Georgia, serif;
    font-size: 17px;
    text-anchor: middle;
    fill: #1E100A;
}

.tri-center.accent {
    font-style: italic;
    fill: #76344E;
}

.story-triangle {
    position: relative;
}

.tri-dot {
    fill: var(--node);
    stroke: #FAF1EF;
    stroke-width: 4;
    transition: r 0.25s ease, opacity 0.25s ease;
}

.story-triangle.has-pick .tri-dot:not(.on) {
    opacity: 0.4;
}

.tri-dot.on {
    r: 13px;
}

/* the three corners are buttons sitting where the labels were */
.tri-btn {
    position: absolute;
    transform: translate(-50%, -50%);
    padding: 6px 14px;
    border: 1.5px solid transparent;
    border-radius: var(--r-pill);
    background: none;
    color: var(--node);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: var(--cursor-hot, pointer);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tri-btn:hover {
    border-color: var(--node);
    background: #FFF8F6;
}

.tri-btn[aria-pressed="true"] {
    border-color: var(--node);
    background: var(--node);
    color: #FFF8F6;
}

.tri-btn:focus-visible {
    outline: 2px solid var(--node);
    outline-offset: 3px;
}

/* the card under the triangle */
.tri-cards {
    max-width: 560px;
    min-height: 150px;
    margin: 18px auto 30px;
}

.tri-hint {
    margin: 0;
    padding-top: 10px;
    font-size: 0.82em;
    text-align: center;
    color: #8A7A76;
}

.tri-card {
    padding: var(--pad-card-sm);
    border-radius: var(--r-card);
    border: var(--card-border);
    border-top: 4px solid var(--node);
    background: #FFF8F6;
    text-align: center;
    animation: tri-in 0.3s ease both;
    box-shadow: var(--shadow-card);
}

@keyframes tri-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.tri-card-name {
    margin: 0;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--node);
}

.mis-intro .tri-card-line,
.tri-card-line {
    margin: 6px 0 14px;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1.2em;
    line-height: 1.4;
    color: #1E100A;
}

.tri-card-courses {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

/* course chips here are light, and open the same course card as the cycle */
.mis-chip.tri-chip {
    gap: 6px;
    padding: 6px 13px;
    border-color: #D9B8B3;
    background: #FAF1EF;
    color: #76344E;
    font-size: 0.85em;
}

.mis-chip.tri-chip span {
    font-weight: 500;
    letter-spacing: 0;
    color: #1E100A;
}

.mis-chip.tri-chip:hover {
    border-color: var(--node);
    background: #F6E4E1;
}

.mis-chip.tri-chip:focus-visible {
    outline-color: var(--node);
}

/* ===== shared bits ===== */
.story {
    max-width: var(--page-width, 1100px);
    margin: 0 auto;
}

.story-section {
    margin: 0 auto 70px;
}

.story-heading {
    margin: 0 0 10px;
    font-family: Georgia, serif;
    font-size: 2em;
    text-align: center;
    color: #1E100A;
}

.story-sub {
    margin: 0 0 28px;
    text-align: left;
    line-height: 1.6;
    color: #3F4A34;
}

.story-heading + :not(.story-sub) {
    margin-top: 26px;
}

/* pull quotes between the sections */
.story-pull {
    display: flex;
    align-items: center;
    gap: 22px;
    max-width: 760px;
    margin: 0 auto 70px;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: clamp(1.25em, 2.2vw, 1.6em);
    line-height: 1.35;
    text-align: center;
    color: #76344E;
}

.story-pull::before,
.story-pull::after {
    content: "";
    flex: 1 1 40px;
    min-width: 24px;
    height: 1px;
    background: #D9B8B3;
}

/* sections ease in as they scroll into view */
.reveal.pending {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.pending.shown {
    opacity: 1;
    transform: none;
}

/* ===== The zoom lens ===== */
/* the closing statement of Coursework: kept compact, a small lens beside the slider */
.zoom {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: center;
    gap: 36px;
    padding: var(--pad-card-sm);
    border-radius: var(--r-card);
    border: var(--card-border);
    background: #FFF8F6;
    box-shadow: var(--shadow-card);
}

.zoom-lens {
    position: relative;
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.zoom-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(var(--r) / 7 * 100%);
    height: calc(var(--r) / 7 * 100%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1.5px dashed #D9B8B3;
    transition: background 0.35s ease, border-color 0.35s ease;
}

/* the dashed rings turn slowly, each the other way from the one inside it */
.zoom-ring {
    animation: zoomSpin 40s linear infinite;
}

.zoom-ring:nth-child(even) {
    animation-direction: reverse;
}

@keyframes zoomSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* the current level breathes */
.zoom-ring.current {
    animation: zoomSpin 40s linear infinite, zoomPulse 2.6s ease-in-out infinite;
}

@keyframes zoomPulse {
    50% { box-shadow: 0 0 0 14px rgba(143, 70, 97, 0.04); }
}

/* the slider fills smoothly, and each level's card slides in */
@property --fill {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 0%;
}

.zoom-range {
    transition: --fill 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.zoom-stop:not([hidden]) {
    animation: zoomIn 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes zoomIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .zoom-ring, .zoom-ring.current, .zoom-stop:not([hidden]) { animation: none; }
    .zoom-range { transition: none; }
}

.zoom-ring.inside {
    border-style: solid;
    border-color: #C99AA5;
    background: rgba(143, 70, 97, 0.07);
}

/* the ring under the pointer, previewing what a click will pick */
.zoom-ring.hover:not(.current) {
    border-style: solid;
    border-color: #76344E;
    background: rgba(143, 70, 97, 0.05);
}

.zoom-ring.current {
    border: 3px solid #76344E;
    background: rgba(143, 70, 97, 0.12);
    box-shadow: 0 0 0 6px rgba(143, 70, 97, 0.1);
}

.zoom-range {
    --fill: 0%;
    width: 100%;
    height: 6px;
    margin: 0;
    border-radius: var(--r-pill);
    background: linear-gradient(to right, #76344E var(--fill), #EBD5D0 var(--fill));
    appearance: none;
    -webkit-appearance: none;
    cursor: var(--cursor-hot, pointer);
}

.zoom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #FFF8F6;
    background: #76344E;
    box-shadow: 0 0 0 1.5px #76344E;
}

.zoom-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #FFF8F6;
    background: #76344E;
    box-shadow: 0 0 0 1.5px #76344E;
}

.zoom-range:focus-visible {
    outline: 2px solid #76344E;
    outline-offset: 6px;
}

.zoom-ticks {
    display: flex;
    justify-content: space-between;
    margin: 10px -6px 26px;
}

.zoom-tick {
    padding: 2px 4px;
    border: none;
    background: none;
    font: inherit;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #8A7A76;
    cursor: var(--cursor-hot, pointer);
}

.zoom-tick.current {
    color: #76344E;
}

.zoom-stop {
    min-height: 190px;
}

/* every level sits in the same grid cell, so the box is always as tall as the longest level
   and never changes size; the levels not showing are just invisible */
.zoom-stops { display: grid; }
.zoom-stops > .zoom-stop { grid-area: 1 / 1; }
.zoom-stops > .zoom-stop[hidden] { display: block !important; visibility: hidden; }   /* beats Bootstrap's [hidden] !important */

.zoom-level,
.zoom-trained {
    margin: 0;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #6B7F5E;
}

.zoom-label {
    margin: 4px 0 10px;
    font-family: Georgia, serif;
    font-size: 2em;
    color: #1E100A;
}

/* what I bring at this level: the point of the whole slider */
.zoom-value {
    margin: 0 0 22px;
    padding: 12px 16px;
    border-left: 3px solid #733642;
    border-radius: 0 var(--r-small, 8px) var(--r-small, 8px) 0;
    background: #F5E0DB;
    font-family: Georgia, serif;
    font-size: 1.12em;
    font-style: italic;
    line-height: 1.45;
    color: #1E100A;
}

.zoom-courses {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.zoom-courses li {
    padding: 10px 0;
    border-top: 1px solid #EBD5D0;
    font-weight: 600;
    color: #1E100A;
}

.zoom-courses .mis-question {
    display: block;
    font-weight: 400;
    font-size: 0.95em;
}

/* ===== Where it all meets ===== */
.meets {
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 1;
    margin: 0 auto;
    container-type: inline-size;
}

.meets-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.meets-ring circle,
.meets-ring line {
    fill: none;
    stroke: #D9B8B3;
    stroke-width: 0.3;
    stroke-dasharray: 1 1.5;
}

.meets-center {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 30%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #A0606E, #7A3F4A);
    box-shadow: 0 0 0 10px rgba(143, 70, 97, 0.1), 0 14px 34px rgba(122, 63, 74, 0.3);
    font-family: Georgia, serif;
    font-size: clamp(1.1em, 4.2cqw, 1.7em);
    font-weight: 700;
    color: #FFF8F6;
}

.meets-nodes {
    margin: 0;
    padding: 0;
    list-style: none;
}

.meets-node {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 29%;
    padding: 2.2cqw 1.8cqw;
    border-radius: var(--r-inset);
    border: 1px solid #EBD5D0;
    background: #FFF8F6;
    text-align: center;
    box-shadow: 0 6px 18px rgba(42, 24, 16, 0.06);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.meets-node:hover,
.meets-node:focus-visible {
    border-color: #76344E;
    box-shadow: 0 12px 28px rgba(143, 70, 97, 0.18);
    transform: translate(-50%, -50%) scale(1.04);
    outline: none;
}

.meets-field {
    display: block;
    font-size: clamp(0.62em, 1.9cqw, 0.78em);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #76344E;
}

.meets-q {
    display: block;
    margin-top: 4px;
    font-family: Georgia, serif;
    font-size: clamp(0.85em, 2.8cqw, 1.1em);
    line-height: 1.3;
    color: #1E100A;
}

@media (prefers-reduced-motion: reduce) {
    .reveal.pending,
    .tri-card,
    .zoom-ring,
    .meets-node {
        transition: none;
    }
}

/* ===== tablets ===== */
@media (max-width: 800px) {
    .zoom {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 26px 22px;
    }

    .zoom-lens {
        max-width: 220px;
    }


}

/* ===== phones ===== */
@media (max-width: 560px) {
    .story-section,
    .story-pull {
        margin-bottom: 50px;
    }

    .story-heading {
        font-size: 1.6em;
    }

    .zoom-tick {
        font-size: 0.6em;
    }

    .zoom-label {
        font-size: 1.6em;
    }



    /* the circle gets too tight: Product on top, the six questions in a grid below */
    .meets {
        aspect-ratio: auto;
        display: grid;
        gap: 18px;
    }

    .meets-ring {
        display: none;
    }

    .meets-center {
        position: static;
        width: 120px;
        margin: 0 auto;
        transform: none;
        font-size: 1.3em;
    }

    .meets-nodes {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .meets-node {
        position: static;
        width: auto;
        padding: 14px 12px;
        transform: none;
    }

    .meets-node:hover,
    .meets-node:focus-visible {
        transform: scale(1.03);
    }

    .meets-field {
        font-size: 0.7em;
    }

    .meets-q {
        font-size: 1em;
    }
}
