:root {
  --ink: #0b1f33;
  --ink-soft: #475569;
  --blue: #0b5f9f;
  --blue-bright: #0ea5e9;
  --navy: #062a42;
  --red: #d93535;
  --vk: #1474db;
  --header-height: 82px;
  --header-offset: 83px;
  --ice: #edf7fb;
  --line: #dbe7ee;
  --white: #fff;
  --radius: 1.5rem;
  --shadow: 0 20px 60px rgba(7, 42, 66, .12);
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-offset) + 8px); }
body {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
/* Keep the underlying page still without losing the current scroll position. */
html.menu-open { overflow: hidden; scroll-behavior: auto; }
body.menu-open {
  position: fixed; top: var(--menu-scroll-top, 0px); left: 0; right: 0;
  overflow: hidden; padding-right: var(--menu-scrollbar-gap, 0px);
}
.menu-open .site-header { padding-right: var(--menu-scrollbar-gap, 0px); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
address { font-style: normal; }

:where(.split-heading, .compact-heading, .mission-grid, .project-feature, .summer-grid, .events-grid, .news-panel, .contacts-grid, .contact-item, .footer-inner) > * { min-width: 0; }

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.section { padding: clamp(5rem, 9vw, 8rem) 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 1000; top: 8px; left: 8px; padding: .75rem 1rem;
  background: #fff; color: var(--navy); border-radius: .5rem; transform: translateY(-140%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed; z-index: 100; top: 0; left: 0; width: 100%;
  background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(219,231,238,.75);
  backdrop-filter: blur(14px); transition: box-shadow .25s ease, background .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 30px rgba(7,42,66,.1); }
.header-inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: block; width: 200px; flex: 0 0 auto; }
.brand img { width: 100%; height: auto; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(1.1rem, 2.3vw, 2.2rem); }
.site-nav > a { position: relative; font-size: .87rem; font-weight: 750; letter-spacing: .02em; }
.site-nav > a:not(.nav-vk)::after {
  content: ""; position: absolute; left: 0; bottom: -.5rem; width: 100%; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: right; transition: transform .2s ease;
}
.site-nav > a:hover::after, .site-nav > a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.nav-vk {
  width: 2.375rem; height: 2.375rem; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%;
  color: white; background: var(--vk); font-size: .72rem !important; letter-spacing: -.03em !important;
}
.menu-toggle { display: none; width: 46px; height: 46px; border: 0; background: transparent; cursor: pointer; }
.menu-toggle > span:not(.sr-only) { display: block; width: 24px; height: 2px; margin: 5px auto; background: var(--ink); transition: .2s ease; }

.hero { position: relative; min-height: min(900px, 100svh); display: flex; align-items: center; overflow: hidden; color: white; }
.hero-media, .hero-shade { position: absolute; inset: 0; }
.hero-media {
  background: url("assets/hero.webp") center 42% / cover no-repeat;
  transform: scale(1.01);
}
.hero-shade {
  background:
    linear-gradient(90deg, rgba(3,25,41,.93) 0%, rgba(3,25,41,.76) 38%, rgba(3,25,41,.15) 74%, rgba(3,25,41,.08) 100%),
    linear-gradient(0deg, rgba(3,25,41,.46), transparent 45%);
}
.hero-content { position: relative; z-index: 2; padding-top: 80px; }
.eyebrow { margin: 0 0 1.1rem; color: var(--blue); font-size: .77rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.light { color: #78d4ff; }
.hero h1, .section-heading h2, .contact-title h2, .news-copy h2 {
  margin: 0; letter-spacing: .008em; line-height: .98; text-wrap: balance;
}
.hero h1 { max-width: 780px; font-size: clamp(3.7rem, 8.2vw, 7.3rem); font-weight: 870; }
.hero h1 span { color: #75d0f5; }
.hero-lead { max-width: 650px; margin: 2rem 0 0; color: rgba(255,255,255,.84); font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.25rem; }
.button {
  min-height: 52px; padding: .88rem 1.45rem; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  border: 1px solid transparent; border-radius: 999px; font-size: .9rem; font-weight: 820; transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--red); color: white; box-shadow: 0 14px 30px rgba(240,68,68,.26); }
.button-primary:hover { background: #bf2525; }
.button-ghost { border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.08); color: white; backdrop-filter: blur(8px); }
.button-ghost:hover { background: rgba(255,255,255,.16); }
.hero-scroll {
  position: absolute; z-index: 3; left: 50%; bottom: 1.8rem; display: flex; flex-direction: column; align-items: center; gap: .35rem;
  color: rgba(255,255,255,.7); font-size: .68rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; transform: translateX(-50%);
}
.hero-scroll svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(5px) } }

.section-heading h2, .contact-title h2, .news-copy h2 { font-size: clamp(2.45rem, 5.3vw, 4.6rem); font-weight: 820; }
.split-heading { display: grid; grid-template-columns: 1.05fr .75fr; gap: clamp(3rem, 8vw, 8rem); align-items: end; margin-bottom: 4.5rem; }
.intro-copy { color: var(--ink-soft); font-size: 1.05rem; }
.intro-copy p { margin: 0; }
.intro-copy p + p { margin-top: 1rem; }
.mission-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.mission-card { position: relative; min-height: 330px; padding: 2rem 1.6rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: transform .25s ease, box-shadow .25s ease; }
.mission-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.mission-number { position: absolute; top: 1.2rem; right: 1.4rem; color: #627583; font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.mission-card svg { width: 56px; height: 56px; margin: 3rem 0 3.2rem; fill: none; stroke: var(--blue); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.mission-card h3 { margin: 0 0 .75rem; font-size: 1.25rem; letter-spacing: .012em; }
.mission-card p { margin: 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.6; }
.mission-card.accent-card { color: white; border-color: var(--blue); background: var(--blue); }
.mission-card.accent-card svg { stroke: white; }
.mission-card.accent-card p, .mission-card.accent-card .mission-number { color: rgba(255,255,255,.82); }

.section-projects { background: var(--ice); }
.compact-heading { display: grid; grid-template-columns: 1fr .72fr; gap: 5rem; align-items: end; margin-bottom: 3rem; }
.compact-heading > p { max-width: 540px; margin: 0; color: var(--ink-soft); font-size: 1.05rem; }
.project-feature { display: grid; grid-template-columns: 1.12fr .88fr; min-height: 590px; overflow: hidden; border-radius: calc(var(--radius) + .3rem); background: white; box-shadow: var(--shadow); }
.project-photo { position: relative; min-height: 520px; }
.project-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-label { position: absolute; left: 1.4rem; bottom: 1.4rem; padding: .55rem .9rem; border-radius: 999px; color: white; background: rgba(6,42,66,.82); backdrop-filter: blur(8px); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.project-content { padding: clamp(2.2rem, 4.5vw, 4.6rem); align-self: center; }
.project-season, .card-kicker, .event-meta span { color: var(--blue); font-size: .72rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.project-content h3 { margin: .65rem 0 1.35rem; font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.05; letter-spacing: .006em; }
.project-content > p { margin: 0 0 1rem; color: var(--ink-soft); }
.project-fact { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; margin: 1.8rem 0; padding: 1.25rem 0; border-block: 1px solid var(--line); }
.project-fact strong { color: var(--red); font-size: 1.2rem; white-space: nowrap; }
.project-fact span { color: var(--ink-soft); font-size: .86rem; line-height: 1.45; }
.text-link { display: inline-flex; gap: .5rem; color: var(--blue); font-size: .9rem; font-weight: 800; }
.text-link:hover { text-decoration: underline; text-underline-offset: .25rem; }
.summer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.summer-card { position: relative; min-height: 310px; padding: clamp(2rem,4vw,3rem); overflow: hidden; border-radius: var(--radius); }
.summer-card h3 { max-width: 480px; margin: .75rem 0 1rem; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.1; letter-spacing: .008em; }
.summer-card p { position: relative; z-index: 2; max-width: 480px; margin: 0; }
.summer-card svg { position: absolute; right: 2rem; bottom: 1.5rem; width: 110px; height: 110px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.3; opacity: .18; }
.blue-card { color: white; background: var(--blue); }
.blue-card .card-kicker { color: #b8e5ff; }
.blue-card p { color: rgba(255,255,255,.82); }
.pale-card { border: 1px solid var(--line); background: white; }
.pale-card p { color: var(--ink-soft); }

.section-events { color: white; background: var(--navy); }
.events-heading { align-items: end; }
.events-heading > p { max-width: 430px; margin: 0 0 .4rem; color: rgba(255,255,255,.66); font-size: 1.05rem; }
.events-grid { display: grid; grid-template-columns: 1.14fr .86fr; gap: 1rem; }
.event-card { overflow: hidden; color: var(--ink); background: white; border-radius: var(--radius); }
.event-card-large { grid-row: span 2; }
.event-image { aspect-ratio: 16/8.5; overflow: hidden; background: #dbe7ee; }
.event-card-large .event-image { aspect-ratio: 16/11.25; }
.event-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.event-card:hover .event-image img { transform: scale(1.035); }
.event-body { padding: clamp(1.5rem, 3vw, 2.5rem); }
.event-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: #647480; font-size: .76rem; }
.event-card h3 { margin: .9rem 0 .7rem; font-size: clamp(1.45rem, 2.8vw, 2.4rem); line-height: 1.13; letter-spacing: .008em; }
.event-card:not(.event-card-large) h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
.event-card p { margin: 0; color: var(--ink-soft); font-size: .94rem; }

.section-news { padding-block: clamp(4rem, 8vw, 6.5rem); background: #f7fafc; }
.news-panel { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.news-icon { width: clamp(80px, 10vw, 120px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 28%; color: white; background: #2787f5; font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 900; letter-spacing: -.07em; box-shadow: 0 16px 36px rgba(39,135,245,.25); }
.news-copy .eyebrow { margin-bottom: .7rem; }
.news-copy h2 { font-size: clamp(2rem,4.2vw,3.5rem); }
.news-copy > p:last-child { max-width: 680px; margin: 1rem 0 0; color: var(--ink-soft); }
.button-vk { color: white; background: var(--vk); }
.button-vk:hover, .nav-vk:hover { background: #0964c4; }

.section-contacts { color: white; background: #0b5f9f; }
.section-contacts .eyebrow.light { color: #b8e5ff; }
.contacts-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(4rem, 9vw, 9rem); }
.contact-title > p:last-child { max-width: 460px; color: rgba(255,255,255,.82); font-size: 1.05rem; }
.contact-list { border-top: 1px solid rgba(255,255,255,.25); }
.contact-item { display: grid; grid-template-columns: 150px 1fr; gap: .4rem 2rem; padding: 1.55rem 0; border-bottom: 1px solid rgba(255,255,255,.25); }
.contact-item > span:first-child { grid-row: 1 / span 2; color: #b8e5ff; font-size: .72rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.contact-item a, .contact-item address { font-size: clamp(1.15rem, 2.2vw, 1.55rem); font-weight: 720; line-height: 1.4; }
.contact-item a:hover { text-decoration: underline; text-underline-offset: .3rem; }

.site-footer { padding: 2.2rem 0; color: rgba(255,255,255,.62); background: #041f33; font-size: .8rem; }
.footer-inner { display: grid; grid-template-columns: 260px 1fr auto; align-items: center; gap: 2rem; }
.footer-inner img { width: 250px; height: auto; }
.footer-inner p { text-align: center; }
.footer-inner > a { font-weight: 800; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; box-shadow: 0 0 0 3px #fff; }

@media (max-width: 980px) {
  /* Without JavaScript, navigation stays visible in normal page flow. */
  html:not(.nav-ready) { scroll-padding-top: 1rem; }
  html:not(.nav-ready) .site-header { position: relative; }
  html:not(.nav-ready) .header-inner { flex-wrap: wrap; gap: .75rem; padding-block: .5rem; }
  html:not(.nav-ready) .site-nav { flex-basis: 100%; gap: .5rem 1rem; padding-bottom: .4rem; }
  html:not(.nav-ready) .site-nav > a { min-height: 44px; display: inline-flex; align-items: center; }

  .nav-ready .menu-toggle { display: block; position: relative; z-index: 102; flex: 0 0 auto; }
  .menu-toggle[aria-expanded="true"] > span:nth-child(2) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] > span:nth-child(3) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] > span:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }
  .nav-ready .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 101;
    height: max(0px, calc(100vh - var(--header-offset)));
    height: max(0px, calc(100dvh - var(--header-offset)));
    padding: clamp(1rem, 4vh, 2.5rem) max(2rem, calc((100vw - var(--container)) / 2)) max(1.5rem, env(safe-area-inset-bottom));
    display: flex; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: .9rem;
    overflow-y: auto; overscroll-behavior-y: contain;
    background: #fff; visibility: hidden; opacity: 0; transform: translateY(-12px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  }
  .nav-ready .site-nav.is-open { visibility: visible; opacity: 1; transform: translateY(0); }
  .nav-ready .site-nav > a { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; font-size: clamp(1.5rem, 7vw, 2.5rem); line-height: 1.25; }
  .nav-ready .site-nav .nav-vk { width: auto; height: auto; margin-top: 1rem; padding: .6rem 1.2rem; border-radius: 999px; font-size: 1rem !important; }
  .split-heading, .compact-heading { grid-template-columns: 1fr; gap: 2rem; }
  .mission-grid { grid-template-columns: 1fr 1fr; }
  .mission-card { min-height: 300px; }
  .project-feature { grid-template-columns: 1fr; }
  .project-photo { min-height: 480px; }
  .events-grid { grid-template-columns: 1fr 1fr; }
  .event-card-large { grid-column: span 2; grid-row: auto; }
  .event-card-large .event-image { aspect-ratio: 16/8; }
  .news-panel { grid-template-columns: auto 1fr; }
  .button-vk { grid-column: 2; justify-self: start; }
  .contacts-grid { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  :root { --header-height: 72px; --header-offset: 73px; }
  .brand { width: 175px; }
  .hero { min-height: 760px; }
  .hero-content { padding-top: 60px; }
  .hero h1 { font-size: clamp(2.6rem, 15vw, 5.1rem); }
  .hero-lead { font-size: 1rem; }
  .hero-actions { align-items: stretch; flex-direction: column; max-width: 360px; }
  .hero-media { background-position: 58% center; }
  .hero-shade { background: linear-gradient(90deg, rgba(3,25,41,.92), rgba(3,25,41,.55)), linear-gradient(0deg, rgba(3,25,41,.5), transparent); }
  .hero-scroll { display: none; }
  .section { padding-block: 4.5rem; }
  .split-heading { margin-bottom: 2.8rem; }
  .mission-grid, .summer-grid, .events-grid { grid-template-columns: 1fr; }
  .mission-card { min-height: 280px; }
  .mission-card svg { margin-bottom: 2.2rem; }
  .project-photo { min-height: 340px; }
  .project-fact { grid-template-columns: 1fr; gap: .25rem; }
  .project-fact strong { white-space: normal; }
  .event-card-large { grid-column: auto; }
  .event-card-large .event-image, .event-image { aspect-ratio: 16/10; }
  .news-panel { grid-template-columns: 1fr; text-align: center; }
  .news-icon { margin-inline: auto; }
  .button-vk { grid-column: auto; justify-self: stretch; }
  .contact-item { grid-template-columns: 1fr; gap: .5rem; }
  .contact-item > span:first-child { grid-row: auto; margin-bottom: .3rem; }
  .footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: .8rem; }
  .footer-inner p { margin: .6rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* A short landscape viewport must not put the first heading under the fixed header. */
@media (min-width: 681px) and (max-height: 600px) {
  .hero-content { padding-top: calc(var(--header-offset) + 2rem); padding-bottom: 3rem; }
  .hero-scroll { display: none; }
}
