:root {
  --ink: #241b16;
  --muted: #625e58;
  --paper: #fffdf9;
  --cream: #f6f2e9;
  --line: #e5ded2;
  --accent: #d6a66c;
  --white: #fff;
  scroll-behavior: smooth
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased
}

a {
  color: inherit;
  text-decoration: none
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px
}

.skip-link {
  position: absolute;
  z-index: 20;
  left: 1rem;
  top: -5rem;
  padding: .7rem 1rem;
  background: #fff;
  color: #111
}

.skip-link:focus {
  top: 1rem
}

.wrap {
  width: min(100% - 64px, 1240px);
  margin-inline: auto
}

.section-pad {
  padding: 112px 0
}

.eyebrow {
  margin: 0 0 26px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2em;
  line-height: 1.5
}

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  color: #fff
}

.header-inner {
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.15
}

.brand-mark {
  position: relative;
  width: 37px;
  height: 31px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 3px 3px 6px 6px
}

.brand-mark:before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: -9px;
  height: 9px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 6px 6px 0 0
}

.brand-mark span {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: currentColor;
  transform: translateX(-50%)
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 14px;
  font-weight: 700
}

.desktop-nav a {
  opacity: .82;
  transition: opacity .2s
}

.desktop-nav a:hover {
  opacity: 1
}

.mobile-nav {
  display: none
}

.hero {
  min-height: 760px;
  height: 100vh;
  max-height: 1000px;
  position: relative;
  display: flex;
  align-items: center;
  background: #21150e url('assets/hero.webp') center center/cover no-repeat;
  color: white;
  overflow: hidden
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(19, 13, 9, .82) 0%, rgba(20, 13, 9, .69) 38%, rgba(20, 13, 9, .34) 73%, rgba(20, 13, 9, .3) 100%), linear-gradient(0deg, rgba(13, 8, 5, .3), transparent 35%)
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 80px
}

.hero-eyebrow {
  color: #e9c79e
}

.hero h1 {
  font-size: clamp(56px, 6vw, 100px);
  line-height: 1.05;
  letter-spacing: -.065em;
  max-width: 900px;
  margin: 0;
  font-weight: 800
}

.hero h1 em {
  font-style: normal;
  color: #e7c498
}

.hero-lead {
  max-width: 580px;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.55;
  margin: 32px 0 38px;
  color: #f3eee8
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-width: 235px;
  gap: 40px;
  background: #fff;
  color: #241b16;
  border-radius: 999px;
  padding: 17px 21px 17px 28px;
  font-size: 15px;
  font-weight: 800;
  transition: transform .2s, background .2s
}

.primary-link:hover {
  transform: translateY(-3px);
  background: #f2dcc1
}

.primary-link span {
  font-size: 22px;
  font-weight: 400;
  line-height: 1
}

.scroll-cue {
  position: absolute;
  z-index: 1;
  bottom: 37px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center
}

.scroll-cue span {
  width: 18px;
  height: 18px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(-3px, -3px)
}

.intro {
  background: var(--paper)
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12%;
  align-items: start
}

.intro .eyebrow,
.subjects .eyebrow,
.approach .eyebrow {
  color: #996b3f
}

.intro h2,
.subjects h2,
.approach h2 {
  margin: 0;
  font-size: clamp(37px, 4vw, 62px);
  line-height: 1.11;
  letter-spacing: -.055em;
  font-weight: 800
}

.intro-copy {
  max-width: 500px;
  padding-top: 38px;
  color: #4b4641;
  font-size: 19px;
  line-height: 1.75
}

.intro-copy p {
  margin: 0 0 18px
}

.subjects {
  background: var(--cream)
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 48px
}

.section-heading .eyebrow {
  margin-bottom: 18px
}

.section-heading p:last-child {
  max-width: 260px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 4px
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px
}

.subject-card {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  border: 1px solid rgba(36, 27, 22, .06);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s
}

.subject-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 42px rgba(32, 25, 20, .12)
}

.chemistry {
  background: #ead8c8
}

.biology {
  background: #d8e4d2
}

.geography {
  background: #d5e0e5
}

.card-top {
  display: flex;
  align-items: start;
  justify-content: space-between
}

.card-number {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em
}

.subject-glyph {
  font-size: 54px;
  font-weight: 800;
  letter-spacing: -.09em;
  line-height: 1;
  opacity: .22
}

.biology .subject-glyph {
  font-size: 120px;
  line-height: .4;
  font-weight: 400
}

.geography .subject-glyph {
  font-size: 76px
}

.card-kind {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em
}

.card-body h3 {
  font-size: clamp(32px, 2.6vw, 42px);
  line-height: 1.1;
  letter-spacing: -.065em;
  margin: 12px 0 13px
}

.card-body p {
  max-width: 310px;
  min-height: 78px;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #3d3935
}

.grade-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(36, 27, 22, .25);
  padding-top: 18px;
  margin-top: 29px;
  font-size: 13px;
  font-weight: 800
}

.grade-line span:last-child {
  font-weight: 600;
  color: #504d48
}

.subjects-note {
  margin: 28px 0 0;
  color: #736d65;
  font-size: 14px
}

.approach {
  background: var(--paper)
}

.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9%
}

.approach-title h2 {
  max-width: 580px
}

.approach-list {
  border-top: 1px solid var(--line)
}

.approach-list>div {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: start;
  gap: 16px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line)
}

.approach-list span {
  font-size: 14px;
  color: #ae7b47;
  font-weight: 800
}

.approach-list p {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45
}

.site-footer {
  background: #211b17;
  color: white;
  padding: 48px 0
}

.footer-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px
}

.footer-inner strong {
  font-size: 19px
}

.footer-inner p {
  margin: 8px 0 0;
  color: #bcb2a8;
  font-size: 14px
}

.footer-inner a {
  color: #e7c498;
  font-size: 14px;
  font-weight: 700
}

.subject-action,
.subject-soon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  margin-top: 21px;
  padding: 9px 14px;
  border: 1px solid rgba(36, 27, 22, .32);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3
}

.subject-action {
  background: #241b16;
  color: #fff;
  transition: transform .2s, background .2s
}

.subject-action:hover {
  background: #463124;
  transform: translateY(-2px)
}

.subject-action span {
  font-size: 19px;
  font-weight: 400
}

.subject-soon {
  width: max-content;
  min-width: 104px;
  justify-content: center;
  border-color: rgba(36, 27, 22, .22);
  background: rgba(255, 255, 255, .35);
  color: #655a52
}

@media(max-width:900px) {
  .subject-grid {
    grid-template-columns: 1fr 1fr
  }

  .intro-grid,
  .approach-grid {
    gap: 6%
  }
}

@media(max-width:700px) {
  .wrap {
    width: min(100% - 36px, 1240px)
  }

  .section-pad {
    padding: 72px 0
  }

  .header-inner {
    height: 82px
  }

  .brand {
    font-size: 13px
  }

  .brand-mark {
    transform: scale(.85);
    transform-origin: left center;
    margin-right: -3px
  }

  .desktop-nav {
    display: none
  }

  .mobile-nav {
    display: block;
    position: relative
  }

  .mobile-nav summary {
    list-style: none;
    display: flex;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    cursor: pointer
  }

  .mobile-nav summary::-webkit-details-marker {
    display: none
  }

  .mobile-nav summary span {
    display: block;
    width: 16px;
    height: 1.5px;
    background: #fff
  }

  .mobile-nav nav {
    position: absolute;
    right: 0;
    top: 53px;
    min-width: 210px;
    padding: 10px;
    background: #fff;
    color: var(--ink);
    border-radius: 12px;
    box-shadow: 0 12px 30px #0003;
    display: flex;
    flex-direction: column
  }

  .mobile-nav nav a {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 700
  }

  .hero {
    min-height: 660px;
    height: 91svh;
    max-height: none;
    background-position: 62% center
  }

  .hero-shade {
    background: linear-gradient(90deg, rgba(19, 13, 9, .82), rgba(19, 13, 9, .48)), linear-gradient(0deg, rgba(13, 8, 5, .42), transparent 48%)
  }

  .hero-content {
    padding-top: 35px
  }

  .hero-eyebrow {
    font-size: 11px;
    letter-spacing: .16em;
    margin-bottom: 22px
  }

  .hero h1 {
    font-size: clamp(43px, 10.6vw, 66px);
    line-height: 1.08
  }

  .hero-lead {
    font-size: 17px;
    margin: 24px 0 30px
  }

  .scroll-cue {
    bottom: 20px
  }

  .intro-grid,
  .approach-grid {
    grid-template-columns: 1fr;
    gap: 20px
  }

  .intro-copy {
    padding-top: 0;
    font-size: 17px
  }

  .section-heading {
    display: block;
    margin-bottom: 30px
  }

  .section-heading p:last-child {
    margin-top: 16px;
    max-width: 100%
  }

  .subject-grid {
    grid-template-columns: 1fr;
    gap: 14px
  }

  .subject-card,
  .subject-card:last-child {
    grid-column: auto;
    min-height: 390px;
    padding: 24px
  }

  .subject-card .card-body p {
    min-height: 0
  }

  .subject-glyph {
    font-size: 56px
  }

  .biology .subject-glyph {
    font-size: 95px
  }

  .grade-line {
    margin-top: 22px
  }

  .approach-list p {
    font-size: 17px
  }

  .footer-inner {
    align-items: start;
    flex-direction: column;
    gap: 26px
  }
}

@media(prefers-reduced-motion:reduce) {
  :root {
    scroll-behavior: auto
  }

  .subject-card,
  .primary-link {
    transition: none
  }
}

/* Восемь предметов: цвета карточек и сетка */
.math {
  background: #e6dfcf
}

.russian {
  background: #efd9d3
}

.physics {
  background: #d9dcea
}

.informatics {
  background: #dde3d9
}

.astronomy {
  background: #d6d3e2
}

.subject-card .subject-glyph {
  font-size: 46px;
  line-height: 1
}

.biology .subject-glyph {
  font-size: 84px;
  line-height: .5
}

@media(max-width:1180px) {
  .subject-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }
}

@media(max-width:900px) {
  .subject-grid {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:700px) {
  .subject-grid {
    grid-template-columns: 1fr
  }

  .subject-card {
    min-height: 340px
  }
}

.resume-card {
  display: flex;
  align-items: center;
  gap: 14px 24px;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  margin-top: 30px;
  padding: 14px 16px 14px 20px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 14px;
  background: rgba(20, 15, 11, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff
}

.resume-text p {
  margin: 0
}

.resume-eyebrow {
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase
}

.resume-title {
  margin-top: 3px !important;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.3
}

.resume-meta {
  color: rgba(255, 255, 255, .72);
  font-size: 13px
}

.resume-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 30px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap
}

.resume-button:hover {
  background: var(--cream)
}
