/* Основи кабали -- landing page.
   Ported from the Claude Design source (LANDER.dc.html), which drove layout from
   JavaScript (`wide = innerWidth >= 900`) and duplicated markup behind sc-if.
   Here those same values are CSS custom properties flipped at the design's two
   real breakpoints, 900px and 1180px, so the page is static HTML and needs no
   runtime to render. */

:root {
  --navy: #0a163c;
  --blue: #1b3a8c;
  --ink: #1f2430;
  --muted: #4a5060;
  --line: #e3e5ea;
  --line-2: #c9cdd6;
  --line-3: #d6d9e0;
  --bg-alt: #f5f6f8;
  --gold: #f2c94c;
  --coral: #ff8a5c;
  --pale: #c9d3ee;
  --pale-2: #8f9bbd;
  --err: #ff8a7a;
  --err-ink: #ffb4a8;
  --ph: #e3e5ea;

  /* narrow (< 900px) is the base; the media queries below are the `wide` branch */
  --hero-h: auto;
  --hero-pos: center top;
  --hero-dir: column;
  --hero-pad: 12px 20px 0;
  --hero-gap: 12px;
  --hero-text-gap: 16px;
  --hero-grad: linear-gradient(180deg, rgba(10,22,60,0) 0%, rgba(10,22,60,.15) 35%, rgba(10,22,60,.85) 62%, rgba(10,22,60,.95) 100%);
  --art-max-w: 100%;
  --art-max-h: 180px;
  --vid-pad: 40px 20px 32px;
  --lin-cols: minmax(0, 1fr);
  --lin-bg-h: 720px;
  --lin-card-margin: 0 0 0 -12px;
  --lin-card-pad: 16px 16px 16px 48px;
  --lin-dot-top: 22px;
  --lin-card-cols: minmax(0, 1fr);
  --lin-img-ar: 4 / 3;
  --foot-logo-h: 40px;
  --cta-w: 100%;
  --cta-align: stretch;
  --cta-text: center;
}

@media (min-width: 900px) {
  :root {
    --hero-h: 640px;
    --hero-pos: center right;
    --hero-dir: row-reverse;
    --hero-pad: 24px 20px 40px;
    --hero-gap: 24px;
    --hero-text-gap: 20px;
    --hero-grad: linear-gradient(90deg, rgba(10,22,60,.9) 0%, rgba(10,22,60,.7) 40%, rgba(10,22,60,0) 75%);
    --art-max-w: 560px;
    --art-max-h: 560px;
    --vid-pad: 40px 20px;
    --lin-cols: 380px minmax(0, 1fr);
    --lin-bg-h: 560px;
    --lin-card-margin: 0 0 0 -16px;
    --lin-card-pad: 20px 24px 24px 52px;
    --lin-dot-top: 26px;
    --foot-logo-h: 44px;
    --cta-w: auto;
    --cta-align: flex-start;
    --cta-text: left;
  }
}

@media (min-width: 1180px) {
  :root {
    --lin-card-cols: 220px minmax(0, 1fr);
    --lin-img-ar: 4 / 5;
  }
}

* { box-sizing: border-box; }

/* A class with an explicit `display` beats the UA stylesheet's [hidden] rule, so
   state it here -- otherwise .done and .err render while still marked hidden. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "IBM Plex Sans", Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}
a { color: var(--blue); }
a:hover { color: var(--navy); }
img { display: block; }

.page { display: flex; flex-direction: column; }
.shell { max-width: 1200px; margin: 0 auto; width: 100%; }

h2 { margin: 0; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.2; text-wrap: balance; }

/* ---------- buttons ---------- */
.btn {
  min-height: 56px;
  padding: 0 36px;
  background: var(--gold);
  color: var(--navy);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  width: var(--cta-w);
}
.cta { margin: 0; display: flex; flex-direction: column; gap: 12px; align-items: var(--cta-align); width: 100%; }
.cta .note { margin: 0; font-size: 16px; color: var(--pale); text-align: var(--cta-text); }
.cta .note b { color: var(--coral); }
.cta-center { align-items: center; }
.cta-center .note { text-align: center; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: var(--hero-h);
  display: flex;
  background: var(--navy) url(assets/hero-bg-900.webp) var(--hero-pos) / cover no-repeat;
  color: #fff;
}
@media (min-width: 900px) { .hero { background-image: url(assets/hero-bg-1440.webp); } }
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: var(--hero-grad);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: min(220px, 40%); z-index: 1;
  background: linear-gradient(rgba(10,22,60,0), var(--navy));
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: var(--hero-pad);
  display: flex; flex-direction: var(--hero-dir);
  align-items: center; justify-content: space-between;
  gap: var(--hero-gap) 48px;
}
.hero-art {
  width: 100%;
  max-width: var(--art-max-w);
  max-height: var(--art-max-h);
  object-fit: contain;
  flex: 1 1 0;
  min-width: 0;
}
.hero-text { display: flex; flex-direction: column; gap: var(--hero-text-gap); max-width: 600px; width: 100%; flex: 1 1 0; }
.eyebrow {
  margin: 0 0 -4px;
  font-size: 16px; line-height: 1.3; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--pale-2);
}
.hero h1 { margin: 0; font-size: clamp(34px, 4.6vw, 64px); line-height: 1.1; font-weight: 700; text-wrap: balance; }
.hero-sub { margin: 0; font-size: 20px; line-height: 1.5; max-width: 34ch; text-wrap: pretty; }
.hero .cta { margin-top: 8px; }

/* ---------- video ---------- */
.video { background: var(--navy); padding: var(--vid-pad); }
.video-frame {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: 10px; overflow: hidden; background: #000;
  max-width: 960px; margin: 0 auto;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- shared: image-left / heading-right pairs ---------- */
/* The design put the heading before the image on narrow and inside the text
   column on wide, via two duplicated sc-if branches. Grid areas give the same
   two layouts from a single heading element. */
.split {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  grid-template-areas: "h" "i" "l";
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(56px, 8vw, 104px) 20px;
}
.split > .split-h { grid-area: h; }
.split > .split-i { grid-area: i; align-self: center; min-width: 0; }
.split > .split-l { grid-area: l; min-width: 0; }
@media (min-width: 900px) {
  .split {
    grid-template-areas: "i h" "i l";
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto 1fr;
    align-items: start;
    row-gap: clamp(20px, 3vw, 28px);
  }
  .split > .split-h { align-self: end; }
}

figure.photo { margin: 0; display: flex; flex-direction: column; gap: 12px; }
figure.photo .frame { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--ph); }
figure.photo .frame img { width: 100%; height: 100%; object-fit: cover; }
figure.photo figcaption { font-size: 15px; color: var(--muted); }

/* ---------- topics ---------- */
.topics { background: #fff; }
/* Full-bleed white band, content capped at 1200px and centred (padding rather
   than max-width so the background still spans the page). */
.topics { padding-inline: max(20px, calc((100% - 1200px) / 2)); }
/* Design centres the heading+list column vertically against the photo. */
@media (min-width: 900px) {
  .topics {
    grid-template-areas: "i ." "i h" "i l" "i .";
    grid-template-rows: 1fr auto auto 1fr;
    row-gap: 0;
    align-items: center;
  }
  .topics > .split-h { align-self: end; margin-bottom: clamp(20px, 3vw, 28px); }
  .topics > .split-l { align-self: start; }
}
.topics ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.topics li {
  display: grid; grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px; align-items: baseline; padding: 18px 0;
  border-top: 1px solid var(--line);
}
.topics li:first-child { border-top-color: var(--ink); }
.topics .n { font-size: 15px; font-weight: 600; letter-spacing: .08em; color: var(--blue); }
.topics .t { font-size: clamp(19px, 1.8vw, 21px); line-height: 1.4; font-weight: 500; text-wrap: pretty; }

/* ---------- lineage ---------- */
.lineage { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 104px) 20px; background: var(--bg-alt); }
.lineage .texture {
  position: absolute; left: 0; right: 0; top: 0;
  height: var(--lin-bg-h);
  background: var(--blue); opacity: .07;
  -webkit-mask: url(assets/sirtutim-1.webp) center / cover no-repeat, linear-gradient(#000 60%, transparent);
  -webkit-mask-composite: source-in;
  mask: url(assets/sirtutim-1.webp) center / cover no-repeat, linear-gradient(#000 60%, transparent);
  mask-composite: intersect;
  pointer-events: none;
}
.lineage-grid {
  position: relative; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: var(--lin-cols);
  gap: 32px clamp(40px, 6vw, 72px); align-items: start;
}
.lineage-intro { display: flex; flex-direction: column; gap: 20px; hyphens: manual; }
.lineage-intro p { margin: 0; max-width: 60ch; text-wrap: pretty; }
.lineage ol { margin: 0; padding: 0; list-style: none; min-width: 0; }
.lineage li { position: relative; padding: 0 0 24px 36px; }
.lineage li:last-child { padding: 0; }
.lineage .stem { position: absolute; left: 7px; top: 14px; bottom: -14px; width: 2px; background: var(--line-2); }
.lineage li:nth-last-child(2) .stem { z-index: 1; background: var(--blue); bottom: calc(-1 * var(--lin-dot-top)); }
.lineage .dot { position: absolute; z-index: 1; left: 3px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.lineage .who { display: block; font-size: 17px; line-height: 1.5; font-weight: 700; letter-spacing: .04em; color: var(--ink); }
.lineage .who span { font-weight: 500; letter-spacing: 0; color: var(--muted); }
.lineage .full { display: block; font-size: 16px; line-height: 1.5; color: var(--muted); }

.lin-card {
  margin: var(--lin-card-margin);
  padding: var(--lin-card-pad);
  background: #fff; border-radius: 10px; box-shadow: 0 1px 0 var(--line);
  display: grid; grid-template-columns: var(--lin-card-cols);
  gap: 16px 32px; align-items: start;
}
.lin-card .dot-lg {
  position: absolute; z-index: 1; left: 1px; top: var(--lin-dot-top);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 0 4px #dbe2f3;
}
.lin-card .who { grid-column: 1 / -1; color: var(--blue); }
.lin-card .frame { aspect-ratio: var(--lin-img-ar); border-radius: 6px; overflow: hidden; background: var(--ph); }
.lin-card .frame img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 22%; }
.lin-card .body { min-width: 0; display: flex; flex-direction: column; gap: 14px; hyphens: manual; }
.lin-card .body p { margin: 0; font-size: 17px; line-height: 1.55; text-wrap: pretty; }
.lin-card blockquote {
  margin: 0; padding-top: 16px; border-top: 1px solid var(--line);
  font-family: "IBM Plex Serif", Georgia, serif; font-style: italic;
  font-size: clamp(19px, 1.8vw, 21px); line-height: 1.5; color: var(--navy); text-wrap: pretty;
}

/* ---------- mid-page CTA ---------- */
.band {
  position: relative; isolation: isolate;
  padding: clamp(72px, 10vw, 128px) 24px;
  background: radial-gradient(120% 90% at 50% 0%, #1d3576 0%, #11245a 45%, #0a163c 100%);
  color: #fff;
}
.band .texture {
  position: absolute; inset: 0; z-index: 1;
  background: url(assets/sirtutim-2.webp) center / cover no-repeat; opacity: .1;
  -webkit-mask: linear-gradient(transparent, #000 25%, #000 75%, transparent);
  mask: linear-gradient(transparent, #000 25%, #000 75%, transparent);
  pointer-events: none;
}
.band-inner {
  position: relative; z-index: 2; max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 24px; text-align: center; align-items: center;
}
.band h2 { text-wrap: initial; }

/* ---------- format ---------- */
.format { padding: clamp(56px, 8vw, 104px) 24px; background: #fff; }
.format-head { display: flex; flex-direction: column; gap: 12px; }
.format-head p { margin: 0; font-size: 20px; font-weight: 600; }
.format-wrap { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(28px, 4vw, 40px); }
.format-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px clamp(32px, 5vw, 64px);
}
.track {
  display: grid; grid-row: span 3; grid-template-rows: subgrid;
  row-gap: 20px; align-content: start;
  padding-top: 24px; border-top: 1px solid var(--ink); min-width: 0;
}
.track-when { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
.when { display: flex; flex-direction: column; gap: 2px; padding-right: 20px; border-right: 1px solid var(--line-2); }
.when .day { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.when .time { font-size: 30px; font-weight: 700; line-height: 1.1; color: var(--navy); }
.when .tz { font-size: 13px; font-style: italic; color: var(--muted); }
.track h3 { margin: 0; font-size: clamp(21px, 2.2vw, 24px); line-height: 1.3; font-weight: 600; text-wrap: balance; }
.track-desc { display: flex; flex-direction: column; gap: 12px; max-width: 52ch; hyphens: manual; text-wrap: pretty; }
.track-desc p { margin: 0; }
.teachers { display: flex; flex-direction: column; gap: 20px; padding-top: 20px; border-top: 1px solid var(--line-3); }
.teacher { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.teacher .frame { flex: none; width: 80px; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: var(--ph); }
.teacher .frame img { width: 100%; height: 100%; object-fit: cover; }
.teacher .bio { flex: 1 1 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; hyphens: manual; text-wrap: pretty; }
.teacher .name { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 600; color: var(--blue); }
.teacher .bio p:last-child { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); }

/* ---------- organization ---------- */
.org { background: var(--bg-alt); }
.org-wrap { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.org .split { padding: 0; grid-template-areas: "h" "i" "l"; gap: 28px clamp(32px, 5vw, 64px); }
@media (min-width: 900px) { .org .split { grid-template-areas: "i h" "i l"; } }
.org-photo { aspect-ratio: 3 / 2; width: 100%; max-width: 560px; border-radius: 10px; overflow: hidden; background: var(--ph); }
.org-photo img { width: 100%; height: 100%; object-fit: cover; }
.org-copy { display: flex; flex-direction: column; gap: 20px; hyphens: manual; }
.org-copy p { margin: 0; max-width: 60ch; text-wrap: pretty; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: clamp(12px, 2vw, 20px); }
.stat { background: #fff; border-radius: 10px; padding: clamp(16px, 3vw, 24px); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat .n { font-size: clamp(28px, 3vw, 36px); font-weight: 700; color: var(--navy); line-height: 1.1; white-space: nowrap; }
.stat .l { font-size: 16px; line-height: 1.4; color: var(--muted); }
.org-foot { hyphens: manual; }
.org-foot p { margin: 0; max-width: 60ch; text-wrap: pretty; }

/* ---------- faq ---------- */
.faq { padding: clamp(56px, 8vw, 104px) 24px; background: #fff; }
.faq-wrap { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.faq-list { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }
.faq-q {
  width: 100%; min-height: 64px; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: 0; cursor: pointer; text-align: left;
  font: inherit; font-size: 19px; font-weight: 600; color: var(--ink);
}
.faq-q .sign { flex: none; font-size: 26px; font-weight: 400; color: var(--blue); width: 24px; text-align: center; }
.faq-a { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .35s ease; }
.faq-a-inner { overflow: hidden; min-height: 0; padding: 0 24px; display: flex; flex-direction: column; gap: 12px; transition: padding .35s ease, opacity .35s ease; }
.faq-item[aria-expanded="true"] .faq-a-inner { padding-bottom: 24px; }
.faq-a p { margin: 0; max-width: 64ch; }
.faq-item[aria-expanded="false"] .faq-a { grid-template-rows: 0fr; }
.faq-item[aria-expanded="false"] .faq-a-inner { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .faq-a, .faq-a-inner { transition: none; } }

/* ---------- registration ---------- */
.join { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 96px) 20px; background: var(--navy); color: #fff; }
.join .texture {
  position: absolute; inset: 0;
  background: url(assets/sirtutim-3.webp) center / cover no-repeat; opacity: .1;
  -webkit-mask: linear-gradient(transparent, #000 25%, #000 75%, transparent);
  mask: linear-gradient(transparent, #000 25%, #000 75%, transparent);
  pointer-events: none;
}
.join-inner { position: relative; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.join h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; }
.join form { margin: 0; width: 100%; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .legend { font-size: 15px; font-weight: 600; color: var(--pale); }
.field input {
  width: 100%; min-width: 0; min-height: 56px; padding: 0 18px;
  border-radius: 10px; background: #fff; font: inherit; font-size: 17px;
  color: var(--ink); outline: none; border: 2px solid transparent;
}
.field input[aria-invalid="true"] { border-color: var(--err); }
.err { font-size: 15px; color: var(--err-ink); }
.genders {
  display: flex; gap: 4px; padding: 4px; border-radius: 10px;
  border: 2px solid rgba(255,255,255,.3); background: rgba(255,255,255,.06);
}
.genders[aria-invalid="true"] { border-color: var(--err); }
.genders button {
  flex: 1 1 0; min-height: 52px; border: 0; border-radius: 7px;
  font: inherit; font-size: 17px; font-weight: 600; cursor: pointer;
  background: transparent; color: #fff;
}
.genders button[aria-checked="true"] { background: #fff; color: var(--navy); }
.submit-row { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.submit-row .btn { width: 100%; }
.submit-row .note { margin: 0; font-size: 16px; color: var(--pale); text-align: center; }
.submit-row .note b { color: var(--coral); }
.terms { margin: 0; font-size: 14px; line-height: 1.45; color: var(--pale-2); text-align: center; }
.terms a { color: var(--pale); }
/* honeypot: off-screen for humans, irresistible to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
footer { padding: 32px 24px; background: #060e28; color: #c5cad6; font-size: 15px; }
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center;
}
.footer-link { color: #c5cad6; }
.footer-link:hover { color: #fff; }
.footer-inner img { height: var(--foot-logo-h); width: auto; max-width: 100%; filter: brightness(0) invert(1); }

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

/* ---------- Terms and privacy dialogs ---------- */
.legal-dialog { border: 0; border-radius: 16px; padding: 24px 32px 24px; width: min(880px, calc(100vw - 24px)); max-height: calc(100vh - 48px); background: #fff; color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); flex-direction: column; gap: 16px; }
.legal-dialog[open] { display: flex; }
.legal-dialog::backdrop { background: rgba(0,0,0,.55); }
.td-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.td-head h2 { margin: 0; font-size: 26px; line-height: 1.2; text-transform: uppercase; color: var(--navy); }
.td-x { border: 0; background: none; font-size: 36px; line-height: 1; cursor: pointer; color: var(--navy); padding: 0 4px; }
.td-body { overflow-y: auto; flex: 1; min-height: 0; padding-right: 12px; font-size: 16px; line-height: 1.75; }
.td-body h3 { margin: 18px 0 4px; font-size: 20px; text-transform: uppercase; color: var(--navy); }
.td-body h4 { margin: 14px 0 4px; font-size: 17px; color: var(--navy); }
.td-body p { margin: 0 0 6px; }
.td-body ul { margin: 0 0 8px; padding-left: 22px; }
.td-body a { color: var(--blue); }
.td-close { border: 0; border-radius: 999px; background: #05366b; color: #fff; font: inherit; font-weight: 700; font-size: 18px; padding: 10px; cursor: pointer; }
@media (max-width: 600px) { .legal-dialog { padding: 18px 16px; } .td-head h2 { font-size: 20px; } }

.faq-measuring .faq-a, .faq-measuring .faq-a-inner { transition: none !important; }
.faq-list { overflow-anchor: none; }
