:root{
  --bg: #fbfbf8;
  --surface: #ffffff;

  --text: #0b1220;
  --muted: #475467;
  --muted2: #667085;

  --line: rgba(230,232,238,.95);

  --primary: #2e3a8c;
  --primary2: #1f2a66;
  --gold: #c8a86a;

  --shadow: 0 18px 60px rgba(16, 24, 40, .10);
  --shadow2: 0 10px 30px rgba(16, 24, 40, .08);

  --radius: 22px;
  --radius2: 16px;
  --max: 1120px;

  /* Textures */
  --tex-paper: url("assets/visual/tex-paper.png");
  --tex-wash:  url("assets/visual/tex-wash.png");
  --tex-wave:  url("assets/visual/tex-wave.png");
  --tex-dust:  url("assets/visual/tex-dust.png");
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; overflow-x:hidden; }

body{
  font-family: "Source Sans 3", system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  background:
    radial-gradient(900px 520px at 15% -10%, rgba(46,58,140,.06), transparent 60%),
    radial-gradient(780px 480px at 92% 0%, rgba(200,168,106,.08), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a{ color: inherit; text-decoration: none; }
a:hover{ opacity: .96; }

.container{
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.skip{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip:focus{
  left:16px; top:16px; width:auto; height:auto;
  padding:10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  z-index: 9999;
}

/* Typography */
h1,h2,h3,h4{
  font-family: "Cormorant Garamond", ui-serif, Georgia, "Times New Roman", Times, serif;
  letter-spacing: -0.01em;
}
h1{
  font-size: clamp(34px, 4.3vw, 56px);
  line-height: 1.05;
  margin: 0 0 14px;
}
h2{
  font-size: clamp(26px, 3.2vw, 40px);
  margin: 0;
  line-height: 1.15;
}
h3{ font-size: 22px; margin: 0 0 8px; line-height: 1.2; }
h4{ font-size: 16px; margin: 0 0 8px; }

.lead{
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 72ch;
}
.lead--small{ font-size: 16px; max-width: 62ch; }

.muted{ color: var(--muted); }
.micro{ font-size: 12.5px; color: var(--muted2); margin: 0; }

/* Header */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,251,248,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(230,232,238,.9);
}
.header__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 14px 0;
}

.logo{
  display:flex;
  align-items:center;
  gap: 12px;
}
.logo__mark{
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  font-weight: 900;
  color: var(--surface);
  background: linear-gradient(135deg, rgba(46,58,140,.98), rgba(200,168,106,.70));
  box-shadow: 0 16px 40px rgba(46,58,140,.16);
}
.logo__text{ display:grid; gap:2px; }
.logo__title{ font-weight: 900; letter-spacing: .1px; }
.logo__subtitle{ font-size: 12px; color: var(--muted2); }

/* Nav */
.nav{ display:flex; align-items:center; gap: 10px; }
.nav__menu{ display:flex; align-items:center; gap: 16px; }
.nav__menu a{
  color: var(--muted);
  font-weight: 650;
  padding: 8px 10px;
  border-radius: 12px;
}
.nav__menu a:hover{
  color: var(--text);
  background: rgba(46,58,140,.06);
}
.nav__toggle{
  display:none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
}
.nav__toggle-line{
  display:block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  opacity: .9;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 16px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn--small{ padding: 10px 12px; border-radius: 14px; }
.btn--block{ width: 100%; }

.btn--primary{
  background: linear-gradient(135deg, rgba(46,58,140,1), rgba(46,58,140,.92));
  color: var(--surface);
  box-shadow: 0 18px 44px rgba(46,58,140,.16);
}
.btn--primary:hover{ filter: brightness(1.02); }

.btn--soft{
  background: rgba(46,58,140,.06);
  border: 1px solid rgba(46,58,140,.18);
  color: var(--primary2);
}
.btn--soft:hover{ background: rgba(46,58,140,.08); }

.btn--ghost{
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(46,58,140,.18);
  color: var(--primary2);
}
.btn--ghost:hover{ background: rgba(255,255,255,.90); }

.btn--dark{
  background: var(--text);
  color: var(--surface);
  box-shadow: 0 18px 44px rgba(16,24,40,.16);
}
.btn--dark:hover{ filter: brightness(1.02); }

.link{ font-weight: 800; color: var(--primary2); }
.link:hover{ text-decoration: underline; }

/* HERO */
.hero{ padding: 0 0 22px; }

.hero__banner{
  width: 100vw;
  height: clamp(240px, 30vw, 460px);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 10px;
  margin-bottom: 40px;
  border-top: 1px solid rgba(16,24,40,.08);
  border-bottom: 1px solid rgba(16,24,40,.08);
  background: rgba(255,255,255,.75);
  overflow: hidden;
  position: relative;
}

.hero__banner-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero__banner-overlay{
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, rgba(251,251,248,.86) 0%, rgba(251,251,248,.12) 45%, rgba(251,251,248,.10) 100%);
  pointer-events:none;
}

.banner__fallback{
  position:absolute;
  inset:0;
  background:
    radial-gradient(900px 420px at 20% 20%, rgba(46,58,140,.10), transparent 60%),
    radial-gradient(900px 420px at 85% 0%, rgba(200,168,106,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.70), rgba(255,255,255,.60));
  opacity: 0;
  pointer-events:none;
}
.banner--fallback .banner__fallback{ opacity: 1; }

.hero__grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 22px;
  align-items: start;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 8px 12px;
  /* Warm “gold” chip like the "Краткая суть" tag */
  border: 1px solid rgba(200,168,106,.22);
  border-radius: 999px;
  background: rgba(200,168,106,.14);
  color: rgba(31,42,102,.92);
  font-weight: 800;
  margin: 0 0 14px;
}

.hero__cta{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 18px;
}

.stats{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
}
.stat{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  border-radius: var(--radius2);
  padding: 12px 14px;
  box-shadow: var(--shadow2);
}
.stat dt{
  color: var(--muted2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.stat dd{
  margin: 6px 0 0;
  font-weight: 850;
  color: var(--text);
}

.hero__panel{
  position: sticky;
  top: 88px;
}
.panel{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.panel__tag{
  display:inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(200,168,106,.14);
  color: rgba(31,42,102,.92);
  border: 1px solid rgba(200,168,106,.22);
  font-weight: 800;
  margin: 0 0 10px;
}
.panel__title{ margin: 0 0 8px; }
.panel__text{ margin: 0 0 12px; color: var(--muted); }

.iconrow{ margin-top: 10px; }
.iconrow__img{
  width: 100%;
  height: auto;
  display:block;
  opacity: .92;
}

/* Section base */
.section{ padding: 64px 0; }
.section__head{
  display:grid;
  gap: 10px;
  margin: 0 0 22px;
}
.section__head p{
  margin: 0;
  color: var(--muted);
  max-width: 78ch;
}

/* Section textures (very subtle) */
.section--paper{
  position: relative;
  background:
    radial-gradient(760px 520px at 20% 0%, rgba(46,58,140,.04), transparent 60%),
    var(--bg);
}
.section--paper::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: var(--tex-paper);
  background-size: 900px 900px;
  background-repeat: repeat;
  opacity: .10;
  pointer-events:none;
}
.section--dust{
  position: relative;
  background:
    radial-gradient(820px 560px at 18% 0%, rgba(46,58,140,.05), transparent 58%),
    var(--bg);
}
.section--dust::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: var(--tex-dust);
  background-size: 900px 900px;
  background-repeat: repeat;
  opacity: .08;
  pointer-events:none;
}

.section--alt{
  background:
    radial-gradient(760px 520px at 20% 0%, rgba(46,58,140,.05), transparent 60%),
    linear-gradient(180deg, rgba(246,247,251,.56), rgba(246,247,251,.24));
  border-top: 1px solid rgba(230,232,238,.85);
  border-bottom: 1px solid rgba(230,232,238,.85);
}

/* Banner separators */
.banner{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-top: 1px solid rgba(16,24,40,.08);
  border-bottom: 1px solid rgba(16,24,40,.08);
}
.banner--thin .banner__media{
  height: clamp(220px, 22vw, 360px);
}
.banner--half .banner__media{
  height: clamp(220px, 22vw, 360px);
}
.banner__media{
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,.7);
}
.banner__img{
  width: 100%;
  height: 100%;
  display:block;
  object-fit: cover;
}
.banner__overlay{
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, rgba(251,251,248,.86) 0%, rgba(251,251,248,.20) 55%, rgba(251,251,248,.10) 100%);
  pointer-events:none;
}
.banner__overlay--alt{
  background:
    linear-gradient(90deg, rgba(251,251,248,.76) 0%, rgba(251,251,248,.16) 55%, rgba(251,251,248,.10) 100%),
    radial-gradient(900px 420px at 85% 0%, rgba(200,168,106,.10), transparent 60%);
}

/* Scroll reveal text over image blocks */
.media-reveal-host{
  position: relative;
}
.scroll-reveal-text{
  position: absolute;
  left: clamp(12px, 3.4vw, 30px);
  bottom: clamp(12px, 3.2vw, 26px);
  z-index: 5;
  max-width: min(920px, calc(100% - 24px));
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.96);
  font-family: "Cormorant Garamond", ui-serif, Georgia, "Times New Roman", Times, serif;
  font-size: clamp(24px, 3.1vw, 46px);
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: .006em;
  text-wrap: balance;
  text-shadow:
    0 2px 16px rgba(11,18,32,.52),
    0 0 2px rgba(11,18,32,.65);
  pointer-events: none;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2,.8,.2,1);
}
.scroll-reveal-main{
  display: block;
  white-space: pre-line;
}
.scroll-reveal-note{
  display: block;
  margin-top: 10px;
  font-family: "Source Sans 3", system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans";
  font-size: clamp(13px, 1.35vw, 18px);
  font-weight: 640;
  letter-spacing: .045em;
  line-height: 1.3;
  color: rgba(255,255,255,.88);
  text-shadow:
    0 2px 10px rgba(11,18,32,.45),
    0 0 1px rgba(11,18,32,.65);
}
.media-reveal-host.reveal-active .scroll-reveal-text{
  opacity: 1;
  transform: translateY(0);
}
.hero__banner .scroll-reveal-text{
  left: auto;
  right: clamp(26px, 5vw, 86px);
  bottom: clamp(26px, 8vw, 86px);
  max-width: min(920px, 58vw);
}
.banner--thin .scroll-reveal-text{
  font-size: clamp(22px, 2.8vw, 36px);
}
.banner--half .scroll-reveal-text{
  font-size: clamp(22px, 2.7vw, 38px);
}

/* Grids & cards */
.grid{ display:grid; gap: 16px; }
.grid{ align-items: stretch; }
.grid--2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3{ grid-template-columns: repeat(3, minmax(0,1fr)); }

.card{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.76);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow2);
}

/* CONTENT: align CTA buttons to the same baseline across cards */
#content .card--click{
  display: flex;
  flex-direction: column;
  height: 100%;
}
#content .card--click .btn{
  margin-top: auto;
}
.card--clean{ box-shadow: none; background: rgba(255,255,255,.70); }
.card--soft{
  background: linear-gradient(180deg, rgba(255,255,255,.84), rgba(255,255,255,.70));
}
.card--click{ transition: transform .14s ease, box-shadow .14s ease; }
.card--click:hover{ transform: translateY(-2px); box-shadow: var(--shadow); }

.bullets{ margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.bullets li{ margin: 8px 0; }

.note{ margin: 12px 0 0; font-size: 13px; color: var(--muted2); }

/* Details */
.details{
  border: 1px solid rgba(230,232,238,.9);
  border-radius: var(--radius2);
  background: rgba(255,255,255,.76);
  padding: 12px 14px;
  margin-top: 12px;
}
.details summary{
  cursor: pointer;
  list-style: none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  font-weight: 850;
  color: var(--text);
}
.details summary::-webkit-details-marker{ display:none; }
.details .chev{
  color: var(--muted2);
  font-size: 14px;
  transition: transform .14s ease;
}
.details[open] .chev{ transform: rotate(180deg); }
.details__body{ margin-top: 12px; color: var(--muted); }
.details__grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}
.details--boxed{
  background: rgba(46,58,140,.03);
  border-color: rgba(46,58,140,.14);
}
.details--inner{
  margin-top: 12px;
  background: rgba(255,255,255,.72);
}

/* Pills */
.pillrow{ display:flex; flex-wrap:wrap; gap: 10px; margin-top: 14px; }
.pill{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(46,58,140,.16);
  background: rgba(46,58,140,.05);
  color: var(--primary2);
  font-weight: 750;
  font-size: 13px;
}

/* Pricing */
.pricing{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}
.price{
  position: relative;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.80);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow2);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.price__top{ display:grid; gap: 8px; margin-bottom: 10px; }
.price__label{
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted2);
  font-weight: 800;
}
.price__name{ margin: 0; }
.price__desc{ margin: 0; color: var(--muted); }

.price__list{
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.price__list li{ margin: 8px 0; }
.price__list .highlight{
  padding: 8px 10px;
  margin-left: -10px;
  border-radius: 14px;
  background: rgba(200,168,106,.14);
  border: 1px solid rgba(200,168,106,.20);
  color: rgba(16,24,40,.92);
}
.price__cta{
  /* Stick footer to the bottom so CTA buttons align across cards */
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price--featured{
  border-color: rgba(46,58,140,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.74));
}
.price__badge{
  position:absolute;
  top: 14px;
  right: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(46,58,140,.10);
  border: 1px solid rgba(46,58,140,.18);
  color: var(--primary2);
  font-weight: 900;
  font-size: 12px;
}

/* Ribbon */
.ribbon{
  margin-top: 16px;
  border: 1px solid rgba(46,58,140,.14);
  background: rgba(46,58,140,.03);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.ribbon__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.ribbon p{ margin: 0; color: var(--muted); max-width: 84ch; }

/* Vault */
.vault{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  align-items:start;
}
.vault__card{
  border: 1px solid rgba(200,168,106,.22);
  background:
    radial-gradient(700px 420px at 30% 0%, rgba(200,168,106,.10), transparent 55%),
    rgba(255,255,255,.80);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow2);
}
.vault__tag{
  display:inline-flex;
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(46,58,140,.06);
  border: 1px solid rgba(46,58,140,.16);
  color: var(--primary2);
  font-weight: 900;
}
.vault__chips{ display:flex; flex-wrap:wrap; gap: 10px; margin-top: 14px; }
.chip{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(230,232,238,.95);
  background: rgba(255,255,255,.72);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.vault__cta{ margin-top: 14px; display:grid; gap: 8px; }

.vault__aside{ display:grid; gap: 16px; }
.aside__card{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.76);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow2);
}
.aside__note{ background: rgba(255,255,255,.72); }

.steps{
  list-style: none;
  padding-left: 0;
  margin: 10px 0 0;
  display:grid;
  gap: 10px;
  color: var(--muted);
}
.steps li{ display:flex; align-items:center; gap: 10px; }
.steps span{
  width: 28px; height: 28px;
  border-radius: 12px;
  display:grid; place-items:center;
  background: rgba(46,58,140,.10);
  border: 1px solid rgba(46,58,140,.18);
  color: var(--primary2);
  font-weight: 900;
}

/* About */
.about{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items:start;
}
.portrait{
  position: relative;
  border-radius: var(--radius);
  border: 1px solid rgba(230,232,238,.95);
  background:
    radial-gradient(540px 360px at 30% 10%, rgba(46,58,140,.10), transparent 55%),
    rgba(255,255,255,.76);
  padding: 18px;
  box-shadow: var(--shadow2);
  min-height: 220px;
}
.portrait__glow{
  position:absolute;
  inset: 18px;
  border-radius: 18px;
  background: radial-gradient(220px 180px at 35% 40%, rgba(255,255,255,.92), transparent 60%);
  opacity: .7;
  pointer-events:none;
}
.portrait__inner{
  position: relative;
  display:grid;
  place-items:center;
  height: 100%;
  text-align:center;
}
.portrait__hint{ color: var(--muted2); font-size: 13px; }

.facts{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-top: 12px;
}
.fact{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.76);
  border-radius: 18px;
  padding: 12px 12px;
  box-shadow: var(--shadow2);
}
.fact__k{ margin: 0; font-weight: 900; color: var(--text); }
.fact__v{ margin: 4px 0 0; color: var(--muted2); font-size: 13px; }

.about__text{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.76);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow2);
}
.about__name{ margin-top: 0; }
.about__cta{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* FAQ */
.faq details{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.76);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 12px 0;
  box-shadow: var(--shadow2);
}
.faq summary{ cursor:pointer; font-weight: 900; }
.faq p{ margin: 10px 0 0; color: var(--muted); }

/* Contact */
.contact-section{
  background:
    radial-gradient(860px 520px at 18% 0%, rgba(46,58,140,.06), transparent 58%),
    rgba(246,247,251,.36);
  border-top: 1px solid rgba(230,232,238,.85);
}
.contact{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items:start;
}
.contact__buttons{ display:flex; flex-wrap:wrap; gap: 12px; margin: 16px 0 12px; }
.contact__note{ display:flex; align-items:flex-start; gap: 10px; margin-top: 12px; }

.form{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.84);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.form label{
  display:grid;
  gap: 8px;
  margin: 10px 0;
  font-weight: 750;
  color: var(--muted2);
}
input, textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(230,232,238,.95);
  background: rgba(255,255,255,.92);
  color: var(--text);
  outline:none;
}
input:focus, textarea:focus{
  border-color: rgba(46,58,140,.30);
  box-shadow: 0 0 0 4px rgba(46,58,140,.10);
}

/* Footer */
.footer{
  border-top: 1px solid rgba(230,232,238,.85);
  background: rgba(251,251,248,.90);
  padding: 22px 0;
}
.footer__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer__links{ display:flex; gap: 12px; flex-wrap:wrap; }
.footer__links a{ color: var(--muted); font-weight: 750; }
.footer__links a:hover{ color: var(--text); }

/* Responsive */
@media (max-width: 980px){
  .hero__grid{ grid-template-columns: 1fr; }
  .hero__panel{ position: static; }
  .stats{ grid-template-columns: 1fr; }
  .grid--2, .pricing, .vault, .about, .contact{ grid-template-columns: 1fr; }
  .details__grid{ grid-template-columns: 1fr; }

  .nav__toggle{ display:inline-flex; }
  .nav__menu{
    position:absolute;
    right: 20px;
    top: 68px;
    display:none;
    flex-direction:column;
    gap: 10px;
    padding: 14px;
    width: min(360px, calc(100vw - 40px));
    border: 1px solid rgba(230,232,238,.95);
    background: rgba(251,251,248,.92);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }
  .nav__menu.open{ display:flex; }
}
/* === FIX: если картинка с иконками раздувает блок (большое полотно) === */
.iconrow__img{
  display: block;
  max-height: 56px !important;
  width: auto !important;
  object-fit: contain;
}
.hero__banner-overlay{
  opacity: .5; /* было без opacity */
}

/* ABOUT: фото преподавателя должно быть "баннером", а не гигантским */
#about .portrait.portrait--photo{
  width: 100%;
  max-width: 100%;
}

#about .portrait.portrait--photo .portrait__inner{
  height: 398px;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
}

/* картинка всегда заполняет рамку */
#about .portrait.portrait--photo .portrait__img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center -90px;
}

/* iOS/Safari: убираем "самовольное" увеличение текста, которое меняет высоты блоков */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ЖЁСТКАЯ СЕТКА 2×N (без masonry/columns) */
#tracks .grid.grid--2,
#starts .grid.grid--2,
#format .grid.grid--2 {
  /* если где-то использовались CSS columns для "псевдо-сетки" — гасим */
  columns: initial !important;
  column-count: initial !important;
  column-gap: normal !important;

  /* если было flex — переопределяем */
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: stretch !important;
}

/* чтобы длинные слова/плашки не раздували колонку */
#tracks .grid.grid--2 > *,
#starts .grid.grid--2 > *,
#format .grid.grid--2 > * {
  min-width: 0;
}

/* карточка заполняет ячейку, и все элементы остаются внутри */
#tracks .card,
#starts .card,
#format .card {
  min-width: 0;
  height: 100%;
}

/* ПЛАШКИ: разрешаем перенос и не даём вылезать */
.pillrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.pill {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* картинки в карточках всегда "блоком" */
.card img {
  display: block;
  max-width: 100%;
}

/* =========================================
   MOBILE REWORK (2026-03)
   ========================================= */
body.menu-open{
  overflow: hidden;
}
body.menu-open::before{
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(11,18,32,.35);
  backdrop-filter: blur(2px);
  z-index: 45;
  pointer-events: none;
}

@media (max-width: 980px){
  .container{
    width: min(var(--max), calc(100% - 28px));
  }
  .header{
    background: rgba(251,251,248,.94);
    backdrop-filter: blur(12px);
  }
  .header__row{
    gap: 10px;
    padding: 10px 0;
    min-height: 64px;
  }

  .logo{
    min-width: 0;
    gap: 10px;
    max-width: calc(100% - 56px);
  }
  .logo__mark{
    width: 38px;
    height: 38px;
    border-radius: 14px;
    font-size: 14px;
  }
  .logo__text{
    min-width: 0;
  }
  .logo__title{
    font-size: 14px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 68vw;
  }
  .logo__subtitle{
    display: none;
  }

  .nav{
    position: static;
  }
  .nav__toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 14px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 12px 24px rgba(16,24,40,.10);
  }
  .nav__menu{
    position: fixed;
    left: 14px;
    right: 14px;
    top: 72px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(230,232,238,.95);
    background: rgba(251,251,248,.97);
    box-shadow: 0 22px 50px rgba(16,24,40,.24);
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    z-index: 60;
    opacity: 0;
    transform: translateY(-8px) scale(.985);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav__menu.open{
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  .nav__menu a{
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(230,232,238,.95);
    border-radius: 14px;
    background: rgba(255,255,255,.94);
    color: var(--text);
    font-weight: 720;
  }
  .nav__menu a.btn{
    margin-top: 4px;
    background: rgba(200,168,106,.14);
    border-color: rgba(200,168,106,.35);
    color: var(--primary2);
  }

  .hero{
    padding-bottom: 12px;
  }
  .hero__banner{
    height: clamp(170px, 54vw, 300px);
    margin-top: 0;
    margin-bottom: 24px;
  }
  .hero__banner-overlay{
    background: linear-gradient(180deg, rgba(251,251,248,.18) 0%, rgba(251,251,248,.56) 100%);
    opacity: 1;
  }
  .hero__grid{
    gap: 14px;
  }
  .panel{
    padding: 16px;
    border-radius: 20px;
  }

  h1{
    font-size: clamp(30px, 8vw, 42px);
    line-height: 1.08;
    margin-bottom: 12px;
  }
  h2{
    font-size: clamp(24px, 6.2vw, 34px);
  }
  .lead{
    font-size: 16px;
    max-width: 100%;
  }
  .eyebrow{
    font-size: 12px;
    padding: 7px 10px;
  }

  .section{
    padding: 46px 0;
  }
  .section__head{
    gap: 8px;
    margin-bottom: 16px;
  }
  .grid{
    gap: 12px;
  }
  .grid--3{
    grid-template-columns: 1fr;
  }
  .card,
  .price,
  .aside__card,
  .vault__card,
  .about__text,
  .portrait,
  .faq details,
  .details{
    padding: 15px;
    border-radius: 18px;
  }

  .hero__cta .btn,
  .about__cta .btn,
  .contact__buttons .btn{
    width: 100%;
  }

  .stats{
    gap: 10px;
    margin-top: 14px;
  }
  .banner--thin .banner__media,
  .banner--half .banner__media{
    height: clamp(160px, 48vw, 250px);
  }
  .scroll-reveal-text{
    max-width: calc(100% - 20px);
    left: 10px;
    bottom: 10px;
    font-size: clamp(18px, 6.3vw, 26px);
    line-height: 1.12;
  }
  .hero__banner .scroll-reveal-text{
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
  }
  .scroll-reveal-note{
    margin-top: 7px;
    font-size: 12px;
    letter-spacing: .03em;
  }
  .ribbon{
    padding: 13px 14px;
  }
  .ribbon__inner{
    align-items: flex-start;
  }
  .pill{
    font-size: 12px;
    padding: 7px 10px;
  }
  .facts{
    grid-template-columns: 1fr;
    gap: 10px;
  }
  #about .portrait.portrait--photo .portrait__inner{
    height: clamp(240px, 62vw, 340px);
  }
  #about .portrait.portrait--photo .portrait__img{
    object-position: center top;
  }

  /* Fix inline desktop grid in university starts block */
  #starts .container > div[style*="grid-template-columns: 300px 1fr"]{
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    align-items: start !important;
  }
  #starts .container > div[style*="grid-template-columns: 300px 1fr"] > div:first-child{
    height: 220px;
    border-radius: 22px !important;
  }
}

@media (max-width: 640px){
  .container{
    width: min(var(--max), calc(100% - 20px));
  }
  .header__row{
    min-height: 60px;
  }
  .logo__mark{
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 12px;
  }
  .logo__title{
    font-size: 13px;
    max-width: 62vw;
  }
  .nav__menu{
    left: 10px;
    right: 10px;
    top: 66px;
    max-height: calc(100dvh - 82px);
    padding: 10px;
  }

  h1{
    font-size: clamp(28px, 9vw, 36px);
  }
  h2{
    font-size: clamp(22px, 7.4vw, 30px);
  }
  .section{
    padding: 38px 0;
  }
  .btn{
    padding: 12px 14px;
    border-radius: 14px;
  }
  .price__badge{
    top: 10px;
    right: 10px;
  }
  .footer__row{
    justify-content: center;
    text-align: center;
  }
  .footer__links{
    justify-content: center;
  }
}

/* Super-compact phones (360px class): dense, but readable */
@media (max-width: 360px){
  .container{
    width: min(var(--max), calc(100% - 16px));
  }
  .header__row{
    min-height: 56px;
    gap: 8px;
    padding: 8px 0;
  }
  .logo{
    max-width: calc(100% - 48px);
    gap: 8px;
  }
  .logo__mark{
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 11px;
  }
  .logo__title{
    font-size: 12px;
    max-width: 56vw;
  }
  .nav__toggle{
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .nav__menu{
    left: 8px;
    right: 8px;
    top: 60px;
    max-height: calc(100dvh - 72px);
    border-radius: 16px;
    padding: 8px;
  }
  .nav__menu a{
    padding: 10px 11px;
    border-radius: 12px;
    font-size: 14px;
  }

  .hero__banner{
    height: clamp(148px, 50vw, 205px);
    margin-bottom: 16px;
  }
  h1{
    font-size: clamp(24px, 8.6vw, 31px);
  }
  h2{
    font-size: clamp(20px, 7vw, 25px);
  }
  .lead{
    font-size: 15px;
    line-height: 1.5;
  }
  .section{
    padding: 32px 0;
  }
  .section__head{
    margin-bottom: 14px;
  }
  .grid{
    gap: 10px;
  }
  .card,
  .price,
  .aside__card,
  .vault__card,
  .about__text,
  .portrait,
  .faq details,
  .details{
    padding: 13px;
    border-radius: 16px;
  }
  .stats{
    gap: 8px;
  }
  .stat{
    padding: 10px 12px;
  }
  .btn{
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 14px;
  }
  .pill{
    font-size: 11px;
    padding: 6px 9px;
  }
  .banner--thin .banner__media,
  .banner--half .banner__media{
    height: clamp(140px, 44vw, 190px);
  }
  .scroll-reveal-text{
    left: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
    font-size: clamp(16px, 5.6vw, 21px);
    line-height: 1.12;
  }
  .scroll-reveal-note{
    margin-top: 5px;
    font-size: 11px;
    letter-spacing: .02em;
  }
}

/* Premium large phones (Pro Max / Plus / wide Android): more air and type */
@media (min-width: 400px) and (max-width: 767px){
  .container{
    width: min(var(--max), calc(100% - 30px));
  }
  .header__row{
    min-height: 68px;
    padding: 11px 0;
  }
  .logo__mark{
    width: 40px;
    height: 40px;
  }
  .logo__title{
    font-size: 15px;
    max-width: 65vw;
  }
  .logo__subtitle{
    display: block;
    font-size: 11px;
  }
  .nav__menu{
    left: 16px;
    right: 16px;
    top: 76px;
    padding: 14px;
    border-radius: 22px;
  }

  .hero{
    padding-bottom: 18px;
  }
  .hero__banner{
    height: clamp(214px, 52vw, 320px);
    margin-bottom: 30px;
  }
  .hero__grid{
    gap: 18px;
  }
  h1{
    font-size: clamp(34px, 8.2vw, 46px);
    line-height: 1.06;
  }
  h2{
    font-size: clamp(27px, 6.4vw, 36px);
  }
  .lead{
    font-size: 17px;
    line-height: 1.6;
  }
  .section{
    padding: 56px 0;
  }
  .grid{
    gap: 14px;
  }
  .card,
  .price,
  .aside__card,
  .vault__card,
  .about__text,
  .portrait,
  .faq details,
  .details{
    padding: 18px;
    border-radius: 20px;
  }
  .hero__cta,
  .about__cta{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .hero__cta .btn,
  .about__cta .btn{
    width: 100%;
  }
  .contact__buttons{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .contact__buttons .btn{
    width: 100%;
  }
  .stats{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .banner--thin .banner__media,
  .banner--half .banner__media{
    height: clamp(205px, 44vw, 285px);
  }
  .scroll-reveal-text{
    left: 14px;
    bottom: 14px;
    max-width: calc(100% - 28px);
    font-size: clamp(24px, 5.1vw, 34px);
  }
  .scroll-reveal-note{
    font-size: 13px;
  }
  .facts{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
