:root {
  --ink: #464459;
  --ink-soft: #5d5b70;
  --muted: #6b7a70;
  --green: #3a8d5d;
  --green-dark: #2e7348;
  --sage: #c5d2ce;
  --sage-light: #b3c6b4;
  --deep: #464459;
  --mist: #f5f8f3;
  --line: #dcefe2;
  --card: #ffffff;
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--sage); min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--sage);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Верхня смуга */
.topbar { padding: 18px 0; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 800; letter-spacing: -0.2px; }
.brand img { height: 53px; width: auto; display: block; }
.brand:hover { text-decoration: none; }
.brands { display: flex; align-items: center; gap: 18px; }
.brands .sep { width: 1px; height: 36px; background: rgba(70, 68, 89, 0.25); }
.brand-app { display: inline-flex; }
.brand-app img { height: 62px; width: 62px; margin: -4px 0; display: block; }
.brand-app:hover { text-decoration: none; }
@media (max-width: 520px) { .brands { gap: 12px; } .brand img { height: 42px; } .brand-app img { height: 49px; width: 49px; margin: -3px 0; } .brands .sep { height: 28px; } }

.langmenu { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px 0 14px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.lang-btn:hover { background: #fff; }
.lang-btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(58, 141, 93, 0.35); }
.lang-btn .chev { transition: transform 0.15s; opacity: 0.7; }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 200px;
  max-height: 70vh;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(70, 68, 89, 0.06);
}
.lang-list[hidden] { display: none; }
.lang-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.lang-list li:hover, .lang-list li:focus-visible { background: var(--mist); outline: 0; }
.lang-list li[aria-selected="true"] { font-weight: 700; }
.lang-list li[aria-selected="true"]::after {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8' fill='none' stroke='%233a8d5d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Головна: вступ */
.hero { padding: 36px 0 12px; }
.hero h1 { margin: 0; font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -0.8px; line-height: 1.1; }
.hero p { margin: 10px 0 0; font-size: 18px; color: var(--ink-soft); max-width: 560px; }

h2.section { margin: 44px 0 16px; font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }

/* Картка застосунку: на всю ширину, як у магазинах */
.apps { display: grid; grid-template-columns: 1fr; gap: 16px; }
.app-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.app-card .icon { width: 96px; height: 96px; border-radius: 22px; background: #fff; border: 1px solid var(--line); object-fit: contain; }
.app-card h3 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -0.2px; }
.app-card .sub { margin: 2px 0 8px; font-size: 14px; color: var(--muted); }
.app-card .desc { margin: 0; color: var(--ink-soft); font-size: 15px; max-width: 640px; }
.app-card .btn { align-self: center; white-space: nowrap; }
@media (max-width: 720px) {
  .app-card { grid-template-columns: auto 1fr; padding: 20px; gap: 16px 18px; }
  .app-card .icon { width: 72px; height: 72px; border-radius: 18px; }
  .app-card .btn { grid-column: 1 / -1; text-align: center; }
}

.btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--green-dark); text-decoration: none; }

/* Публікації */
.posts { display: grid; gap: 12px; }
.more { display: inline-block; margin-top: 14px; font-weight: 700; }
.post {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  background: var(--card);
  border-radius: 16px;
  padding: 16px 20px;
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}
.post:hover { text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); }
.post .t { font-weight: 700; }
.post .m { font-size: 13px; color: var(--muted); white-space: nowrap; }
.empty { background: rgba(255, 255, 255, 0.55); border-radius: 16px; padding: 18px 20px; color: var(--ink-soft); }

/* Запрошення на програму (лише для посилань виду PG-XXXX) */
.program-card { display: none; background: #fff; border-radius: 20px; padding: 24px; margin: 8px 0 8px; box-shadow: 0 10px 30px rgba(0,0,0,.08); text-align: center; }
.program-card p { margin: 0 0 14px; }
.code-box { background: var(--mist); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 22px; font-weight: 800; letter-spacing: 2px; margin-bottom: 14px; }
.program-card .btn { align-self: auto; }

/* Сторінка застосунку */
.back { display: inline-block; margin: 6px 0 0; font-weight: 600; color: var(--ink); opacity: 0.85; }
.app-hero { display: flex; gap: 28px; align-items: center; padding: 22px 0 8px; flex-wrap: wrap; }
.app-hero .icon { width: 132px; height: 132px; border-radius: 30px; background: #fff; border: 1px solid var(--line); object-fit: contain; flex: none; }
.app-hero h1 { margin: 0; font-size: clamp(26px, 4.4vw, 40px); font-weight: 800; letter-spacing: -0.6px; line-height: 1.12; }
.app-hero .sub { margin: 6px 0 14px; font-size: 18px; color: var(--ink-soft); }
.store-pill { display: inline-block; padding: 12px 20px; border-radius: 12px; background: rgba(255,255,255,.7); font-weight: 700; color: var(--ink); }
.store-btn { display: inline-block; background: #111; color: #fff; padding: 12px 22px; border-radius: 12px; font-weight: 700; }
.store-btn:hover { text-decoration: none; background: #000; }

.shots-wrap { position: relative; margin-top: 8px; }
.shots {
  display: flex;
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
/* Скріншоти нарізані з однієї панорами, тож їх треба ставити впритул */
.shots img { display: block; height: clamp(360px, 62vh, 560px); width: auto; flex: none; scroll-snap-align: start; }
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--deep);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s, background 0.15s;
}
.arrow svg { display: block; }
.arrow:hover { background: #2d2b3a; transform: translateY(-50%) scale(1.06); }
.arrow:focus-visible { outline: 3px solid rgba(58, 141, 93, 0.7); outline-offset: 2px; }
.arrow.prev { left: 14px; }
.arrow.next { right: 14px; }
.arrow[hidden] { display: none; }
@media (hover: none) { .arrow { display: none; } }

.about-lead { margin: 0 0 24px; font-size: 19px; line-height: 1.6; color: var(--ink); max-width: 760px; }
.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; }
.about-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}
.about-card h3 { margin: 0 0 18px; font-size: 13px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--green); }
.about-card p { margin: 0 0 14px; color: var(--ink-soft); }
.about-card p:last-child { margin-bottom: 0; }
.about-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.about-card li { position: relative; padding-left: 32px; color: var(--ink-soft); line-height: 1.55; }
.about-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(58, 141, 93, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%233a8d5d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.about-card .fine { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.55; color: var(--muted); }
.about-card .fine + .fine { margin-top: 10px; padding-top: 0; border-top: 0; }

footer { margin-top: auto; padding: 36px 0 28px; text-align: center; font-size: 13.5px; color: #383647; }
footer a { color: var(--ink); text-decoration: underline; font-weight: 600; }

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-card { padding: 24px 22px; }
}

@media (max-width: 600px) {
  .app-hero .icon { width: 96px; height: 96px; border-radius: 22px; }
  .post { flex-direction: column; gap: 4px; }
}

/* Нарізані зі спільної панорами скріншоти стикуються без видимих швів на дробових розмірах */
.shots img { margin-right: -1px; }
.shots img:last-child { margin-right: 0; }
