@font-face {
  font-family: Nunito;
  src: url("./assets/fonts/Nunito-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: Neucha;
  src: url("./assets/fonts/Neucha.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  --navy: #213b56;
  --navy-deep: #172f48;
  --ink: #23384d;
  --paper: #fffdf8;
  --cream: #f5efe4;
  --gold: #f3c66d;
  --red: #a63132;
  --line: #d8d5cd;
  color: var(--ink);
  font-family: Nunito, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { min-width: 0; margin: 0; background: var(--navy); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 20; padding: 10px 16px; background: var(--paper); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.shell-wrap { width: min(100% - 72px, 1340px); margin-inline: auto; }
.sub-night { position: relative; isolation: isolate; color: white; background: radial-gradient(circle at 82% 11%, rgba(105,154,197,.17), transparent 26%), var(--navy); overflow: hidden; }
.sub-night::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35; background-image: radial-gradient(#8fb8db 1px, transparent 1.4px); background-size: 78px 86px; }
.sub-header { position: relative; z-index: 10; min-height: 104px; display: flex; align-items: center; gap: 28px; }
.sub-brand { flex: none; display: flex; align-items: center; gap: 12px; font: 36px/1 Neucha, cursive; }
.sub-brand > span:first-child { color: var(--gold); font: 38px/1 Nunito, sans-serif; }
.sub-brand small { display: block; padding-top: 3px; font: 800 12px/1 Nunito, sans-serif; }
.sub-nav { flex: 1; display: flex; justify-content: center; align-items: center; gap: clamp(15px, 2vw, 28px); }
.sub-nav a, .sub-header-link { font-size: 15px; font-weight: 900; white-space: nowrap; }
.sub-nav a:hover, .sub-header-link:hover, .sub-footer nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.sub-nav a[aria-current="page"], .sub-header-link[aria-current="page"] { color: var(--gold); }
.sub-header-link { padding: 12px 18px; border: 1.5px solid rgba(255,255,255,.85); border-radius: 100px; }
.sub-mobile-nav { display: none; }
.sub-hero { padding: 34px 0 82px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: #e8edf2; font-size: 15px; font-weight: 800; }
.breadcrumbs a { text-decoration: underline; text-underline-offset: 4px; }
.breadcrumbs span[aria-current="page"] { color: var(--gold); }
.sub-hero-content { min-height: 245px; display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.hero-type { color: #f3d396; font-size: 16px; font-weight: 900; }
.sub-hero h1 { max-width: 950px; margin-top: 10px; font: 400 clamp(55px, 6vw, 92px)/1.05 Neucha, cursive; }
.sub-hero img { width: 120px; height: 230px; object-fit: contain; object-position: bottom; align-self: end; }
.sub-wave { height: 32px; background: var(--red); border-top: 8px solid #e9daca; }
.sub-paper { position: relative; width: min(100% - 66px, 1360px); margin: -10px auto 0; background: var(--paper); border-radius: 70px 8px 6px 6px / 34px 8px 6px 6px; box-shadow: 20px 27px 0 rgba(10,27,43,.18), 0 12px 45px rgba(11,28,45,.18); overflow: hidden; }
.sub-paper::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .28; background-image: radial-gradient(#cebb9b .4px, transparent .6px); background-size: 7px 7px; }
.paper-holes { position: absolute; top: 22px; right: 15%; display: flex; gap: 40px; }
.paper-holes span { width: 22px; height: 22px; border-radius: 50%; background: var(--navy); box-shadow: inset 3px 3px 2px rgba(0,0,0,.24); }
.paper-inner { position: relative; width: min(100% - 140px, 1100px); min-height: 600px; margin: auto; padding: 88px 0 100px; }
.sub-section { padding: 65px 0; border-top: 1px solid var(--line); }
.sub-section:first-child { padding-top: 20px; border-top: 0; }
.sub-section h2 { margin-bottom: 30px; font: 400 clamp(43px, 4vw, 58px)/1.08 Neucha, cursive; }
.sub-section p { font-size: 18px; line-height: 1.48; }
.statement-panel { display: grid; align-content: center; gap: 24px; min-height: 240px; padding: 32px 38px; background: #eee8dc; border-radius: 16px 25px 15px 23px; box-shadow: 7px 9px 0 #d6cabb; }
.statement-panel p:last-child:not(:first-child) { font-weight: 800; }
.sub-section .large-copy { max-width: 720px; font-size: clamp(26px, 3vw, 40px); font-weight: 800; line-height: 1.23; }
.wide-statement { background: #e7e3d5; }
.split-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: stretch; }
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.sub-card { min-height: 165px; padding: 25px; background: #ede5d6; border: 1px solid #d6cab9; border-radius: 16px 24px 13px 21px; box-shadow: 5px 7px 0 rgba(35,56,77,.09); }
.sub-card:nth-child(3n+2) { background: #dce8e4; }
.sub-card:nth-child(3n) { background: #eadccf; }
.sub-card h3 { font: 400 clamp(26px, 2.7vw, 36px)/1.12 Neucha, cursive; }
.sub-card p { margin-top: 18px; }
.card-link { min-height: 112px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.card-link span { flex: none; font-size: 29px; font-weight: 700; }
.card-link:hover h3 { text-decoration: underline; text-underline-offset: 6px; }
.subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.subject-grid .sub-card { min-height: 220px; }
.subject-grid .math-tone { background: #e8dec4; }
.subject-grid .russian-tone { background: #c7d8d6; }
.blank-slot { min-height: 220px; background: #e9e5dc; border: 10px solid #fff; box-shadow: 5px 8px 0 #d3cbbf; }
.photo-slot { min-height: 300px; transform: rotate(1deg); }
.text-slot { min-height: 170px; }
.profile-shell { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 30px; align-items: center; }
.portrait-slot { min-height: 370px; }
.profile-content .blank-slot { background: transparent; border: 0; box-shadow: none; }
.route-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; }
.route-chain span { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 10px 17px; background: #e8dec4; border: 1px solid #d7c7a6; border-radius: 13px; font-size: 16px; font-weight: 900; }
.route-chain span:not(:last-child)::after { content: "→"; margin-left: 16px; color: var(--red); }
.roles-chain span:not(:last-child)::after { content: none; }
.program-stage { min-height: 295px; display: grid; place-items: center; padding: 35px; background: #e8dec4; border-radius: 18px 28px 13px 23px; box-shadow: 7px 9px 0 #c5bba7; }
.program-stage-art { position: relative; width: 255px; height: 205px; }
.program-stage-art span { position: absolute; display: block; width: 140px; height: 150px; background: #f4ebd9; box-shadow: 4px 7px 0 rgba(33,59,86,.16); transform: rotate(-11deg); }
.program-stage-art span:nth-child(2) { top: 20px; left: 55px; background: #a8c1b5; transform: rotate(9deg); }
.program-stage-art span:nth-child(3) { top: 44px; left: 100px; background: #e6ad78; transform: rotate(-2deg); }
.document-register { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.register-head { display: grid; grid-template-columns: 1fr 170px 170px; gap: 20px; padding: 17px 22px; background: #e8dec4; font-size: 17px; font-weight: 900; }
.register-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 170px; gap: 20px; padding: 17px 22px; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.4; }
.register-row span { min-width: 0; overflow-wrap: anywhere; }
.register-row a { color: #174b78; text-decoration: underline; text-underline-offset: 3px; font-weight: 900; }
.register-empty { padding: 35px 22px; color: #657482; }
.contact-list { max-width: 760px; }
.contact-list > div { display: grid; grid-template-columns: 160px 1fr; align-items: center; min-height: 64px; gap: 20px; border-bottom: 1px solid var(--line); font-size: 19px; }
.contact-list strong { font-weight: 900; }
.unfilled { display: block; width: 60%; height: 3px; background: var(--line); }
.paper-edge { height: 54px; background: var(--red); }
.sub-footer { padding: 45px 0 65px; color: #f1f5f8; }
.footer-grid { display: grid; grid-template-columns: 1.25fr 2fr 1fr; gap: 35px; }
.footer-name { display: grid; align-content: start; gap: 10px; }
.footer-name a { font: 400 37px/1 Neucha, cursive; }
.footer-name span { font-size: 15px; font-weight: 800; }
.sub-footer nav { display: flex; flex-wrap: wrap; align-content: start; gap: 10px 22px; }
.sub-footer nav a { font-size: 15px; font-weight: 800; }
@media (max-width: 1150px) {
  .sub-nav { gap: 13px; }
  .sub-nav a, .sub-header-link { font-size: 13px; }
  .paper-inner { width: min(100% - 90px, 1100px); }
}
@media (max-width: 1100px) {
  .sub-night { overflow: visible; }
  .sub-night:has(.sub-mobile-nav[open]) { z-index: 20; }
  .sub-nav, .sub-header-link { display: none; }
  .sub-header { justify-content: space-between; min-height: 85px; }
  .sub-mobile-nav { display: block; position: relative; }
  .sub-mobile-nav summary { display: grid; place-items: center; width: 50px; height: 50px; cursor: pointer; list-style: none; font-size: 28px; border: 1.5px solid white; border-radius: 50%; }
  .sub-mobile-nav summary::-webkit-details-marker { display: none; }
  .sub-mobile-nav nav { position: absolute; right: 0; top: 62px; z-index: 9; width: min(320px, calc(100vw - 36px)); max-height: calc(100vh - 90px); overflow-y: auto; display: grid; padding: 14px; color: var(--ink); background: var(--paper); border-radius: 15px; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
  .sub-mobile-nav nav a { padding: 10px 12px; font-size: 17px; font-weight: 800; }
  .sub-mobile-nav nav a[aria-current="page"] { background: #f3e7c9; border-radius: 8px; }
  .sub-hero { padding-bottom: 50px; }
  .sub-hero-content { min-height: 200px; }
  .sub-hero img { height: 180px; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 2fr; }
  .footer-grid nav:last-child { grid-column: 2; }
}
@media (max-width: 680px) {
  .shell-wrap { width: min(100% - 32px, 1340px); }
  .sub-brand { font-size: 31px; }
  .sub-brand > span:first-child { font-size: 31px; }
  .sub-hero { padding: 20px 0 43px; }
  .sub-hero-content { min-height: 164px; }
  .sub-hero h1 { font-size: clamp(48px, 11vw, 72px); }
  .sub-hero img { width: 76px; height: 140px; }
  .hero-type { font-size: 14px; }
  .sub-paper { width: calc(100% - 24px); border-radius: 48px 7px 5px 5px / 26px 7px 5px 5px; }
  .paper-holes { right: 14%; gap: 20px; top: 15px; }
  .paper-holes span { width: 16px; height: 16px; }
  .paper-inner { width: calc(100% - 38px); padding: 78px 0 60px; }
  .sub-section { padding: 42px 0; }
  .sub-section:first-child { padding-top: 8px; }
  .sub-section h2 { font-size: 43px; margin-bottom: 21px; }
  .split-grid, .cards-grid, .subject-grid, .profile-shell { grid-template-columns: 1fr; }
  .sub-card, .subject-grid .sub-card { min-height: 132px; }
  .card-link { min-height: 78px; }
  .statement-panel { padding: 28px; }
  .photo-slot { min-height: 240px; }
  .portrait-slot { min-height: 290px; }
  .program-stage { min-height: 180px; padding: 25px; }
  .program-stage-art { width: 170px; height: 125px; transform: scale(.62); transform-origin: center; }
  .register-head { grid-template-columns: 1fr 95px 50px; gap: 8px; padding: 14px 12px; font-size: 15px; }
  .register-row { grid-template-columns: minmax(0, 1fr) 95px 50px; gap: 8px; padding: 14px 12px; font-size: 14px; }
  .register-empty { padding: 25px 12px; }
  .contact-list > div { grid-template-columns: 110px 1fr; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid nav:last-child { grid-column: auto; }
}
@media (max-width: 340px) {
  .sub-hero h1 { max-width: 100%; font-size: 42px; }
  .sub-hero img { display: none; }
}
@media (min-width: 1700px) and (min-height: 900px) {
  .sub-header { min-height: 115px; }
  .sub-nav a, .sub-header-link { font-size: 18px; }
  .sub-hero h1 { font-size: 105px; }
  .sub-section p { font-size: 21px; }
  .sub-card h3 { font-size: 40px; }
}
