/* ══════════════════════════════════════════════════════════════
   Volna Studio — спільні стилі: токени, типографіка, кнопки, шапка, меню, підвал, заклик.
   Стилі сторінок — окремі файли (home.css, portfolio.css…), підключаються лише там, де потрібні.
   Стартові стани анімацій діють тільки з класом .motion на <html> (inc/enqueue.php):
   без JS або з «Зменшити рух» сторінка статична й повністю видима.
   ══════════════════════════════════════════════════════════════ */

:root {
    color-scheme: dark;
    --bg: #0F0F0D;
    --bg-deep: #0B0B09;
    --card: #141411;
    --card-2: #1A1A16;
    --line: #26261F;
    --line-2: #2E2E27;
    --line-3: #3A3A33;
    --text: #F2F0E8;
    --text-2: #C9C6BB;
    --muted: #A3A096;
    --dim: #8E8B81;
    --accent: #C6F432;
    --danger: #FF6B5B;
    --font-display: 'Unbounded', system-ui, sans-serif;
    --font-text: 'Manrope', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --ease-io: cubic-bezier(.7, 0, .2, 1);
    --gutter: 32px;
    --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-text);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    min-height: 100vh;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--text); text-decoration: none; transition: color .3s; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 200; padding: 12px 18px; border-radius: 999px; background: var(--accent); color: var(--bg); font-weight: 700; }
.skip:focus { top: 12px; color: var(--bg); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── Сітка та відступи ── */
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding: clamp(64px, 10vw, 140px) 0; }
.section--lg { padding: clamp(72px, 11vw, 160px) 0; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 48px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.center { text-align: center; }

/* ── Типографіка ── */
.display { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.04em; line-height: .98; margin: 0; }
.h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; font-size: clamp(38px, 7vw, 96px); margin: 0; }
.h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; font-size: clamp(30px, 5vw, 64px); margin: 0; }
.h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; margin: 0; }
.eyebrow + .h1, .eyebrow + .h2 { margin-top: 18px; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.acc, .ok { color: var(--accent); }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: ping 2s infinite; }
.eyebrow.plain::before { display: none; }

.chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12px; color: var(--text-2); font-family: var(--font-mono); white-space: nowrap; }

/* ── Кнопки ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 28px; border-radius: 999px; font-weight: 700; font-size: 16px; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: transform .35s var(--ease), background-color .3s, color .3s, border-color .3s; }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 14px; }
.btn-primary, .btn-primary:hover { background: var(--accent); color: var(--bg); }
.btn-ghost { border-color: var(--line-3); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .ico { transition: transform .35s var(--ease); }
.btn:hover .ico { transform: translateX(4px); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ── Курсор-кільце (лише миша) ── */
.cursor { position: fixed; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 1.5px solid var(--accent); pointer-events: none; z-index: 90; opacity: 0; transition: width .3s, height .3s, margin .3s, background-color .3s, opacity .3s; display: none; }
.fine .cursor { display: block; }
.cursor.on { opacity: 1; }
.cursor.hot { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: color-mix(in srgb, var(--accent) 18%, transparent); }

.only-touch { display: none; }
html:not(.fine) .only-fine { display: none; }
html:not(.fine) .only-touch { display: inline; }

/* ── Появи під час прокручування ── */
.motion [data-reveal], .motion [data-hero] { opacity: 0; transform: translateY(32px); }
.motion [data-split] { visibility: hidden; }
.line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.line-in { display: block; }
.motion [data-hero-line] { transform: translateY(110%); }
.split-line { overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }

/* ── Шапка ── */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(15, 15, 13, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid #22221C; }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.site-header__right { display: flex; align-items: center; gap: 18px; }
.site-nav { display: flex; gap: 30px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-wave path { stroke: var(--accent); stroke-dasharray: 8 6; animation: flow 1.4s linear infinite; }

.roll { position: relative; display: inline-flex; align-items: center; min-height: 44px; overflow: hidden; font-size: 15px; font-weight: 600; color: var(--text-2); }
.roll-in { display: flex; flex-direction: column; height: 1.6em; line-height: 1.6em; overflow: hidden; }
.roll-in span { display: block; transition: transform .45s var(--ease-io); }
.roll-in span + span { color: var(--accent); }
.roll:hover .roll-in span, .roll[aria-current] .roll-in span { transform: translateY(-100%); }

.lang-sw { display: flex; gap: 2px; font-family: var(--font-mono); font-size: 12px; }
.lang-sw a, .lang-sw span { display: grid; place-items: center; min-width: 34px; min-height: 34px; border-radius: 999px; color: var(--dim); }
.lang-sw a:hover { color: var(--accent); }
.lang-sw span[aria-current] { color: var(--bg); background: var(--accent); }

.burger { display: none; position: relative; width: 44px; height: 44px; border: 1px solid var(--line-3); border-radius: 50%; background: transparent; cursor: pointer; padding: 0; }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .4s var(--ease), top .4s var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ── Мобільне меню на весь екран ── */
.menu { position: fixed; inset: 0; z-index: 35; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: calc(var(--header-h) + 32px) var(--gutter) 32px; background: var(--bg); overflow-y: auto; clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .7s var(--ease-io), visibility 0s .7s; }
.menu.open { clip-path: inset(0); visibility: visible; transition: clip-path .7s var(--ease-io); }
.menu__nav { display: flex; flex-direction: column; }
.menu__link { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 9vw, 52px); letter-spacing: -0.03em; line-height: 1.1; opacity: 0; transform: translateY(24px); transition: opacity .5s, transform .6s var(--ease), color .3s; }
.menu__link .mono { font-size: 12px; color: var(--accent); letter-spacing: 0; font-weight: 400; }
.menu__link[aria-current] { color: var(--accent); }
.menu.open .menu__link { opacity: 1; transform: none; }
.menu.open .menu__link:nth-child(1) { transition-delay: .15s; }
.menu.open .menu__link:nth-child(2) { transition-delay: .2s; }
.menu.open .menu__link:nth-child(3) { transition-delay: .25s; }
.menu.open .menu__link:nth-child(4) { transition-delay: .3s; }
.menu.open .menu__link:nth-child(5) { transition-delay: .35s; }
.menu__foot { display: flex; flex-direction: column; gap: 20px; }
.menu__social { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; }
.menu__social a { color: var(--muted); }
.lang-sw--menu a, .lang-sw--menu span { min-width: 48px; min-height: 44px; font-size: 14px; }

/* ── Заголовок внутрішньої сторінки, крихти, текст ── */
.page-head { padding: clamp(40px, 6vw, 88px) 0 clamp(24px, 4vw, 48px); }
.page-head .h1 { max-width: 16ch; }
.page-head__lead { max-width: 620px; margin-top: 24px; font-size: clamp(17px, 1.5vw, 20px); }
.crumbs { margin-bottom: 28px; font-size: 12px; color: var(--dim); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.crumbs li + li::before { content: '/'; margin-right: 10px; color: var(--line-3); }
.crumbs a { color: var(--dim); }
.crumbs a:hover { color: var(--accent); }

.prose { max-width: 760px; }
.prose > * + * { margin-top: 1.2em; }
.prose h2, .prose h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.2; margin-top: 1.8em; }
.prose h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 700; }
.prose h3 { font-size: clamp(19px, 2.2vw, 24px); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); }
.prose img { border-radius: 18px; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); font-family: var(--font-display); font-weight: 600; font-size: clamp(19px, 2.2vw, 26px); line-height: 1.35; letter-spacing: -0.01em; }
.prose pre { overflow-x: auto; padding: 20px; border-radius: 16px; background: var(--bg-deep); border: 1px solid var(--line); font-family: var(--font-mono); font-size: 14px; line-height: 1.7; }
.prose code { font-family: var(--font-mono); font-size: .9em; padding: .15em .4em; border-radius: 6px; background: var(--card-2); }
.prose pre code { padding: 0; background: none; }

/* ── Вікно зі скриншотом проєкту (картки кейсів, портфоліо, сторінка кейсу) ── */
.shot { --shot-h: 440px; position: relative; overflow: hidden; border-radius: 20px; background: #FBF6EE; height: var(--shot-h); }
/* Тривалість задає шаблон за довжиною сторінки (--shot-d, inc/images.php) — швидкість однакова для всіх скриншотів */
.shot-scroll { animation: autoscroll var(--shot-d, 14s) cubic-bezier(.45, 0, .55, 1) infinite alternate; }
/* Прокручування стартує, коли скриншот зʼявився на екрані, і стоїть на паузі поза ним (клас is-in ставить main.js) */
.motion .shot-scroll { animation-play-state: paused; }
.motion .is-in > .shot-scroll, .motion .is-in .c-phone__screen > .shot-scroll { animation-play-state: running; }
/* Картинка, нижча за вікно (горизонтальний екран інтерфейсу), заповнює його без порожньої смуги знизу */
.shot-scroll img { width: 100%; min-height: var(--shot-h); object-fit: cover; object-position: 50% 0; }
.shot-scroll--still { animation: none; height: 100%; }
.shot-scroll--still img { height: 100%; object-fit: cover; }
.shot-mock { color: #1E140C; }
.m-nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 28px; font-weight: 800; font-size: 13px; }
.m-logo { font-family: var(--font-display); letter-spacing: -0.04em; font-size: 17px; }
.m-hero { margin: 0 28px; height: 240px; border-radius: 18px; padding: 24px; display: flex; align-items: flex-end; color: var(--bg); background: var(--c, var(--accent)); }
.m-hero b { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 4vw, 48px); letter-spacing: -0.05em; line-height: .9; }
.m-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 28px; }
.m-grid i { display: block; height: 120px; border-radius: 12px; background: #EADCC8; }
.m-band { margin: 0 28px 16px; height: 110px; border-radius: 18px; background: #1E140C; }

/* ── Фінальний заклик ── */
.cta { position: relative; overflow: hidden; padding: clamp(72px, 12vw, 180px) 0; }
.cta__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 48px; }
.cta__text { min-width: 0; }
.cta-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 8.4vw, 128px); letter-spacing: -0.055em; line-height: .94; margin: 28px 0 0; max-width: 9ch; }
.cta__lead { font-size: 18px; max-width: 480px; margin-top: 28px; }
.big-btn { position: relative; flex: none; width: clamp(150px, 16vw, 220px); height: clamp(150px, 16vw, 220px); border-radius: 50%; background: var(--accent); color: var(--bg); display: grid; place-items: center; text-align: center; font-weight: 800; font-size: 18px; line-height: 1.2; }
.big-btn:hover { color: var(--bg); }
.big-btn::before { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent); animation: spin 16s linear infinite; }

/* ── Підвал ── */
.site-footer { border-top: 1px solid #22221C; padding: 72px 0 28px; }
.site-footer__top { display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; }
.site-footer__about { flex: 1 1 300px; max-width: 420px; }
.site-footer__about p { margin-top: 20px; font-size: 15px; }
.site-footer__cols { display: flex; flex-wrap: wrap; gap: 32px 72px; }
.foot-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-size: 15px; }
.foot-link { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); }
.foot-word { margin-top: 64px; font-family: var(--font-display); font-weight: 800; font-size: clamp(72px, 17vw, 250px); line-height: .9; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1.5px #34342C; transition: color .6s, -webkit-text-stroke-color .6s; user-select: none; white-space: nowrap; }
.foot-word:hover { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.site-footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; margin-top: 8px; border-top: 1px solid #22221C; font-size: 14px; }
.site-footer__bottom .mono { font-size: 12px; }

/* ── 404 ── */
.e404 { padding: clamp(64px, 10vw, 140px) 0; }
.e404__num { font-size: clamp(120px, 28vw, 380px); color: transparent; -webkit-text-stroke: 2px var(--accent); }
.e404 .muted { max-width: 480px; margin: 20px 0 32px; }

/* ── Перехід між сторінками: скриншот кейсу «перелітає» з картки на сторінку ── */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .25s ease both; }
::view-transition-new(root) { animation: vt-in .4s var(--ease) both; }
::view-transition-group(*) { animation-duration: .55s; animation-timing-function: var(--ease-io); }

@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes flow { to { stroke-dashoffset: -28; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes autoscroll { 0%, 6% { transform: translateY(0); } 94%, 100% { transform: translateY(calc(-100% + var(--shot-h))); } }

@media (max-width: 1040px) {
    .site-nav, .site-header .btn, .site-header .lang-sw { display: none; }
    .burger { display: block; }
}

@media (max-width: 720px) {
    :root { --gutter: 16px; --header-h: 64px; }
    body { font-size: 16px; }
    .shot { --shot-h: 300px; }
    .cta__in { gap: 56px; }
    .big-btn { margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
