/* ============================================================================
   Molfar System — лендінг. Темна тема застосунку.
   Підхід: mobile-first. Базові стилі — телефон; @media розширюють під більші.
   Брейкпоінти:  телефон (база) · планшет ≥600px · десктоп ≥1024px
   ============================================================================ */

:root {
  /* Бренд (бірюза/темно-зелений) */
  --teal:        #2BA89A;
  --teal-bright: #34C9B8;
  --teal-deep:   #1B7A6B;
  --orange:      #E07B39;

  /* Темна тема */
  --bg:        #0E1A18;
  --bg-2:      #13231F;
  --card:      #18302B;
  --card-2:    #1E3A33;
  --border:    #284A42;
  --text:      #E7F0ED;
  --text-dim:  #9DB2AC;
  --text-mut:  #6E8780;

  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1080px;
  --gap:       clamp(16px, 4vw, 28px);
  --shadow:    0 6px 24px rgba(0, 0, 0, 0.35);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

section { padding: clamp(48px, 9vw, 96px) 0; }

.section-head { text-align: center; margin-bottom: clamp(28px, 5vw, 48px); }
.section-head h2 {
  font-size: clamp(1.5rem, 5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.section-head .lead {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: clamp(0.95rem, 2.6vw, 1.1rem);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ── ХЕДЕР ───────────────────────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 26, 24, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--teal-bright), var(--teal-deep));
  display: grid; place-items: center; color: #062019; font-weight: 900;
  font-size: 1rem;
}
.brand b { color: var(--text); }
.brand span { color: var(--teal-bright); }

/* навігація — ховається на телефоні */
.nav { display: none; gap: 22px; }
.nav a { color: var(--text-dim); font-size: 0.95rem; transition: color .15s; }
.nav a:hover { color: var(--teal-bright); }

.header-right { display: flex; align-items: center; gap: 12px; }

/* перемикач мов */
.lang {
  position: relative;
}
.lang-btn {
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 12px; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; text-transform: uppercase; letter-spacing: .04em;
  display: flex; align-items: center; gap: 6px;
}
.lang-btn:hover { border-color: var(--teal); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; min-width: 140px;
  box-shadow: var(--shadow); display: none;
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--text);
  padding: 11px 14px; font-size: 0.9rem; cursor: pointer;
}
.lang-menu button:hover { background: var(--teal-deep); }
.lang-menu button.active { color: var(--teal-bright); font-weight: 700; }

/* ── ХЕРО ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(56px, 12vw, 110px) 0 clamp(48px, 9vw, 90px);
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(43, 168, 154, 0.18), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.badge {
  display: inline-block;
  background: rgba(43, 168, 154, 0.14);
  color: var(--teal-bright);
  border: 1px solid var(--teal-deep);
  border-radius: 999px;
  padding: 6px 14px; font-size: 0.8rem; font-weight: 700;
  letter-spacing: .03em; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2rem, 8vw, 3.6rem);
  font-weight: 900; line-height: 1.08;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff, #Bfeee7);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 16ch; margin: 0 auto;
}
.hero .sub {
  margin: 20px auto 0; max-width: 60ch;
  color: var(--text-dim);
  font-size: clamp(1rem, 3vw, 1.2rem);
}
.hero-cta {
  margin-top: 32px;
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
}
.hero .note { margin-top: 16px; color: var(--text-mut); font-size: 0.85rem; }

/* ── КНОПКИ ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 12px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--teal-bright), var(--teal-deep));
  color: #042019; box-shadow: 0 8px 22px rgba(43, 168, 154, 0.28);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(43, 168, 154, 0.42); }
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-bright); }
.btn svg { width: 20px; height: 20px; }

/* ── СІТКИ КАРТОК ────────────────────────────────────────────────────────── */
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 30px);
}
.card h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--text); }
.card p  { color: var(--text-dim); font-size: 0.96rem; }
.card .ic {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(43, 168, 154, 0.12);
  display: grid; place-items: center; margin-bottom: 16px;
  color: var(--teal-bright);
}
.card .ic svg { width: 24px; height: 24px; }

/* нумерований крок */
.step .num {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-bright), var(--teal-deep));
  color: #042019; font-weight: 900; display: grid; place-items: center;
  margin-bottom: 14px; font-size: 1.05rem;
}

/* ── ABOUT ───────────────────────────────────────────────────────────────── */
.about .prose { max-width: 720px; margin: 0 auto; }
.about .prose p { color: var(--text-dim); margin-bottom: 16px; font-size: 1.02rem; }
.about .prose .lead-line {
  color: var(--text); font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 600; margin-bottom: 24px; text-align: center;
}

/* ── ГАЛЕРЕЯ (горизонтальний скрол) ──────────────────────────────────────── */
.gallery { background: var(--bg-2); }
.gallery-track {
  display: flex; gap: 16px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 6px 18px 22px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--teal-deep) transparent;
}
.gallery-track::-webkit-scrollbar { height: 8px; }
.gallery-track::-webkit-scrollbar-thumb { background: var(--teal-deep); border-radius: 8px; }
.gallery-track::-webkit-scrollbar-track { background: transparent; }
.shot {
  flex: 0 0 auto;
  width: 230px;
  scroll-snap-align: center;
  border-radius: 18px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
}
.shot img { width: 100%; height: auto; display: block; aspect-ratio: 9 / 19.5; object-fit: cover; }
.gallery-empty { text-align: center; color: var(--text-mut); padding: 30px 0; }

/* ── ROADMAP ─────────────────────────────────────────────────────────────── */
.roadmap ol { list-style: none; max-width: 760px; margin: 0 auto; counter-reset: rm; }
.roadmap li {
  counter-increment: rm;
  position: relative;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px 18px 64px; margin-bottom: 14px;
  color: var(--text-dim);
}
.roadmap li::before {
  content: counter(rm);
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(43, 168, 154, 0.14); color: var(--teal-bright);
  border: 1px solid var(--teal-deep);
  display: grid; place-items: center; font-weight: 800;
}

/* ── DOWNLOAD ────────────────────────────────────────────────────────────── */
.download {
  text-align: center;
  background:
    radial-gradient(900px 400px at 50% 120%, rgba(43, 168, 154, 0.15), transparent 70%),
    var(--bg-2);
  border-top: 1px solid var(--border);
}
.download .dl-card {
  max-width: 600px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(28px, 6vw, 44px);
}
.download .dl-actions {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 24px;
}
.download .hint { margin-top: 18px; color: var(--text-mut); font-size: 0.85rem; }
.gh-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-dim); font-size: 0.92rem; margin-top: 6px;
}
.gh-link:hover { color: var(--teal-bright); }
.gh-link svg { width: 20px; height: 20px; }

/* ── ФУТЕР ───────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 40px 0 48px;
  text-align: center;
}
.footer .f-tag { color: var(--text); font-weight: 600; margin-bottom: 14px; }
.footer .f-contact a { color: var(--teal-bright); font-weight: 700; }
.footer .f-rights { color: var(--text-mut); font-size: 0.82rem; margin-top: 16px; }
.footer .f-disc { color: var(--text-mut); font-size: 0.8rem; max-width: 640px; margin: 18px auto 0; }

/* лоадер-стан мови */
[data-i18n].loading { opacity: .4; }

/* ============================================================================
   АДАПТИВ
   ============================================================================ */

/* ── ПЛАНШЕТ ≥ 600px ─────────────────────────────────────────────────────── */
@media (min-width: 600px) {
  .wrap { padding: 0 28px; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .shot { width: 260px; }
  .gallery-track { padding-left: 28px; padding-right: 28px; }
}

/* ── ДЕСКТОП ≥ 1024px ────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  .nav { display: flex; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .shot { width: 280px; }
  .gallery-track {
    max-width: var(--maxw); margin: 0 auto;
    padding-left: 18px; padding-right: 18px;
  }
}

/* великі екрани — трохи більші скріни в галереї */
@media (min-width: 1280px) {
  .shot { width: 300px; }
}

/* доступність: менше анімацій, якщо користувач так просить */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
