/* ============================================================
   AFTERA — brand stylesheet
   Brand colours: teal #00705e · purple #5c1f7d
   Typefaces: Atyp Display (headings) · Atyp Text (body)
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Atyp Text';
  src: url('../fonts/AtypText-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Atyp Text';
  src: url('../fonts/AtypText-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Atyp Text';
  src: url('../fonts/AtypText-Semibold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Atyp Text';
  src: url('../fonts/AtypText-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Atyp Display';
  src: url('../fonts/AtypDisplay-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Atyp Display';
  src: url('../fonts/AtypDisplay-Semibold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Atyp Display';
  src: url('../fonts/AtypDisplay-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --teal: #00705e;
  --teal-dark: #00553f;
  --teal-soft: #e6f0ed;
  --purple: #5c1f7d;
  --purple-dark: #461560;
  --purple-soft: #f0e9f4;

  --ink: #1c2422;
  --muted: #5c6a66;
  --line: #e7eae9;
  --bg: #ffffff;
  --bg-alt: #f7f9f8;
  --cream: #fbfaf7;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(28,36,34,.04), 0 8px 24px rgba(28,36,34,.06);
  --shadow-lg: 0 12px 40px rgba(28,36,34,.10);
  --maxw: 1140px;
  --gut: clamp(20px, 5vw, 56px);

  --font-display: 'Atyp Display', 'Atyp Text', system-ui, sans-serif;
  --font-text: 'Atyp Text', system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-text);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: clamp(56px, 8vw, 100px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.bg-alt { background: var(--bg-alt); }
.bg-cream { background: var(--cream); }
.center { text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 14px;
}
.eyebrow--purple { color: var(--purple); }

.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 48px); }
.section-head.center { margin-inline: auto; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15.5px; letter-spacing: .01em;
  border: 1.5px solid transparent; transition: .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn--purple { background: var(--purple); color: #fff; }
.btn--purple:hover { background: var(--purple-dark); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn--light { background: #fff; color: var(--teal); }
.btn--light:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; }
.brand img { height: 45px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 15.5px; font-weight: 500; color: var(--muted); transition: color .15s; }
.nav-links a:hover { color: var(--teal); }
.nav-actions { display: flex; align-items: center; gap: 14px; }

/* language toggle */
.lang {
  display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden;
}
.lang button {
  border: 0; background: transparent; padding: 6px 12px;
  font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .03em;
}
.lang button.is-active { background: var(--teal); color: #fff; }

/* mobile nav */
.nav-toggle { display: none; background: transparent; border: 0; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--cream); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 88% -10%, rgba(92,31,125,.10), transparent 60%),
    radial-gradient(55% 70% at 6% 110%, rgba(0,112,94,.10), transparent 60%);
  pointer-events: none;
}
.hero .wrap { position: relative; padding-block: clamp(56px, 9vw, 104px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(34px, 5.2vw, 58px); letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero h1 em.alt { color: var(--purple); }
.hero p.lede { font-size: clamp(17px, 2vw, 20px); color: var(--muted); margin-top: 22px; max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-trust { display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.hero-trust .num { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--teal); }
.hero-trust .num em { color: var(--purple); font-style: normal; }
.hero-trust .lbl { font-size: 13.5px; color: var(--muted); margin-top: 2px; }

/* hero passport visual */
.hero-art { position: relative; min-height: 320px; display: grid; place-items: center; }
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-lg); padding: 28px; width: min(100%, 380px);
}
.hero-card h3 { font-size: 19px; }
.hero-card .row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.hero-card .row:last-child { border-bottom: 0; }
.hero-card .flag { font-size: 26px; line-height: 1; }
.hero-card .rt { font-weight: 600; font-size: 15px; }
.hero-card .rs { font-size: 13px; color: var(--muted); }
.hero-card .rmeta { margin-left: auto; text-align: right; font-size: 13px; color: var(--teal); font-weight: 600; }

/* ---------- Program cards ---------- */
.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: .2s ease; height: 100%;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card .flag { font-size: 34px; line-height: 1; margin-bottom: 14px; }
.card h3 { font-size: 19px; }
.card .ctype { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--purple); margin-bottom: 6px; }
.card .meta { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; }
.card .meta div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.card .meta .k { color: var(--muted); }
.card .meta .v { font-weight: 600; }
.card .more {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 14.5px; font-weight: 600; color: var(--teal); display: inline-flex; align-items: center; gap: 6px;
}
.card:hover .more { gap: 10px; }
.card .more svg { width: 16px; height: 16px; transition: .2s; }
.card a.stretch { position: absolute; inset: 0; }

/* ---------- Official-agent banner (landing) ---------- */
.agent-banner {
  display: flex; align-items: center; gap: 22px; margin-top: 22px;
  background: var(--teal-soft); border: 1px solid #cfe2dc;
  border-radius: var(--radius); padding: 22px 26px;
}
.agent-badge {
  flex: none; width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; background: var(--teal); color: #fff;
}
.agent-badge svg { width: 28px; height: 28px; }
.agent-body { flex: 1 1 auto; min-width: 0; }
.agent-body strong { display: block; font-family: var(--font-display); font-size: 18px; color: var(--teal-dark); }
.agent-body p { font-size: 14.5px; color: var(--ink); margin-top: 6px; max-width: 72ch; }
.agent-actions { flex: none; display: flex; flex-direction: column; gap: 10px; }
.agent-actions .btn { justify-content: center; }
@media (max-width: 760px) {
  .agent-banner { flex-direction: column; align-items: flex-start; }
  .agent-actions { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Principles ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.feat .ic {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal); margin-bottom: 16px;
}
.feat:nth-child(even) .ic { background: var(--purple-soft); color: var(--purple); }
.feat .ic svg { width: 22px; height: 22px; }
.feat h3 { font-size: 18px; margin-bottom: 8px; }
.feat p { font-size: 15px; color: var(--muted); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; padding-top: 6px; }
.step .n {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal); color: #fff; margin-bottom: 14px;
}
.step:nth-child(even) .n { background: var(--purple); }
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { font-size: 14.5px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--teal) 0%, var(--teal-dark) 60%, var(--purple) 140%);
  color: #fff; border-radius: var(--radius); padding: clamp(32px, 5vw, 56px);
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(24px, 3.4vw, 34px); }
.cta-band p { color: rgba(255,255,255,.85); margin-top: 10px; max-width: 48ch; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.contact-info .ci { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-info .ci:last-child { border-bottom: 0; }
.contact-info .ic { color: var(--teal); flex: none; margin-top: 2px; }
.contact-info .ic svg { width: 20px; height: 20px; }
.contact-info .k { font-size: 13px; color: var(--muted); }
.contact-info .v { font-weight: 600; }
.contact-info .v a:hover { color: var(--teal); }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 15.5px; color: var(--ink); background: var(--bg-alt); transition: .15s;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--teal); background: #fff; }
.field textarea { resize: vertical; min-height: 90px; }
.form .consent { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.form .consent a { color: var(--teal); text-decoration: underline; }
.form-note { font-size: 14px; margin-top: 12px; }
.form-note.ok { color: var(--teal); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: #10201c; color: #cdd6d3; padding-block: 56px 28px; }
.site-footer a { color: #cdd6d3; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand img { height: 45px; filter: brightness(0) invert(1); opacity: .95; }
.footer-brand p { color: #9fb0ab; font-size: 14.5px; margin-top: 14px; max-width: 34ch; }
.footer-col h4 { font-family: var(--font-text); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #7e928c; margin-bottom: 14px; font-weight: 600; }
.footer-col li { margin-bottom: 9px; font-size: 14.5px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; font-size: 13px; color: #7e928c; }

/* ---------- Program detail page ---------- */
.prog-hero { background: var(--cream); position: relative; overflow: hidden; }
.prog-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 80% at 92% 0%, rgba(92,31,125,.10), transparent 60%);
}
.prog-hero .wrap { position: relative; padding-block: clamp(36px, 6vw, 64px); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.crumbs a:hover { color: var(--teal); }
.prog-hero .flag { font-size: 56px; line-height: 1; margin-bottom: 16px; }
.prog-hero .ctype { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--purple); margin-bottom: 8px; }
.prog-hero h1 { font-size: clamp(30px, 4.6vw, 48px); }
.prog-hero p.lede { font-size: 18px; color: var(--muted); margin-top: 16px; max-width: 60ch; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; }
.fact .k { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.fact .v { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--teal); margin-top: 6px; }
.fact:nth-child(even) .v { color: var(--purple); }

.prog-body { display: grid; grid-template-columns: 1fr 340px; gap: clamp(28px, 5vw, 56px); align-items: start; }
.prose h2 { font-size: 26px; margin: 8px 0 14px; }
.prose h3 { font-size: 19px; margin: 28px 0 12px; }
.prose p { color: var(--muted); margin-bottom: 14px; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 11px; color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2300705e' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
}
/* official-agent licence callout */
.license-box {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--teal-soft); border: 1px solid #cfe2dc;
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 28px;
}
.license-badge {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; background: var(--teal); color: #fff;
}
.license-badge svg { width: 24px; height: 24px; }
.license-body strong { display: block; font-family: var(--font-display); font-size: 17px; color: var(--teal-dark); }
.license-body p { font-size: 14.5px; color: var(--ink); margin: 6px 0 12px; }
.license-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 600; color: var(--teal);
}
.license-link:hover { color: var(--teal-dark); }
.license-link svg { width: 15px; height: 15px; }

.aside-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); position: sticky; top: 92px; }
.aside-card h3 { font-size: 20px; }
.aside-card p { font-size: 14.5px; color: var(--muted); margin: 10px 0 18px; }

.related .grid { margin-top: 8px; }

/* ---------- Blog / Articles ---------- */
.post-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.post-card .ptag { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--purple); margin-bottom: 12px; }
.post-card h3 { font-size: 20px; line-height: 1.28; }
.post-card .excerpt { color: var(--muted); font-size: 15px; margin-top: 11px; flex: 1 1 auto; }
.post-card .post-meta { margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.post-card .more { margin-top: 14px; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--teal); font-size: 14.5px; }
.post-card .more svg { width: 16px; height: 16px; transition: .2s; }
.post-card:hover .more { gap: 10px; }
.post-card a.stretch { position: absolute; inset: 0; z-index: 1; }

/* article page meta + prose extras */
.post-meta-line { font-size: 14px; color: var(--muted); margin-top: 16px; }
.post-meta-line .dot { margin: 0 8px; opacity: .5; }
.prose ul:not(.checklist) { margin: 0 0 16px; padding-left: 1.2em; color: var(--muted); }
.prose ul:not(.checklist) li { list-style: disc; margin-bottom: 8px; }
.prose .lede { font-size: 18px; color: var(--ink); margin-bottom: 18px; }
.note {
  background: var(--cream); border: 1px solid var(--line); border-left: 3px solid var(--purple);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 20px 0; font-size: 14.5px; color: var(--ink);
}
.note strong { color: var(--purple-dark); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Lang visibility ---------- */
[data-lang-en], [data-lang-ru] { display: none; }
html[lang="en"] [data-lang-en] { display: revert; }
html[lang="ru"] [data-lang-ru] { display: revert; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; min-height: auto; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .prog-body { grid-template-columns: 1fr; }
  .aside-card { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .site-header.open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
    position: absolute; left: 0; right: 0; top: 72px; background: #fff;
    padding: 22px var(--gut); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .grid--4, .grid--3, .feat-grid, .steps, .facts { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .hero-trust { gap: 20px; }
}
