@font-face { font-family: Ubuntu; src: url(../fonts/ubuntu-regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Ubuntu; src: url(../fonts/ubuntu-bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
/* Общие стили 01Школа. Плитки классов взяты из 01Русского. */
:root { color-scheme: dark; --brand: #0066ff; --junior: #2c8768; --r: 18px; }
* { box-sizing: border-box; }
html { background: #0b1036; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; color: #fff; font: 15px/1.5 Ubuntu, 'Helvetica Neue', Arial, sans-serif; background: transparent; }
body::before { content: ''; position: fixed; inset: 0; z-index: -3; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(150deg, #0a0f3c 0%, #141c4f 42%, #2b1a5e 74%, #6d1650 100%); }
body::after { content: ''; position: fixed; inset: -20%; z-index: -2; pointer-events: none; background: radial-gradient(34% 34% at 76% 20%, rgba(0,102,255,.6), transparent 70%), radial-gradient(30% 32% at 18% 26%, rgba(92,193,250,.26), transparent 70%), radial-gradient(34% 34% at 22% 82%, rgba(44,135,104,.42), transparent 70%), radial-gradient(32% 32% at 84% 82%, rgba(155,23,71,.58), transparent 70%); filter: blur(34px); animation: glow 24s ease-in-out infinite alternate; }
@keyframes glow { from { transform: translate3d(-4%, -3%, 0) rotate(-3deg); } to { transform: translate3d(4%, 4%, 0) rotate(4deg) scale(1.08); } }
a { color: inherit; }
:focus-visible { outline: 3px solid #5cc1fa; outline-offset: 2px; }
body { padding-top: 60px; }
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; transition: background .2s linear, box-shadow .2s linear; }
.top.scrolled, .top.open { background: rgba(12,18,62,.95); box-shadow: 0 10px 26px -14px rgba(0,0,0,.7); }
.top-nav { display: flex; align-items: center; width: 1180px; max-width: 100%; height: 60px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px)); }
.brand { display: flex; align-items: center; gap: 8px; margin-right: 18px; color: #fff; font-size: 19px; font-weight: 700; text-decoration: none; } .brand img { width: 30px; height: auto; } .brand b { color: #5cc1fa; }
.menu { display: flex; flex: 1; align-items: center; justify-content: space-between; }
.menu ul { margin: 0; padding: 0; list-style: none; }
.menu-main, .menu-projects { display: flex; align-items: center; gap: 2px; }
.menu-main > li { position: relative; }
.menu-main > li > a, .drop-btn { display: flex; align-items: center; height: 40px; padding: 0 14px; color: #fff; font: 700 13px Ubuntu, sans-serif; text-decoration: none; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; background: none; border: 0; border-radius: 10px; cursor: pointer; transition: background .12s; }
.drop-btn::after { content: ''; margin-left: 8px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.menu-main > li > a:hover, .drop-btn:hover, .drop.open .drop-btn { background: rgba(255,255,255,.16); }
.sub { position: absolute; top: 100%; left: 0; display: none; min-width: 230px; padding: 8px !important; background: #fff; border-radius: 14px; box-shadow: 0 22px 44px -14px rgba(5,10,40,.75); }
.sub.wide { min-width: 340px; }
.drop.open .sub { display: block; }
.sub a { display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; min-height: 42px; padding: 7px 12px; color: #1a2150; font-size: 14px; line-height: 1.25; text-decoration: none; border-radius: 9px; }
.sub a:hover, .sub a.on { background: #e8f0ff; } .sub small { color: #5a6383; font-size: 12px; }
.menu-projects a { display: flex; align-items: center; height: 36px; padding: 0 14px; color: #fff; font-size: 13.5px; font-weight: 700; text-decoration: none; border-radius: 18px; transition: transform .15s; }
.menu-projects a:hover { transform: translateY(-1px); } .p-math { background: linear-gradient(120deg, #27327b, #9b1747); } .p-russian { background: linear-gradient(120deg, #27307f, #087764); }
.menu-btn { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: auto; color: #fff; background: none; border: 0; cursor: pointer; }
@media (hover: hover) and (min-width: 981px) { .drop:hover .sub { display: block; } }
@media (max-width: 980px) {
  .menu-btn { display: flex; }
  .menu { position: absolute; top: 60px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; max-height: calc(100vh - 60px); padding: 8px max(12px, env(safe-area-inset-right, 0px)) 14px max(12px, env(safe-area-inset-left, 0px)); overflow-y: auto; background: rgba(12,18,62,.98); }
  .top.open .menu { display: flex; }
  .menu-main { flex-direction: column; align-items: stretch; } .menu-main > li > a, .drop-btn { width: 100%; height: 48px; font-size: 14px; }
  .sub, .sub.wide { position: static; min-width: 0; margin: 2px 0 6px; }
  .menu-projects { gap: 8px; margin-top: 8px; } .menu-projects li { flex: 1; } .menu-projects a { justify-content: center; height: 44px; }
}
main { flex: 1; }
.home { width: 1060px; max-width: 100%; margin: 0 auto; padding: 30px max(20px, env(safe-area-inset-right, 0px)) 56px max(20px, env(safe-area-inset-left, 0px)); }
.logo { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 0 0 10px; font-size: inherit; font-weight: inherit; }
.logo img { width: 112px; height: auto; filter: drop-shadow(0 10px 26px rgba(0,0,0,.4)); }
.word { font: 700 86px/1 Ubuntu, sans-serif; letter-spacing: -2px; } .word b { background: linear-gradient(120deg, #5cc1fa, #34d399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo.small .word { font-size: 56px; letter-spacing: -1px; }
.mark { display: grid; place-items: center; min-width: 76px; height: 76px; padding: 0 14px; font: 700 28px/1 Ubuntu, sans-serif; background: var(--tile); border-radius: 18px; }
.sub { max-width: 640px; margin: 0 auto 30px; text-align: center; font-size: 19px; color: #fff; }
.all { display: flex; align-items: center; justify-content: center; min-height: 54px; margin-bottom: 30px; color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; background: var(--brand); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,102,255,.35); } .all:hover { background: #1f7bff; }
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.tile { position: relative; grid-column: span 3; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 158px; padding: 22px 10px 32px; color: #fff; text-decoration: none; border-radius: var(--r); box-shadow: 0 8px 22px rgba(10,14,50,.28); transition: transform .15s; }
a.tile:hover { transform: translateY(-4px); }
a.tile.senior:hover { background: #1f7bff; } a.tile.junior:hover { background: #329673; } a.tile.exam:hover { background: linear-gradient(165deg, #f4970f, #d27502); }
.tile .count { position: absolute; top: 10px; right: 13px; font-size: 13px; }
.tile b { font-size: 50px; line-height: 1; font-weight: 700; letter-spacing: -1px; }
.tile span { font-size: 16px; }
.tile small { position: absolute; left: 8px; right: 8px; bottom: 14px; text-align: center; font-size: 13px; }
.tile.junior { background: var(--junior); } .tile.senior { background: var(--brand); }
.tile.exam { grid-column: span 6; background: linear-gradient(165deg, #ec8c08, #c76c00); }
.tile.off { background: rgba(255,255,255,.1); box-shadow: none; border: 1px solid rgba(255,255,255,.16); color: #eef1ff; }
.back { margin: 22px 0 0; text-align: center; }
.note { padding: 40px 20px; text-align: center; } .note h1 { font-size: 30px; } .btn { display: inline-block; padding: 12px 22px; color: #fff; text-decoration: none; background: var(--brand); border-radius: 10px; }
.foot { padding: 34px 20px 22px; background: rgba(6,10,40,.45); border-top: 1px solid rgba(255,255,255,.12); }
.foot-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; width: 1140px; max-width: 100%; margin: 0 auto; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.foot-col h2 { margin: 0 0 8px; font-size: 13px; letter-spacing: .4px; text-transform: uppercase; }
.foot-col a { display: flex; align-items: center; min-height: 32px; color: rgba(255,255,255,.88); font-size: 14px; line-height: 1.25; text-decoration: none; } .foot-col a:hover { color: #fff; text-decoration: underline; }
.copy { width: 1140px; max-width: 100%; margin: 22px auto 0; padding-top: 16px; font-size: 13.5px; color: rgba(255,255,255,.78); border-top: 1px solid rgba(255,255,255,.12); }
@media (max-width: 720px) { .foot-in { grid-template-columns: minmax(0, 1fr); } }
/* Неполный последний ряд классов растягивается на всю ширину. */
.tile.last-1 { grid-column: span 12; } .tile.last-2 { grid-column: span 6; } .tile.last-3 { grid-column: span 4; }
@media (max-width: 720px) {
  .tile, .tile.exam, .tile.last-1, .tile.last-2, .tile.last-3 { grid-column: span 6; }
  /* На телефоне два столбца: при нечётном числе классов последний занимает весь ряд, а ОГЭ и ЕГЭ остаются парой. */
  .tile:not(.exam):nth-last-child(3):nth-child(odd) { grid-column: span 12; }
  .tile { min-height: 136px; padding-top: 30px; } .tile b { font-size: 40px; }
  .logo { gap: 10px; } .logo img { width: 72px; } .logo.small .word { font-size: 34px; } .mark { min-width: 56px; height: 56px; font-size: 20px; } .sub { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { a.tile:hover { transform: none; } body::after { animation: none; } }

/* Subject links stay visible against the dark navigation. */
.menu-projects .p-biology { background: #176342; }
.menu-projects .p-chemistry { background: #63408e; }
.menu-projects .p-biology:hover { background: #217a50; }
.menu-projects .p-chemistry:hover { background: #78509f; }
.hero-cta .cta:focus-visible, .menu-projects a:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* Shared header accommodates four subjects and the original project navigation. */
@media(min-width:981px){.top-nav{width:1440px}.menu-main>li>a,.drop-btn{padding-inline:10px}.menu-projects a{padding-inline:12px}.brand{flex-shrink:0}}
@media(max-width:980px){.sub.wide{min-width:0}.menu-projects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.menu-projects a{white-space:nowrap}.menu-main{align-items:stretch}.menu-main>li>a,.drop-btn{width:100%}}
@media(max-width:420px){.menu-projects a{font-size:13px;padding-inline:8px}}

.menu-projects .p-english{background:linear-gradient(120deg,#c94b52,#982d46)}
.menu-projects .p-physics{background:linear-gradient(115deg,#245fc2 0%,#244b90 46%,#df7b38 100%)}
.menu-projects .p-informatics{background:linear-gradient(115deg,#07828d 0%,#087b87 65%,#485995 100%)}

.menu-projects .p-geography{background:linear-gradient(115deg,#168759 0%,#19825a 60%,#d19a24 100%)}
.menu-projects .p-german{background:linear-gradient(115deg,#8536ba 0%,#7638ab 60%,#d89520 100%)}
.menu-projects .p-social{background:linear-gradient(115deg,#4458d4,#dc367e)}

/* Subject selection lives on the home screen; the shared header stays compact. */
@media(min-width:981px){.top-nav{width:1180px;height:60px}.menu{flex-direction:row;align-items:center;justify-content:flex-end}body{padding-top:60px}}

/* Подвал: четыре колонки, первая — предметы с цветными метками. */
.foot-in { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); }
.foot-subjects { display: grid !important; grid-template-columns: 1fr 1fr; column-gap: 18px; align-content: start; }
.foot-subjects h2 { grid-column: 1 / -1; }
.foot-subjects i { flex: none; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; }
@media (max-width: 980px) { .foot-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-in { grid-template-columns: 1fr; } }
