/* Аватарська Школа Творіння
   Тема: нічне небо і Творящий Вогонь, лише темна. Один акцент (вогонь), кнопки-пігулки, поверхні 24px. */

:root {
  color-scheme: dark;
  --bg: #0b1030;
  --bg-2: #11173d;
  --surface: #161d48;
  --ink: #eef0fb;
  --muted: #b4bbe0;
  --line: #2b3470;
  --accent: #ffa245;
  --accent-hover: #ffb866;
  --on-accent: #1a0f05;
  --glow-1: rgba(255, 170, 60, .38);
  --glow-2: rgba(220, 90, 30, .16);
  --night: #1d2660;
  --night-ink: #f2f3fc;
  --night-muted: #c3c9ee;
  --night-accent: #ffb14e;
  --shadow: 0 24px 60px -32px rgba(0, 0, 10, .7);
  --radius: 24px;
  --display: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}


* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(3rem, 7vw, 5.5rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); }
h3 { font-size: 1.75rem; }
p { text-wrap: pretty; }

.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.section { padding-block: clamp(56px, 8vw, 112px); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }

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

.skip { position: absolute; left: 16px; top: -80px; z-index: 40; background: var(--surface); padding: 10px 18px; border-radius: 999px; }
.skip:focus { top: 12px; }

/* Кнопки та посилання */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border-radius: 999px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, border-color .2s, transform .15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); border-color: var(--accent); }
.btn--small { min-height: 42px; padding: 0 20px; font-size: .95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.link { font-weight: 700; color: var(--accent); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__in { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__name { font-family: var(--display); font-weight: 700; font-size: 1.12rem; line-height: 1.05; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .98rem; color: var(--muted); transition: color .2s; }
.nav a:not(.btn):hover { color: var(--ink); }
.header .nav { gap: 12px; }

/* Перемикач мов */
.lang { position: relative; }
.lang summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px;
  font-weight: 700; font-size: .85rem; letter-spacing: .06em; cursor: pointer; user-select: none;
  transition: border-color .2s, background .2s;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: none; }
.lang summary:hover, .lang[open] summary { border-color: var(--accent); background: var(--surface); }
.lang summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang__globe { width: 16px; height: 16px; color: var(--accent); }
.lang__chev { width: 12px; height: 12px; color: var(--muted); transition: transform .2s; }
.lang[open] .lang__chev { transform: rotate(180deg); }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 180px;
  list-style: none; padding: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); animation: lang-in .18s ease-out;
}
.lang__menu a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  text-decoration: none; color: var(--muted); font-size: .95rem; transition: background .15s, color .15s;
}
.lang__menu a:hover { background: var(--bg-2); color: var(--ink); }
.lang__menu b { min-width: 34px; font-size: .8rem; letter-spacing: .06em; color: var(--ink); }
.lang__menu a[aria-current] { color: var(--ink); }
.lang__menu a[aria-current]::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
@keyframes lang-in { from { opacity: 0; transform: translateY(-4px); } }
/* Вузькі телефони: у шапці лишаються логотип і мова, кнопка запису є на першому екрані */
@media (max-width: 480px) {
  .header .nav .btn--small { display: none; }
}
@media (max-width: 380px) {
  .lang__globe { display: none; }
  .lang summary { padding: 0 12px; }
}

/* Головний екран */
.hero { position: relative; overflow-x: clip; display: flex;align-items: center; min-height: calc(100dvh - 73px); max-height: 860px; padding-block: 40px 56px; }
.hero__in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 span { color: var(--accent); }
.hero .lead { margin-top: 24px; }
.hero__text > * { animation: rise .9s cubic-bezier(.16, 1, .3, 1) both; }
.hero__text > :nth-child(2) { animation-delay: .1s; }
.hero__text > :nth-child(3) { animation-delay: .2s; }

.halo { position: relative; justify-self: center; width: min(100%, 460px); aspect-ratio: 1; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
.halo > * { grid-area: 1 / 1; }
.halo__glow {
  width: 150%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--glow-1) 0%, var(--glow-2) 34%, transparent 66%);
  animation: breathe 9s ease-in-out infinite;
}
.halo__rays {
  width: 132%; aspect-ratio: 1; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, var(--glow-1) 0deg .5deg, transparent 1.5deg 10deg);
  -webkit-mask: radial-gradient(circle, transparent 38%, #000 45%, transparent 69%);
          mask: radial-gradient(circle, transparent 38%, #000 45%, transparent 69%);
  animation: turn 140s linear infinite;
}
.halo__ring { border-radius: 50%; border: 1px solid var(--accent); }
.halo__ring--1 { width: 86%; aspect-ratio: 1; opacity: .35; }
.halo__ring--2 { width: 102%; aspect-ratio: 1; opacity: .15; }
.halo__logo { width: 70%; height: auto; filter: drop-shadow(0 12px 30px var(--glow-2)); animation: appear 1.4s cubic-bezier(.16, 1, .3, 1) both; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes appear { from { opacity: 0; transform: scale(.9); } }
@keyframes breathe { 50% { transform: scale(1.07); opacity: .78; } }
@keyframes turn { to { transform: rotate(1turn); } }

/* Семінар: нічний блок з датою */
.event { background: var(--night); color: var(--night-ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.event .lead, .event .note { color: var(--night-muted); }
.event__upcoming { display: grid; grid-template-columns: minmax(260px, 4fr) 8fr; }
.event__date {
  padding: 56px 32px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 42%, rgba(255, 160, 60, .34), transparent 64%);
}
.event__day { font-family: var(--display); font-weight: 700; font-size: clamp(8rem, 15vw, 12rem); line-height: .85; color: var(--night-accent); font-variant-numeric: lining-nums; }
.event__month { font-family: var(--display); font-size: 1.9rem; margin-top: 12px; }
.event__time { margin-top: 20px; font-weight: 600; }
.event__local { margin-top: 12px; font-size: .95rem; color: var(--night-muted); }
.event__body { padding: 56px clamp(24px, 5vw, 64px); }
.event__body .lead { margin-top: 16px; }
.gifts { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; margin-top: 36px; }
.gifts li { position: relative; padding-left: 34px; }
.gifts li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--night-accent); }
.event .btn { background: var(--night-accent); border-color: var(--night-accent); color: #1a0f05; }
.event .btn:hover { background: #ffc579; border-color: #ffc579; }
.event .note { margin-top: 20px; font-size: .95rem; }
.event__past { padding: clamp(40px, 7vw, 80px); }
.event__past .lead { margin-top: 16px; }

/* Про школу */
.about .lead { margin-top: 16px; max-width: 56ch; }
.about p:not(.lead) { margin-top: 16px; max-width: 56ch; color: var(--muted); }

/* Маніфест */
.manifesto { text-align: center; }
.manifesto__text { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.22; max-width: 22em; margin-inline: auto; text-wrap: balance; }
.manifesto em { color: var(--accent); padding-bottom: .05em; }

/* Напрямки */
.bento { display: grid; grid-template-columns: 7fr 5fr; grid-template-rows: auto auto; gap: 20px; margin-top: 48px; }
.tile { border-radius: var(--radius); padding: clamp(28px, 3.6vw, 48px); background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.tile p { color: var(--muted); max-width: 52ch; }
.tile .link { margin-top: auto; padding-top: 12px; }
.tile--webinar {
  background:
    radial-gradient(circle at 108% -8%, transparent 0 120px, var(--glow-1) 121px 124px, transparent 125px 168px, var(--glow-1) 169px 171px, transparent 172px 224px, var(--glow-2) 225px 227px, transparent 228px),
    var(--surface);
  min-height: 340px; justify-content: flex-end;
}
.tile--webinar h3 { font-size: clamp(2.2rem, 3.6vw, 3rem); }
.tile--webinar .link { margin-top: 0; }
.tile--webinar { grid-column: 1; grid-row: 1; }
.tile--consult { grid-column: 2; grid-row: 1 / span 2; }
.tile--meditation { grid-column: 1; grid-row: 2; background: linear-gradient(170deg, var(--bg-2) 20%, color-mix(in srgb, var(--glow-1) 55%, var(--bg-2))); }
.tile--meditation p { color: var(--ink); }
.tile--consult { border: 1px solid var(--line); background: transparent; box-shadow: none; }
.tile--consult .mentor-art + .link { margin-top: 0; }
/* Ілюстрація: медитація серця */
.mentor-art { flex: 1 1 220px; width: 100%; min-height: 220px; max-height: 340px; margin-top: auto; }
.mentor-art .ma-line { stroke: var(--ink); stroke-width: 1.5; opacity: .85; }
.mentor-art .ma-heart { fill: var(--accent); }
.mentor-art .ma-spark { fill: var(--accent); opacity: .7; }
.tile__label { font-weight: 700; margin-top: auto; padding-top: 24px; }
.themes { list-style: none; width: 100%; display: grid; gap: 10px; }
.themes li { background: var(--surface); border-radius: 999px; padding: 12px 20px; font-size: .98rem; font-weight: 500; }

/* Засновниця */
.founder { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 7vw, 96px); align-items: center; }
.portrait__frame {
  position: relative; width: min(100%, 440px); aspect-ratio: 1; margin-inline: auto;
  border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, var(--surface) 52%, var(--bg-2));
  box-shadow: 0 0 0 10px var(--bg), 0 0 0 12px var(--accent), 0 0 80px 20px var(--glow-2);
}
.portrait__fallback { width: 56%; }
.portrait__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.founder__text .lead { margin-top: 16px; }
.founder__text p { max-width: 56ch; }
blockquote { margin-block: 32px; }
blockquote p { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.25; max-width: 24em !important; }
.founder .link { display: inline-block; margin-top: 24px; }

/* Шлях участі */
#how { background: var(--bg-2); }
.path { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 56px; }
.path li { position: relative; padding: 52px 28px 0 0; }
.path li::before { content: ""; position: absolute; top: 0; left: 0; width: 24px; height: 24px; border-radius: 50%; border: 4px solid var(--accent); background: var(--bg-2); z-index: 1; }
.path li:not(:last-child)::after { content: ""; position: absolute; top: 11px; left: 24px; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--line)); }
.path p { color: var(--muted); margin-top: 12px; }

/* Вперше на практиці */

/* Питання */
.faq { max-width: 860px; }
.faq__list { margin-top: 40px; display: grid; gap: 12px; }
details { background: var(--surface); border-radius: var(--radius); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 28px; font-weight: 700; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.7rem; line-height: 1; font-weight: 400; color: var(--accent); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 28px 24px; color: var(--muted); }

/* Заклик */
.cta {
  text-align: center; display: flex; flex-direction: column; align-items: center;
  padding: clamp(48px, 7vw, 96px) 24px; border-radius: var(--radius);
  background: radial-gradient(ellipse at 50% 0%, var(--glow-1), var(--glow-2) 38%, transparent 70%), var(--surface);
  box-shadow: var(--shadow);
}
.cta img { margin-bottom: 24px; }
.cta .lead { margin-top: 16px; color: var(--ink); }
.cta .actions { justify-content: center; }

/* Підвал */
.footer { border-top: 1px solid var(--line); padding-block: 48px; }
.footer__in { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.footer__links { list-style: none; display: flex; gap: 28px; font-weight: 600; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--accent); }
.footer__social { gap: 14px; justify-self: end; }
.footer__social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; transition: transform .2s; }
.footer__social a:hover { transform: translateY(-2px) scale(1.06); }
.footer__social a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.footer__social svg { display: block; width: 34px; height: 34px; }
.footer__privacy { grid-column: 2; margin-top: -16px; font-size: .9rem; color: var(--muted); justify-self: end; }
.footer__privacy a { color: inherit; }
.footer__privacy a:hover { color: var(--accent); }
.footer__pay { grid-column: 2; justify-self: end; margin-top: -16px; list-style: none; display: flex; align-items: center; gap: 10px; }
.footer__pay li { display: grid; place-items: center; width: 54px; height: 34px; background: #fff; border-radius: 6px; box-shadow: 0 2px 8px -2px rgba(0, 0, 10, .5); }
.footer__pay svg { display: block; }
.footer__legal { grid-column: 1 / -1; font-size: .9rem; color: var(--muted); }

/* Поява під час прокручування (лише коли працює JS) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.path li:nth-child(2) { transition-delay: .08s; }
.path li:nth-child(3) { transition-delay: .16s; }
.path li:nth-child(4) { transition-delay: .24s; }

/* Сторінка документа (політика конфіденційності) */
.legal { max-width: 780px; }
.legal h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.legal__meta { margin-top: 12px; color: var(--muted); }
.legal h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin-top: 48px; }
.legal p, .legal ul { margin-top: 14px; }
.legal ul { padding-left: 1.3em; }
.legal li + li { margin-top: 8px; }
.legal a { color: var(--accent); }
.legal__todo { background: color-mix(in srgb, var(--accent) 18%, transparent); padding: 0 .25em; border-radius: 4px; }

/* Сторінка подяки після оплати */
.thanks { padding-block: clamp(32px, 6vh, 72px); overflow: hidden; }
.thanks__in { max-width: 720px; text-align: center; }
.thanks__halo { width: min(56vw, 240px, 26vh); margin-bottom: 20px; }
.thanks__check { width: 62%; height: auto; fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 8px 24px var(--glow-2)); }
.thanks__check path { stroke-width: 6; stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw .8s .4s cubic-bezier(.65, 0, .35, 1) forwards; }
.thanks h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); }
.thanks .lead { margin: 20px auto 0; }
.thanks__note { margin: 16px auto 0; max-width: 560px; color: var(--muted); }
.thanks .actions { justify-content: center; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .thanks__check path { animation: none; stroke-dashoffset: 0; } }

/* Планшет і телефон */
@media (max-width: 960px) {
  html:not(.js) .header { position: static; }
  html:not(.js) .header__in { flex-wrap: wrap; height: auto; padding-block: 12px; gap: 12px; }
  html:not(.js) .nav { flex-wrap: wrap; gap: 12px 20px; }

  .hero { min-height: 0; max-height: none; padding-block: 28px 48px; }
  .hero__in { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .halo { order: -1; width: min(42vw, 240px); }
  .hero__text { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero .actions { justify-content: center; }

  .event__upcoming { grid-template-columns: 1fr; }
  .event__date { padding-bottom: 8px; }
  .bento { grid-template-columns: 1fr; }
  .tile--webinar, .tile--consult, .tile--meditation { grid-column: auto; grid-row: auto; }
  .tile--webinar { min-height: 300px; }
  .footer__links { flex-wrap: wrap; gap: 4px 24px; }
  .footer__privacy a { display: inline-block; padding-block: 10px; }
  .footer__social { gap: 10px; }
  .founder__text .link { display: inline-block; padding-block: 8px; }
  .founder { grid-template-columns: 1fr; }
  .portrait__frame { width: min(76%, 360px); }
  .path { grid-template-columns: 1fr; margin-top: 40px; }
  .path li { padding: 0 0 36px 48px; }
  .path li:last-child { padding-bottom: 0; }
  .path li:not(:last-child)::after { top: 24px; bottom: 0; left: 11px; right: auto; width: 2px; height: auto; background: linear-gradient(var(--accent), var(--line)); }
}

@media (max-width: 600px) {
  .gifts { grid-template-columns: 1fr; }
  .gifts { gap: 16px; }
  .actions { flex-direction: column; align-items: stretch; }
  .btn { white-space: normal; text-align: center; padding-block: 12px; }
  .hero { padding-block: 20px 40px; }
  .hero__in { gap: 12px; }
  .halo { width: min(40vw, 170px); }
  .hero h1 { font-size: clamp(2.4rem, 11.5vw, 3rem); }
  .hero .lead { font-size: 1.05rem; margin-top: 16px; }
  .hero .actions { margin-top: 24px; }
  .footer__in { grid-template-columns: 1fr; }
  .footer__privacy, .footer__pay, .footer__social { grid-column: auto; justify-self: start; }
  .footer__social { margin-left: -5px; }
}

/* Телефон у горизонтальному положенні: логотип і текст поруч */
@media (max-width: 960px) and (orientation: landscape) and (max-height: 560px) {
  .hero { padding-block: 24px 32px; }
  .hero__in { grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 24px; align-items: start; }
  .halo { margin-top: 8px; }
  .halo { order: 0; width: min(100%, 62vh); }
  .hero__text { text-align: left; }
  .hero .lead { margin-inline: 0; font-size: 1rem; margin-top: 14px; }
  .hero h1 { font-size: clamp(2.2rem, 6vw, 3rem); }
  .hero .actions { justify-content: flex-start; flex-direction: row; margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
