/* ЯМБ — static rebuild. Palette from the school emblem: laurel green + heraldic gold. */
:root {
  --laurel: #2c4708;
  --green: #3d5b05;
  --leaf: #8dc217;
  --leaf-soft: #eef5dc;
  --gold: #c98a1b;
  --gold-soft: #fbf1dc;
  --ink: #24261d;
  --ink-2: #555a48;
  --line: #dfe5cf;
  --paper: #ffffff;
  --r: 22px;
  --wrap: 1180px;
  --display: "Unbounded", "Arial Black", sans-serif;
  --text: "Commissioner", "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--laurel); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; color: var(--laurel); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin: 0; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); margin: 0 0 .6em; }
h3 { font-size: 1.12rem; font-weight: 500; margin: 1.6em 0 .5em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--laurel); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* buttons */
.btn { display: inline-block; font: 600 1rem/1 var(--text); padding: 15px 24px; border-radius: 999px; background: var(--green); color: #fff; text-decoration: none; border: 2px solid var(--green); cursor: pointer; }
.btn:hover { background: var(--laurel); border-color: var(--laurel); color: #fff; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--green); }
.btn.ghost:hover { background: var(--leaf-soft); color: var(--laurel); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1f1606; }
.btn.gold:hover { background: #b37813; border-color: #b37813; }

/* header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--laurel); flex-shrink: 0; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font: 700 1.25rem var(--display); }
.brand-text span { font-size: .86rem; color: var(--ink-2); }
.nav { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 16px; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav-top { display: flex; gap: 4px; align-items: center; }
.nav-top > li { position: relative; }
.nav-top > li > a, .sub-btn { display: block; font: 500 .98rem/1 var(--text); color: var(--ink); padding: 12px 12px; border-radius: 10px; text-decoration: none; background: none; border: 0; cursor: pointer; }
.sub-btn::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav-top > li > a:hover, .sub-btn:hover, .nav-top > li.current > .sub-btn, .nav-top > li > a[aria-current] { background: var(--leaf-soft); color: var(--laurel); }
.sub { position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: 0 18px 40px -18px rgba(44,71,8,.35); display: none; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub, .sub-btn[aria-expanded="true"] + .sub { display: block; }
.sub a { display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.sub a:hover, .sub a[aria-current] { background: var(--leaf-soft); color: var(--laurel); }
.nav-aux { display: flex; align-items: center; gap: 14px; }
.lang { font-weight: 600; text-decoration: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 12px; color: var(--ink-2); }
.phone { font-weight: 600; color: var(--laurel); text-decoration: none; white-space: nowrap; }
.menu-btn { display: none; margin-left: auto; width: 48px; height: 48px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: var(--laurel); margin: 0 auto; position: relative; transition: transform .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.menu-btn[aria-expanded="true"] .bars { background: transparent; }
.menu-btn[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1020px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 24px 20px; max-height: calc(100vh - 76px); overflow: auto; }
  .nav.open { display: flex; }
  .nav-top { flex-direction: column; align-items: stretch; }
  .nav-top > li > a, .sub-btn { width: 100%; text-align: left; padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .sub { position: static; display: none; box-shadow: none; border: 0; padding: 4px 0 8px 12px; }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { display: none; }
  .sub-btn[aria-expanded="true"] + .sub { display: block; }
  .nav-aux { padding-top: 14px; }
}

/* hero */
.hero { padding: 56px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); line-height: .98; letter-spacing: -0.03em; }
.hero h1 span { display: block; }
.hero .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 34ch; margin: 24px 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 540px; justify-self: end; width: 100%; }
.ring { position: absolute; inset: 6%; border-radius: 50%; padding: 14px; background: var(--leaf); }
.ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 6px solid #fff; }
.dot { position: absolute; width: 27%; aspect-ratio: 1; border-radius: 50%; border: 6px solid #fff; overflow: hidden; box-shadow: 0 10px 30px -10px rgba(44,71,8,.45); }
.dot img { width: 100%; height: 100%; object-fit: cover; }
.dot.d1 { left: -4%; bottom: 4%; }
.dot.d2 { right: -2%; top: 2%; width: 22%; }
.dot.d3 { right: 4%; bottom: -2%; width: 19%; }

/* facts */
.facts { background: var(--laurel); color: #fff; }
.facts-row { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 26px; padding-bottom: 26px; margin: 0 auto; }
.facts-row li { display: flex; align-items: baseline; gap: 12px; }
.facts-row b { font: 700 2rem/1 var(--display); color: var(--leaf); flex-shrink: 0; }
.facts-row span { font-size: .95rem; line-height: 1.3; color: #e7eed6; }

/* paths */
.paths { padding: 80px 0 40px; }
.paths-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.path { position: relative; padding: 36px 36px 30px; border-radius: 32px; background: var(--leaf-soft); }
.path-school { background: var(--gold-soft); }
.path .circle-ph { width: 132px; height: 132px; margin: 0 0 22px; }
.path h2 small { font: 500 1rem var(--text); color: var(--ink-2); margin-left: 6px; }
.path > p { color: var(--ink-2); max-width: 44ch; }
.path-links { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.path-links a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: #fff; text-decoration: none; color: var(--laurel); font-weight: 500; font-size: .95rem; border: 1px solid transparent; }
.path-links a:hover { border-color: var(--green); }
.circle-ph { border-radius: 50%; overflow: hidden; border: 5px solid #fff; box-shadow: 0 0 0 3px var(--leaf); }
.circle-ph img { width: 100%; height: 100%; object-fit: cover; }

/* grant */
.grant { padding: 24px 0; }
.grant-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 2px solid var(--gold); border-radius: 28px; padding: 28px 36px; max-width: calc(var(--wrap) - 48px); margin: 0 24px; }
@media (min-width: 1228px) { .grant-row { margin: 0 auto; } }
.grant h2 { margin-bottom: .3em; }
.grant p { margin: 0; color: var(--ink-2); max-width: 60ch; }

/* space */
.space { padding: 72px 0; }
.space-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 16px 56px; }
.space-grid h2 { grid-row: span 2; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.space-list { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.space-list li { padding: 18px 0; border-top: 1px solid var(--line); font-size: 1.12rem; }
.space-list li:last-child { border-bottom: 1px solid var(--line); }
.space-close { grid-column: 2; font-weight: 600; color: var(--laurel); font-size: 1.12rem; margin: 10px 0 0; }

/* studios */
.studios { padding: 0 0 80px; }
.studios-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 56px; align-items: center; }
.studios-grid p { color: var(--ink-2); margin: 0; }
.studio-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.studio-links a { display: flex; align-items: flex-end; min-height: 120px; padding: 20px; border-radius: 24px; background: var(--green); color: #fff; font: 500 1.15rem/1.2 var(--display); text-decoration: none; }
.studio-links li:nth-child(2) a { background: var(--laurel); }
.studio-links li:nth-child(3) a { background: var(--gold); color: #1f1606; }
.studio-links a:hover { filter: brightness(1.08); }

/* inner pages */
.page-head { background: var(--leaf-soft); padding: 44px 0 40px; margin-bottom: 48px; }
.crumb { margin: 0 0 10px; color: var(--ink-2); font-size: .95rem; }
.crumb a { color: var(--ink-2); }
.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: start; padding-bottom: 72px; }
.side { position: sticky; top: 100px; border-left: 3px solid var(--leaf); padding-left: 20px; }
.side-title { font: 700 1rem var(--display); color: var(--laurel); margin: 0 0 8px; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: block; padding: 6px 0; text-decoration: none; color: var(--ink); }
.side li a:hover { color: var(--green); text-decoration: underline; }
.side li a[aria-current] { color: var(--green); font-weight: 600; }
.side-social { display: flex; gap: 14px; margin-top: 14px; font-size: .95rem; }

.prose { max-width: 70ch; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin: 0 0 .45em; }
.prose li::marker { color: var(--leaf); }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0 1.5em; font-size: .97rem; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 12px; vertical-align: top; }
.prose figure.inline { margin: 8px 0 24px; }
.prose figure.inline img { border-radius: var(--r); max-height: 460px; width: auto; }

.about { padding-bottom: 72px; }
.about-block { display: grid; grid-template-columns: 1fr; gap: 40px; padding: 8px 0 40px; }
.about-block.has-img { grid-template-columns: 300px minmax(0, 1fr); align-items: center; }
.about-block.has-img.b { grid-template-columns: minmax(0, 1fr) 300px; }
.about-block.has-img.b .circle-ph { order: 2; }
.about-block .circle-ph { width: 300px; height: 300px; }
.about-block .prose { max-width: 72ch; }

.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 40px 28px; }
.person img { width: 170px; height: 170px; object-fit: cover; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 0 0 3px var(--leaf); margin-bottom: 18px; }
.person h2 { font-size: 1.15rem; margin: 0 0 4px; }
.person .role { margin: 0 0 8px; color: var(--ink-2); font-size: .95rem; line-height: 1.4; }
.person details summary { cursor: pointer; color: var(--green); font-weight: 600; list-style: none; }
.person details summary::-webkit-details-marker { display: none; }
.person details summary::after { content: " +"; }
.person details[open] summary::after { content: " −"; }
.person details p { font-size: .95rem; margin: .6em 0 0; }

.gallery { list-style: none; margin: 0; padding: 0; columns: 3 220px; column-gap: 14px; }
.gallery li { break-inside: avoid; margin-bottom: 14px; }
.gallery a { display: block; border-radius: 16px; overflow: hidden; }
.gallery img { width: 100%; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.03); }

.schedules { display: grid; gap: 40px; }
.sched h2 { font-size: 1.25rem; }
.sched table { width: 100%; border-collapse: collapse; }
.sched th { text-align: left; font-size: .85rem; color: var(--ink-2); font-weight: 500; padding: 0 12px 8px 0; }
.sched td { padding: 10px 16px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.sched td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--laurel); width: 9.5em; }

.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-bottom: 72px; }
.campus h2 { font-size: 1.2rem; }
.map { border-radius: var(--r); overflow: hidden; aspect-ratio: 4/3; background: var(--leaf-soft); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(20,28,6,.94); display: flex; align-items: center; justify-content: center; }
.lb[hidden] { display: none; }
.lb img { max-width: 92vw; max-height: 84vh; width: auto; border-radius: 10px; }
.lb button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 24px; cursor: pointer; }
.lb button:hover { background: rgba(255,255,255,.25); }
.lb .lb-close { top: 18px; right: 18px; }
.lb .lb-prev { left: 18px; top: 50%; translate: 0 -50%; }
.lb .lb-next { right: 18px; top: 50%; translate: 0 -50%; }
.lb .lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #dfe8c8; font-size: .9rem; }

/* callback form */
.callback { background: var(--laurel); color: #eef3e2; padding: 72px 0; }
.callback h2 { color: #fff; }
.cb-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start; }
.cb-intro p { max-width: 40ch; }
.cb-phone a { font: 700 1.5rem var(--display); color: var(--leaf); text-decoration: none; }
.cb-form { background: #fff; color: var(--ink); border-radius: 28px; padding: 32px; display: grid; gap: 16px; }
.fld { display: grid; gap: 6px; }
.fld span { font-size: .92rem; font-weight: 500; color: var(--ink-2); }
.fld input, .fld textarea { font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fbfcf8; color: var(--ink); width: 100%; }
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--leaf-soft); }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cb-form .btn { justify-self: start; }
.cb-status { margin: 0; font-weight: 500; }
.cb-status.ok { color: var(--green); }
.cb-status.err { color: #a3260f; }
.hp { position: absolute; left: -9999px; }

/* footer */
.site-foot { background: #1e3105; color: #cfd9b8; padding: 56px 0 28px; font-size: .95rem; }
.site-foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.1fr 1.4fr 1fr; gap: 40px; }
.foot-grid img { width: 72px; margin-bottom: 12px; background: #fff; border-radius: 50%; padding: 4px; }
.foot-name { font-weight: 600; color: #fff; }
.foot-base { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); color: #9fae82; font-size: .88rem; }

@media (max-width: 900px) {
  .hero { padding-top: 32px; }
  .hero-grid, .paths-grid, .space-grid, .studios-grid, .cb-grid, .contacts, .foot-grid { grid-template-columns: 1fr; }
  .hero-art { justify-self: center; max-width: 420px; }
  .facts-row { grid-template-columns: 1fr 1fr; }
  .space-grid h2 { grid-row: auto; }
  .space-close { grid-column: 1; }
  .studio-links { grid-template-columns: 1fr; }
  .studio-links a { min-height: 76px; }
  .with-side { grid-template-columns: 1fr; gap: 40px; }
  .side { position: static; }
  .about-block.has-img, .about-block.has-img.b { grid-template-columns: 1fr; }
  .about-block.has-img.b .circle-ph { order: 0; }
  .about-block .circle-ph { width: 220px; height: 220px; }
  .grant-row { flex-direction: column; align-items: flex-start; padding: 24px; margin: 0 16px; }
  .paths { padding-top: 48px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  body { font-size: 16px; }
  .path { padding: 26px 22px; border-radius: 24px; }
  .fld-row { grid-template-columns: 1fr; }
  .cb-form { padding: 22px; }
  .facts-row { grid-template-columns: 1fr; gap: 14px; }
  .brand-text span { display: none; }
}
.prose li > p { margin: 0; }
.prose h3 + ul, .prose h3 + p { margin-top: 0; }

/* dropdown: invisible bridge over the gap so hover is not lost on the way down,
   plus a short close delay */
@media (min-width: 1021px) {
  .sub { display: block; visibility: hidden; opacity: 0; transition: opacity .15s, visibility 0s linear .25s; }
  .sub::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub, .sub-btn[aria-expanded="true"] + .sub { visibility: visible; opacity: 1; transition-delay: 0s; }
}

/* logo wordmark + motto (per school request) */
.ymb-word { font-family: "PT Serif", Georgia, serif; font-weight: 700; letter-spacing: .02em;
  background: linear-gradient(180deg, #00442d 0%, #006b4b 55%, #00856a 100%); -webkit-background-clip: text; background-clip: text; color: #00442d; -webkit-text-fill-color: transparent; }
.brand-text b.ymb-word { font-size: 1.55rem; line-height: 1; }
.hero-brand { display: flex; align-items: center; gap: 22px; }
.hero-emblem { width: 128px; height: 128px; object-fit: contain; flex-shrink: 0; }
.hero h1.ymb-word { font-size: clamp(3.4rem, 8vw, 6.2rem); line-height: .95; letter-spacing: .03em; margin: 0; }
.hero .motto { font: 500 clamp(1.3rem, 2.4vw, 1.9rem)/1.2 var(--text); color: var(--laurel); margin: 8px 0 0; }
.facts-row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (max-width: 560px) { .hero-emblem { width: 88px; height: 88px; } .hero-brand { gap: 14px; } }
