/* ==========================================================================
   Сайт учителя-логопеда Ирины Курочкиной
   Палитра: горчичный + жёлтый + белый + бежевый
   ========================================================================== */

:root {
  --paper: #fdfbf6;
  --white: #ffffff;
  --beige: #f5eee1;
  --beige-deep: #ebdfcb;
  --sand: #d9c7a8;
  --mustard: #c99a1d;
  --mustard-deep: #8f6708;
  --yellow: #f2c230;
  --yellow-soft: #fbe7a6;
  --yellow-pale: #fdf4d6;
  --ink: #2a241c;
  --ink-2: #5e5547;
  --line: rgba(42, 36, 28, 0.12);

  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --r-xl: 44px;

  --shadow-sm: 0 2px 10px rgba(96, 72, 20, 0.06);
  --shadow-md: 0 14px 40px rgba(96, 72, 20, 0.1);
  --shadow-lg: 0 30px 70px rgba(96, 72, 20, 0.16);

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --header-h: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--mustard);
  outline-offset: 3px;
  border-radius: 8px;
}

::selection {
  background: var(--yellow-soft);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Типографика ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3.1rem, 8.2vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
}

.h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  line-height: 1.15;
}

.accent {
  font-style: italic;
  font-weight: 500;
  color: var(--mustard-deep);
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.muted {
  color: var(--ink-2);
}

.small {
  font-size: 0.9rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mustard-deep);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--yellow);
}

.prose p + p {
  margin-top: 1em;
}

/* ---------- Кнопки и чипы ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s, border-color 0.2s;
}

.btn svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.btn--primary {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(201, 154, 29, 0.32);
}

.btn--primary:hover {
  background: #eab520;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(201, 154, 29, 0.4);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--mustard);
  background: var(--yellow-pale);
}

.btn--light {
  background: var(--white);
  color: var(--ink);
}

.btn--light:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--sm {
  min-height: 42px;
  padding: 8px 18px;
  font-size: 0.9rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--yellow-pale);
  border: 1px solid rgba(201, 154, 29, 0.28);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
  color: #6b4e06;
}

.chip {
  width: fit-content;
  justify-self: start;
}

.chip--plain {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 251, 246, 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.header.is-stuck {
  border-color: var(--line);
  box-shadow: 0 6px 24px rgba(96, 72, 20, 0.06);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--yellow);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand__text {
  display: grid;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.brand__role {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mustard-deep);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  display: block;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  transition: background-color 0.2s, color 0.2s;
}

.nav__link:hover {
  background: var(--beige);
}

.nav__link[aria-current="page"] {
  background: var(--yellow);
}

.burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
}

.burger span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s, opacity 0.2s;
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 940px) {
  .burger {
    display: flex;
  }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 8px var(--gutter) 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(96, 72, 20, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .nav__link {
    padding: 14px 18px;
    font-size: 1.05rem;
    border-radius: var(--r-sm);
    background: var(--white);
    border: 1px solid var(--line);
  }

  .nav__link[aria-current="page"] {
    border-color: transparent;
  }
}

@media (max-width: 420px) {
  .brand__role {
    letter-spacing: 0.08em;
  }
}

/* ---------- Секции ---------- */

.section {
  position: relative;
  padding-block: clamp(64px, 9vw, 120px);
}

.section--beige {
  background: var(--beige);
}

.section--white {
  background: var(--white);
}

.section--tight {
  padding-block: clamp(48px, 6vw, 80px);
}

.section__head {
  display: grid;
  gap: 16px;
  max-width: 760px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.grid-2--top {
  align-items: start;
}

@media (max-width: 860px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Декор ---------- */

.letters {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.letters span {
  position: absolute;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(201, 154, 29, 0.28);
}

.sound {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-md);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  font-style: italic;
  color: var(--mustard-deep);
}

.dots {
  background-image: radial-gradient(var(--mustard) 2.2px, transparent 2.6px);
  background-size: 18px 18px;
  opacity: 0.45;
}

/* ---------- Первый экран (главная) ---------- */

.hero {
  position: relative;
  padding-block: clamp(36px, 6vw, 72px) clamp(56px, 8vw, 104px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  right: -14%;
  top: -30%;
  width: min(820px, 76vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--yellow-soft), rgba(251, 231, 166, 0));
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.hero__text {
  display: grid;
  gap: 22px;
  justify-items: start;
}

.hero__role {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1;
  color: var(--mustard-deep);
}

.hero__lead {
  max-width: 34em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  margin-top: 18px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.stat {
  padding-right: 18px;
}

.stat + .stat {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1;
}

.stat__num small {
  font-size: 0.42em;
  font-weight: 600;
  font-style: italic;
  color: var(--mustard-deep);
  margin-left: 6px;
}

.stat__label {
  margin-top: 8px;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--ink-2);
}

.hero__visual {
  position: relative;
  justify-self: center;
  width: min(100%, 470px);
}

.hero__disc {
  position: absolute;
  left: -9%;
  bottom: -6%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--yellow);
}

.hero__dots {
  position: absolute;
  right: -8%;
  top: 7%;
  width: 34%;
  aspect-ratio: 1;
}

.hero__photo {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px var(--r-xl) var(--r-xl);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}

.hero__badge {
  position: absolute;
  left: -16%;
  top: 31%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 12px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
}

.hero__badge b {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--yellow);
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.hero__sounds {
  position: absolute;
  right: -5%;
  bottom: 9%;
  display: grid;
  gap: 10px;
}

.hero__sounds .sound:nth-child(2) {
  margin-left: 26px;
}

@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    order: -1;
    width: min(78%, 360px);
  }

  .hero__badge {
    left: -12%;
    top: auto;
    bottom: 6%;
  }

  .hero__sounds {
    right: -12%;
    bottom: 22%;
  }
}

@media (max-width: 520px) {
  .stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stat {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 0;
  }

  .stat + .stat {
    padding: 16px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .stat__num {
    flex: none;
    min-width: 96px;
  }

  .stat__label {
    margin: 0;
  }

  .hero__badge {
    padding: 8px 14px 8px 8px;
    font-size: 0.78rem;
  }

  .hero__badge b {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }

  .sound {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

/* ---------- Первый экран внутренних страниц ---------- */

.page-hero {
  position: relative;
  padding-block: clamp(36px, 5vw, 64px) 0;
  background: linear-gradient(180deg, var(--paper), var(--beige));
  overflow: hidden;
}

.page-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
}

.page-hero__text {
  display: grid;
  gap: 20px;
  justify-items: start;
  align-self: center;
  padding-bottom: clamp(40px, 6vw, 80px);
}

.page-hero__text .lead {
  max-width: 36em;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.crumbs a {
  text-decoration: none;
  border-bottom: 1px solid var(--sand);
}

.crumbs a:hover {
  color: var(--mustard-deep);
}

.figure {
  position: relative;
  justify-self: center;
  width: min(100%, 420px);
  aspect-ratio: 4 / 5;
}

.figure__shape {
  position: absolute;
  inset: 12% 4% 0;
  border-radius: 999px 999px 0 0;
  background: var(--yellow);
}

.figure__shape--soft {
  background: var(--yellow-soft);
}

.figure__shape--ring::after {
  content: "";
  position: absolute;
  inset: -16px;
  border: 1.5px dashed rgba(201, 154, 29, 0.55);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.figure__clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0 0 0 0;
}

.figure img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: auto;
  max-width: none;
  height: 100%;
  transform: translateX(-50%);
}

.figure--slim {
  width: min(100%, 360px);
  aspect-ratio: 3 / 4.3;
}

.figure--slim .figure__shape {
  inset: 16% 6% 0;
}

.figure .sound {
  position: absolute;
}

@media (max-width: 860px) {
  .page-hero__inner {
    grid-template-columns: 1fr;
  }

  .page-hero__text {
    padding-bottom: 8px;
  }

  .figure {
    width: min(74%, 330px);
  }
}

/* ---------- Блок с портретом в тексте ---------- */

.portrait {
  position: relative;
  width: min(100%, 460px);
  justify-self: center;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xl);
  background: var(--beige-deep);
  overflow: hidden;
}

.portrait::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 9%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--yellow);
  transform: translateX(-50%);
}

.portrait--white {
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.portrait--white::before {
  background: var(--yellow-soft);
}

.portrait img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: auto;
  max-width: none;
  height: 94%;
  transform: translateX(-50%);
}

/* фото, обрезанное по левому краю кадра: прижимаем к рамке */
.portrait--left img {
  left: -1%;
  height: 96%;
  transform: none;
}

/* фото, обрезанное по правому краю кадра */
.portrait--right img {
  left: auto;
  right: 0;
  height: 92%;
  transform: none;
}

/* фото в полный рост: показываем верхнюю часть */
.portrait--tall img {
  top: 6%;
  bottom: auto;
  height: 170%;
}

.portrait--arch {
  border-radius: 999px 999px var(--r-xl) var(--r-xl);
}

/* портрет на первом экране внутренней страницы */
.portrait--hero {
  align-self: end;
  width: min(100%, 400px);
  border-radius: 999px 999px 0 0;
  background: var(--yellow-soft);
}

.portrait--hero::before {
  top: 14%;
  width: 84%;
}

.portrait-wrap {
  position: relative;
  display: grid;
}

.portrait-wrap .dots {
  position: absolute;
  width: 120px;
  height: 120px;
  left: -28px;
  bottom: -28px;
  z-index: -1;
}

.portrait__note {
  position: absolute;
  right: -10px;
  bottom: 28px;
  max-width: 230px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--white);
  box-shadow: var(--shadow-md);
  font-size: 0.88rem;
  line-height: 1.4;
}

.portrait__note b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.1;
  margin-bottom: 4px;
}

@media (max-width: 520px) {
  .portrait__note {
    right: 8px;
    bottom: 12px;
    max-width: 200px;
  }
}

/* ---------- Карточки ---------- */

.cards {
  display: grid;
  gap: 18px;
}

.cards--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1020px) {
  .cards--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cards--2,
  .cards--3,
  .cards--4 {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(22px, 2.6vw, 30px);
  border-radius: var(--r-lg);
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.section--white .card,
.card--beige {
  background: var(--beige);
  border-color: transparent;
}

.card--yellow {
  background: var(--yellow-pale);
  border-color: rgba(201, 154, 29, 0.25);
}

.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.card p {
  color: var(--ink-2);
  font-size: 0.97rem;
}

.card .h3 {
  hyphens: auto;
  overflow-wrap: break-word;
}

.material .h3 {
  overflow-wrap: break-word;
}

.cards--4 .h3,
.cards--2 .h3 {
  font-size: clamp(1.3rem, 1.7vw, 1.5rem);
}

.card__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  color: var(--mustard);
}

.icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--yellow);
  color: var(--ink);
}

.icon svg {
  width: 26px;
  height: 26px;
}

.icon--soft {
  background: var(--yellow-soft);
}

/* ---------- Списки ---------- */

.ticks {
  display: grid;
  gap: 12px;
}

.ticks li {
  position: relative;
  padding-left: 36px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--yellow)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a241c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 12.5 3.2 3.2L17 9'/%3E%3C/svg%3E")
    center / 16px no-repeat;
}

.bullets {
  display: grid;
  gap: 8px;
}

.bullets li {
  position: relative;
  padding-left: 22px;
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mustard);
}

/* ---------- Опыт ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.fact {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--r-lg);
  background: var(--white);
}

.fact--accent {
  background: var(--yellow);
}

.fact__num {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 6vw, 4.8rem);
  font-weight: 600;
  line-height: 0.9;
}

.fact__num small {
  font-size: 0.34em;
  font-style: italic;
  margin-left: 8px;
}

.fact__title {
  font-weight: 700;
  line-height: 1.3;
}

.fact p {
  font-size: 0.95rem;
  color: var(--ink-2);
}

.fact--accent p {
  color: #4b3a10;
}

@media (max-width: 860px) {
  .facts {
    grid-template-columns: 1fr;
  }
}

/* ---------- Образование: лента ---------- */

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 43px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: repeating-linear-gradient(var(--sand) 0 6px, transparent 6px 12px);
}

.tl {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.tl__year {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 88px;
  height: 44px;
  border-radius: 999px;
  background: var(--yellow);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.tl__body {
  display: grid;
  gap: 6px;
  padding: 22px 26px;
  border-radius: var(--r-md);
  background: var(--white);
  border: 1px solid var(--line);
}

.section--white .tl__body {
  background: var(--beige);
  border-color: transparent;
}

.tl__tag {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mustard-deep);
}

.tl__title {
  font-weight: 700;
  font-size: 1.06rem;
  line-height: 1.35;
}

.tl__body p {
  font-size: 0.95rem;
  color: var(--ink-2);
}

@media (max-width: 560px) {
  .timeline::before {
    left: 20px;
  }

  .tl {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-left: 0;
  }

  .tl__year {
    width: 76px;
    height: 38px;
    font-size: 1.2rem;
  }

  .tl__body {
    margin-left: 0;
    padding: 18px 20px;
  }
}

/* ---------- Дипломы ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.doc {
  grid-column: span 4;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--white);
  overflow: hidden;
  text-align: left;
  transition: transform 0.25s, box-shadow 0.25s;
}

.doc--wide {
  grid-column: span 6;
}

.doc:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.doc__img {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 10 / 7;
  padding: 14px;
  background: var(--beige);
  overflow: hidden;
}

.doc__img img {
  max-height: 100%;
  width: auto;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(42, 36, 28, 0.18);
  transition: transform 0.4s;
}

.doc:hover .doc__img img {
  transform: scale(1.03);
}

.doc__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: var(--shadow-sm);
}

.doc__zoom svg {
  width: 18px;
  height: 18px;
}

.doc__cap {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 16px 20px 20px;
}

.doc__cap b {
  font-size: 0.98rem;
  line-height: 1.35;
}

.doc__cap span {
  font-size: 0.86rem;
  color: var(--ink-2);
}

@media (max-width: 960px) {
  .doc,
  .doc--wide {
    grid-column: span 6;
  }
}

@media (max-width: 600px) {
  .doc,
  .doc--wide {
    grid-column: span 12;
  }
}

/* ---------- Просмотр документа ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(14px, 3vw, 36px);
  background: rgba(34, 27, 16, 0.9);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__stage {
  display: grid;
  place-items: center;
  min-height: 0;
}

.lightbox__stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox__cap {
  padding-top: 16px;
  text-align: center;
  color: #f6ecd6;
  font-size: 0.95rem;
}

.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  transition: transform 0.2s;
}

.lightbox__btn:hover {
  transform: scale(1.07);
}

.lightbox__btn svg {
  width: 22px;
  height: 22px;
}

.lightbox__close {
  right: clamp(14px, 3vw, 32px);
  top: clamp(14px, 3vw, 32px);
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  margin-top: -26px;
}

.lightbox__prev {
  left: clamp(10px, 2vw, 28px);
}

.lightbox__next {
  right: clamp(10px, 2vw, 28px);
}

/* ---------- Методики ---------- */

.method-main {
  display: grid;
  gap: 14px;
  padding: clamp(26px, 3.4vw, 44px);
  border-radius: var(--r-lg);
  background: var(--yellow);
}

.method-main .h3 {
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
}

.method-main p {
  color: #4b3a10;
}

.people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.person {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 0.93rem;
  font-weight: 600;
}

.section--white .person {
  background: var(--beige);
  border-color: transparent;
}

/* ---------- Цитата ---------- */

.quote {
  position: relative;
  display: grid;
  gap: 16px;
  padding: clamp(28px, 4vw, 52px);
  border-radius: var(--r-lg);
  background: var(--yellow-pale);
  border: 1px solid rgba(201, 154, 29, 0.25);
}

.quote::before {
  content: "«";
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.5;
  color: var(--mustard);
}

.quote p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
}

.quote cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* ---------- «Если — то» ---------- */

.pairs {
  display: grid;
  gap: 12px;
}

.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: var(--white);
  border: 1px solid var(--line);
}

.pair__if {
  font-weight: 700;
  line-height: 1.35;
}

.pair__arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--yellow);
}

.pair__arrow svg {
  width: 18px;
  height: 18px;
}

.pair__then {
  color: var(--ink-2);
  font-size: 0.97rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .pair {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pair__arrow {
    width: 34px;
    height: 34px;
    transform: rotate(90deg);
  }
}

/* ---------- Возрастные ориентиры ---------- */

.tabs {
  display: grid;
  gap: 22px;
}

.tabs__list {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs__list::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 1 0 auto;
  min-height: 46px;
  padding: 8px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.tab:hover {
  background: var(--beige);
}

.tab[aria-selected="true"] {
  background: var(--yellow);
}

.tabpanel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  padding: clamp(26px, 4vw, 48px);
  border-radius: var(--r-lg);
  background: var(--white);
  border: 1px solid var(--line);
}

.tabpanel[hidden] {
  display: none;
}

.tabpanel__age {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 8vw, 6rem);
  font-weight: 600;
  line-height: 0.9;
}

.tabpanel__age small {
  display: block;
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--mustard-deep);
}

@media (max-width: 760px) {
  .tabpanel {
    grid-template-columns: 1fr;
  }
}

.note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 22px;
  border-radius: var(--r-md);
  background: var(--yellow-pale);
  border: 1px solid rgba(201, 154, 29, 0.25);
  font-size: 0.95rem;
  line-height: 1.5;
}

.note svg {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  color: var(--mustard-deep);
}

/* ---------- Библиотека материалов ---------- */

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filter__btn {
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.92rem;
  font-weight: 600;
  transition: background-color 0.2s, border-color 0.2s;
}

.filter__btn:hover {
  border-color: var(--mustard);
}

.filter__btn[aria-pressed="true"] {
  background: var(--yellow);
  border-color: var(--yellow);
}

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

@media (max-width: 1020px) {
  .library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .library {
    grid-template-columns: 1fr;
  }
}

.material {
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--r-lg);
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.material:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.material[hidden] {
  display: none;
}

.material__cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: var(--yellow-soft);
  overflow: hidden;
}

.material__cover--beige {
  background: var(--beige-deep);
}

.material__cover--yellow {
  background: var(--yellow);
}

.material__cover--pale {
  background: var(--yellow-pale);
}

.material__cover svg {
  position: relative;
  width: 46%;
  max-height: 78%;
}

.material__type {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--white);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.material__body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  padding: 22px 24px 24px;
}

.material__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--mustard-deep);
}

.material__tags span + span::before {
  content: "·";
  margin-right: 6px;
}

.material__body p {
  font-size: 0.95rem;
  color: var(--ink-2);
}

.material__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.material--soon {
  border-style: dashed;
  background: transparent;
}

.material--soon:hover {
  transform: none;
  box-shadow: none;
}

.library__empty {
  grid-column: 1 / -1;
  padding: 32px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--sand);
  text-align: center;
  color: var(--ink-2);
}

/* ---------- Чтение материала ---------- */

.reader {
  width: min(880px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.reader::backdrop {
  background: rgba(34, 27, 16, 0.6);
  backdrop-filter: blur(4px);
}

.reader[open] {
  display: grid;
  grid-template-rows: auto 1fr;
  animation: reader-in 0.28s ease;
}

@keyframes reader-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.reader__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px 14px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.reader__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--beige);
  transition: background-color 0.2s;
}

.reader__close:hover {
  background: var(--yellow);
}

.reader__close svg {
  width: 18px;
  height: 18px;
}

.reader__scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(24px, 4vw, 48px) clamp(20px, 5vw, 56px) clamp(32px, 5vw, 56px);
}

.article {
  display: grid;
  gap: 20px;
}

.article > header {
  display: grid;
  gap: 12px;
  padding-bottom: 8px;
}

.article h3 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.15;
}

.article h4 {
  font-size: 1.02rem;
  font-weight: 700;
}

.article p {
  color: #3d362b;
}

.game {
  display: grid;
  gap: 8px;
  padding: 20px 22px;
  border-radius: var(--r-md);
  background: var(--white);
  border: 1px solid var(--line);
}

.game__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.game p {
  font-size: 0.97rem;
}

.games {
  display: grid;
  gap: 12px;
}

.steps {
  display: grid;
  gap: 12px;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 14px 18px 14px 62px;
  border-radius: var(--r-md);
  background: var(--white);
  border: 1px solid var(--line);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--yellow);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

/* ---------- Баннер-ссылка ---------- */

.banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: clamp(28px, 4vw, 52px);
  border-radius: var(--r-xl);
  background: var(--yellow);
  overflow: hidden;
}

.banner::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 260px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 46px solid rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.banner > * {
  position: relative;
  z-index: 1;
}

.banner p {
  margin-top: 10px;
  max-width: 44em;
  color: #4b3a10;
}

@media (max-width: 760px) {
  .banner {
    grid-template-columns: 1fr;
  }
}

/* ---------- Контакты и подвал ---------- */

.contact {
  padding-block: clamp(56px, 8vw, 104px) 0;
  background: var(--beige);
}

.contact--flush {
  padding-top: 0;
}

.contact--white {
  background: linear-gradient(var(--white) 50%, var(--beige) 50%);
  padding-top: 0;
}

.contact__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(30px, 5vw, 64px);
  border-radius: var(--r-xl);
  background: var(--mustard);
  color: var(--ink);
  overflow: hidden;
}

.contact__card::before {
  content: "";
  position: absolute;
  left: -90px;
  bottom: -130px;
  width: 340px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(242, 194, 48, 0.55);
}

.contact__card::after {
  content: "";
  position: absolute;
  right: 6%;
  top: -70px;
  width: 180px;
  height: 180px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 2.4px, transparent 2.8px);
  background-size: 18px 18px;
}

.contact__card > * {
  position: relative;
  z-index: 1;
}

.contact__who {
  display: grid;
  gap: 12px;
}

.contact__who .eyebrow {
  color: var(--ink);
}

.contact__who .eyebrow::before {
  background: var(--ink);
}

.contact__role {
  font-size: 1.05rem;
  font-weight: 600;
  color: #3b2d09;
}

.contact__list {
  display: grid;
  gap: 12px;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-radius: var(--r-md);
  background: var(--white);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact__item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.contact__item .icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.contact__item small {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mustard-deep);
}

.contact__item b {
  display: block;
  font-size: clamp(0.98rem, 1.7vw, 1.18rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .contact__card {
    grid-template-columns: 1fr;
  }
}

.footer {
  background: var(--beige);
  padding-block: 28px 34px;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer__nav a {
  text-decoration: none;
}

.footer__nav a:hover {
  color: var(--mustard-deep);
}

/* ---------- Появление при прокрутке ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--d, 0s);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@keyframes float {
  50% {
    transform: translateY(-8px);
  }
}

.floaty {
  animation: float 6s ease-in-out infinite;
}

.floaty--2 {
  animation-delay: -2.5s;
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .header,
  .burger,
  .hero__sounds,
  .letters {
    display: none;
  }
}
