/* ui_kits/website/home.css
   HOME page — extends the imported design system (colors_and_type.css + site.css).
   Adds the .lcard link-card component (per docs/components/link-card.md) plus the
   HOME-specific section layouts (Центр, Фото рецепції, Консиліум, Апарати, FAQ). */

:root {
  /* HOME / link-card tokens (see docs/components/link-card.md) */
  --gold-l:    #C9A86A;            /* сяюче золото — default lcard stripe on HOME */
  --bronze-2:  var(--ink-700);     /* card description text */
  --champ:     #FCF8F0;            /* champagne lift on hover */
  /* track colours — only used when a card physically sits on that track page */
  --peak:      #0F6E56;
  --protect:   #9A7339;
  --restore:   #A85A33;
}

/* ============================================================
   Reusable photo placeholder ("[ВСТАВТЕ СВОЄ ФОТО СЮДИ]")
   Replace the .ph element with <img> when real photography lands.
   ============================================================ */
.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #EAE3D6 0%, #DCCEB4 100%);
  color: var(--gold-700);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.6;
  padding: 24px;
  border-radius: var(--r-photo);
  box-shadow: inset 0 0 0 1px #C8B58C;
  overflow: hidden;
}
.ph img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ph--portrait { aspect-ratio: 4 / 5; }
.ph--landscape { aspect-ratio: 4 / 3; }
/* Framed photo — image fills the frame edge-to-edge (no padding gap) and the gold
   line is drawn as an overlay ON TOP of the photo via ::after, so it overlaps the
   portrait's edge and no empty space can show between photo and frame. */
.ph--framed { position: relative; padding: 0; box-shadow: none; }
.ph--framed::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid #C8B58C;
  border-radius: inherit;
  pointer-events: none;
}

/* ============================================================
   HERO — the brain animation, embedded full-viewport
   ============================================================ */
.home-hero {
  display: block;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  border: 0;
}

/* ============================================================
   .lcard — link-card component
   Variant A: <a class="lcard lcard--link">  (clickable, arrow, hover lift)
   Variant B: <div class="lcard">            (static, no arrow, no hover)
   ============================================================ */
.lcard {
  position: relative;
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  padding: 34px 30px 34px 34px;
  text-decoration: none;
  overflow: hidden;
}
/* left colour stripe — defaults to gold; override with --lcard-stripe */
.lcard::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--lcard-stripe, var(--gold-l));
}
.lcard__title {
  font-family: var(--font-serif);
  font-weight: 600;                 /* heavier than .hv-service-card__title */
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink-900);
  margin: 0 0 10px;
  text-wrap: pretty;
}
.lcard__title a { color: inherit; text-decoration: none; }
.lcard__desc {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.55;
  color: var(--bronze-2);
  margin: 0;
  text-wrap: pretty;
}

/* Variant A — clickable */
.lcard__arrow {
  position: absolute;
  top: 22px; right: 22px;
  width: 14px; height: 14px;
  color: var(--gold-700);
  transition: transform var(--t-fast) var(--ease-quiet);
}
a.lcard {
  transition: transform var(--t-base) var(--ease-quiet),
              background var(--t-base) var(--ease-quiet),
              border-color var(--t-base) var(--ease-quiet),
              box-shadow var(--t-base) var(--ease-quiet);
}
a.lcard:hover {
  transform: translateY(-3px);
  background: var(--champ);
  border-color: var(--gold-300);
  box-shadow: var(--shadow-card);
}
a.lcard:hover .lcard__arrow { transform: translate(2px, -2px); }

/* Track-bound stripe colours (used only inside the matching track page) */
.lcard--peak    { --lcard-stripe: var(--peak); }
.lcard--protect { --lcard-stripe: var(--protect); }
.lcard--restore { --lcard-stripe: var(--restore); }

/* ============================================================
   Generic lcard grid
   ============================================================ */
.lcard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* HOME — «Наш підхід» (3), «Чотири клініки» (2×2), «Технології» (3×2) */
.home-approach .lcard-grid { grid-template-columns: repeat(3, 1fr); margin-top: 44px; }
.home-clinics  .lcard-grid { grid-template-columns: repeat(2, 1fr); margin-top: 40px; }
.home-tech     .lcard-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) {
  .home-approach .lcard-grid,
  .home-tech .lcard-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .home-approach .lcard-grid,
  .home-clinics .lcard-grid,
  .home-tech .lcard-grid { grid-template-columns: 1fr; }
}
/* method list inside the «Передова наука» card */
.home-approach .lcard__desc ul { margin: 10px 0 0; padding-left: 20px; }
.home-approach .lcard__desc li { margin: 3px 0; }

/* footer «Анонімний канал» — a button that looks like the list links */
.hv-footer__list li button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  cursor: pointer; text-align: left;
  transition: color 0.2s var(--ease-quiet);
}
.hv-footer__list li button:hover { color: var(--gold-700); }

/* ============================================================
   .rc-lede — visible page H1 block for the RESTORE sub-clinic pages
   (the patient-request headline, between the hero brain and section 1).
   ============================================================ */
.rc-lede { padding: 22px 0 0; }
.rc-lede__h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  margin: 0;
  max-width: 22ch;
  text-wrap: balance;
}
@media (max-width: 560px) {
  .rc-lede { padding: 14px 0 0; }
}

/* ============================================================
   .page-intro — first-screen block on the track landings (Peak / Protect
   / Restore): eyebrow · H1 · sub · CTAs · trust line. Mirrors Protect's
   original .protect-intro so all three tracks open the same way.
   ============================================================ */
.page-intro { padding-bottom: 88px; }
.page-intro__inner { max-width: 920px; }
.page-intro__h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  margin: 18px 0 0;
  text-wrap: balance;
  max-width: 20ch;
}
.page-intro__sub {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-700);
  margin: 24px 0 0;
  max-width: 60ch;
}
.page-intro__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.page-intro__trust {
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-500);
  margin: 32px 0 0;
  max-width: 74ch;
  padding-left: 18px;
  border-left: 2px solid var(--gold-700);
}
.page-intro--peak    .page-intro__trust { border-left-color: var(--peak); }
.page-intro--restore .page-intro__trust { border-left-color: var(--restore); }
/* Narrow screens: stack the CTAs full-width so a long label (RESTORE's
   «Записатися на консультацію») can't push past the viewport. */
@media (max-width: 560px) {
  .page-intro__ctas { flex-direction: column; align-items: stretch; }
  .page-intro__ctas .hv-btn { width: 100%; white-space: normal; }
}

/* ============================================================
   SECTION — Центр нейромедицини
   ============================================================ */
.home-about__lead {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-700);
  max-width: 62ch;
  margin: 22px 0 56px;
}

/* ============================================================
   SECTION — Фото рецепції (full-bleed)
   ============================================================ */
.home-reception { position: relative; width: 100%; }
.home-reception .ph {
  border-radius: 0;
  height: clamp(360px, 64vh, 760px);
  box-shadow: none;
}
.home-reception__caption {
  position: absolute;
  left: clamp(24px, 5vw, 80px);
  bottom: clamp(24px, 5vw, 56px);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cream-50);
  background: rgba(43, 33, 23, 0.42);
  backdrop-filter: blur(4px);
  padding: 10px 18px;
  border-radius: 2px;
}

/* ============================================================
   SECTION — Консиліум лікарів
   ============================================================ */
.home-cons__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr;
  gap: 72px;
  align-items: center;
}
.home-cons__body { max-width: 56ch; }
.home-cons__text {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-700);
  margin: 24px 0 0;
}
.home-cons__media { position: relative; }
/* Desktop: the portrait hugs the right edge of its (narrower) column. */
.home-cons__media .ph--framed { margin-left: auto; }

.trust {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.trust__card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  padding: 30px 28px;
}
.trust__value {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--gold-700);
  display: block;
  margin-bottom: 14px;
}
.trust__label {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-700);
}
.home-cons__note {
  margin-top: 24px;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-500);
}
.home-cons__note a { color: var(--gold-700); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   SECTION — Апарати та технології
   ============================================================ */
.home-tech__lead {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-700);
  max-width: 58ch;
  margin: 22px 0 56px;
}

/* ============================================================
   SECTION — FAQ (native <details>, no JS)
   ============================================================ */
.home-faq__inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 72px;
  align-items: start;
}
.home-faq__head { position: sticky; top: 40px; }
.home-faq__list {
  border-top: 1px solid var(--sand-200);
}
.home-faq__item { border-bottom: 1px solid var(--sand-200); }
.home-faq__q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.3;
  color: var(--ink-900);
  transition: color var(--t-fast) var(--ease-quiet);
}
.home-faq__q::-webkit-details-marker { display: none; }
.home-faq__q:hover { color: var(--gold-700); }
/* FAQ question wrapped in an <h4> (so questions carry heading semantics and can
   surface in People-Also-Ask). It must look exactly like the plain summary text:
   inherit the serif type, drop the default heading margins. */
.home-faq__qh { margin: 0; font: inherit; color: inherit; letter-spacing: inherit; }
/* Заголовок групи питань (H3) у згрупованому FAQ — маленький верхній підпис-роздільник. */
.home-faq__group {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin: 38px 0 2px;
}
.home-faq__group:first-child { margin-top: 0; }
.home-faq__q::after {
  content: "";
  flex: 0 0 auto;
  width: 16px; height: 16px;
  background:
    linear-gradient(var(--gold-700), var(--gold-700)) center / 16px 1.5px no-repeat,
    linear-gradient(var(--gold-700), var(--gold-700)) center / 1.5px 16px no-repeat;
  transition: transform var(--t-base) var(--ease-quiet);
}
.home-faq__item[open] .home-faq__q::after { transform: rotate(90deg); opacity: 0.9; }
/* hide the vertical bar when open → turns "+" into "−" */
.home-faq__item[open] .home-faq__q::after {
  background:
    linear-gradient(var(--gold-700), var(--gold-700)) center / 16px 1.5px no-repeat;
  transform: none;
}
.home-faq__a {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-700);
  margin: 0;
  padding: 0 60px 26px 0;
  max-width: 64ch;
}

/* ============================================================
   Responsive
   ============================================================ */
/* HOME is locked to the hero until the brain settles on HELMIVI (no programme
   selected). The hero iframe fills the first screen; unlocking lets HOME scroll. */
body.hero-lock { overflow: hidden; height: 100vh; height: 100dvh; }

/* footer links inherit the list look (plain text → hover gold) */
.hv-footer__list li a { color: inherit; text-decoration: none; }

@media (max-width: 960px) {
  .lcard-grid { grid-template-columns: repeat(2, 1fr); }
  .home-cons__grid { grid-template-columns: 1fr; gap: 40px; }
  /* Stacked: the portrait centres instead of sticking to the right edge. */
  .home-cons__media .ph--framed { margin-inline: auto; }
  .home-faq__inner { grid-template-columns: 1fr; gap: 32px; }
  .home-faq__head { position: static; }
}
@media (max-width: 560px) {
  .lcard-grid { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr; }
  .home-faq__q { font-size: 18px; }
  .home-faq__a { padding-right: 0; }
}

/* ============================================================
   Express brain-state test (see brain-test.js / brain-test.i18n.js)
   A HOME-only feature: an invite band + a modal quiz whose result
   places the visitor on the PEAK · PROTECT · RESTORE continuum.
   Styled from the shared tokens — cream sheet, gold accents,
   Cormorant headings — with the hero programme colours on the gauge.
   ============================================================ */
:root {
  --bt-peak: #3b9500; --bt-protect: #ffbf00; --bt-restore: #cc3a2f;
  --bt-protect-text: #b9820a; /* legible amber for PROTECT label text on cream */
}

/* ---- "Про центр" state doors → direct links to Peak / Protect / Restore ----
   Recognition line + a coloured CTA; the top border + link colour carry each
   programme's hue (from the hero brief), tying the section to the continuum. */
.home-doors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: clamp(28px, 3vw, 40px);
}
.home-door {
  display: flex; flex-direction: column; text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--door, var(--gold-500));
  border-radius: 14px;
  padding: 26px 22px;
  color: var(--ink-900);   /* override the default <a> link colour */
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.home-door:hover {
  transform: translateY(-3px);
  background: var(--cream-100);
  box-shadow: 0 16px 34px -20px rgba(43, 33, 23, 0.4);
}
.home-door--peak    { --door: var(--bt-peak); }
.home-door--protect { --door: var(--bt-protect); }
.home-door--restore { --door: var(--bt-restore); }
.home-door__k {
  font-family: var(--font-sans); font-weight: 600;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-900);
}
.home-door__d {
  font-family: var(--font-sans); font-size: 14.5px; line-height: 1.5;
  color: var(--ink-500); margin: 11px 0 18px; flex: 1;
}
.home-door__go {
  font-family: var(--font-sans); font-weight: 600; font-size: 13.5px;
  color: var(--gold-700);
}
.home-door--peak    .home-door__go { color: var(--bt-peak); }
.home-door--protect .home-door__go { color: var(--bt-protect-text); }
.home-door--restore .home-door__go { color: var(--bt-restore); }
@media (max-width: 760px) { .home-doors { grid-template-columns: 1fr; } }
