@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Lora:wght@400;600;700&display=swap");

:root {
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  --font-heading: "Lora", Georgia, serif;
  --bg: #f6efe4;
  --bg-soft: #fff8ee;
  --bg-alt: #eef3f7;
  --text: #1d2a39;
  --text-muted: rgba(29, 42, 57, 0.78);
  --line: rgba(23, 50, 77, 0.14);
  --card: rgba(255, 255, 255, 0.82);
  --cta: #3f7e6d;
  --cta-hover: #356b5d;
  --accent: #f59e0b;
  --shadow: 0 24px 56px rgba(85, 61, 22, 0.14);
  --shadow-soft: 0 14px 32px rgba(85, 61, 22, 0.1);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(120% 90% at 50% -12%, rgba(255, 255, 255, 0.88) 0%, rgba(246, 239, 228, 0) 54%),
    linear-gradient(180deg, #fff8ee 0%, #f6efe4 36%, #eef3f7 100%);
  line-height: 1.65;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 238, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
}

.nav {
  display: none;
  gap: 16px;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.nav a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 22px;
  border-radius: 14px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-body);
  transition: transform 120ms ease, background-color 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--cta);
  color: #fff;
  box-shadow: 0 10px 24px rgba(60, 127, 111, 0.28);
}

.btn--primary:hover {
  background: var(--cta-hover);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.hero {
  padding: 28px 0 32px;
}

.hero__grid {
  display: grid;
  gap: 22px;
}

.hero__panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.42), rgba(255,255,255,0.16));
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
}

.hero__media {
  min-height: 420px;
  background: linear-gradient(135deg, #d8e8f3 0%, #f9e1bf 42%, #f3d5c9 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 24px;
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 14px 0 12px;
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero p,
.page-hero p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.hero__actions,
.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.hero__stats {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.hero__visual {
  position: relative;
  min-height: 420px;
}

.hero__visual img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 22, 34, 0.06), rgba(14, 22, 34, 0.34));
}

.stat-card,
.category-card,
.content-card,
.quote-card,
.faq-item,
.cta-panel,
.detail-card,
.step-card {
  background: var(--card);
  border: 1px solid rgba(23, 50, 77, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.stat-card {
  padding: 18px;
}

.stat-card strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.section {
  padding: 24px 0 34px;
}

.section__heading {
  margin-bottom: 18px;
  max-width: 760px;
}

.section__heading h2 {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.15;
}

.section__heading p {
  margin: 0;
  color: var(--text-muted);
}

.section__heading .section__micro {
  margin-top: 12px;
}

.section__micro {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.55;
}

.section__micro a {
  color: var(--cta);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.category-card,
.content-card,
.detail-card,
.step-card,
.cta-panel,
.quote-card {
  padding: 20px;
}

.content-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
  text-decoration: none;
}

/*
 * Карточки контенту та блоки visualCard на внутрішніх сторінках =
 * те саме, що в застосунку (app/styles/app.css):
 * — .app-media-card (~2101), плеєр .app-card-view-image-wrap (~4300), текст (~2156)
 */
.seo-app-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  scroll-snap-align: start;
  border: 1px solid rgba(23, 50, 77, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(125%);
  box-shadow: 0 10px 24px rgba(85, 61, 22, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

article.seo-app-card {
  cursor: default;
}

a.content-card.seo-app-card {
  cursor: pointer;
  color: inherit;
}

a.content-card.seo-app-card:active {
  transform: scale(0.98);
}

@media (hover: hover) {
  a.content-card.seo-app-card:hover {
    transform: translateY(-2px);
    border-color: rgba(23, 50, 77, 0.22);
  }

  a.content-card.seo-app-card:active:hover {
    transform: scale(0.98);
  }
}

a.content-card.seo-app-card:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 3px;
}

.seo-app-card__player {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-width: 620px;
  margin-inline: auto;
  flex-shrink: 0;
  background: rgba(241, 244, 247, 0.92);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.seo-app-card__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

/* Колишній visual-card--screen: скрін інтерфейсу з UI-файлів лендингу */
.seo-app-card__player--ux {
  aspect-ratio: 4 / 4.8;
  max-width: 100%;
  background: linear-gradient(180deg, #f8f3ea, #eef3f7);
  padding: 18px;
  box-sizing: border-box;
}

.seo-app-card__player--ux .seo-app-card__img {
  object-fit: contain;
  object-position: center center;
}

.seo-app-card__body {
  padding: 10px 12px 12px;
  display: grid;
  gap: 3px;
}

.seo-app-card .seo-app-card__body .tag-row {
  margin-top: 10px;
}

.seo-app-card__title {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.24;
  font-weight: 700;
}

.seo-app-card__sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.seo-app-card.content-card .tag {
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(23, 50, 77, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 640;
}

.seo-app-card.seo-app-card--no-media .seo-app-card__body {
  padding: 16px 14px 14px;
}

.content-card__meta {
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3f7e6d;
}

.category-card h3,
.detail-card h3,
.cta-panel h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.category-card p,
.detail-card p,
.quote-card p,
.cta-panel p {
  margin: 0;
  color: var(--text-muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(63, 126, 109, 0.1);
  color: #2d5c50;
  font-size: 0.82rem;
  font-weight: 700;
}

.page-hero {
  padding: 28px 0 10px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  text-decoration: none;
}

.detail-layout {
  display: grid;
  gap: 18px;
}

.steps {
  display: grid;
  gap: 12px;
}

.step-card strong {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.16);
  color: #8b5e00;
  margin-bottom: 10px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  padding: 18px 20px;
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.03rem;
}

.faq-item p {
  margin: 0;
  color: var(--text-muted);
}

.cta-panel {
  display: grid;
  gap: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
}

.visual-grid {
  display: grid;
  gap: 16px;
}

.story-block {
  display: grid;
  gap: 16px;
}

.story-block__quote {
  padding: 20px;
  background: rgba(255, 255, 255, 0.78);
  border-left: 4px solid rgba(196, 139, 122, 0.9);
  border-radius: 0 18px 18px 0;
  box-shadow: var(--shadow-soft);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  line-height: 1.55;
}

.site-footer {
  padding: 28px 0 40px;
  color: var(--text-muted);
}

.site-footer__inner {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid;
  gap: 12px;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .hero__grid {
    grid-template-columns: 1.25fr 0.75fr;
    align-items: stretch;
  }

  .hero__stats {
    margin-top: 0;
  }

  .detail-layout {
    grid-template-columns: 1.3fr 0.7fr;
    align-items: start;
  }

  .visual-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .story-block {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }
}

/* Mobile: readable card art (full frame), caption clearly below; tighter hero so grids start sooner */
@media (max-width: 899px) {
  .hero {
    padding: 12px 0 14px;
  }

  .hero__grid {
    gap: 12px;
  }

  .hero__media {
    min-height: 0;
    border-radius: 22px;
  }

  .hero__content {
    padding: 18px 18px 16px;
  }

  .hero__visual {
    min-height: 0;
    border-radius: 22px;
    max-height: min(42vh, 280px);
  }

  .hero__visual img {
    min-height: 0;
    height: 100%;
    max-height: min(42vh, 280px);
    object-fit: cover;
    object-position: center 30%;
  }

  .hero__stats {
    margin-top: 8px;
    gap: 8px;
  }

  .stat-card {
    padding: 14px 16px;
  }

  .section {
    padding: 14px 0 22px;
  }

  /* Перший блок під hero (цитата / історія) — менше повітря зверху */
  .hero + .section {
    padding-top: 6px;
  }

  .story-block {
    gap: 12px;
  }

  .story-block__quote {
    padding: 16px;
    font-size: 1.05rem;
  }

  .category-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 16px;
  }

  .category-card__icon {
    align-self: flex-start;
  }

  .seo-app-card__player {
    max-width: 100%;
    max-height: min(72vh, 620px);
  }

  .seo-app-card__player--ux {
    max-height: min(52vh, 460px);
  }

  .grid {
    gap: 12px;
  }

  .grid--2 {
    grid-template-columns: 1fr;
  }

  .grid--3 {
    grid-template-columns: 1fr;
  }
}
