/* ==========================================================================
   Case and solution platform — стиль anix.agency
   Палітра: Біло-Помаранчево-Чорна. Токени зняті з core-theme anix.agency:
     brand #ff7b00 · ink #1a1a1a · black #000 · light #f6f5f5 · muted #6d6d6d
   Шрифт: Montserrat (як на сайті).
   ========================================================================== */

:root {
  --white: #ffffff;
  --surface: #f6f5f5;
  --surface-2: #f2f4f7;
  --ink: #1a1a1a;         /* заголовки / сильний текст */
  --ink-strong: #000000;
  --muted: #6d6d6d;       /* основний текст (як --ui-text-color) */
  --muted-2: #9a9a9a;
  --line: #e7e7e9;
  --line-strong: #d9d9dc;

  --brand: #ff7b00;       /* --ui-brand-color */
  --brand-600: #e56f00;
  --brand-700: #cc6300;
  --brand-tint: rgba(255, 123, 0, 0.10);
  --brand-tint-2: rgba(255, 123, 0, 0.16);

  --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.06);
  --shadow-md: 0 10px 30px rgba(26, 26, 26, 0.10);
  --shadow-lg: 0 26px 60px rgba(26, 26, 26, 0.16);

  --radius: 12px;
  --radius-lg: 20px;
  --maxw: 1200px;

  --font: "Montserrat", "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--muted);
  background: var(--white);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-strong); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-ghost-brand { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-ghost-brand:hover { background: var(--brand); color: var(--white); }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ==========================================================================
   HEADER (репліка anix.agency)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(26, 26, 26, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 76px;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 34px; width: auto; }
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: 8px;
}
.nav a {
  color: #f2efe9;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.15s ease;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -6px;
  height: 2px;
  background: var(--brand);
  transition: right 0.2s ease;
}
.nav a:hover { color: var(--brand); }
.nav a:hover::after { right: 0; }
.header-cta { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.header-phone { color: #ffffff; font-weight: 700; font-size: 15px; white-space: nowrap; }
.header-phone:hover { color: var(--brand); }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); cursor: pointer; font-size: 17px;
  display: grid; place-items: center; flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span { width: 20px; height: 2px; background: #fff; border-radius: 2px; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  background:
    radial-gradient(900px 420px at 88% -20%, var(--brand-tint-2), transparent 60%),
    radial-gradient(700px 380px at -5% 10%, rgba(255, 123, 0, 0.08), transparent 55%),
    var(--white);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero .container { padding-top: 72px; padding-bottom: 80px; position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brand-700);
  background: var(--brand-tint);
  border: 1px solid rgba(255, 123, 0, 0.3);
  padding: 7px 14px;
  border-radius: 999px;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 22px 0 18px;
  max-width: 18ch;
  color: var(--ink);
}
.hero h1 .accent { color: var(--brand); }
.hero p.lead {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 44px; margin-top: 56px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 30px; color: var(--ink); letter-spacing: -0.02em; }
.hero-stats .stat span { color: var(--muted); font-size: 14px; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 74px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 34px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 8px; }
.section-head p { color: var(--muted); margin: 0; max-width: 60ch; }

/* Filters (майбутнє) */
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.filters .filters-label { font-size: 13px; font-weight: 700; color: var(--ink); margin-right: 4px; }
.chip {
  font-size: 13px; font-weight: 600; color: var(--muted);
  background: var(--white); border: 1px solid var(--line-strong);
  padding: 7px 13px; border-radius: 999px; cursor: not-allowed;
}
.filters .soon {
  margin-left: auto; font-size: 12px; font-weight: 700; color: var(--brand);
  background: var(--brand-tint); border: 1px solid rgba(255, 123, 0, 0.3);
  padding: 5px 11px; border-radius: 999px; text-transform: uppercase;
}

/* ==========================================================================
   Board
   ========================================================================== */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 22px 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: visible;
  cursor: pointer;
}
.card::before {
  content: "";
  position: absolute;
  /* Відступ з боків = радіус кута: інакше пряма смужка «звисає» над
     заокругленням, бо в картки overflow: visible (потрібен для підказки). */
  inset: 0 var(--radius-lg) auto;
  height: 3px;
  background: var(--brand);
  border-radius: 0 0 3px 3px;
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 3;
}

/* Spotlight: підсвічуємо наведену картку, решту застосунку затемнюємо */
.spotlight-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 17, 13, 0.62);
  backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 90; pointer-events: none;
}
body.spotlight-active .spotlight-overlay { opacity: 1; visibility: visible; }

.card.is-spotlit {
  z-index: 95;
  /* Масштаб задає адмінка (поле card.scale проєкту); 1.42 — дефолт. */
  transform: scale(var(--card-scale, 1.42));
  transform-origin: center top;   /* росте вниз/убік — верх лишається на місці для підказки */
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}
.card.is-spotlit::before { opacity: 1; }

/* При ховері: медіа (відео/слайди) — на всю площу картки, тексти в картці ховаємо */
.card.is-spotlit .card-media {
  position: absolute; inset: 0;
  width: auto; height: auto;
  margin: 0;
  border-radius: var(--radius-lg);
  box-shadow: none;
}
.card.is-spotlit .card-title,
.card.is-spotlit .card-industry { visibility: hidden; }

/* Медіа-плитка: аватар за замовчуванням; відео/слайди — при ховері */
.card-media {
  position: relative;
  width: 132px; height: 132px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
  flex-shrink: 0;
}
.card-avatar {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--white); font-size: 52px;
}
.card-video, .card-slides {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.3s ease;
  z-index: 1;
}
.card-video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.card.is-spotlit .card-video,
.card.is-spotlit .card-slides { opacity: 1; }
.card-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.5s ease;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 12px; text-align: center;
  background: linear-gradient(135deg, #2b2b2b, #1a1a1a);
  color: #fff;
}
.card-slide .cs-ic { font-size: 26px; color: var(--brand); }
.card-slide b { font-size: 12.5px; font-weight: 700; line-height: 1.25; }
.card-slide.active { opacity: 1; }

.card-title { font-size: 19px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.card-industry { font-size: 13px; color: var(--muted-2); font-weight: 600; }
.card-featured {
  position: absolute; top: 14px; right: 14px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  color: var(--white); background: var(--brand);
  padding: 4px 10px; border-radius: 999px; text-transform: uppercase; z-index: 3;
}
.card-featured.info { background: var(--ink); }

/* Підказка — НАД карткою (не спливає знизу) */
.card-tip {
  position: absolute;
  bottom: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(8px) scale(0.96);
  width: 260px; max-width: 78vw;
  background: var(--ink); color: #ececec;
  padding: 14px 16px; border-radius: 14px;
  text-align: left;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 4;
}
.card-tip::after {
  content: ""; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent; border-top-color: var(--ink);
}
.card.is-spotlit .card-tip {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}
.card-tip-title { font-size: 15.5px; font-weight: 700; color: #fff; margin-bottom: 8px; line-height: 1.2; }
.card-tip-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.card-tip-tags span {
  font-size: 11px; font-weight: 600; color: #e6e6e6;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 3px 8px; border-radius: 999px;
}
.card-tip-tags span.ti {
  color: #ffd9b0;
  background: rgba(255, 123, 0, 0.20);
  border-color: rgba(255, 123, 0, 0.45);
}
.card-tip p { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: #cfcfcf; }
.card-tip .card-hover-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--brand); }

/* Steps (як працює) */
.step-card { align-items: flex-start; text-align: left; cursor: default; }
.step-card:hover { transform: none; border-color: var(--line); box-shadow: var(--shadow-sm); }
.step-card:hover::before { opacity: 0; }
.step-num {
  width: 54px; height: 54px; border-radius: 15px;
  background: var(--brand); color: var(--white);
  display: grid; place-items: center; font-size: 22px; font-weight: 700;
  margin-bottom: 14px;
}
.step-num.dark { background: var(--ink); }

/* ==========================================================================
   Tags
   ========================================================================== */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12.5px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink); background: var(--white);
}
.tag[data-kind="industry"] { border-color: rgba(255, 123, 0, 0.35); color: var(--brand-700); background: var(--brand-tint); }
.tag[data-kind="tools"] { border-color: var(--ink); color: var(--white); background: var(--ink); }
.tag[data-kind="stack"] { border-color: var(--line-strong); color: var(--muted); background: var(--surface); }

/* CTA band */
.cta-band {
  background: var(--brand);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
.cta-band h3 { margin: 0 0 6px; font-size: 27px; color: var(--white); }
.cta-band p { margin: 0; color: rgba(255, 255, 255, 0.9); max-width: 52ch; }

/* ==========================================================================
   FOOTER (репліка anix.agency)
   ========================================================================== */
.site-footer { background: var(--ink); color: #c9c9c9; padding: 56px 0 26px; margin-top: 10px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; }
.footer-brand .brand-logo { height: 40px; margin-bottom: 16px; }
.footer-tagline { color: var(--brand); font-weight: 600; font-size: 14px; margin: 0 0 12px; }
.footer-addr { font-size: 14px; color: #9a9a9a; max-width: 30ch; }
.footer-col h4 { color: var(--white); font-size: 15px; margin: 0 0 16px; }
.footer-col a, .footer-col span { display: block; color: #c9c9c9; font-size: 14px; margin-bottom: 10px; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--brand); }
.socials { display: flex; gap: 12px; }
.socials a {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: grid; place-items: center; margin: 0;
  color: #d6d6d6; transition: background 0.15s ease, color 0.15s ease;
}
.socials a:hover { background: var(--brand); color: var(--white); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: #8a8a8a;
}

/* ==========================================================================
   Project page
   ========================================================================== */
.project-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 42px 0 46px; }
.breadcrumbs { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.breadcrumbs a:hover { color: var(--brand); }
.project-hero-inner { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }
.project-avatar {
  width: 132px; height: 132px; border-radius: 30px;
  display: grid; place-items: center; color: var(--white); font-size: 56px;
  box-shadow: var(--shadow-md); flex-shrink: 0;
}
.project-hero h1 { font-size: clamp(28px, 4vw, 42px); margin: 0 0 8px; }
.project-hero .project-short { font-size: 18px; color: var(--muted); max-width: 60ch; margin: 0 0 18px; }
.project-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; padding: 56px 0; }
.project-main h2 { font-size: 22px; margin: 0 0 12px; }
.project-main p.body { color: var(--ink); font-size: 16.5px; }
.project-block { margin-bottom: 40px; }
.tag-groups { display: grid; gap: 14px; }
.tag-group-row { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.tag-group-row .tg-label { font-size: 13px; font-weight: 700; color: var(--ink); min-width: 92px; }

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.shot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: var(--shadow-sm); }
.shot-frame {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  display: grid; place-items: center; position: relative; border-bottom: 1px solid var(--line);
}
.shot-frame::before {
  content: ""; position: absolute; top: 10px; left: 10px;
  width: 42px; height: 8px; border-radius: 6px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 8px, transparent 8px 14px);
}
.shot-frame span { font-size: 30px; color: var(--brand); opacity: 0.6; }
.shot-cap { padding: 12px 14px; }
.shot-cap b { font-size: 14.5px; display: block; color: var(--ink); }
.shot-cap small { color: var(--muted); font-size: 13px; }

.demo-card { position: sticky; top: 96px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-md); overflow: hidden; }
.demo-card-top { background: var(--brand); color: var(--white); padding: 22px; }
.demo-card-top h3 { margin: 0 0 4px; font-size: 20px; color: var(--white); }
.demo-card-top p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.9); }
.demo-card-body { padding: 22px; }
.demo-limits { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.demo-limits li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink); }
.demo-limits li .li-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--brand-tint); display: grid; place-items: center; color: var(--brand); font-size: 15px; flex-shrink: 0; }
.limit-warning {
  display: flex; gap: 10px;
  background: var(--brand-tint); border: 1px solid rgba(255, 123, 0, 0.35); color: var(--brand-700);
  border-radius: var(--radius); padding: 12px 14px; font-size: 13.5px; line-height: 1.45; margin-bottom: 18px;
}
.limit-warning .lw-ic { font-size: 16px; }
.demo-open-wrap { text-align: center; }
.demo-open-wrap .btn { width: 100%; }
.demo-hint { font-size: 12.5px; color: var(--muted); margin-top: 12px; }

/* ==========================================================================
   Modal (лід-форма)
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26, 26, 26, 0.55); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 100%; max-width: 460px; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); max-height: 92vh; overflow-y: auto; }
@keyframes pop { from { transform: translateY(12px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 24px 26px 6px; position: relative; }
.modal-head .modal-eyebrow { font-size: 12.5px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.04em; }
.modal-head h3 { margin: 8px 0 4px; font-size: 22px; }
.modal-head p { margin: 0; color: var(--muted); font-size: 14.5px; }
.modal-close { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); color: var(--muted); font-size: 18px; cursor: pointer; display: grid; place-items: center; transition: background 0.15s ease; }
.modal-close:hover { background: var(--surface); }
.modal-body { padding: 18px 26px 26px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.field label .req { color: var(--brand); }
.field label .opt { color: var(--muted-2); font-weight: 500; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 11px 13px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--white); color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 74px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.field.invalid input, .field.invalid textarea { border-color: #e11; }
.field .err { display: none; font-size: 12.5px; color: #e11; margin-top: 5px; }
.field.invalid .err { display: block; }
.consent { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--muted); margin: 4px 0 18px; line-height: 1.4; }
.consent input { margin-top: 2px; accent-color: var(--brand); }
.consent a { color: var(--brand); }
.modal-submit { width: 100%; }
.form-note { font-size: 12px; color: var(--muted-2); text-align: center; margin-top: 12px; }
.modal-success { padding: 34px 26px 30px; text-align: center; display: none; }
.modal-success.show { display: block; }
.success-badge { width: 62px; height: 62px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; font-size: 30px; margin: 0 auto 16px; }
.modal-success h3 { margin: 0 0 6px; font-size: 22px; }
.modal-success p { margin: 0 auto 20px; color: var(--muted); max-width: 34ch; }
.form-error-banner { display: none; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.form-error-banner.show { display: block; }

/* ==========================================================================
   Кабінет користувача
   ========================================================================== */
.cabinet-wrap { padding: 48px 0 64px; min-height: 50vh; }
.cab-head { margin-bottom: 26px; }
.cab-head h1 { font-size: clamp(26px, 4vw, 40px); margin: 14px 0 8px; }
.cab-head p { margin: 0; max-width: 60ch; }
.cab-limits { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.cab-limit {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 18px; min-width: 220px;
}
.cab-limit .li-ic { font-size: 22px; }
.cab-limit b { display: block; color: var(--ink); font-size: 15px; }
.cab-limit small { color: var(--muted); font-size: 13px; }
.cab-section h2 { font-size: 22px; margin: 0 0 18px; }
.cab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.cab-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.cab-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cab-card.is-primary { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.cab-card-av { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; color: #fff; font-size: 24px; flex-shrink: 0; }
.cab-card-body { width: 100%; min-width: 0; }
.cab-card-body h3 { font-size: 16.5px; margin: 0 0 6px; }
.cab-card-body p {
  font-size: 13.5px; color: var(--muted); margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cab-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); background: var(--surface); border: 1px solid var(--line-strong); padding: 3px 9px; border-radius: 999px; }
.cab-badge.demo { color: var(--brand-700); background: var(--brand-tint); border-color: rgba(255, 123, 0, 0.35); }
.cab-card .btn { width: 100%; margin-top: auto; }
.cab-more { margin-top: 30px; }
.cab-empty { text-align: center; padding: 60px 20px; }
.cab-empty h1 { font-size: 30px; margin: 0 0 12px; }
.cab-empty p { color: var(--muted); margin: 0 auto 24px; max-width: 44ch; }

/* Відео на сторінці проєкту */
.project-video { margin-bottom: 40px; }
.project-video video { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow-md); background: #000; }

/* Info-only sidebar (без «поклікати») */
.info-card .demo-card-top { background: var(--ink); }
.info-note {
  font-size: 13.5px; color: var(--muted); line-height: 1.5;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px;
}

/* Ряд/блок з кнопкою «Почати співпрацю» */
.section-cta { display: flex; justify-content: center; margin-top: 34px; }

/* ==========================================================================
   Секція «Наші проекти» (сторінка проєкту) — 3 картки з ротацією
   ========================================================================== */
.related { background: var(--surface); border-top: 1px solid var(--line); padding: 64px 0; }
.related .section-head { text-align: center; }
.related .section-head p { margin-left: auto; margin-right: auto; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rel-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 26px 20px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden; cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease,
              box-shadow 0.18s ease, border-color 0.18s ease;
}
.rel-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); }
.rel-card.rel-enter { opacity: 0; transform: translateX(46px); }
.rel-card.rel-leave { opacity: 0; transform: translateX(-28px); }
.rel-av {
  width: 84px; height: 84px; border-radius: 20px;
  display: grid; place-items: center; color: #fff; font-size: 34px;
  box-shadow: var(--shadow-md); margin-bottom: 14px;
}
.rel-card h3 { font-size: 16.5px; margin: 0 0 4px; }
.rel-card .rel-ind { font-size: 12.5px; color: var(--muted-2); font-weight: 600; }
/* Ховер: короткий опис спливає знизу (як було на дошці раніше) */
.rel-hover {
  position: absolute; inset: auto 0 0 0;
  transform: translateY(101%);
  background: var(--ink); color: #ececec; padding: 16px 18px; text-align: left;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rel-card:hover .rel-hover { transform: translateY(0); }
.rel-hover p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; color: #cfcfcf; }
.rel-hover .rel-cta { font-size: 12.5px; font-weight: 700; color: var(--brand); }

/* ==========================================================================
   Reveal — «підтягування» елементів (з'являються нижче/правіше й доїжджають)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.reveal-right { transform: translateX(34px); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Utilities ---------- */
.muted { color: var(--muted); }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ==========================================================================
   Тема: усі кольори — токени. Світла (default) + темна (system + [data-theme]).
   Це готує ґрунт для перемикача світла/темряви в майбутньому.
   ========================================================================== */
:root[data-theme="dark"],
:root:not([data-theme="light"]) {
  /* дефолт лишається світлим; темні значення нижче застосовуються лише
     коли явно data-theme="dark" АБО система в темному режимі (див. @media) */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --white: #14110d;
    --surface: #1c1813;
    --surface-2: #221d16;
    --ink: #f5f2ee;
    --ink-strong: #ffffff;
    --muted: #b7ada1;
    --muted-2: #8a8073;
    --line: #2e2820;
    --line-strong: #3b342a;
    --brand-tint: rgba(255, 123, 0, 0.16);
    --brand-tint-2: rgba(255, 123, 0, 0.24);
  }
}
:root[data-theme="dark"] {
  --white: #14110d;
  --surface: #1c1813;
  --surface-2: #221d16;
  --ink: #f5f2ee;
  --ink-strong: #ffffff;
  --muted: #b7ada1;
  --muted-2: #8a8073;
  --line: #2e2820;
  --line-strong: #3b342a;
  --brand-tint: rgba(255, 123, 0, 0.16);
  --brand-tint-2: rgba(255, 123, 0, 0.24);
}

/* ==========================================================================
   Embed mode: ховаємо власні хедер/футер (на випадок вбудовування)
   ========================================================================== */
body.embed .site-header,
body.embed .site-footer { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .project-layout { grid-template-columns: 1fr; }
  .demo-card { position: static; }
  .nav, .header-phone { display: none; }
  .nav-toggle { display: flex; }
  .nav.open {
    display: flex; position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: #1a1a1a; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding: 8px 24px 16px;
  }
  .nav.open a { padding: 12px 0; width: 100%; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .nav.open a::after { display: none; }
}
@media (max-width: 560px) {
  .hero .container { padding-top: 52px; padding-bottom: 58px; }
  .hero-stats { gap: 28px; }
  .cta-band { padding: 30px; }
  .card-avatar { width: 108px; height: 108px; font-size: 44px; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-cta .btn { padding: 10px 14px; font-size: 14px; }
}

/* ==========================================================================
   1.1 — КАТАЛОГ РІШЕНЬ І СТОРІНКА РІШЕННЯ
   Структура з прототипів Олександра, палітра й ефекти — з версії 1.0.
   ========================================================================== */

/* ---------- Статуси життєвого циклу (спільні для всіх сторінок) ---------- */
.status-badge {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.status-badge.demo     { background: #e9f9ee; color: #1a7a3d; }
.status-badge.demo::before     { background: #1a7a3d; }
.status-badge.realized { background: #eaf1ff; color: #2454b8; }
.status-badge.realized::before { background: #2454b8; }
.status-badge.concept  { background: #f2f2f2; color: #5c5c5c; }
.status-badge.concept::before  { background: #5c5c5c; }

[data-theme="dark"] .status-badge.demo     { background: rgba(26,122,61,.22);  color: #7fe0a3; }
[data-theme="dark"] .status-badge.realized { background: rgba(36,84,184,.22);  color: #9dbcff; }
[data-theme="dark"] .status-badge.concept  { background: rgba(255,255,255,.10); color: #c9c9cf; }

/* Легенда статусів під заголовком каталогу */
.status-legend {
  display: flex; flex-wrap: wrap; gap: 18px;
  margin: 0 0 22px; font-size: 13.5px; color: var(--muted);
}
.status-legend span { display: inline-flex; align-items: center; gap: 7px; }
.status-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-legend .dot.demo { background: #1a7a3d; }
.status-legend .dot.realized { background: #2454b8; }
.status-legend .dot.concept { background: #8a8a8a; }

/* ------------------------- Картка каталогу 1.1 --------------------------- */
/* Медіа 16:9 зверху, під ним — статус, заголовок, опис, теги, CTA.
   Ефект spotlight (збільшення + затемнення + підказка) успадковується з 1.0. */
.board-catalog { align-items: stretch; }
.board-catalog .card {
  padding: 0;
  align-items: stretch;
  text-align: left;
  overflow: visible;
}
.board-catalog .card-media {
  position: relative;
  width: 100%; height: auto;
  aspect-ratio: 16 / 9;
  margin: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: none;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.card-still {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: opacity 0.3s ease;
}
.card-still-empty { display: grid; place-items: center; }
.card-still-empty span { font-size: 46px; color: rgba(255, 255, 255, 0.92); }
.board-catalog .card-body {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 18px 20px; flex: 1;
}
.board-catalog .card-title {
  font-size: 17.5px; font-weight: 800; line-height: 1.3; margin: 0;
  color: var(--ink); text-align: left;
}
.card-desc { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.card-tags .tag {
  font-size: 11.5px; padding: 4px 9px; border-radius: 7px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
}
.card-cta {
  margin-top: 2px; font-size: 13.5px; font-weight: 700; color: var(--brand-700);
  display: inline-flex; align-items: center; gap: 4px;
}
/* На ховері картка «стає» самим медіа: текст ховаємо, білу підкладку робимо
   прозорою — інакше під медіа лишалася б порожня біла площа висотою з опис.
   Медіа тримає СВОЇ пропорції (--media-ratio ставить app.js за реальними
   розмірами відео/слайда; дефолт 16:9), тож зображення не розтягується. */
.board-catalog .card.is-spotlit {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.board-catalog .card.is-spotlit .card-media {
  position: absolute;
  inset: 0 0 auto;                       /* приклеєне до верху картки */
  height: auto;
  aspect-ratio: var(--media-ratio, 16 / 9);
  border-radius: var(--radius-lg);
  border-bottom: none;
  background: #000;                      /* поля, якщо пропорції не збіглись */
  box-shadow: 0 0 0 1px var(--brand), var(--shadow-lg);
}
/* contain, а не cover: краще поле по краю, ніж обрізаний або спотворений кадр */
.board-catalog .card.is-spotlit .card-video { object-fit: contain; }
.board-catalog .card.is-spotlit .card-slide {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.board-catalog .card.is-spotlit .card-body { visibility: hidden; }
.board-catalog .card.is-spotlit .card-media.has-hover .card-still { opacity: 0; }
.board-catalog .card.is-spotlit .card-video,
.board-catalog .card.is-spotlit .card-slides { opacity: 1; }
.board-catalog .card-slide { background-size: cover; background-position: center; }
.board-catalog .card-slide:first-child { opacity: 1; }

/* ========================== Сторінка рішення ============================= */
.solution .breadcrumbs { padding: 22px 0 0; }
.sol-hero { padding: 26px 0 8px; }
.sol-hero h1 {
  font-size: clamp(28px, 4.2vw, 42px); line-height: 1.14;
  margin: 14px 0 14px; max-width: 20ch;
}
.sol-subtitle { font-size: 19px; color: var(--muted); margin: 0 0 22px; max-width: 60ch; }
.sol-hero .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.sol-hero .tag.industry { border-color: var(--brand); color: var(--brand-700); }
.sol-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }

.sol-section { padding: 36px 0; border-top: 1px solid var(--line); }
.sol-section > h2 { font-size: 23px; margin: 0 0 18px; font-weight: 800; }
/* Надпис-рубрика над заголовком секції. На дошці .eyebrow — «пігулка» з рамкою,
   тут потрібен простий текстовий лейбл, тому скидаємо фон і межі. */
.sol-section .eyebrow {
  display: block; width: fit-content;
  font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--brand-700); margin: 0 0 8px;
  background: none; border: 0; padding: 0; border-radius: 0;
}

/* Проблема */
.pain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pain-list li {
  display: flex; gap: 12px; font-size: 16px; color: var(--ink);
  background: var(--surface); padding: 14px 16px; border-radius: 10px;
}
.pain-list li::before { content: "—"; color: var(--brand); font-weight: 800; flex: none; }

/* Що робить рішення */
.does-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.does-list li { display: flex; gap: 14px; align-items: flex-start; font-size: 16px; color: var(--ink); }
.does-check {
  flex: none; width: 24px; height: 24px; border-radius: 7px;
  background: var(--ink); color: var(--brand);
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
}

/* Як це виглядає — карусель однакових плиток */
.media-carousel { position: relative; }
/* Flex, а не grid: `flex: 0 0 …` гарантує, що плитки НЕ стискаються під
   ширину контейнера, а виїжджають за нього — інакше каруселі нема чого гортати
   (grid-auto-columns із minmax дозволяє трекам ужатись і все влазить). */
.media-track {
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding-bottom: 6px;
  scrollbar-width: thin;
}
.media-track > .media-item { flex: 0 0 calc(50% - 8px); }
.media-track::-webkit-scrollbar { height: 6px; }
.media-track::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; }
.media-item { margin: 0; scroll-snap-align: start; }
.media-item > video,
.media-item > img,
.media-item > .media-empty {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); display: block;
}
.media-item > video { background: #000; cursor: pointer; }
.media-item > img { cursor: zoom-in; }
.media-empty { display: grid; place-items: center; color: var(--muted-2); font-size: 30px; }
.media-item figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.media-item figcaption b { color: var(--ink); }
.carousel-nav {
  position: absolute; top: calc(50% - 34px); transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; z-index: 3;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  font-size: 24px; line-height: 1; cursor: pointer; box-shadow: var(--shadow-md);
  display: grid; place-items: center;
}
.carousel-nav:hover { border-color: var(--brand); color: var(--brand); }
.carousel-nav[hidden] { display: none; }
.carousel-nav.prev { left: -18px; }
.carousel-nav.next { right: -18px; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.carousel-dots button {
  width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0;
  background: var(--line-strong); cursor: pointer;
}
.carousel-dots button.is-active { background: var(--brand); width: 20px; border-radius: 4px; }

/* Лайтбокс для повного перегляду */
.media-lightbox {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(15, 13, 11, 0.88); padding: 24px;
}
.media-lightbox img, .media-lightbox video { max-width: 92vw; max-height: 88vh; border-radius: 10px; }
.media-lightbox .lb-close {
  position: absolute; top: 18px; right: 22px; font-size: 30px; line-height: 1;
  background: none; border: 0; color: #fff; cursor: pointer;
}

/* Результат */
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.result-card { background: var(--surface); border-radius: var(--radius); padding: 20px; }
.result-card h3 {
  margin: 0 0 6px; font-size: 12.5px; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted);
}
.result-card .value { font-size: 16.5px; font-weight: 600; margin: 0; color: var(--ink); }
.metrics-strip { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.metric-pill {
  background: var(--ink); color: var(--white); padding: 10px 16px;
  border-radius: 10px; font-size: 14px; font-weight: 700;
}
.metric-pill.unclear {
  background: var(--surface); color: var(--muted);
  border: 1px dashed var(--line-strong); font-weight: 600; font-style: italic;
}

/* Стек і терміни */
.kv-list { margin: 0; }
.kv-row {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15.5px;
}
.kv-row:last-child { border-bottom: none; }
.kv-row dt { color: var(--muted); }
.kv-row dd { margin: 0; font-weight: 600; text-align: right; color: var(--ink); }

/* Кому підходить */
.segment-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.segment-list li {
  font-size: 15.5px; padding: 13px 15px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
}
.segment-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.segment-meta .pill {
  font-size: 12.5px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; color: var(--muted);
}

/* CTA-форми на сторінці рішення */
.sol-cta-note { color: var(--muted); margin: 0 0 18px; max-width: 62ch; }
.lead-form { display: grid; gap: 14px; max-width: 640px; }
.lf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead-form label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.lead-form label > span { display: block; margin-bottom: 6px; }
.lead-form label > span i { color: var(--brand); font-style: normal; }
.lead-form input[type="text"], .lead-form input:not([type]),
.lead-form input[type="tel"], .lead-form input[type="email"], .lead-form textarea {
  width: 100%; padding: 13px 14px; font: inherit; font-weight: 400;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--white); color: var(--ink);
}
.lead-form input:focus, .lead-form textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint);
}
.lead-form textarea { resize: vertical; }
.lf-consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--muted); }
/* Скидаємо блочний підпис, успадкований від звичайних полів форми, —
   у чекбоксі текст має стояти в рядок із квадратиком. */
.lf-consent > span { display: inline; margin: 0; font-weight: 400; }
.lf-consent input { width: 17px; height: 17px; accent-color: var(--brand); margin-top: 3px; flex: none; }
.lead-form .btn { justify-self: start; }
.lf-status { margin: 0; font-size: 14px; min-height: 20px; }
.lf-status.ok { color: #1a7a3d; font-weight: 600; }
.lf-status.err { color: #c0392b; font-weight: 600; }
.lead-form .field-invalid { border-color: #c0392b; }

/* Липкий CTA на мобільному */
.sticky-cta { display: none; }

@media (max-width: 900px) {
  .media-track > .media-item { flex-basis: 86%; }
  .carousel-nav.prev { left: 4px; }
  .carousel-nav.next { right: 4px; }
}
@media (max-width: 720px) {
  .result-grid, .segment-list, .lf-row { grid-template-columns: 1fr; }
  .sol-hero h1 { max-width: none; }
  .sticky-cta {
    display: block; position: sticky; bottom: 0; z-index: 40;
    background: var(--white); border-top: 1px solid var(--line);
    padding: 12px 20px; box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.07);
  }
  .sticky-cta .btn { width: 100%; }
}
