/* OZO School of Design: motion layer (loaded after style.css)
   Hero image mosaic · sticky section pills · scroll reveals · image parallax · fade slider + lightbox · smooth FAQ.
   Everything shows normally without JavaScript or with reduced motion. */

:root {
  --rise: cubic-bezier(.16, .84, .24, 1);   /* fast start, long soft landing */
}

/* ---------- hero mosaic: columns of OZO work drifting behind the headline ---------- */
.hero { position: relative; isolation: isolate; }
.hero-mosaic {
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.5rem, 1vw, 1rem);
  padding-inline: clamp(.5rem, 1vw, 1rem);
}
.hero-mosaic::after {               /* navy wash keeps the type readable */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 36, 92, .78) 0%, rgba(0, 36, 92, .6) 45%, var(--navy) 100%),
              linear-gradient(90deg, rgba(0, 36, 92, .9) 0%, rgba(0, 36, 92, .35) 70%);
}
.mosaic-col { display: grid; gap: inherit; align-content: start; margin-top: -12vh; will-change: transform; }
.mosaic-col:nth-child(even) { margin-top: -30vh; }
.mosaic-col img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: calc(var(--radius) * .6); opacity: .55; }
.js:not(.reduced) .mosaic-col img { opacity: 0; transform: scale(.94); transition: opacity 1.2s var(--rise), transform 1.6s var(--rise); }
.js:not(.reduced) .hero-mosaic.is-in .mosaic-col img { opacity: .55; transform: none; }
.hero-mosaic.is-in .mosaic-col img:nth-child(2) { transition-delay: .12s; }
.hero-mosaic.is-in .mosaic-col img:nth-child(3) { transition-delay: .24s; }
.hero-mosaic.is-in .mosaic-col:nth-child(2) img { transition-delay: .08s; }
.hero-mosaic.is-in .mosaic-col:nth-child(3) img { transition-delay: .16s; }
.hero-mosaic.is-in .mosaic-col:nth-child(4) img { transition-delay: .24s; }
@media (max-width: 700px) {
  .hero-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mosaic-col:nth-child(n+3) { display: none; }
}

/* ---------- sticky section pills ---------- */
.jump {
  position: sticky; top: calc(var(--header-h) + .5rem); z-index: 70;
  height: 0; display: flex; justify-content: center; align-items: flex-start; pointer-events: none;
  transition: top .45s var(--ease);
}
body:has(.site-header.is-hidden) .jump { top: .75rem; }
.jump-track { transform: translateY(-50%); }  /* sits on the seam between hero and the first section */
.jump.is-stuck .jump-track { transform: none; }
.jump-track {
  pointer-events: auto; position: relative; display: flex; gap: .25rem; padding: .3rem;
  max-width: calc(100vw - 2 * var(--gutter)); overflow-x: auto; scrollbar-width: none;
  background: rgba(0, 26, 68, .82); border: 1px solid var(--line-dark); border-radius: 999px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -12px rgba(0, 10, 30, .6);
}
.jump-track::-webkit-scrollbar { display: none; }
.jump a {
  position: relative; z-index: 1; flex: none; padding: .5rem 1rem; border-radius: 999px;
  font-size: var(--step--1); font-weight: 600; text-decoration: none; white-space: nowrap; color: var(--mist);
  transition: color .35s var(--ease);
}
.jump a:hover, .jump a[aria-current="true"] { color: var(--white); }
.jump-thumb {                        /* the highlight slides to the section in view */
  position: absolute; z-index: 0; top: .3rem; bottom: .3rem; left: 0; width: 0; border-radius: 999px;
  background: var(--volt); opacity: 0;
  transition: transform .5s var(--rise), width .5s var(--rise), opacity .3s;
}
.jump-thumb.is-on { opacity: 1; }
[id].anchor { scroll-margin-top: calc(var(--header-h) + 4.5rem); }

/* ---------- scroll reveals ---------- */
.js:not(.reduced) [data-reveal] {
  opacity: 0; transform: translate3d(0, 48px, 0);
  transition: opacity .9s var(--rise), transform 1.1s var(--rise);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js:not(.reduced) [data-reveal="left"]  { transform: translate3d(-48px, 0, 0); }
.js:not(.reduced) [data-reveal="right"] { transform: translate3d(48px, 0, 0); }
.js:not(.reduced) [data-reveal="zoom"]  { transform: scale(.94); }
.js:not(.reduced) [data-reveal].is-in { opacity: 1; transform: none; }

/* image wipes open from the bottom as it arrives */
.js:not(.reduced) [data-wipe] { clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path 1.3s var(--rise); }
.js:not(.reduced) [data-wipe].is-in { clip-path: inset(0 0 0 0 round var(--radius)); }

/* ---------- parallax frames: the image is taller than its frame and drifts inside it ---------- */
.parallax { position: relative; overflow: hidden; }
.parallax > img { position: absolute; left: 0; width: 100%; height: 118%; top: -9%; object-fit: cover; will-change: transform; }

/* ---------- course blocks: alternating split sections ---------- */
.course-block { position: relative; }
.course-block-media { position: relative; aspect-ratio: 4 / 5; }
.course-block-media .course-num {
  position: absolute; z-index: 1; left: 1.1rem; top: 1rem; font-family: var(--display); font-weight: 760; font-stretch: 120%;
  font-size: var(--step-2); color: var(--white); text-shadow: 0 2px 18px rgba(0, 20, 50, .5);
}
.course-block .course-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.chapter--paper .btn--ghost { color: var(--navy); border-color: var(--line-light); }
.chapter--paper .btn--ghost:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.course-learn { margin-top: 1.4rem; font-size: var(--step--1); font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--royal); }
.course-block .chips { margin-top: .7rem; }
.course-block .chips li { transition: background .3s, color .3s, transform .3s var(--rise); }
.course-block .chips li:hover { background: var(--volt); color: var(--white); transform: translateY(-2px); }

/* ---------- reasons grid ---------- */
.reasons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.reasons li { background: var(--navy); padding: clamp(1.5rem, 3vw, 2.5rem); display: grid; gap: .8rem; align-content: start; position: relative; transition: background .5s var(--ease); }
.reasons li::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--volt); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--rise); }
.reasons li:hover { background: var(--deep); }
.reasons li:hover::before { transform: scaleX(1); }
.reasons .num { font-family: var(--display); font-weight: 700; font-stretch: 120%; color: var(--volt); font-size: var(--step-1); }
.reasons h3 { font-size: var(--step-2); font-stretch: 105%; }
.reasons p { color: var(--mist); }
@media (max-width: 960px) { .reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .reasons { grid-template-columns: minmax(0, 1fr); } }

/* ---------- split section: text beside a slider ---------- */
.split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 6rem); align-items: center; }
.split-text { display: grid; gap: 1.2rem; }
.split-text h2 { font-size: var(--step-4); font-stretch: 112%; }
.split-text p { color: var(--mist); font-size: var(--step-1); }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ---------- fade slider ---------- */
.slider { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--deep); touch-action: pan-y;
  height: min(78svh, 780px); aspect-ratio: .72; width: auto; max-width: 100%; justify-self: center; }
@media (max-width: 960px) { .slider { height: auto; width: 100%; max-width: 30rem; } }
.slider-slides { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility 0s .9s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s var(--ease), visibility 0s; }
.slide button { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.slide button:focus-visible { outline: 2px solid var(--blush); outline-offset: -4px; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 6s linear; }
.slide.is-active img { transform: scale(1); }
.reduced .slide img { transform: none; transition: none; }
.slider-arrow {
  position: absolute; z-index: 2; top: 50%; translate: 0 -50%; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(0, 26, 68, .45); color: var(--white); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .3s, transform .35s var(--rise);
}
.slider-arrow:hover { background: var(--volt); border-color: var(--volt); }
.slider-arrow[data-dir="-1"] { left: 1rem; }
.slider-arrow[data-dir="1"] { right: 1rem; }
.slider-arrow[data-dir="-1"]:hover { transform: translateX(-3px); }
.slider-arrow[data-dir="1"]:hover { transform: translateX(3px); }
.slider-arrow svg { width: 20px; height: 20px; }
.slider-dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: 1rem; display: flex; justify-content: center; gap: .45rem; }
.slider-dots button {
  width: 10px; height: 10px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--white); background: transparent; transition: width .45s var(--rise), background .3s;
}
.slider-dots button[aria-current="true"] { width: 28px; background: var(--white); }
.slider-progress { position: absolute; z-index: 2; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--volt); transform: scaleX(0); transform-origin: left; }

/* ---------- lightbox: the photo grows out of where it was ---------- */
.lightbox { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem); visibility: hidden; }
.lightbox.is-open { visibility: visible; }
.lightbox-bg { position: absolute; inset: 0; background: rgba(0, 18, 46, .94); opacity: 0; transition: opacity .45s var(--ease); }
.lightbox.is-open .lightbox-bg { opacity: 1; }
.lightbox-img { position: relative; max-width: min(100%, 1100px); max-height: calc(100svh - 7rem); width: auto; height: auto; border-radius: 10px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); transform-origin: top left; }
.lightbox-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center; gap: 1rem; padding: 1rem; opacity: 0; transition: opacity .35s .15s; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; opacity: 0; transition: opacity .35s .15s; }
.lightbox.is-open .lightbox-bar, .lightbox.is-open .lightbox-close { opacity: 1; }
.lightbox .slider-arrow { position: static; translate: none; }
.lightbox .lightbox-close { position: absolute; top: 1rem; right: 1rem; }
.lightbox-count { color: var(--mist); font-variant-numeric: tabular-nums; min-width: 4.5ch; text-align: center; }
body.lightbox-open { overflow: hidden; }

/* ---------- student stories ---------- */
.stories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.6rem); }
.story { margin: 0; padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--radius); background: var(--white); color: var(--ink); display: grid; gap: 1.6rem; align-content: space-between;
  transition: transform .5s var(--rise), box-shadow .5s var(--rise); }
.story:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -28px rgba(0, 36, 92, .45); }
.story blockquote { margin: 0; font-size: var(--step-1); line-height: 1.5; }
.story blockquote::before { content: "\201C"; display: block; font-family: var(--display); font-weight: 800; font-size: 3.4rem; line-height: .6; color: var(--volt); margin-bottom: .6rem; }
.story figcaption { display: flex; align-items: center; gap: 1rem; }
.story figcaption img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.story figcaption strong { display: block; font-weight: 700; }
.story figcaption span { color: var(--ink-soft); font-size: var(--step--1); }
@media (max-width: 760px) { .stories { grid-template-columns: minmax(0, 1fr); } }

/* ---------- FAQ: the answer slides open (height animated in motion.js) ---------- */
.faq details { overflow: hidden; }
.faq summary { transition: color .3s; }
.faq summary:hover { color: var(--royal); }
.faq details .answer { padding-bottom: 1.5rem; color: var(--ink-soft); }

/* ---------- campuses ---------- */
.campus { transition: transform .5s var(--rise), background .4s; }
.campus:hover { transform: translateY(-6px); background: var(--volt); }
.campus:hover address { color: var(--white); }
.campus .link-line { color: var(--white); }

/* buttons: arrow nudges on hover */
.btn svg { transition: transform .35s var(--rise); }
.btn:hover svg { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
  .jump-thumb, .slider-dots button, .story, .campus, .reasons li::before { transition: none !important; }
}

/* course titles and story names */
.course-block .course-title { font-size: var(--step-4); font-stretch: 110%; }
.chapter--white .course-block .desc { color: var(--ink-soft); }
.story figcaption strong { color: var(--ink); }
.chapter--white .chips li { background: var(--paper); }
