:root {
  --bg: #FFFFFF;
  --bg-alt: #F5F6F8;
  --text: #111318;
  --muted: #5B6270;
  --brand: #0F4C45;
  --brand-soft: #E6EFED;
  --cta: #F26B3A;
  --cta-hover: #E35A28;
  --cta-text: #111318;   /* темний текст на коралі = 6.1:1 (AA); білий дає лише 3.0:1 */
  --cta-link: #C4471A;   /* кораловий відтінок для текстових посилань = 4.9:1 (AA) */
  --border: #E3E6EA;
  --header-h: 72px;
}
body { background: var(--bg); color: var(--text); font-size: 18px; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

.site-header {
  padding-block: 16px; background: rgba(255,255,255,.9); backdrop-filter: saturate(140%) blur(8px);
  transition: padding .2s ease, box-shadow .2s ease;
}
/* Меню: «зашифровані» пункти */
.nav-cipher { position: relative; display: inline-block; padding: 4px 2px; color: var(--text); text-decoration: none; transition: color .2s ease; }
.nav-cipher__ghost { visibility: hidden; white-space: nowrap; }
.nav-cipher__txt { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); white-space: nowrap; }
.nav-cipher .g { color: var(--brand); opacity: .7; }
.nav-cipher .g { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; font-weight: 500; letter-spacing: .06em; color: var(--muted); }
.nav-cipher:hover, .nav-cipher:focus-visible { color: var(--brand); }
.nav-cipher:hover .g, .nav-cipher:focus-visible .g { color: rgba(15,76,69,.55); }
.site-header.is-scrolled { padding-block: 8px; box-shadow: 0 1px 0 var(--border), 0 6px 20px -12px rgba(17,19,24,.18); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 8px;
  font-weight: 600; font-size: 17px; line-height: 1; padding: 15px 22px; min-height: 48px; white-space: nowrap; text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cta); color: var(--cta-text); border: 1px solid transparent; }
.btn-primary:hover { background: var(--cta-hover); }
.btn-secondary { background: transparent; color: var(--text); border: 1.5px solid var(--text); }
.btn-secondary:hover { background: var(--text); color: #fff; }
.btn-on-brand { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.7); }
.btn-on-brand:hover { background: #fff; color: var(--brand); border-color: #fff; }
.btn-sm { padding: 11px 16px; min-height: 40px; font-size: 15px; }

:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.on-brand :where(a, button, input, select, textarea):focus-visible { outline-color: #fff; }

.link-cta { color: var(--cta-link); font-weight: 600; text-decoration: none; }
.link-cta:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-brand { color: var(--brand); font-weight: 600; text-decoration: none; }
.link-brand:hover { text-decoration: underline; text-underline-offset: 3px; }

.card { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(17,19,24,.25); }
.eyebrow { color: var(--brand); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow--lg { font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: .12em; line-height: 1.1; }

.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; } }
.lazy-section { content-visibility: auto; contain-intrinsic-size: 1px 600px; }

/* Hero-анімація: мережа вузлів з імпульсами. Зліва затухає, щоб не заважати тексту */
.hero { position: relative; overflow: hidden; isolation: isolate; }
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .85;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
}


/* Персонаж у hero */
.cat-stage {
  position: relative; aspect-ratio: 1052 / 1008;
  animation: cat-rise .9s cubic-bezier(.2,.7,.2,1) both, cat-float 7s ease-in-out 1s infinite;
}
.cat-img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  mix-blend-mode: multiply;                 /* білий фон картинки зникає, мережа просвічує */
  -webkit-mask-image: radial-gradient(ellipse 62% 66% at 50% 48%, #000 74%, transparent 100%);
          mask-image: radial-gradient(ellipse 62% 66% at 50% 48%, #000 74%, transparent 100%);
}
.cat-fx { position: absolute; inset: 0; pointer-events: none; }
.glow {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); aspect-ratio: 1; border-radius: 50%;
  translate: -50% -50%; mix-blend-mode: screen;   /* світло лягає лише на темні ділянки, на білому невидиме */
}
.glow.eye {
  background: radial-gradient(circle, rgba(120,255,235,.95) 0%, rgba(64,235,215,.45) 30%, rgba(64,235,215,0) 68%);
  animation: glow-breathe 3.6s ease-in-out infinite, eye-blink 6.5s ease-in-out infinite;
}
.glow.strip {
  background: radial-gradient(circle, rgba(64,235,215,.7) 0%, rgba(64,235,215,.2) 40%, rgba(64,235,215,0) 70%);
  animation: glow-breathe 2.8s ease-in-out infinite;
}
.glow.coral {
  background: radial-gradient(circle, rgba(255,150,90,.9) 0%, rgba(242,107,58,.3) 45%, rgba(242,107,58,0) 72%);
  animation: coral-pulse 2.2s ease-in-out infinite;
}
.orbits { position: absolute; inset: -6%; width: 112%; height: 112%; pointer-events: none; overflow: visible; }
@keyframes cat-rise { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes cat-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes glow-breathe { 0%, 100% { opacity: .55; scale: .9; } 50% { opacity: 1; scale: 1.08; } }
@keyframes eye-blink { 0%, 90%, 100% { filter: brightness(1); } 93%, 95% { filter: brightness(.25); } }
@keyframes coral-pulse { 0%, 100% { opacity: .25; scale: .8; } 50% { opacity: 1; scale: 1.15; } }
@media (prefers-reduced-motion: reduce) {
  .cat-stage, .glow { animation: none !important; transform: none !important; }
  .glow { opacity: .8; }
  .orbit-dot { display: none; }
}


/* Кнопка у стилі панелей кота: скошені кути, бірюзові смуги, кутові маркери */
.btn-tech-wrap {
  --tech: 64, 235, 215;
  position: relative; display: inline-block;
  filter: drop-shadow(0 0 0 rgba(var(--tech), 0));
  transition: filter .3s ease, transform .3s ease;
}
.btn-tech-wrap::before, .btn-tech-wrap::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border: 2px solid var(--brand); transition: transform .3s ease, border-color .3s ease, opacity .3s ease; opacity: .55;
}
.btn-tech-wrap::before { left: -9px; top: -9px; border-right: 0; border-bottom: 0; }
.btn-tech-wrap::after  { right: -9px; bottom: -9px; border-left: 0; border-top: 0; }
.btn-tech {
  --cut: 13px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 18px 40px; min-height: 58px; text-decoration: none; overflow: hidden;
  font-size: 15px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; line-height: 1;
  color: var(--cta-text); background: var(--cta); white-space: nowrap; flex: none;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background-color .2s ease;
}
@media (max-width: 420px) { .btn-tech { padding: 16px 22px; font-size: 13px; letter-spacing: .08em; gap: 8px; } }
.btn-tech-wrap { flex: none; }
.btn-tech:focus-visible { outline: none; }
.btn-tech::before, .btn-tech::after {
  content: ""; position: absolute; top: 22%; width: 3px; height: 56%; border-radius: 2px;
  background: linear-gradient(180deg, rgba(var(--tech), .2), rgb(var(--tech)), rgba(var(--tech), .2));
  box-shadow: 0 0 8px rgba(var(--tech), .8);
  animation: strip-pulse 2.4s ease-in-out infinite;
}
.btn-tech::before { left: 14px; }
.btn-tech::after  { right: 14px; animation-delay: -1.2s; }
.btn-tech__shine {
  position: absolute; top: -20%; bottom: -20%; width: 40%; left: -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.55) 50%, transparent 100%);
  transform: skewX(-18deg);
}
.btn-tech-wrap:hover, .btn-tech-wrap:focus-within {
  filter: drop-shadow(0 0 14px rgba(var(--tech), .6)); transform: translateY(-2px);
}
.btn-tech-wrap:hover::before, .btn-tech-wrap:focus-within::before { transform: translate(-4px, -4px); opacity: 1; border-color: rgb(var(--tech)); }
.btn-tech-wrap:hover::after,  .btn-tech-wrap:focus-within::after  { transform: translate(4px, 4px); opacity: 1; border-color: rgb(var(--tech)); }
.btn-tech-wrap:hover .btn-tech, .btn-tech-wrap:focus-within .btn-tech { background: var(--cta-hover); }
.btn-tech-wrap:hover .btn-tech::before, .btn-tech-wrap:hover .btn-tech::after,
.btn-tech-wrap:focus-within .btn-tech::before, .btn-tech-wrap:focus-within .btn-tech::after { animation-duration: .5s; box-shadow: 0 0 14px rgba(var(--tech), 1); }
.btn-tech-wrap:hover .btn-tech__shine, .btn-tech-wrap:focus-within .btn-tech__shine { animation: shine 1.1s ease-out .05s 1 both; }
.btn-tech:active { transform: translateY(1px); }
@keyframes strip-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes shine { from { left: -60%; } to { left: 130%; } }

/* Очі активно мерехтять, коли кнопка в hover/focus */
.eyes-active .glow.eye { animation: eye-flicker .9s steps(1, end) infinite; }
.eyes-active .glow.strip { animation-duration: .6s; }
@keyframes eye-flicker {
  0%   { opacity: 1;   scale: 1.2;  filter: brightness(1.7); }
  9%   { opacity: .3;  scale: 1;    filter: brightness(1); }
  15%  { opacity: 1;   scale: 1.3;  filter: brightness(1.9); }
  26%  { opacity: .55; scale: 1.05; filter: brightness(1.2); }
  32%  { opacity: 1;   scale: 1.25; filter: brightness(1.8); }
  48%  { opacity: .2;  scale: .95;  filter: brightness(1); }
  54%  { opacity: 1;   scale: 1.35; filter: brightness(2.1); }
  71%  { opacity: .7;  scale: 1.1;  filter: brightness(1.4); }
  79%  { opacity: 1;   scale: 1.2;  filter: brightness(1.8); }
  91%  { opacity: .4;  scale: 1;    filter: brightness(1.1); }
  100% { opacity: 1;   scale: 1.25; filter: brightness(1.7); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-tech-wrap, .btn-tech::before, .btn-tech::after, .btn-tech__shine { animation: none !important; transition: none !important; }
  .eyes-active .glow.eye { opacity: 1; scale: 1.25; filter: brightness(1.8); }
}


/* Напис «We engineer magic.» з ефектом декодування */
.magic-text { font-size: clamp(32px, 6vw, 72px); line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; }
.magic-line { display: inline-flex; align-items: baseline; white-space: pre; }
.magic-glyphs {
  font-variant-numeric: tabular-nums;
  padding: .06em .04em .24em; margin-bottom: -.24em;   /* місце для виносних елементів (g, j), інакше градієнт їх обрізає */
  background: linear-gradient(90deg, var(--brand) 0%, #1C8C7E 45%, #22A08F 50%, #1C8C7E 55%, var(--brand) 100%);
  background-size: 240% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: magic-shimmer 6s linear infinite;
}
.magic-glyphs .g { color: #9AA1AB; -webkit-text-fill-color: #9AA1AB; }
.magic-caret {
  display: inline-block; width: .08em; height: .9em; margin-left: .08em; background: var(--cta);
  transform: translateY(.1em); animation: caret-blink 1s steps(1, end) infinite;
}
@keyframes magic-shimmer { to { background-position: -140% 0; } }
@keyframes caret-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .magic-glyphs, .magic-caret { animation: none !important; } }


/* Секція форми у техно-стилі на брендовому фоні */
.on-brand { --cy: 64, 235, 215; }
.estimate { position: relative; overflow: hidden; isolation: isolate; }
#estimate-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 50%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 90% at 50% 50%, #000 40%, transparent 100%);
}
.text-cy { color: rgb(var(--cy)); }
.tech-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.tech-dot { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--cy)); box-shadow: 0 0 10px rgb(var(--cy)); animation: strip-pulse 1.8s ease-in-out infinite; }
.tech-tick { flex: none; margin-top: 9px; width: 10px; height: 10px; background: rgb(var(--cy)); clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%); box-shadow: 0 0 8px rgba(var(--cy), .7); }

.tl { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.tl .req { color: rgb(var(--cy)); }
.tl .opt { margin-left: 6px; font-weight: 500; letter-spacing: .06em; text-transform: none; color: rgba(255,255,255,.55); }
.tf {
  --cut: 10px; position: relative; padding: 1px; background: rgba(255,255,255,.28);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background-color .2s ease, filter .2s ease;
}
.tf::after {                                              /* бірюзова смужка зліва, як на панелях кота */
  content: ""; position: absolute; left: 0; top: 30%; width: 3px; height: 40%; background: rgba(var(--cy), .55); transition: background-color .2s ease, box-shadow .2s ease;
}
.tf:focus-within { background: rgb(var(--cy)); filter: drop-shadow(0 0 10px rgba(var(--cy), .45)); }
.tf:focus-within::after { background: #fff; box-shadow: 0 0 10px #fff; }
.tf:has(.field[aria-invalid="true"]) { background: #FFB4A0; }
.tf:has(.field[aria-invalid="true"])::after { background: #FFB4A0; }
.tf .field {
  background: #0A3A34; color: #fff; border: 0; border-radius: 0; box-shadow: none; padding: 14px 16px 14px 18px; font-size: 16px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.tf .field:focus { outline: none; box-shadow: none; }
.tf .field::placeholder { color: rgba(255,255,255,.45); }
.tf select.field {
  appearance: none; -webkit-appearance: none; padding-right: 48px; color-scheme: dark; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2340EBD7' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.tf textarea.field { resize: vertical; min-height: 140px; display: block; }
.tf .field:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 1000px #0A3A34 inset; }
.ferr { margin-top: 6px; font-size: 14px; color: #FFC9BA; }
.tf-status { padding: 14px 16px; border-left: 3px solid rgb(var(--cy)); background: rgba(255,255,255,.08); font-size: 16px; }

/* Техно-кнопки на брендовому фоні */
.on-brand .btn-tech-wrap::before, .on-brand .btn-tech-wrap::after { border-color: rgba(var(--cy), .6); }
.btn-tech-wrap--ghost .btn-tech { background: rgba(255,255,255,.08); color: #fff; }
.btn-tech-wrap--ghost:hover .btn-tech, .btn-tech-wrap--ghost:focus-within .btn-tech { background: rgba(255,255,255,.16); }
.btn-tech-wrap--ghost .btn-tech__shine { background: linear-gradient(100deg, transparent 0%, rgba(var(--cy), .35) 50%, transparent 100%); }
.on-brand .btn-tech:focus-visible { outline: none; }


.chip { display: inline-block; border: 1px solid var(--border); background: var(--bg-alt); color: var(--text); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 500; }
/* Картки проєктів */
.pj {
  --cut: 14px; position: relative; padding: 1px; background: var(--border);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: transform .25s ease, filter .25s ease, background-color .25s ease;
}
.pj:hover, .pj:focus-within { transform: translateY(-4px); background: rgba(64,235,215,.75); filter: drop-shadow(0 0 14px rgba(64,235,215,.35)); }
.pj-inner {
  display: flex; flex-direction: column; height: 100%; background: var(--bg);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.pj-media { position: relative; aspect-ratio: 16 / 10; background: #0A3A34; overflow: hidden; }
.pj-media svg, .pj-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pj-media::after {                                        /* сканувальна смуга при наведенні */
  content: ""; position: absolute; left: 0; right: 0; top: -45%; height: 45%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(64,235,215,.18) 50%, transparent);
}
.pj:hover .pj-media::after, .pj:focus-within .pj-media::after { animation: pj-scan 1.4s linear infinite; }
@keyframes pj-scan { to { top: 100%; } }
.pj-body { display: flex; flex: 1; flex-direction: column; padding: 20px 22px 22px; }
.pj-meta { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.pj-title { margin-top: 8px; font-size: 21px; font-weight: 600; line-height: 1.3; }
.pj-title-link { color: inherit; text-decoration: none; }
.pj-title-link:hover { color: var(--brand); }
.pj-desc { margin-top: 8px; flex: 1; font-size: 16px; color: var(--muted); }
.pj-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; list-style: none; padding: 0; }
.pj-link { margin-top: 18px; font-size: 16px; display: inline-flex; gap: 6px; }
@media (prefers-reduced-motion: reduce) { .pj, .pj-media::after { transition: none !important; animation: none !important; } }


/* Клуб: членська картка */
.club-tick { flex: none; margin-top: 8px; width: 10px; height: 10px; background: var(--brand); clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%); }
.club-card {
  --cut: 18px; --cy: 64, 235, 215; position: relative; isolation: isolate; aspect-ratio: 1.6; padding: 26px 28px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  background:
    radial-gradient(circle at 80% 20%, rgba(var(--cy), .18), transparent 45%),
    linear-gradient(135deg, #0F4C45 0%, #0A3A34 55%, #072A26 100%);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.club-card::before {                                      /* сітка */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 24px 24px;
}
.club-card::after {                                       /* голографічний відблиск */
  content: ""; position: absolute; top: -20%; bottom: -20%; width: 35%; left: -45%; pointer-events: none; transform: skewX(-18deg);
  background: linear-gradient(100deg, transparent 0%, rgba(var(--cy), .16) 45%, rgba(255,255,255,.22) 50%, rgba(var(--cy), .16) 55%, transparent 100%);
  animation: club-shine 7s ease-in-out infinite;
}
@keyframes club-shine { 0%, 60% { left: -45%; } 85%, 100% { left: 125%; } }
.club-label { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.club-value { margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(22px, 4.6vw, 30px); font-weight: 600; letter-spacing: .06em; color: rgb(var(--cy)); }
.club-value--sm { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; letter-spacing: .04em; color: #fff; }
.club-value .g { color: rgba(255,255,255,.4); }
.club-chip { width: 46px; height: 34px; border-radius: 6px; background: linear-gradient(135deg, #40EBD7, #1C8C7E); box-shadow: 0 0 14px rgba(var(--cy), .35); position: relative; }
.club-chip::before { content: ""; position: absolute; inset: 7px 6px; border: 1px solid rgba(7,42,38,.45); border-radius: 3px; }
.club-chip::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 1px; background: rgba(7,42,38,.45); }
.club-logo { display: inline-flex; width: 48px; height: 48px; padding: 4px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 0 18px rgba(var(--cy), .35); }
.club-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; display: block; }
.club-wm {                                                /* водяний знак: лого на підфоні картки */
  position: absolute; z-index: -1; pointer-events: none; right: -4%; top: 50%; width: 54%; aspect-ratio: 1;
  transform: translateY(-50%) rotate(-8deg); opacity: .14; mix-blend-mode: screen;
}
.club-wm img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  /* білий фон PNG → чорний (зникає при screen), синій силует → бірюзове світло */
  filter: grayscale(1) invert(1) sepia(1) saturate(2.4) hue-rotate(118deg) brightness(1.15);
}
@media (max-width: 639px) { .club-wm { width: 62%; right: -8%; opacity: .12; } }
.club-bar { height: 26px; opacity: .55; background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 5px, #fff 5px 6px, transparent 6px 11px, #fff 11px 14px, transparent 14px 18px); }
.club-label { white-space: nowrap; }
@media (max-width: 639px) { .club-card { aspect-ratio: auto; padding: 22px 20px; } }
@media (prefers-reduced-motion: reduce) { .club-card::after { animation: none !important; } }

/* FAQ: панелі зі скошеними кутами, відповідь у стилі терміналу */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.faq-deco {                                           /* декор під заголовком FAQ: ледь помітний термінальний промпт */
  position: relative; margin-top: 56px; height: 240px; user-select: none;
}
.faq-deco::before {
  content: ">_"; position: absolute; left: 0; top: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 180px; font-weight: 500; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px #D8E2DF;
}
.faq-deco::after {                                    /* тонка шкала знизу, як штрихкод на членській картці */
  content: ""; position: absolute; left: 0; bottom: 0; width: 120px; height: 10px; opacity: .5;
  background: repeating-linear-gradient(90deg, #C9D5D1 0 1px, transparent 1px 8px);
}
.faq-item {
  --cut: 12px; position: relative; background: var(--bg-alt);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background-color .2s ease;
}
.faq-item::before {                                   /* смужка зліва, як на полях форми */
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0; background: var(--brand); transform: translateY(-50%);
  transition: height .25s ease, background-color .25s ease;
}
.faq-item:hover { background: #EEF1F3; }
.faq-item[open] { background: var(--brand-soft); }
.faq-item[open]::before { height: 42%; }
.faq-q { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 18px 20px 18px 22px; font-size: 18px; font-weight: 600; }
.faq-q:focus-visible { outline-offset: -3px; }
.faq-n { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; font-weight: 500; letter-spacing: .08em; color: var(--brand); }
.faq-ic { position: relative; width: 22px; height: 22px; background: #fff; clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); transition: background-color .2s ease; }
.faq-ic::before, .faq-ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; background: var(--brand); transform: translate(-50%, -50%); transition: transform .25s ease, background-color .2s ease; }
.faq-ic::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-ic { background: var(--brand); }
.faq-item[open] .faq-ic::before, .faq-item[open] .faq-ic::after { background: #fff; transform: translate(-50%, -50%) rotate(0); }
.faq-a {
  display: flex; gap: 12px; padding: 0 20px 20px 22px; font-size: 17px; line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text);
}
.faq-prompt { flex: none; color: var(--brand); font-weight: 600; }
.faq-at .g { color: #9AA1AB; }
@media (min-width: 640px) { .faq-a { padding-left: calc(22px + 16px + 2.1em); } }

.field { width: 100%; background: #fff; color: var(--text); border: 1px solid transparent; border-radius: 8px; padding: 13px 14px; font-size: 16px; line-height: 1.4; }
.field::placeholder { color: var(--muted); }
.field:focus { border-color: var(--cta); outline: none; box-shadow: 0 0 0 3px rgba(242,107,58,.35); }
.field[aria-invalid="true"] { border-color: #FFB4A0; box-shadow: 0 0 0 3px rgba(255,180,160,.4); }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--text); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* Перемикач мов */
.lang { position: relative; }
.lang > summary { list-style: none; cursor: pointer; }
.lang > summary::-webkit-details-marker { display: none; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-weight: 600; letter-spacing: .04em; color: var(--text); }
.lang-btn:hover { border-color: var(--brand); color: var(--brand); }
.lang-menu {
  --cut: 10px; position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 180px; padding: 6px; margin: 0; list-style: none;
  background: var(--bg); border: 1px solid var(--border); box-shadow: 0 14px 30px -18px rgba(17,19,24,.35);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.lang-menu a { display: block; padding: 9px 12px; font-size: 15px; font-weight: 500; color: var(--text); text-decoration: none; border-radius: 6px; }
.lang-menu a:hover { background: var(--bg-alt); color: var(--brand); }
.lang-menu a[aria-current="true"] { color: var(--brand); font-weight: 600; background: var(--brand-soft); }
.lang--inline > summary { display: none; }
.lang--inline .lang-menu { position: static; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; padding: 0; border: 0; box-shadow: none; clip-path: none; background: transparent; }
.lang--inline .lang-menu a { font-size: 14px; padding: 7px 10px; border: 1px solid var(--border); }


/* ===== Сторінка проєкту (/projects/{slug}) ===== */
.pp-hero { background: radial-gradient(900px 420px at 85% 20%, rgba(64,235,215,.14), transparent 70%); }
.pp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
@media (min-width: 640px) { .pp-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pp-facts--2, .pp-facts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 420px; }
@media (min-width: 640px) { .pp-facts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pp-fact { background: var(--bg); padding: 14px 16px; }
.pp-fact dt { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pp-fact dd { margin-top: 4px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--brand); line-height: 1.1; }
.pp-label { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }

/* Що ми зробили */
.pp-built {
  --cut: 14px; position: relative; background: var(--bg); padding: 24px 24px 26px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.pp-built::before { content: ""; position: absolute; left: 0; top: 24px; width: 3px; height: 28px; background: var(--brand); }
.pp-built-n { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .08em; color: var(--brand); }

/* Макет телефона (заглушка скриншота) */
.phone {
  width: 280px; aspect-ratio: 9 / 19; padding: 12px; border-radius: 42px; background: #111318;
  box-shadow: 0 30px 60px -30px rgba(17,19,24,.55), inset 0 0 0 2px #2A2E36;
  animation: cat-float 7s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .phone { animation: none; } }
.phone-screen {
  position: relative; height: 100%; border-radius: 32px; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, var(--a), var(--b));
}
.phone-art {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120px 160px at 50% 38%, rgba(255,255,255,.28), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px);
}
.phone-art::after { content: ""; position: absolute; left: 50%; top: 22%; width: 86px; height: 86px; border-radius: 50%; transform: translateX(-50%); background: rgba(255,255,255,.35); box-shadow: 0 110px 0 30px rgba(255,255,255,.22); }
.phone-ui { position: absolute; inset: auto 0 0 0; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.55) 40%); }
.phone-tag { align-self: flex-start; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(255,255,255,.18); border-radius: 999px; padding: 3px 8px; }
.phone-title { font-size: 17px; color: #fff; line-height: 1.2; }
.phone-dialog { margin-top: 2px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.92); display: flex; flex-direction: column; gap: 6px; }
.phone-name { font-size: 10px; font-weight: 600; color: var(--brand); }
.phone-line { height: 6px; border-radius: 3px; background: #D6DAE0; }
.phone-line--short { width: 60%; }
.phone-choice { height: 30px; border-radius: 8px; border: 1.5px solid rgba(255,255,255,.7); }
.phone-choice--a { background: var(--cta); border-color: transparent; }

/* Бейджі статусу історій */
.st-badge { display: inline-block; border: 1px solid var(--border); background: var(--bg); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 500; color: var(--text); vertical-align: middle; }
.st-badge--ongoing { border-color: transparent; background: var(--cta); color: var(--cta-text); }
.st-badge--completed { border-color: transparent; background: var(--brand); color: #fff; }
.st-badge--upcoming { border-color: transparent; background: #DDE3E8; color: var(--text); }
.ep-label { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.ep-lock { position: absolute; right: 12px; top: 12px; width: 14px; height: 11px; border-radius: 2px; background: rgba(255,255,255,.9); }
.ep-lock::before { content: ""; position: absolute; left: 2px; top: -7px; width: 10px; height: 10px; border: 2px solid rgba(255,255,255,.9); border-bottom: 0; border-radius: 6px 6px 0 0; box-sizing: border-box; }

/* Телефон зі справжнім сплешем */
.phone-splash { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: center top; }

/* Історії на сторінці проєкту: великі блоки */
.sb {
  --cut: 18px; position: relative; display: grid; gap: 28px; padding: 22px; background: var(--bg-alt);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.sb::before { content: ""; position: absolute; left: 0; top: var(--cut); bottom: var(--cut); width: 3px; background: linear-gradient(180deg, var(--a), var(--b)); }
@media (min-width: 768px) { .sb { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; padding: 28px; } .sb--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .sb--flip .sb-cover { order: 2; } }
@media (min-width: 1024px) { .sb { gap: 48px; padding: 34px; } }
.sb-cover {
  position: relative; display: block; aspect-ratio: 2 / 3; max-height: 560px; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, var(--a), var(--b));
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.sb-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.sb:hover .sb-cover img { transform: scale(1.03); }
.sb-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), transparent 30%, transparent 70%, rgba(0,0,0,.35)); pointer-events: none; }
.sb-cover-n { position: absolute; left: 14px; top: 12px; z-index: 1; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .1em; color: rgba(255,255,255,.9); }
.sb-age { position: absolute; right: 12px; top: 12px; z-index: 1; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: #fff; border: 1px solid rgba(255,255,255,.7); padding: 2px 7px; }
.sb-body { display: flex; flex-direction: column; min-width: 0; }
.sb-genres { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.sb-title { margin-top: 10px; font-size: 30px; font-weight: 600; line-height: 1.15; letter-spacing: -.015em; }
@media (min-width: 640px) { .sb-title { font-size: 38px; } }
.sb-title a { color: inherit; text-decoration: none; }
.sb-title a:hover { color: var(--brand); }
.sb-desc { margin-top: 12px; font-size: 17px; color: var(--muted); max-width: 60ch; }
.sb-meta { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 22px; }
.sb-meta dt { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sb-meta dd { margin-top: 3px; font-size: 17px; font-weight: 600; color: var(--text); }
.sb-cast { margin-top: 22px; }
.sb-cast-label { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sb-cast ul { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; list-style: none; padding: 0; }
.sb-li { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 92px; }
.sb-li-art {
  position: relative; display: block; width: 92px; aspect-ratio: 3 / 4; overflow: hidden;
  background: radial-gradient(80% 60% at 50% 30%, color-mix(in srgb, var(--c) 45%, #1B1F26), #15181E);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.sb-li-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c); }
.sb-li-art img { display: block; width: 100%; height: auto; transform: scale(2.3); transform-origin: 50% 9%; transition: transform .5s ease; }
.sb-li:hover .sb-li-art img { transform: scale(2.45); }
.sb-li-name { font-size: 14px; font-weight: 600; text-align: center; line-height: 1.2; }
.sb-episodes { margin-top: 22px; list-style: none; padding: 0; border-top: 1px solid var(--border); }
.sb-episodes li { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.sb-ep-n { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .08em; color: var(--brand); }
.sb-ep-t { font-weight: 600; }
.sb-ep-d { font-size: 13px; color: var(--muted); white-space: nowrap; }
.sb-episodes .is-soon .sb-ep-t { color: var(--muted); font-weight: 500; }
.sb-link { margin-top: 22px; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-size: 17px; }

/* ===== Сторінка історії (/projects/{slug}/stories/{story}) ===== */
.sp-hero { position: relative; isolation: isolate; overflow: hidden; background: #0B1F1C; color: #fff; }
.sp-hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; filter: saturate(1.05); }
.sp-hero-shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(7,30,27,.96) 0%, rgba(7,30,27,.82) 45%, rgba(7,30,27,.35) 100%),
  linear-gradient(180deg, rgba(7,30,27,.55), transparent 30%, rgba(7,30,27,.85) 100%); }
@media (max-width: 1023px) { .sp-hero-shade { background: linear-gradient(180deg, rgba(7,30,27,.85), rgba(7,30,27,.7) 50%, rgba(7,30,27,.95)); } }
.sp-back { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: rgba(255,255,255,.8); text-decoration: none; }
.sp-back:hover { color: #fff; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-chip { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #fff; border: 1px solid rgba(255,255,255,.35); padding: 4px 10px; }
.sp-chip--age { border-color: var(--cta); color: var(--cta); }
.sp-chip--free { border-color: rgba(64,235,215,.7); color: #40EBD7; }
.sp-title { margin-top: 18px; font-size: 42px; line-height: 1.02; font-weight: 600; letter-spacing: -.025em; }
@media (min-width: 640px) { .sp-title { font-size: 64px; } }
.sp-lead { margin-top: 18px; max-width: 58ch; font-size: 19px; line-height: 1.55; color: rgba(255,255,255,.85); }
.sp-meta { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-top: 28px; }
.sp-meta dt { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.sp-meta dd { margin-top: 4px; font-size: 18px; font-weight: 600; }
.sp-cover-wrap { display: flex; justify-content: center; }
.sp-cover {
  position: relative; width: min(100%, 300px); aspect-ratio: 2 / 3; overflow: hidden;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8);
  animation: cat-float 8s ease-in-out infinite;
}
@media (min-width: 1024px) { .sp-cover { width: 340px; } }
.sp-cover img { width: 100%; height: 100%; object-fit: cover; }
.sp-cover::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .sp-cover { animation: none; } }

.sp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; max-width: 720px; margin-inline: auto; background: var(--border); border: 1px solid var(--border); }
.sp-stats div { text-align: center; }
.sp-stats div { background: var(--bg); padding: 14px 16px; }
.sp-stats dd { font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--brand); line-height: 1.1; }
.sp-stats dt { margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.sp-episodes { display: grid; gap: 18px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .sp-episodes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .sp-episodes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.spe { --cut: 14px; position: relative; background: var(--bg-alt); clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); transition: transform .25s ease; }
.spe:hover { transform: translateY(-4px); }
.spe-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(140deg, var(--a), var(--b)); }
.spe-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.spe-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.6)); }
.spe-n { position: absolute; left: 14px; bottom: 10px; z-index: 1; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 30px; font-weight: 600; color: #fff; letter-spacing: -.02em; }
.spe-body { padding: 16px 18px 20px; }
.spe-title { margin-top: 4px; font-size: 20px; font-weight: 600; line-height: 1.25; }
.spe-date { margin-top: 4px; font-size: 14px; color: var(--muted); }
.spe-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.spe-stats strong { color: var(--text); font-weight: 600; }
.spe-premium { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 14px; font-weight: 500; }
.spe-gem { flex: none; width: 10px; height: 10px; background: var(--cta); clip-path: polygon(50% 0, 100% 35%, 50% 100%, 0 35%); }
.spe-cost { margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--cta-link); }
.spe--soon .spe-cover img { filter: saturate(.3) brightness(.8); }
.spe--soon .spe-title { color: var(--muted); }

.sp-cast-section { background: linear-gradient(180deg, #0A3A34, #072A26); color: #fff; }
.sp-cast { display: grid; gap: 18px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .sp-cast { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.sp-char { --cut: 16px; position: relative; display: flex; flex-direction: column; background: rgba(255,255,255,.05); clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.sp-char-art { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: radial-gradient(70% 60% at 50% 35%, color-mix(in srgb, var(--c) 35%, transparent), transparent 75%); }
.sp-char-art img { width: 100%; height: 130%; object-fit: cover; object-position: 50% 0; transition: transform .6s ease; }
.sp-char:hover .sp-char-art img { transform: translateY(-2%) scale(1.02); }
.sp-char-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(7,42,38,.95)); }
.sp-char-body { position: relative; padding: 0 20px 22px; margin-top: -40px; }
.sp-char-label { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c); }
.sp-char-name { margin-top: 4px; font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.sp-aff { display: flex; gap: 5px; margin-top: 12px; }
.sp-aff span { width: 22px; height: 4px; background: rgba(255,255,255,.18); }
.sp-aff span:nth-child(-n+2) { background: var(--c); }
.sp-others { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; font-size: 15px; color: rgba(255,255,255,.85); }
.sp-others li { display: inline-flex; align-items: center; gap: 8px; }
.sp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }

.sp-paths { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; font-weight: 600; }
.sp-paths li { display: flex; align-items: center; gap: 12px; }
.sp-path-bar { flex: none; width: 46px; height: 6px; background: var(--a); }
.sp-paths li:nth-child(even) .sp-path-bar { background: var(--b); }
.sp-premium { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sp-premium li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.sp-premium .spe-gem { margin-top: 6px; }
.sp-premium-t { display: flex; flex-direction: column; }
.sp-premium-t em { font-style: normal; font-size: 13px; color: var(--muted); }

.sp-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .sp-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .sp-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } .sp-gallery li:first-child { grid-column: span 2; grid-row: span 2; } }
.sp-cg { position: relative; display: block; width: 100%; height: 100%; aspect-ratio: 9 / 14; overflow: hidden; padding: 0; border: 0; background: #111; cursor: zoom-in; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.sp-gallery li:first-child .sp-cg { aspect-ratio: auto; }
.sp-cg img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.sp-cg:hover img, .sp-cg:focus-visible img { transform: scale(1.04); }
.sp-cg-name { position: absolute; left: 12px; bottom: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .08em; color: rgba(255,255,255,.85); text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.sp-lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 900px); max-height: 94vh; }
.sp-lightbox::backdrop { background: rgba(7,30,27,.92); backdrop-filter: blur(6px); }
.sp-lightbox img { display: block; max-width: 96vw; max-height: 94vh; object-fit: contain; }
.sp-lightbox-close { position: fixed; right: 18px; top: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.sp-lightbox-close:hover { background: rgba(255,255,255,.25); }

.sp-locations { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 8px; }
.sp-locations ul { display: flex; gap: 12px; list-style: none; padding: 0 16px; margin: 0; width: max-content; }
@media (min-width: 1024px) { .sp-locations ul { padding-inline: calc((100vw - 80rem) / 2 + 2rem); } }
.sp-locations li { position: relative; flex: none; width: 200px; aspect-ratio: 3 / 4; overflow: hidden; scroll-snap-align: start; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); background: #111; }
@media (min-width: 640px) { .sp-locations li { width: 240px; } }
.sp-locations img { width: 100%; height: 100%; object-fit: cover; }
.sp-loc-name { position: absolute; left: 10px; right: 10px; bottom: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .08em; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.sp-more { display: grid; gap: 16px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .sp-more { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sp-more-card { display: grid; grid-template-columns: 120px 1fr; gap: 18px; padding: 14px; background: var(--bg); color: inherit; text-decoration: none; clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); transition: transform .25s ease; }
.sp-more-card:hover { transform: translateY(-3px); }
.sp-more-card img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: linear-gradient(160deg, var(--a), var(--b)); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.sp-more-body { display: flex; flex-direction: column; min-width: 0; }
.sp-more-title { margin-top: 6px; font-size: 22px; font-weight: 600; line-height: 1.2; }
.sp-more-card:hover .sp-more-title { color: var(--brand); }
.sp-more-desc { margin-top: 6px; font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sp-more-meta { margin-top: auto; padding-top: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .06em; color: var(--brand); }
@media (prefers-reduced-motion: reduce) { .spe, .sb-cover img, .sp-cg img, .sp-char-art img { transition: none !important; } }

/* Медіа виділеного проєкту: ілюстрація з історії + телефон зі сплешем */
.pj-media--app { display: flex; align-items: center; justify-content: center; isolation: isolate; background: #072A26; }
.pj-app-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; filter: saturate(1.05) brightness(.75); transform: scale(1.02); transition: transform .8s ease; }
.pj:hover .pj-app-bg { transform: scale(1.06); }
.pj-app-grid { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7,42,38,.15), rgba(7,42,38,.6) 100%),
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px; }
.phone--sm { width: 190px; padding: 8px; border-radius: 30px; margin: 32px 0; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7), inset 0 0 0 2px #2A2E36; }
.phone--sm .phone-screen { border-radius: 22px; }
.phone--sm .phone-ui { padding: 12px; gap: 6px; }
.phone--sm .phone-title { font-size: 14px; }
.phone--sm .phone-dialog { padding: 8px 10px; }
.phone--sm .phone-choice { height: 24px; }
.pj-app-caption { position: absolute; left: 18px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.85); }
@media (max-width: 767px) { .pj-media--app { min-height: 380px; } }

/* Один виділений проєкт на головній: медіа зліва, текст справа */
.pj--featured .pj-media { aspect-ratio: 4 / 3; }
@media (min-width: 768px) {
  .pj--featured .pj-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .pj--featured .pj-media { aspect-ratio: auto; min-height: 460px; }
  .pj--featured .pj-body { padding: 40px 44px; justify-content: center; }
  .pj--featured .pj-title { font-size: 30px; }
  .pj--featured .pj-desc { flex: none; font-size: 17px; }
  .pj--featured .pj-desc + .pj-desc { margin-top: 10px; }
}

/* Згода на кукі: плашка знизу, зі скошеними кутами як у решти елементів */
.cookie-bar {
  --cut: 14px; position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; margin: 0 auto; max-width: 720px;
  display: flex; flex-direction: column; gap: 16px; padding: 20px 22px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  box-shadow: 0 18px 40px -18px rgba(17,19,24,.35);
  opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease;
}
.cookie-bar.is-visible { opacity: 1; transform: none; }
.cookie-bar__title { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); }
.cookie-bar__text { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.cookie-bar__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-bar__actions .btn { flex: 1 1 auto; }
@media (min-width: 640px) {
  .cookie-bar { flex-direction: row; align-items: center; gap: 24px; left: 24px; right: auto; bottom: 24px; }
  .cookie-bar__body { flex: 1 1 auto; }
  .cookie-bar__actions { flex: none; }
  .cookie-bar__actions .btn { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .cookie-bar { transition: none; } }

/* Юридичні сторінки */
.legal-lead { font-size: 20px; line-height: 1.55; color: var(--text); }
.legal-section { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.legal-section h2 { display: flex; align-items: baseline; gap: 14px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.legal-n { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .08em; color: var(--brand); }
.legal-section p { margin-top: 14px; font-size: 17px; color: var(--muted); }
.legal-section ul { margin-top: 14px; padding-left: 0; list-style: none; }
.legal-section li { position: relative; padding-left: 22px; margin-top: 8px; font-size: 17px; color: var(--muted); }
.legal-section li::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 9px; background: var(--brand); clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%); }
.legal-section .btn { margin-top: 6px; }
.legal-toc ol { list-style: none; padding: 0; }
.legal-toc li + li { margin-top: 6px; }
.legal-toc a { display: flex; gap: 10px; font-size: 15px; color: var(--muted); text-decoration: none; }
.legal-toc a:hover { color: var(--brand); }
.legal-toc__n { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .08em; color: var(--brand); }
.legal-cross { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); font-size: 16px; }

/* Кнопки магазинів застосунків */
.store-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.store-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 7px 16px 7px 12px; border-radius: 10px; background: #111318; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.14); transition: transform .2s ease, background-color .2s ease, border-color .2s ease; }
.store-btn:hover { transform: translateY(-2px); background: #1B1F26; border-color: rgba(64,235,215,.6); }
.store-btn__ic { width: 24px; height: 24px; flex: none; }
.store-btn__txt { display: flex; flex-direction: column; line-height: 1.1; }
.store-btn__txt small { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.store-btn__txt strong { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.store-btns--light .store-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.store-btns--light .store-btn:hover { background: rgba(255,255,255,.16); border-color: #fff; }


/* Сторінка епізоду */
.spe { position: relative; }
.spe-link { position: absolute; inset: 0; z-index: 2; }
.spe-link:focus-visible { outline-offset: -3px; }
.ep-hero .sp-hero-bg { object-position: center 45%; }
.ep-teaser { max-width: 62ch; border-left: 3px solid var(--brand); padding-left: 18px; }
.ep-teaser p { font-size: 17px; line-height: 1.6; color: var(--muted); font-style: italic; }
.ep-teaser p + p { margin-top: 10px; }
.ep-cast { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; padding: 0; margin: 0; }
.ep-cast .sb-li { width: 104px; }
.ep-cast .sb-li-art { width: 104px; }
.ep-li-tag { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); text-align: center; }
.ep-nav { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; }
.ep-nav--next { text-align: right; align-items: flex-end; }
.ep-nav-t { font-size: 17px; font-weight: 600; }
.ep-nav:hover .ep-nav-t { color: var(--brand); }

/* Лор історії: гачок, настрої, світ, герої, шляхи */
.sp-tagline { margin-top: 16px; max-width: 30ch; font-size: 24px; line-height: 1.25; font-weight: 500; letter-spacing: -.01em; color: #fff; }
@media (min-width: 640px) { .sp-tagline { font-size: 28px; } }
.sp-moods { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.sp-moods li { padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); font-size: 14px; color: rgba(255,255,255,.92); }
.sp-prose { max-width: 64ch; }
.sp-prose p { font-size: 18px; line-height: 1.7; }
.sp-prose p + p { margin-top: 18px; }
.sp-prose p:first-child { font-size: 21px; line-height: 1.55; }
.sp-notes { display: flex; flex-direction: column; gap: 14px; list-style: none; padding: 0; margin: 0; }
.sp-notes li { position: relative; padding: 20px 22px 22px 26px; background: var(--bg-alt); }
.sp-notes li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--a), var(--b)); }
.sp-notes h3 { font-size: 17px; font-weight: 600; }
.sp-notes p { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--muted); }

.sp-sub { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.sp-heroine { display: grid; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); overflow: hidden; }
.sp-heroine-art { position: relative; height: 300px; overflow: hidden; background: radial-gradient(70% 60% at 50% 35%, color-mix(in srgb, var(--c) 35%, transparent), transparent 75%); }
.sp-heroine-art img { width: 100%; height: 190%; object-fit: cover; object-position: 50% 0; }
.sp-heroine-body { padding: 26px 22px 30px; }
.sp-heroine .sp-char-name { font-size: 34px; }
.sp-heroine .sp-char-bio { max-width: 62ch; font-size: 17px; }
@media (min-width: 768px) {
  .sp-heroine { grid-template-columns: 300px 1fr; align-items: stretch; }
  .sp-heroine-art { height: auto; min-height: 380px; }
  .sp-heroine-art img { position: absolute; inset: 0; height: 170%; }
  .sp-heroine-body { align-self: center; padding: 36px 40px; }
}
.sp-char-role { margin-top: 6px; font-size: 15px; font-weight: 500; color: color-mix(in srgb, var(--c) 70%, #fff); }
.sp-char-bio { margin-top: 12px; font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.84); }
.sp-char-quote { margin: 16px 0 0; padding-left: 14px; border-left: 2px solid var(--c); font-size: 16px; line-height: 1.5; font-style: italic; color: #fff; }
@media (min-width: 640px) { .sp-cast--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 1023px) { .sp-cast--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sp-cast--2 .sp-char-art { aspect-ratio: 5 / 4; }
.sp-support { display: grid; gap: 14px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 768px) { .sp-support { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1200px) { .sp-support { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sp-support li { display: flex; align-items: flex-start; gap: 16px; padding: 18px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.sp-support .sb-li-art { flex: none; }
.sp-support h4 { font-size: 18px; font-weight: 600; }
.sp-support-role { margin-top: 2px; font-size: 13px; font-weight: 500; color: color-mix(in srgb, var(--c) 70%, #fff); }
.sp-support-bio { margin-top: 8px; font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.8); }
.sp-support-quote { margin-top: 8px; font-size: 14px; line-height: 1.5; font-style: italic; color: rgba(255,255,255,.95); }

.sp-tracks { display: grid; gap: 18px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 768px) { .sp-tracks { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; } }
.sp-track { padding: 26px 26px 30px; background: var(--bg-alt); }
.sp-track .sp-path-bar { display: block; width: 64px; }
.sp-track:nth-child(even) .sp-path-bar { background: var(--b); }
.sp-track--resource .sp-path-bar { background: var(--cta); }
.sp-track h3 { margin-top: 16px; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.sp-track p { margin-top: 10px; font-size: 16px; line-height: 1.6; color: var(--muted); }

.spe-hook { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.spe-date { margin-top: 10px; font-size: 13px; }

.ep-question { margin-top: 32px; max-width: 30ch; padding-top: 22px; border-top: 4px solid; border-image: linear-gradient(90deg, var(--a), var(--b)) 1; font-size: 26px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; }
@media (min-width: 640px) { .ep-question { font-size: 30px; } }
