/* /projects — „Web & Digital Projects“, авторското портфолио зад знака ПХ.
   Нарочно НЕ зарежда style.css: страницата има собствена идентичност (черно,
   въглен, тъмносин нощен тон, метално злато), а не синьо-тюркоазената гама на
   InvLib. Споделя със сайта само шрифтовете в /fonts/.

   Всичко е CSS анимация; js/projects.js само добавя класове (.in, .solid,
   .current) и пише --py за паралакса. */

@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../fonts/CormorantGaramond-var-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../fonts/CormorantGaramond-var-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../fonts/CormorantGaramond-var-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../fonts/CormorantGaramond-var-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../fonts/Inter-var-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../fonts/Inter-var-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../fonts/Inter-var-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../fonts/Inter-var-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #07080b; --char: #111216; --navy: #0b1220;
  --gold: #c9a45c; --gold-l: #f1d48c; --gold-d: #8a5f1d;
  --warm: #f3ede1; --muted: rgba(243, 237, 225, 0.7); --faint: rgba(243, 237, 225, 0.56);
  --line: rgba(201, 164, 92, 0.2); --glass: rgba(18, 20, 26, 0.55);
  --metal: linear-gradient(115deg, #8a5f1d 0%, #e9c878 32%, #fff1c4 48%, #d6a94f 64%, #8a5f1d 100%);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); color: var(--warm); line-height: 1.6; min-height: 100vh;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(14, 24, 48, 0.9), transparent 70%),
    linear-gradient(180deg, var(--ink) 0%, var(--char) 55%, var(--ink) 100%);
  background-color: var(--ink);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: rgba(201, 164, 92, 0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--gold-l); outline-offset: 4px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--gold); color: var(--ink);
  padding: 0.6rem 1rem; font-size: 0.8rem; font-weight: 600; text-decoration: none; border-radius: 6px; transition: top 0.2s;
}
.skip:focus { top: 1rem; }

/* ── Атмосфера: фин зърнест филм, златен прах, светлина след курсора ── */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#dust { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.glow-cursor {
  position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; z-index: 2;
  pointer-events: none; border-radius: 50%; opacity: 0; transition: opacity 0.6s;
  background: radial-gradient(circle, rgba(201, 164, 92, 0.085) 0%, rgba(201, 164, 92, 0.03) 35%, transparent 65%);
}
.glow-cursor.on { opacity: 1; }

/* Входна завеса — продължава прехода от футъра на сайта (черно + златна
   линия), после се разтваря. Само CSS, затова работи и без JS. */
.veil { position: fixed; inset: 0; z-index: 90; background: var(--ink); pointer-events: none; animation: veilOut 0.7s var(--ease) 0.1s forwards; }
.veil i {
  position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-l), transparent);
  box-shadow: 0 0 18px rgba(241, 212, 140, 0.55); animation: lineOut 0.6s var(--ease) forwards;
}
@keyframes veilOut { to { opacity: 0; visibility: hidden; } }
@keyframes lineOut { to { transform: scaleX(0); opacity: 0; } }

/* ── Горна лента ── */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem clamp(1rem, 4vw, 3rem); padding-top: max(1.1rem, env(safe-area-inset-top));
  border-bottom: 1px solid transparent; transition: background 0.4s, border-color 0.4s, padding 0.4s;
}
.bar.solid {
  background: rgba(7, 8, 11, 0.7); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  border-color: var(--line); padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.bar-mark { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; min-height: 44px; }
.bar-mark img { height: 26px; width: auto; }
.bar-tag { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.34em; text-transform: uppercase; color: var(--faint); }
.back {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; text-decoration: none;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--warm);
  padding: 0.62rem 1.1rem; border: 1px solid var(--line); border-radius: 100px; background: var(--glass);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: border-color 0.3s, color 0.3s;
}
.back .back-arr { display: inline-block; transition: transform 0.35s var(--ease); }
.back:hover { border-color: rgba(201, 164, 92, 0.55); color: var(--gold-l); }
.back:hover .back-arr { transform: translateX(-4px); }

main, footer { position: relative; z-index: 3; }
.wrap { width: min(1240px, 100% - 2 * clamp(1.1rem, 5vw, 3.5rem)); margin: 0 auto; }

/* ── Появяване при скрол ──
   Скрито по подразбиране, както .reveal в style.css; <noscript> в
   страницата го показва, ако JS е изключен. */
[data-r] { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
[data-r].in { opacity: 1; transform: none; }

/* ── HERO ── */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; position: relative; padding: 7rem 0 7.5rem; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; left: 50%; top: 38%; width: min(900px, 120vw); height: min(900px, 120vw);
  transform: translate(-50%, -50%); pointer-events: none; animation: breathe 7s ease-in-out infinite;
  background: radial-gradient(circle, rgba(201, 164, 92, 0.16) 0%, rgba(201, 164, 92, 0.05) 30%, transparent 62%);
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: conic-gradient(from 200deg at 50% 36%, transparent 0deg, rgba(241, 212, 140, 0.05) 18deg, transparent 40deg, transparent 320deg, rgba(241, 212, 140, 0.04) 340deg, transparent 360deg);
}
@keyframes breathe { 0%, 100% { opacity: 0.75; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } }
.hero > * { position: relative; z-index: 1; }
.hero-logo {
  width: min(380px, 68vw); height: auto; aspect-ratio: 2 / 1;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 28px rgba(201, 164, 92, 0.22));
}
.eyebrow {
  font-size: 0.64rem; font-weight: 600; letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold);
  display: inline-flex; align-items: center; gap: 1rem;
}
.eyebrow::before, .eyebrow::after { content: ''; width: 2.2rem; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.eyebrow::after { transform: scaleX(-1); }
.hero .eyebrow { margin-top: 2.4rem; }
.hero h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 7.2vw, 5.8rem); line-height: 1.02; letter-spacing: -0.01em; margin-top: 1.1rem; }
.hero h1 em, .finale .identity {
  font-style: italic; font-weight: 300; background: var(--metal); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 6s linear infinite;
}
@keyframes sheen { to { background-position: -200% 0; } }
.hero .lead { max-width: 34rem; margin: 1.6rem auto 0; padding: 0 1.1rem; font-size: clamp(0.95rem, 1.4vw, 1.04rem); font-weight: 300; line-height: 1.9; color: var(--muted); }
/* Стъпаловидно появяване на редовете в hero — чист CSS. */
.st { display: inline-block; opacity: 0; transform: translateY(0.6em); animation: stIn 1.1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes stIn { to { opacity: 1; transform: none; } }
.cue {
  position: absolute; bottom: max(2rem, env(safe-area-inset-bottom)); left: 50%; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem; padding: 0.4rem 0.6rem; text-decoration: none;
  font-size: 0.64rem; font-weight: 600; letter-spacing: 0.4em; text-transform: uppercase; color: var(--faint); white-space: nowrap; transition: color 0.3s;
}
.cue:hover { color: var(--gold-l); }
.cue-line { width: 1px; height: 40px; background: linear-gradient(var(--gold), transparent); position: relative; overflow: hidden; }
.cue-line::after {
  content: ''; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold-l);
  box-shadow: 0 0 8px var(--gold-l); animation: drop 2.2s var(--ease) infinite;
}
.cue svg { width: 12px; height: 12px; animation: nudge 2.2s var(--ease) infinite; }
@keyframes drop { to { top: 110%; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(4px); opacity: 1; } }

/* ── Индекс на трите проекта ── */
.index { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(11, 18, 32, 0.35); }
.index ol { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); }
.index li + li { border-left: 1px solid var(--line); }
.index a { display: flex; align-items: baseline; gap: 1rem; padding: 1.4rem clamp(1rem, 2.5vw, 2rem); text-decoration: none; transition: background 0.35s; }
.index a:hover { background: rgba(201, 164, 92, 0.05); }
.index b { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; color: var(--gold); }
.index span { font-size: 0.84rem; letter-spacing: 0.04em; color: var(--muted); transition: color 0.3s; overflow-wrap: anywhere; }
.index a:hover span { color: var(--warm); }

/* ── Проекти ── */
.works { padding: clamp(5rem, 11vw, 9rem) 0 2rem; }
.works-head { text-align: center; margin-bottom: clamp(3rem, 7vw, 5.5rem); }
.works-head h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-top: 1rem; line-height: 1.15; }
.works-head h2 em { color: var(--gold-l); font-style: italic; }

.proj {
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 6rem); align-items: center;
  padding: clamp(3rem, 7vw, 6rem) 0; position: relative; scroll-margin-top: 5rem;
}
.proj.rev { grid-template-columns: 7fr 5fr; }
.proj.rev .p-text { order: 2; }
.proj.rev .p-view { order: 1; }
.sep { display: flex; align-items: center; gap: 1rem; width: min(420px, 70%); margin: 0 auto; }
.sep::before, .sep::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.sep::after { transform: scaleX(-1); }
.sep i { width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--gold); opacity: 0.7; }

.p-text { position: relative; isolation: isolate; }
.p-num {
  position: absolute; top: -0.55em; left: -0.06em; z-index: -1; pointer-events: none; user-select: none;
  font-family: var(--serif); font-weight: 300; font-size: clamp(7rem, 15vw, 12.5rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(201, 164, 92, 0.22);
}
.p-kicker { display: flex; align-items: center; gap: 0.9rem; font-size: 0.64rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.p-kicker::before { content: ''; width: 1.8rem; height: 1px; background: var(--gold); flex: none; }
.p-name { font-family: var(--serif); font-weight: 400; font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.05; margin-top: 1rem; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.p-name .tld { font-style: italic; font-weight: 300; color: var(--gold-l); }
.here {
  display: none; align-items: center; gap: 0.5rem; margin-top: 0.9rem; padding: 0.34rem 0.75rem;
  font-size: 0.64rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-l);
  border: 1px solid rgba(201, 164, 92, 0.35); border-radius: 100px; background: rgba(201, 164, 92, 0.07);
}
.here::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-l); box-shadow: 0 0 10px var(--gold-l); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.proj.current .here { display: inline-flex; }
.p-desc { margin-top: 1.3rem; font-size: 1.02rem; font-weight: 300; line-height: 1.85; color: var(--muted); max-width: 30rem; }
.p-feat { list-style: none; margin-top: 1.8rem; display: grid; gap: 0.75rem; max-width: 30rem; }
.p-feat li { display: grid; grid-template-columns: 1.4rem 1fr; align-items: baseline; font-size: 0.9rem; color: rgba(243, 237, 225, 0.84); line-height: 1.55; }
.p-feat li::before { content: ''; width: 0.8rem; height: 1px; background: var(--gold); transform: translateY(-0.25em); }
.p-cta { margin-top: 2.4rem; }
.cta {
  display: inline-flex; align-items: center; gap: 0.9rem; min-height: 48px; text-decoration: none;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink);
  background: var(--metal); background-size: 180% 100%; background-position: 0 0;
  padding: 0.9rem 1.1rem 0.9rem 1.7rem; border-radius: 100px;
  box-shadow: 0 10px 30px -10px rgba(201, 164, 92, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: background-position 0.6s var(--ease), box-shadow 0.4s, transform 0.3s var(--ease);
}
.cta .arr { display: inline-flex; width: 1.8rem; height: 1.8rem; align-items: center; justify-content: center; border-radius: 50%; background: rgba(7, 8, 11, 0.9); color: var(--gold-l); transition: transform 0.45s var(--ease); }
.cta .arr svg { width: 12px; height: 12px; }
.cta:hover { background-position: 100% 0; box-shadow: 0 14px 38px -10px rgba(241, 212, 140, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.cta:focus-visible { outline-offset: 5px; }
.proj:hover .cta .arr, .cta:focus-visible .arr { transform: translateX(5px); }

/* Композиция на прегледа: браузър (компютър) + телефон, реални снимки. */
.p-view { position: relative; padding-bottom: 9%; }
.frame, .phone { transform: translate3d(0, var(--py, 0px), 0); }
.frame {
  position: relative; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, rgba(28, 31, 40, 0.85), rgba(12, 14, 19, 0.9));
  border: 1px solid rgba(243, 237, 225, 0.08);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.6s var(--ease), border-color 0.6s;
}
/* Златна линия, която пробягва по ръба при hover. */
.frame::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: 4; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent 0%, transparent 35%, var(--gold-l) 50%, transparent 65%, transparent 100%);
  background-size: 250% 100%; background-position: 120% 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  transition: opacity 0.4s;
}
.chrome { display: flex; align-items: center; gap: 0.9rem; height: 34px; padding: 0 0.9rem; border-bottom: 1px solid rgba(243, 237, 225, 0.06); background: rgba(7, 8, 11, 0.55); }
.dots { display: flex; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(243, 237, 225, 0.14); }
.url {
  flex: 1; max-width: 60%; margin: 0 auto; height: 20px; border-radius: 100px; overflow: hidden; white-space: nowrap;
  background: rgba(243, 237, 225, 0.05); border: 1px solid rgba(243, 237, 225, 0.06);
  display: flex; align-items: center; justify-content: center; gap: 0.4rem; font-size: 0.64rem; letter-spacing: 0.06em; color: var(--faint);
}
.url svg { width: 9px; height: 9px; opacity: 0.6; flex-shrink: 0; }
.shot { position: relative; aspect-ratio: 1200 / 667; overflow: hidden; background: var(--navy); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(1.001); transition: transform 1.2s var(--ease); }
.shot::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(7, 8, 11, 0.35)); pointer-events: none; }
.phone {
  position: absolute; right: -3%; bottom: 0; width: 26%; min-width: 92px; z-index: 3; border-radius: 18px; padding: 5px;
  background: linear-gradient(160deg, #2a2d36, #0e1014); border: 1px solid rgba(243, 237, 225, 0.1);
  box-shadow: -20px 30px 60px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.5);
  transition: transform 0.8s var(--ease);
}
.phone .shot { aspect-ratio: 390 / 800; border-radius: 13px; }
.phone::before { content: ''; position: absolute; top: 9px; left: 50%; width: 26%; height: 5px; border-radius: 5px; transform: translateX(-50%); background: var(--ink); z-index: 2; }
.proj.rev .phone { right: auto; left: -3%; }

@media (hover: hover) and (pointer: fine) {
  .proj:hover .frame { border-color: rgba(201, 164, 92, 0.28); box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.9), 0 0 60px -20px rgba(201, 164, 92, 0.35); }
  .proj:hover .frame::before { opacity: 1; animation: edge 1.6s var(--ease) forwards; }
  .proj:hover .frame .shot img { transform: scale(1.045); }
  .proj:hover .phone { transform: translate3d(0, calc(var(--py, 0px) - 8px), 0); }
}
@keyframes edge { from { background-position: 120% 0; } to { background-position: -20% 0; } }

/* ── Финал ── */
.finale { text-align: center; padding: clamp(6rem, 14vw, 11rem) 0 clamp(4rem, 9vw, 7rem); position: relative; overflow: hidden; }
.finale::before {
  content: ''; position: absolute; left: 50%; top: 62%; width: min(760px, 110vw); height: min(560px, 90vw); transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(201, 164, 92, 0.13), transparent 65%); pointer-events: none;
}
.finale h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: 1.08; }
.finale h2 > span { display: block; }
.finale .identity { animation-duration: 7s; }
.finale p { max-width: 32rem; margin: 1.8rem auto 0; font-size: 1.02rem; font-weight: 300; line-height: 1.9; color: var(--muted); }
.finale-sig { margin-top: clamp(3.5rem, 8vw, 5.5rem); }
.finale-logo { width: min(260px, 56vw); height: auto; aspect-ratio: 2 / 1; margin: 0 auto; filter: drop-shadow(0 0 30px rgba(201, 164, 92, 0.25)); }
.finale .tag { display: block; margin-top: 1.3rem; font-size: 0.64rem; font-weight: 600; letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold); }
.foot { border-top: 1px solid var(--line); padding: 1.4rem 0 max(1.4rem, env(safe-area-inset-bottom)); }
.foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem 1rem; flex-wrap: wrap; font-size: 0.74rem; color: var(--faint); letter-spacing: 0.06em; }
.foot a { color: var(--muted); text-decoration: none; transition: color 0.3s; display: inline-flex; align-items: center; min-height: 44px; }
.foot a:hover { color: var(--gold-l); }

/* ── Адаптивност ── */
@media (max-width: 1024px) {
  .proj, .proj.rev { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .p-num { font-size: clamp(6rem, 14vw, 9rem); }
}
@media (max-width: 820px) {
  .proj, .proj.rev { grid-template-columns: 1fr; gap: 2.6rem; padding: 3.5rem 0; }
  .proj .p-view, .proj.rev .p-view { order: 1; }
  .proj .p-text, .proj.rev .p-text { order: 2; }
  .p-view { padding-bottom: 12%; }
  .phone { width: 30%; right: -1%; }
  .proj.rev .phone { left: auto; right: -1%; }
  .index ol { grid-template-columns: 1fr; }
  .index li + li { border-left: 0; border-top: 1px solid var(--line); }
  .index a { padding: 1.05rem 0; }
  .bar-tag { display: none; }
}
@media (max-width: 480px) {
  .back { padding: 0.55rem 0.9rem; font-size: 0.66rem; letter-spacing: 0.1em; }
  .hero { padding: 6rem 0 7.5rem; }
  .eyebrow { letter-spacing: 0.32em; gap: 0.7rem; }
  .eyebrow::before, .eyebrow::after { width: 1.4rem; }
  .p-num { top: -0.45em; }
  .cta { width: 100%; justify-content: space-between; }
  .chrome { height: 28px; }
  .url { max-width: 72%; }
  .phone { min-width: 84px; }
}
@media (max-width: 340px) {
  .bar { gap: 0.5rem; }
  .p-kicker { letter-spacing: 0.22em; }
}
/* ── Приложение: три телефона ветрилообразно (без браузър) ── */
.proj.app .p-view { padding-bottom: 0; }
.trio { position: relative; aspect-ratio: 7 / 5; }
.proj .trio .phone { position: absolute; bottom: auto; top: 50%; width: 34%; min-width: 0; }
.trio .phone .shot { aspect-ratio: 9 / 16; }
.proj .trio .t-c { left: 33%; z-index: 3; transform: translate3d(0, calc(-50% + var(--py, 0px)), 0); }
.proj .trio .t-l { left: 6%; z-index: 2; transform: translate3d(0, calc(-46% + var(--py, 0px)), 0) rotate(-6deg) scale(0.9); opacity: 0.92; }
.proj .trio .t-r { left: 60%; z-index: 2; transform: translate3d(0, calc(-46% + var(--py, 0px)), 0) rotate(6deg) scale(0.9); opacity: 0.92; }
.proj.rev.app .trio .phone { right: auto; }
@media (hover: hover) and (pointer: fine) {
  .proj.app:hover .t-c { transform: translate3d(0, calc(-50% + var(--py, 0px) - 8px), 0); }
  .proj.app:hover .t-l { transform: translate3d(-6px, calc(-46% + var(--py, 0px)), 0) rotate(-8deg) scale(0.9); }
  .proj.app:hover .t-r { transform: translate3d(6px, calc(-46% + var(--py, 0px)), 0) rotate(8deg) scale(0.9); }
  .proj.app:hover .phone .shot img { transform: scale(1.03); }
}

/* ── Настолна програма: прозорец вместо адресна лента ── */
.win .chrome { justify-content: space-between; }
.win-title { font-size: 0.66rem; letter-spacing: 0.08em; color: var(--faint); }
.win-ctl { display: flex; gap: 14px; }
.win-ctl i { width: 9px; height: 1px; background: rgba(243, 237, 225, 0.35); position: relative; }
.win-ctl i:nth-child(2) { height: 8px; width: 8px; background: none; border: 1px solid rgba(243, 237, 225, 0.35); margin-top: -4px; }
.win-ctl i:nth-child(3) { background: none; }
.win-ctl i:nth-child(3)::before, .win-ctl i:nth-child(3)::after { content: ''; position: absolute; left: 0; top: 0; width: 10px; height: 1px; background: rgba(243, 237, 225, 0.35); transform: rotate(45deg); }
.win-ctl i:nth-child(3)::after { transform: rotate(-45deg); }

/* Пет проекта в индекса: колоните се събират и на по-тесни екрани. */
.index ol { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .index ol { grid-template-columns: repeat(3, 1fr); } .index li:nth-child(4) { border-left: 0; } .index li:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 820px) { .index ol { grid-template-columns: 1fr; } .index li + li { border-left: 0; border-top: 1px solid var(--line); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .veil, #dust, .glow-cursor { display: none; }
  .st, [data-r] { opacity: 1; transform: none; }
}
