/* ==========================================================================
   Content.UA — Ghost theme
   Design system: clean modernization of the Tilda brand.
   Montserrat · brand yellow #ffe100 · raspberry CTA #c40c60 · line illustrations
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --yellow: #ffe100;
  --yellow-2: #ffde2a;
  --yellow-soft: #fff7cc;
  --cta: #c40c60;
  --cta-hover: #a30a50;
  --orange: #ff5500;
  --blue: #3f67ab;
  --ink: #1c1c1c;
  --ink-2: #4a4a4a;
  --muted: #7a7a7a;
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --line: #e8e8e8;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(56px, 8vw, 112px);
  --radius: 18px;
  --radius-sm: 12px;

  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 2px 10px rgba(28, 28, 28, .06);
  --shadow: 0 18px 48px rgba(28, 28, 28, .10);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 800; line-height: 1.12; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); font-weight: 800; }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-weight: 700; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--ink-2); line-height: 1.6; }
.eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1rem;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(40px, 5vw, 72px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .95rem 2rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
  border: 2px solid transparent; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  line-height: 1; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--cta { background: var(--cta); color: #fff; box-shadow: 0 10px 24px rgba(196, 12, 96, .28); }
.btn--cta:hover { background: var(--cta-hover); }
.btn--yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 10px 24px rgba(255, 225, 0, .35); }
.btn--yellow:hover { background: var(--yellow-2); }
.btn--orange { background: var(--orange); color: #fff; box-shadow: 0 10px 24px rgba(255, 85, 0, .28); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }

/* ==========================================================================
   Navbar
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 74px; }
.nav__brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.nav__brand img { width: 44px; height: 44px; }
.nav__menu { display: flex; align-items: center; gap: .35rem; margin-left: auto; flex-wrap: wrap; }
.nav__link {
  padding: .5rem .7rem; font-size: .93rem; font-weight: 600; color: var(--ink);
  border-radius: 8px; transition: color .15s ease, background .15s ease; white-space: nowrap;
}
.nav__link:hover, .nav__link.active { color: var(--cta); }
.nav__sep { width: 1px; height: 20px; background: var(--line); margin-inline: .35rem; }
.nav__lang { font-size: .82rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.nav__lang:hover { color: var(--ink); }
.nav__toggle { display: none; margin-left: auto; background: none; border: 0; padding: .5rem; }
.nav__toggle span { display: block; width: 26px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

@media (max-width: 940px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; inset: 74px 0 auto; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 1rem var(--gutter) 1.4rem;
    gap: .1rem; box-shadow: var(--shadow); display: none;
  }
  .nav.open .nav__menu { display: flex; }
  .nav__menu .nav__link { padding: .75rem .4rem; font-size: 1rem; }
  .nav__sep { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-top: clamp(40px, 6vw, 84px); padding-bottom: clamp(20px, 3vw, 40px); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero__title { max-width: 15ch; }
.hero__lead { max-width: 46ch; margin-bottom: 2rem; }
.hero__art { position: relative; }
.hero__art img { width: 100%; max-width: 460px; margin-inline: auto; }
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; text-align: left; }
  .hero__art { order: -1; max-width: 300px; }
}

/* ---------- Video + contact bubble row ---------- */
.promo { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(20px, 3vw, 40px); align-items: stretch; }
.video-card {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 260px;
  background: linear-gradient(120deg, #2a2a2a, #111); color: #fff; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 1.6rem; box-shadow: var(--shadow);
}
.video-card__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 74px; height: 74px; border-radius: 50%; background: var(--cta);
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.4);
  transition: transform .2s ease;
}
.video-card:hover .video-card__play { transform: translate(-50%, -50%) scale(1.08); }
.video-card__play::after { content: ""; border-left: 20px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 5px; }
.video-card__label { position: relative; font-weight: 700; font-size: 1.05rem; max-width: 22ch; }
.contact-bubble {
  border-radius: var(--radius); background: var(--yellow-soft); border: 1px solid var(--yellow-2);
  padding: 1.6rem; display: flex; flex-direction: column; justify-content: center; gap: 1rem;
}
.contact-bubble p { font-weight: 600; }
.chat-icons { display: flex; gap: .6rem; }
.chat-icons a { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.chat-icons img { width: 22px; height: 22px; }
@media (max-width: 720px) { .promo { grid-template-columns: 1fr; } }

/* ==========================================================================
   Feature rows (illustration + text)
   ========================================================================== */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.feature--flip .feature__art { order: 2; }
.feature__art { display: flex; justify-content: center; }
.feature__art img { max-height: 320px; width: auto; }
.feature__body { max-width: 52ch; }
.feature__body .lead { margin-bottom: 0; }
@media (max-width: 800px) {
  .feature { grid-template-columns: 1fr; }
  .feature--flip .feature__art { order: -1; }
  .feature__art img { max-height: 220px; }
}

/* ---------- Directions (services intro) ---------- */
.directions__head { display: flex; align-items: center; gap: 1.5rem; margin-bottom: clamp(24px, 4vw, 48px); }
.directions__head img { width: clamp(120px, 18vw, 200px); }
.directions__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.direction {
  background: var(--bg-soft); border-radius: var(--radius); padding: clamp(1.4rem, 2.4vw, 2rem);
  border: 1px solid var(--line); position: relative; overflow: hidden;
}
.direction h3 { margin-bottom: .6rem; }
.direction p { color: var(--ink-2); font-size: .98rem; margin: 0; }
.direction__art { max-height: 120px; margin-bottom: 1rem; }
@media (max-width: 860px) { .directions__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Yellow accent band
   ========================================================================== */
.band-yellow {
  background: var(--yellow); position: relative; overflow: hidden;
  clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%);
}
.band-yellow .container { position: relative; z-index: 1; }
.band-yellow h2 { max-width: 20ch; }
.band-yellow .kicker { font-size: 1.15rem; font-weight: 700; opacity: .85; margin-bottom: .5rem; }
.band-yellow p { max-width: 60ch; color: #2a2600; }
.band-art { position: absolute; right: -4%; bottom: -10%; width: min(420px, 40%); opacity: .9; pointer-events: none; }
@media (max-width: 700px) { .band-yellow { clip-path: none; } .band-art { display: none; } }

/* ==========================================================================
   Benefits grid
   ========================================================================== */
.section-head { text-align: center; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head h2 { margin: 0; }
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 24px); }
.benefit {
  background: var(--yellow); border-radius: var(--radius); padding: clamp(1.4rem, 2vw, 1.8rem);
  min-height: 220px; display: flex; flex-direction: column;
}
.benefit h3 { font-size: 1.12rem; margin-bottom: .7rem; }
.benefit p { font-size: .92rem; color: #2a2600; margin: 0; }
.benefit--dark { background: var(--ink); color: #fff; }
.benefit--dark p { color: rgba(255,255,255,.82); }
@media (max-width: 900px) { .benefits { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .benefits { grid-template-columns: 1fr; } .benefit { min-height: 0; } }

/* ==========================================================================
   Clients
   ========================================================================== */
.clients__badge { display: flex; justify-content: center; margin-bottom: clamp(28px, 4vw, 48px); }
.clients__badge span {
  position: relative; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; padding: .2em 1em;
}
.clients__badge span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 22px;
  background: url("../img/badge-underline.svg") center / contain no-repeat;
}
.clients__logos { width: 100%; max-width: 1000px; margin-inline: auto; }
.clients__logos .desktop { display: block; }
.clients__logos .mobile { display: none; }
@media (max-width: 640px) {
  .clients__logos .desktop { display: none; }
  .clients__logos .mobile { display: block; max-width: 420px; margin-inline: auto; }
}

/* ==========================================================================
   Team band (yellow)
   ========================================================================== */
.team { background: var(--yellow); position: relative; overflow: hidden; }
.team__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.team__body { max-width: 46ch; }
.team__body p { color: #2a2600; }
.team__art img { width: 100%; max-width: 460px; margin-left: auto; }
@media (max-width: 760px) { .team__grid { grid-template-columns: 1fr; } .team__art { order: -1; max-width: 340px; } }

/* ==========================================================================
   Cloud editorial (Хмарна редакція)
   ========================================================================== */
.cloud { position: relative; overflow: hidden; }
.cloud__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.cloud__art { position: relative; }
.cloud__art img.person { width: 100%; max-width: 420px; position: relative; z-index: 1; }
.cloud__art img.deco { position: absolute; width: 120px; opacity: .8; z-index: 0; }
.cloud__art img.deco.c1 { top: 4%; left: 2%; }
.cloud__art img.deco.c2 { bottom: 10%; right: 6%; width: 90px; }
.cloud__body h2 { color: var(--ink); }
.cloud__body .brandmark { font-size: 1.1rem; font-weight: 800; color: var(--cta); }
@media (max-width: 760px) { .cloud__grid { grid-template-columns: 1fr; } .cloud__art { order: -1; } }

/* ==========================================================================
   Contact form
   ========================================================================== */
.contact { background: var(--bg-soft); }
.contact h2 { margin-bottom: clamp(24px, 3vw, 40px); }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 1.2rem; align-items: end; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.field input {
  font-family: inherit; font-size: 1rem; padding: .7rem .2rem; border: 0; border-bottom: 2px solid var(--ink);
  background: transparent; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--cta); }
.contact__foot { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: clamp(40px, 6vw, 72px); flex-wrap: wrap; }
.contact__foot h3 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
@media (max-width: 760px) { .form-row { grid-template-columns: 1fr; } .form-row .btn { width: 100%; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--ink); color: #fff; padding-block: clamp(40px, 5vw, 64px); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer__social { display: flex; gap: .7rem; }
.footer__social a { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; transition: background .2s ease; }
.footer__social a:hover { background: var(--cta); }
.footer__social img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
.footer__copy { font-size: .85rem; color: rgba(255,255,255,.6); }

/* ==========================================================================
   Blog / post (baseline — refined in later phases)
   ========================================================================== */
.page-head { text-align: center; padding-block: clamp(40px, 6vw, 80px) clamp(24px, 3vw, 40px); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
.post-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); transition: transform .18s ease, box-shadow .18s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card__img { aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 1.2rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.post-card__cat { align-self: flex-start; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cta); }
.post-card__title { font-size: 1.12rem; font-weight: 700; line-height: 1.3; }
.post-card__excerpt { font-size: .92rem; color: var(--ink-2); margin: 0; }
.post-card__meta { margin-top: auto; font-size: .8rem; color: var(--muted); }
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }

.post-content { max-width: 720px; margin-inline: auto; }
.post-content h1 { margin-bottom: .4em; }
.post-content .post-meta { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; }
.post-content img { border-radius: var(--radius-sm); margin-block: 1.5rem; }
.post-content h2, .post-content h3 { margin-top: 1.6em; }

.pagination { display: flex; justify-content: center; gap: 1rem; margin-top: clamp(32px, 4vw, 56px); }
.pagination a, .pagination span { padding: .6rem 1.2rem; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; }

/* ==========================================================================
   Koenig editor content (required classes + card styles)
   ========================================================================== */
.post-body { font-size: 1.08rem; line-height: 1.75; }
.post-body > * { margin-block: 0 1.4rem; }
.post-body a { color: var(--cta); text-decoration: underline; text-underline-offset: 2px; }
.post-body blockquote { margin: 1.6rem 0; padding-left: 1.2rem; border-left: 4px solid var(--yellow); font-size: 1.15rem; color: var(--ink-2); }
.post-body figure { margin: 1.8rem 0; }
.post-body figcaption { text-align: center; font-size: .85rem; color: var(--muted); margin-top: .6rem; }
.post-body ul, .post-body ol { padding-left: 1.4rem; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }

/* Koenig widths — required by gscan */
.kg-width-wide { position: relative; width: 85vw; min-width: 100%; margin-inline: calc(50% - 42.5vw); }
.kg-width-full { position: relative; width: 100vw; margin-inline: calc(50% - 50vw); max-width: 100vw; }
.kg-width-full img { width: 100%; }

.kg-image { max-width: 100%; }
figure.kg-card { margin-block: 1.8rem; }

/* Gallery card */
.kg-gallery-container { display: flex; flex-direction: column; gap: 10px; margin-inline: auto; max-width: 1040px; }
.kg-gallery-row { display: flex; gap: 10px; }
.kg-gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Embed / bookmark cards */
.kg-embed-card { display: flex; flex-direction: column; align-items: center; width: 100%; }
.kg-bookmark-card, .kg-bookmark-card * { box-sizing: border-box; }
.kg-bookmark-card { width: 100%; }
.kg-bookmark-container { display: flex; min-height: 148px; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; overflow: hidden; }
.kg-bookmark-content { flex-basis: 100%; padding: 20px; }
.kg-bookmark-title { font-weight: 700; }
.kg-bookmark-description { color: var(--ink-2); font-size: .92rem; margin-top: .4rem; }
.kg-bookmark-thumbnail { position: relative; min-width: 33%; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

/* Button / callout / product cards (baseline) */
.kg-btn { display: inline-block; padding: .8rem 1.6rem; border-radius: 999px; background: var(--cta); color: #fff; font-weight: 700; }
.kg-callout-card { display: flex; gap: .8rem; padding: 1.2rem 1.4rem; border-radius: var(--radius-sm); background: var(--bg-soft); }
.kg-toggle-card { border-bottom: 1px solid var(--line); padding: 1rem 0; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
