/* Magic Institution — bureau layer: a serious institution where anomalies are filed, not decorated. */

/* Walking through the school door: the gateway doorway becomes the school hero door. */
@view-transition { navigation: auto; }
.gateway-school .doorway,
.entry-architecture .architecture { view-transition-name: school-door; }
::view-transition-old(school-door),
::view-transition-new(school-door) {
  animation-duration: .6s;
  animation-timing-function: cubic-bezier(.2, .7, .2, 1);
}
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .35s; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* Administration notices replace the plain route bar. */
.bureau-notice {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 38px;
  padding: 8px var(--gutter);
  background: #070c16;
  border-bottom: 1px solid var(--brand-line-dark);
  font: 11px/1.4 var(--font-code);
  letter-spacing: .05em;
  color: #c9cbd3;
}
.bureau-notice__back {
  flex-shrink: 0;
  color: #d8c28c;
  text-decoration: none;
  white-space: nowrap;
}
.bureau-notice__back:hover { text-decoration: underline; }
.bureau-notice__back:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }
.bureau-notice__text {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0 0 0 auto;
}
.bureau-notice__label {
  flex-shrink: 0;
  padding: 2px 6px 1px;
  background: var(--signal);
  color: #121524;
  font-weight: 700;
  text-transform: uppercase;
}
.bureau-notice__message {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity .3s ease;
}
.bureau-notice__message.is-switching { opacity: 0; }
@media (max-width: 760px) {
  .bureau-notice { gap: 12px; font-size: 10px; }
  .bureau-notice__back-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .bureau-notice__label { display: none; }
  .bureau-notice__text { margin: 0; }
  .bureau-notice__message {
    display: -webkit-box;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

/* Hero states the offer; the brand name steps back to a service line. */
.entry-copy h1.entry-offer {
  font-size: clamp(56px, 6.4vw, 104px);
  line-height: .9;
  letter-spacing: -.06em;
  margin: 4px 0 30px;
}
.entry-offer > span { display: block; }
.entry-copy h1.entry-offer .entry-offer__brand {
  margin-bottom: 20px;
  font: 600 12px/1.4 var(--font-code);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #aeb3c2;
}
.entry-offer__accent { color: #aac6ae; }
@media (max-width: 760px) {
  .entry-copy h1.entry-offer { font-size: clamp(46px, 13.4vw, 64px); margin-bottom: 24px; }
}

/* Anomaly protocol: strange things described in a dry service voice. */
.anomaly-note {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 420px;
  margin: 16px 0 0;
  padding: 10px 12px 11px;
  border: 1px dashed rgba(128, 201, 216, .5);
  border-left: 3px solid var(--glass);
  background: rgba(128, 201, 216, .07);
  font-size: 13px;
  line-height: 1.45;
  color: #d7dbe2;
}
.anomaly-note__id {
  font: 700 10px/1.3 var(--font-code);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--glass);
}
.translation-copy .anomaly-note { flex-basis: 100%; }
.school-note .anomaly-note { margin-top: 22px; }

/* Language cards are departments with a clearance level. */
.department-code {
  display: block;
  margin-bottom: 8px;
  font: 700 9px/1.3 var(--font-code);
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .8;
}
.department-code + h3 { margin-top: 0; }

/* Ceremony comes from stamps and forms, not serif italics. */
.learning-document .document-note {
  padding: 8px 10px 7px;
  border: 2px solid currentColor;
  font: 800 13px/1 var(--font-condensed);
  letter-spacing: .16em;
  text-transform: uppercase;
  transform: rotate(-5deg);
}

/* Platform band: short, with the student pass as its only anomaly. */
@media (min-width: 761px) {
  .school-note {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
  }
}
.school-note h2 { font-size: clamp(36px, 3.6vw, 54px); }

/* Gateway: a direct way into the school on the first screen. */
.institution-lobby .intro-lede {
  max-width: 560px;
  margin: 26px 0 0;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.55;
  color: #45464f;
}
.institution-lobby .intro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 26px;
}
.institution-lobby .intro-cta {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 14px 26px;
  background: var(--night);
  color: var(--paper);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s ease;
}
.institution-lobby .intro-cta:hover { transform: translateY(-2px); }
.institution-lobby .intro-link {
  color: var(--ink);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.institution-lobby .intro-cta:focus-visible,
.institution-lobby .intro-link:focus-visible { outline: 2px solid var(--night); outline-offset: 4px; }

/* Sector plaques and the closed Products sector. */
.lintel .sector-status {
  padding: 1px 5px;
  border: 1px solid rgba(244, 237, 220, .55);
  font-weight: 700;
  color: #f4eddc;
}
.lintel .sector-status--closed {
  border-color: #d7e56f;
  background: #d7e56f;
  color: #121524;
}
.sector-tape {
  position: absolute;
  z-index: 6;
  top: 46%;
  left: -4%;
  right: -4%;
  display: flex;
  align-items: center;
  height: 34px;
  overflow: hidden;
  background: repeating-linear-gradient(-45deg, #d7e56f 0 16px, #121524 16px 32px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .35);
  transform: rotate(-8deg);
  pointer-events: none;
  transition: opacity .3s ease;
}
.sector-tape > span {
  margin: 0 auto;
  padding: 5px 10px 4px;
  background: #d7e56f;
  color: #121524;
  font: 800 11px/1 var(--font-condensed);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.gateway-education.is-open .sector-tape,
.gateway-closed.is-open .sector-tape { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .institution-lobby .intro-cta:hover { transform: none; }
  .sector-tape { transition: none; }
}

/* The hero description no longer has a side index column. */
.entry-copy .entry-description {
  display: block;
  max-width: 560px;
}

/* Open doors show a live, scaled view of their destination pages. */
.institution-lobby .preview-school,
.institution-lobby .preview-education { grid-template-rows: auto minmax(0, 1fr) auto; }
.product-preview .live-preview {
  position: relative;
  flex: 1 1 auto;
  min-height: 240px;
  margin: 0 0 14px;
  overflow: hidden;
  background: #0b1020;
  border: 1px solid rgba(244, 237, 220, .2);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4);
}
.live-preview iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
}
.live-preview.is-loaded iframe { opacity: 1; }
.live-preview::before {
  content: "Встановлюємо зв’язок з кабінетом…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  font: 9px/1.4 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(128, 201, 216, .75);
}
.live-preview.is-loaded::before { content: none; }
.live-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(244, 237, 220, .08), transparent 38%, transparent 70%, rgba(128, 201, 216, .06));
}
.live-preview__label {
  position: absolute;
  z-index: 2;
  left: 8px;
  bottom: 8px;
  padding: 4px 7px 3px;
  background: rgba(7, 11, 19, .88);
  color: var(--glass);
  font: 700 8px/1.3 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.live-preview__label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 6px 1px 0;
  border-radius: 50%;
  background: #e5484d;
  animation: live-dot 1.6s ease-in-out infinite;
}
@keyframes live-dot { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .live-preview__label::before { animation: none; }
}

/* Staff archive: manila folders per language; opening one reveals its personnel files. */
.staff-folder-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  padding-top: 16px;
}
.staff-folder {
  --folder-accent: var(--oxblood);
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 6px;
  min-height: 176px;
  padding: 22px 18px 16px 22px;
  border: 1px solid rgba(18, 21, 36, .24);
  border-left: 5px solid var(--folder-accent);
  background: #d9c59a;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .18), transparent 40%);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 16px 26px -20px rgba(18, 21, 36, .7);
  transition: transform .28s cubic-bezier(.16, .84, .2, 1), box-shadow .28s ease, background-color .28s ease;
}
.staff-folder--de { --folder-accent: #34316e; }
.staff-folder--pl { --folder-accent: #0d5a45; }
.staff-folder--es { --folder-accent: #a8742a; }
.staff-folder::before {
  content: "";
  position: absolute;
  top: -15px;
  left: -5px;
  width: 46%;
  height: 16px;
  background: inherit;
  border: 1px solid rgba(18, 21, 36, .24);
  border-left: 5px solid var(--folder-accent);
  border-bottom: 0;
  border-radius: 5px 8px 0 0;
}
/* Papers peeking out of the folder; they rise when it opens. */
.staff-folder::after {
  content: "";
  position: absolute;
  top: -11px;
  right: 14px;
  width: 44%;
  height: 11px;
  background: #fffaf0;
  border: 1px solid rgba(18, 21, 36, .16);
  box-shadow: 6px -4px 0 -1px #f3ead6, 6px -4px 0 0 rgba(18, 21, 36, .12);
  transition: transform .28s cubic-bezier(.16, .84, .2, 1);
}
.staff-folder:hover { transform: translateY(-4px); }
.staff-folder:hover::after { transform: translateY(-4px); }
.staff-folder:focus-visible { outline: 3px solid var(--night); outline-offset: 4px; }
.staff-folder[aria-expanded="true"] {
  background-color: #e8d8b3;
  transform: translateY(-8px);
  box-shadow: 0 22px 30px -18px rgba(18, 21, 36, .75);
}
.staff-folder[aria-expanded="true"]::after { transform: translateY(-12px) rotate(-2deg); }
.staff-folder__tab {
  font: 700 9px/1.3 var(--font-code);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5f4f2f;
}
.staff-folder__title {
  font: 700 clamp(30px, 2.6vw, 40px)/1 var(--font-condensed);
  letter-spacing: -.04em;
}
.staff-folder__faces {
  display: flex;
  align-items: flex-end;
  padding-top: 8px;
}
.staff-folder__faces > img,
.staff-folder__faces > i {
  display: block;
  width: 34px;
  height: 42px;
  margin-right: -9px;
  border: 2px solid #fffaf0;
  box-shadow: 0 4px 8px -4px rgba(0, 0, 0, .5);
  object-fit: cover;
  object-position: center 28%;
  transform: rotate(-3deg);
}
.staff-folder__faces > :nth-child(even) { transform: rotate(3deg); }
.staff-folder__faces > i {
  background:
    radial-gradient(circle at 50% 40%, rgba(128, 201, 216, .45) 0 17%, transparent 18%),
    radial-gradient(ellipse 34% 20% at 50% 82%, rgba(128, 201, 216, .35) 0 98%, transparent 100%),
    #141b2b;
}
.staff-folder__count {
  font: 10px/1.3 var(--font-code);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #4d4330;
}
.staff-folders.is-enhanced .staff-folder-panel {
  margin-top: 26px;
  padding: 22px 22px 26px;
  background: #efe3c6;
  border: 1px solid rgba(18, 21, 36, .2);
  box-shadow: inset 0 10px 18px -14px rgba(18, 21, 36, .45);
}
.staff-folders.is-enhanced .staff-folder-panel + .staff-folder-panel { margin-top: 26px; }
.staff-folder-panel[hidden] { display: none; }
.staff-folder-panel.is-opening { animation: folder-open .38s cubic-bezier(.16, .84, .2, 1) both; }
@keyframes folder-open {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
.staff-folders:not(.is-enhanced) .staff-folder-row { display: none; }
@media (max-width: 1050px) {
  .staff-folder-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
}
@media (max-width: 760px) {
  .staff-folder-row { gap: 34px 12px; }
  .staff-folder { min-height: 150px; padding: 18px 12px 12px 15px; }
  .staff-folder__title { font-size: 28px; }
  .staff-folder__faces > img,
  .staff-folder__faces > i { width: 28px; height: 35px; }
  .staff-folders.is-enhanced .staff-folder-panel { padding: 16px 0 18px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .staff-folder,
  .staff-folder::after { transition: none; }
  .staff-folder-panel.is-opening { animation: none; }
}

/* Two type families across the site: Inter for reading and interface, the narrow grotesk for
   display and plaques. Monospace and serif roles fold into them. */
:root {
  --mono: var(--sans);
  --font-code: var(--font-body);
  --font-brand-mono: var(--font-brand);
  --serif: var(--narrow);
  --font-ceremony: var(--font-condensed);
  --font-brand-ceremony: var(--font-brand-condensed);
}
/* The one ceremonial word on the gateway keeps its serif. */
.institution-lobby:not(.language-wing) .lobby-intro h1 em {
  font-family: Baskerville, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}
.lobby-footer p { font-style: normal; }

/* Director's desk: a pinned card above the department folders. */
.staff-director {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 560px;
  margin: 0 0 42px;
  padding: 16px 22px 16px 16px;
  background: #efe3c6;
  border: 1px solid rgba(18, 21, 36, .2);
  border-left: 5px solid var(--oxblood, #7a2e2a);
  box-shadow: 0 16px 26px -20px rgba(18, 21, 36, .7);
}
.staff-director__photo {
  flex: 0 0 auto;
  width: 112px;
  height: 140px;
  object-fit: cover;
  object-position: center 30%;
  border: 3px solid #fffaf0;
  box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .5);
  transform: rotate(-2deg);
  filter: saturate(.8);
}
.staff-director__tab {
  font: 700 9px/1.3 var(--font-code);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5f4f2f;
}
.staff-director h3 {
  margin: 6px 0 8px;
  font: 700 clamp(28px, 2.4vw, 36px)/1 var(--font-condensed);
  letter-spacing: -.04em;
}
.staff-director p { margin: 0; font-size: 14px; line-height: 1.5; }
@media (max-width: 760px) {
  .staff-director { gap: 16px; padding: 14px; margin-bottom: 34px; }
  .staff-director__photo { width: 88px; height: 110px; }
  .staff-director h3 { font-size: 26px; }
  .staff-director p { font-size: 13px; }
}

/* Student reviews: real chat screenshots taped to the page like evidence in a case file. */
.student-reviews {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2.4fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.student-reviews__aside { position: sticky; top: 110px; }
.student-reviews__aside h2 {
  margin: 18px 0 0;
  font-size: clamp(40px, 4.4vw, 68px);
  line-height: .95;
  letter-spacing: -.05em;
}
.student-reviews__wall { columns: 3 220px; column-gap: 26px; }
.review-shot {
  position: relative;
  break-inside: avoid;
  margin: 0 0 30px;
  padding: 10px 10px 8px;
  background: #fffaf0;
  border: 1px solid rgba(18, 21, 36, .14);
  box-shadow: 0 16px 24px -18px rgba(18, 21, 36, .65);
  transform: rotate(var(--tilt, -1deg));
  transition: transform .3s cubic-bezier(.16, .84, .2, 1), box-shadow .3s ease;
}
.review-shot:nth-child(3n + 2) { --tilt: 1.2deg; }
.review-shot:nth-child(3n) { --tilt: -.4deg; }
/* A strip of tape holding each screenshot. */
.review-shot::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 74px;
  height: 20px;
  margin-left: -37px;
  background: rgba(244, 226, 170, .78);
  border: 1px solid rgba(18, 21, 36, .08);
  transform: rotate(-3deg);
}
.review-shot:nth-child(even)::before { transform: rotate(4deg); }
.review-shot img { display: block; width: 100%; height: auto; }
.review-shot figcaption {
  padding-top: 7px;
  font: 9px/1.2 var(--font-code);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7a6e58;
}
.review-shot:hover {
  transform: rotate(0) translateY(-4px);
  box-shadow: 0 24px 32px -20px rgba(18, 21, 36, .75);
}
@media (max-width: 900px) {
  .student-reviews { grid-template-columns: 1fr; }
  .student-reviews__aside { position: static; }
  .student-reviews__wall { columns: 2 200px; column-gap: 18px; }
}
@media (max-width: 480px) {
  .student-reviews__wall { columns: 1; max-width: 400px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .review-shot { transition: none; }
}

/* Portraits are pre-framed alike (same face height, grade and softened original background), so one rule fits all. */
.staff-photo img,
.photo-daria img,
.photo-simona img,
.photo-victoria img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-position: center 22%;
  filter: none;
}

.preview-education .preview-enter { background: #3d3a5c; color: var(--paper); }
