/*
Theme Name: Мельниченко — Ноктюрн
Theme URI: https://alexmelnichenko.com
Author: Claude Code, from a design by the project designer
Description: Односторінковий сайт інтеграційної реабілітації Олександра Мельниченка. Побудований на дизайн-системі Nocturne (світлий варіант A). Контент редагується через Налаштувальник (Customizer).
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: melnychenko
Tags: one-page, landing, custom-colors, translation-ready
*/

/* ══════════════════════════════════════════════════════════════════════════
   Ноктюрн світлий A — page styles.

   The Nocturne design system (assets/css/nocturne.css) supplies tokens and
   component classes. This file holds the light-variant role swap and the
   landing page's own layout, translated from the designer's canvas.

   The canvas was authored at a fixed 1160px. Everything at and above that
   width renders exactly as designed; the breakpoints below it are additions
   for real traffic, and they only reflow — no restyling.
   ══════════════════════════════════════════════════════════════════════ */

/* — light variant: the same tokens, different roles — */
body {
  margin: 0;
  --color-bg: var(--color-neutral-200);
  --color-surface: var(--color-neutral-100);
  --color-text: var(--color-neutral-900);
  --color-divider: var(--color-neutral-300);
  --glow-soft: color-mix(in srgb, var(--color-accent) 35%, transparent);
  --glow-strong: color-mix(in srgb, var(--color-accent) 65%, transparent);
  background: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}

a { color: var(--color-accent-700); }
a:hover { color: var(--color-accent-600); }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

@keyframes vertpulse {
  0%, 100% { filter: drop-shadow(0 0 6px var(--glow-soft)); }
  50%      { filter: drop-shadow(0 0 14px var(--glow-strong)); }
}

/* Accessibility: honour a reduced-motion preference — the reveal and the
   vertebra pulse are decorative. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--color-neutral-100); color: var(--color-accent-700);
  padding: 10px 18px; border-radius: var(--radius-md);
}
.skip-link:focus { left: 12px; top: 12px; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* — scroll reveal (JS adds .is-in) — */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ── shell ─────────────────────────────────────────────────────────────── */

.wrap { overflow: clip; }

.shell {
  max-width: 1160px;
  margin: 0 auto;
  padding-inline: 48px;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

/* ── navigation ────────────────────────────────────────────────────────── */

.site-nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--color-neutral-100) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-neutral-300);
}
.site-nav .nav-brand { color: var(--color-neutral-900); text-decoration: none; }
.site-nav a:not(.nav-brand):not(.btn) { color: var(--color-neutral-700); }
.site-nav .btn-primary { color: var(--color-accent-700); }

.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-md); padding: 7px 9px; cursor: pointer;
  color: var(--color-neutral-700);
}
.nav-toggle svg { display: block; }

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  max-width: 1160px; margin: 0 auto;
  padding: 104px 48px 120px;
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 64px; align-items: center;
}
.hero__glow {
  position: absolute; inset: -60px -300px auto; height: 560px;
  background: radial-gradient(ellipse 700px 420px at 70% 40%,
    color-mix(in srgb, var(--color-accent) 18%, transparent), transparent 70%);
  pointer-events: none;
}
.hero__body { position: relative; }
.hero__title {
  font-size: 64px; margin: 0 0 20px; font-weight: 500;
  letter-spacing: -0.03em; line-height: 1.02;
}
.hero__lead {
  margin: 0 0 32px; font-size: 17px; line-height: 1.65;
  max-width: 46ch; color: var(--color-neutral-700);
}
.hero__actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero__actions .btn-primary { padding: 13px 28px; font-size: 15px; }
.hero__media { position: relative; }

.kicker {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
}
.kicker::before {
  content: ""; width: 40px; height: 1px; flex: none;
  background: linear-gradient(to right, transparent, var(--color-accent));
}
.kicker > span,
.kicker-text {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--color-accent-700);
}
.kicker-text { display: block; margin-bottom: 14px; }

/* — placeholder plates (hatched boxes standing in for photography) — */
.ph {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-neutral-300);
  background: repeating-linear-gradient(45deg,
    var(--color-neutral-200) 0 12px, var(--color-neutral-100) 12px 24px);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ph > img { width: 100%; height: 100%; object-fit: cover; }
.ph__label {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
  color: var(--color-neutral-700); background: var(--color-neutral-100);
  padding: 6px 12px; border-radius: var(--radius-sm);
}
.ph--hero { height: 500px; }
.ph--about { height: 440px; }
.ph--map { height: 220px; margin-bottom: 20px; }
.ph--map iframe { width: 100%; height: 100%; border: 0; display: block; }
.ph--review { height: 180px; border-radius: var(--radius-sm); }
.ph--review .ph__label { font-size: 12px; background: transparent; padding: 0; }
.ph--review iframe { width: 100%; height: 100%; border: 0; display: block; }

.note {
  font-size: 11px; color: var(--color-neutral-600); margin: 10px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── section furniture ─────────────────────────────────────────────────── */

.section { padding-bottom: 96px; }
.section--tight { padding-bottom: 88px; }

.section-head {
  display: flex; align-items: baseline; gap: 20px; margin-bottom: 28px;
}
.section-head h2 { font-size: 32px; font-weight: 500; margin: 0; }
.section-head::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to right, var(--color-neutral-300) 0, transparent);
}

.section-head--center { display: block; text-align: center; margin-bottom: 8px; }
.section-head--center::after { content: none; }
.section-head--center h2 { font-size: 36px; margin: 0 0 12px; }
.section-head--center p {
  margin: 0 auto; max-width: 52ch; font-size: 15px; color: var(--color-neutral-700);
}
.section-head--center .kicker-text { margin-bottom: 12px; }

.grid { display: grid; gap: 14px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* — audience cards — */
.card--bordered { border: 1px solid var(--color-neutral-300); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.card--bordered:hover {
  border-color: var(--color-accent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--color-accent) 18%, transparent);
}
.card--bordered .card-kicker { color: var(--color-accent-700); }
.card--bordered .card-body { color: var(--color-neutral-700); }

/* ── path / stages ─────────────────────────────────────────────────────── */

.path { position: relative; max-width: 1160px; margin: 0 auto; padding: 40px 48px 80px; }
.path__track { position: relative; padding: 32px 0 0; }

.stage {
  position: relative; display: grid;
  grid-template-columns: 1fr 150px 1fr;
  align-items: center; min-height: 168px;
}
.stage__text { max-width: 38ch; }
.stage--left  .stage__text { text-align: right; padding-right: 8px; margin-left: auto; }
.stage--right .stage__text { padding-left: 8px; }
.stage__step { font-size: 13px; color: var(--color-accent-700); margin-bottom: 4px; }
.stage__title { font-size: 21px; font-weight: 500; margin: 0 0 6px; }
.stage__desc { margin: 0; font-size: 14px; color: var(--color-neutral-700); }
.stage__vert { display: flex; justify-content: center; }
.stage__vert svg { display: block; overflow: visible; }
.stage__vert--pulse svg { animation: vertpulse 3.5s ease-in-out infinite; }
.stage__vert--final svg {
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--color-accent) 60%, transparent));
}

/* ── stats band ────────────────────────────────────────────────────────── */

.stats {
  background: linear-gradient(135deg, var(--color-section), var(--color-section-glow));
  padding: 64px 48px;
  color: var(--color-neutral-100);
}
.stats__grid {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.stats__value { font-size: 46px; font-weight: 500; letter-spacing: -0.02em; }
.stats__label { font-size: 13px; color: var(--color-neutral-300); margin-top: 4px; }
.stats__note {
  max-width: 1160px; margin: 20px auto 0; font-size: 11px;
  color: var(--color-section-ghost);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── about ─────────────────────────────────────────────────────────────── */

.about {
  max-width: 1160px; margin: 0 auto; padding: 88px 48px 72px;
  display: grid; grid-template-columns: 360px 1fr; gap: 64px;
}
.about h2 { font-size: 32px; font-weight: 500; margin: 0 0 18px; }
.about__lead {
  margin: 0 0 24px; font-size: 15px; line-height: 1.65;
  color: var(--color-neutral-700); max-width: 58ch;
}
.about__facts { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.about__fact { display: flex; gap: 12px; }
.about__fact::before { content: "—"; color: var(--color-accent-700); flex: none; }
.about__fact em { color: var(--color-neutral-600); font-style: normal; }

/* ── method cards ──────────────────────────────────────────────────────── */

.method {
  background: var(--color-neutral-100); border-radius: var(--radius-lg);
  padding: 26px; border: 1px solid var(--color-neutral-300);
}
.method__num { font-size: 34px; color: var(--color-accent); opacity: 0.6; font-weight: 500; }
.method h3 { font-size: 18px; font-weight: 500; margin: 10px 0 8px; }
.method p { margin: 0; font-size: 14px; color: var(--color-neutral-700); line-height: 1.6; }

/* ── reviews ───────────────────────────────────────────────────────────── */

.review--text { justify-content: center; }
.review--text .card-body { font-size: 15px; line-height: 1.6; color: var(--color-neutral-700); }

/* ── faq ───────────────────────────────────────────────────────────────── */

.faq {
  max-width: 1160px; margin: 0 auto; padding: 0 48px 88px;
  display: grid; grid-template-columns: 300px 1fr; gap: 64px;
}
.faq h2 { font-size: 32px; font-weight: 500; margin: 0; }
.faq__item summary {
  padding: 14px 0; font-weight: 500;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq__item summary::after {
  content: "+"; flex: none; font-size: 18px; line-height: 1;
  color: var(--color-accent-700); transition: transform 0.2s ease;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p {
  margin: 0 0 14px; color: var(--color-neutral-700); font-size: 14px; max-width: 60ch;
}
.faq__rule { height: 1px; background: var(--color-neutral-300); }

/* ── contact ───────────────────────────────────────────────────────────── */

.contact {
  position: relative; max-width: 1160px; margin: 0 auto;
  padding: 0 48px 96px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
}
.contact__glow {
  position: absolute; inset: auto -200px -200px; height: 400px;
  background: radial-gradient(ellipse 600px 300px at 30% 100%,
    color-mix(in srgb, var(--color-accent) 14%, transparent), transparent 70%);
  pointer-events: none;
}
.contact__col { position: relative; }
.contact h2 { font-size: 32px; font-weight: 500; margin: 0 0 20px; }
.contact__links { display: flex; gap: 10px; flex-wrap: wrap; }
.contact__direct {
  display: flex; flex-direction: column; gap: 6px;
  margin: 18px 0 0; font-size: 15px;
}
.contact__direct a { text-decoration: none; }

.lead-form {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  background: var(--color-neutral-100); border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: 0 12px 32px rgba(22,24,38,0.08);
}
.lead-form h3 { font-size: 19px; font-weight: 500; margin: 0; }
.lead-form .input {
  background: var(--color-neutral-200);
  border-color: var(--color-neutral-300);
  color: var(--color-neutral-900);
}
.lead-form .btn-primary { padding: 12px 26px; font-size: 15px; color: var(--color-accent-700); }
.lead-form__hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.lead-form__consent { font-size: 12px; color: var(--color-neutral-600); margin: 0; }

.notice {
  border-radius: var(--radius-md); padding: 12px 14px; font-size: 14px; margin: 0;
  border: 1px solid transparent;
}
.notice--ok {
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  border-color: var(--color-accent); color: var(--color-accent-700);
}
.notice--err {
  background: color-mix(in srgb, #c0392b 10%, transparent);
  border-color: #c0392b; color: #96271b;
}

/* ── footer ────────────────────────────────────────────────────────────── */

.site-footer {
  padding: 20px 48px; display: flex; justify-content: space-between; gap: 16px;
  font-size: 12px; color: var(--color-neutral-600);
  max-width: 1160px; margin: 0 auto; box-sizing: border-box;
  border-top: 1px solid var(--color-neutral-300);
}

/* ══════════════════════════════════════════════════════════════════════════
   Responsive — reflow only. The canvas design is preserved intact at
   ≥1160px; below that the columns collapse in the order the content reads.
   ══════════════════════════════════════════════════════════════════════ */

@media (max-width: 1159px) {
  .shell, .hero, .path, .about, .faq, .contact { padding-inline: 32px; }
  .stats { padding-inline: 32px; }
  .site-footer { padding-inline: 32px; }
  .hero { padding-top: 72px; padding-bottom: 88px; gap: 40px; }
  .hero__title { font-size: 52px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 300px 1fr; gap: 40px; }
  .faq { grid-template-columns: 240px 1fr; gap: 40px; }
  .contact { gap: 40px; }
  .stats__value { font-size: 38px; }
}

@media (max-width: 900px) {
  .site-nav .nav { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; }
  .site-nav .nav-links {
    display: none; flex-basis: 100%; flex-direction: column;
    align-items: flex-start; gap: 4px; padding: 8px 0 12px;
  }
  .site-nav .nav-links.is-open { display: flex; }
  .site-nav .nav-links a { padding: 8px 0; font-size: 15px; }

  .hero { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 64px; }
  .hero__media { order: -1; }
  .ph--hero { height: 320px; }
  .hero__title { font-size: 42px; }
  .hero__lead { font-size: 16px; }

  .stage { grid-template-columns: 96px 1fr; gap: 16px; min-height: 0; padding: 20px 0; }
  .stage__vert { grid-column: 1; grid-row: 1; justify-content: flex-start; }
  .stage__vert svg { width: 72px; }
  .stage--left .stage__text,
  .stage--right .stage__text {
    grid-column: 2; grid-row: 1;
    text-align: left; padding: 0; margin: 0; max-width: none;
  }
  .stage > div:empty { display: none; }
  .path { padding-bottom: 56px; }
  .path__track { padding-top: 12px; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .ph--about { height: 340px; max-width: 420px; }
  .faq { grid-template-columns: 1fr; gap: 24px; }
  .contact { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr; }
  .section-head--center h2 { font-size: 30px; }
}

@media (max-width: 600px) {
  .shell, .hero, .path, .about, .faq, .contact,
  .stats, .site-footer { padding-inline: 20px; }
  .hero__title { font-size: 34px; }
  .section-head h2, .about h2, .contact h2, .faq h2 { font-size: 26px; }
  .grid--4, .grid--2 { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr; gap: 20px; }
  .stats__value { font-size: 34px; }
  .section { padding-bottom: 56px; }
  .section--tight { padding-bottom: 52px; }
  .lead-form { padding: 20px; }
  .site-footer { flex-direction: column; gap: 6px; }
  .stage { grid-template-columns: 72px 1fr; }
  .stage__vert svg { width: 56px; }
}
