/* ---------- 1. Цвета и шрифты: меняй здесь ---------- */
:root {
  --bg: #E8E6FF;
  --ink: #14133A;
  --muted: #55547E;
  --blue: #2B3BFF;
  --pink: #FF5CA8;
  --yellow: #FFD84A;
  --mint: #5EE6B0;
  --lilac: #C9C3FF;
  --border: 2px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --f-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --f-body: 'Manrope', system-ui, sans-serif;
}

/* ---------- 2. База ---------- */
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
img { display: block; max-width: 100%; }
a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.muted { color: var(--muted); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: .95; }

/* ---------- 3. Навигация ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 14px clamp(20px, 4vw, 56px); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); }
.logo { font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -.03em; }
.menu { position: relative; display: flex; gap: 4px; padding: 5px; background: #fff; border: var(--border); border-radius: 999px; }
.menu a { position: relative; z-index: 1; padding: 7px 18px; border-radius: 999px; font-weight: 600; font-size: .92rem; transition: color .3s; }
.menu a.is-active { color: #fff; }
.menu__pill { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: var(--ink); transition: transform .5s var(--ease), width .5s var(--ease); }
.nav__cta { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--yellow); border: var(--border); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); font-weight: 700; font-size: .88rem; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.nav__cta::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.nav__cta:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- 4. Страницы ---------- */
.view { display: none; padding: 110px clamp(20px, 4vw, 56px) 64px; min-height: 100vh; }
.view.is-active { display: block; }

/* ---------- 5. Home ---------- */
.hero { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: clamp(24px, 4vw, 64px); max-width: 1280px; margin: 0 auto; min-height: calc(100vh - 260px); }
.hero__role { display: inline-block; padding: 6px 16px; margin-bottom: 24px; background: var(--mint); border: var(--border); border-radius: 999px; font-weight: 700; font-size: .9rem; }
h1 { font-size: clamp(2.7rem, 5.6vw, 5.2rem); line-height: .95; }
.line { display: block; overflow: hidden; padding-bottom: .08em; }
.line > span { display: block; animation: rise .9s var(--ease) both; animation-delay: calc(.55s + var(--i) * .09s); }
.hero__lead { max-width: 42ch; margin: 28px 0 32px; color: var(--muted); font-size: 1.1rem; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn { display: inline-block; padding: 14px 28px; background: var(--blue); color: #fff; border: var(--border); border-radius: 999px; box-shadow: var(--shadow); font-weight: 700; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.btn:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn--ghost { background: #fff; color: var(--ink); }

.hero__visual { position: relative; isolation: isolate; justify-self: center; width: min(420px, 100%); }
.portrait { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--blue); border: var(--border); border-radius: 999px 999px 32px 32px; box-shadow: 8px 8px 0 var(--ink); animation: reveal 1.1s var(--ease) .55s both; }
.portrait img, .portrait svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.blob { position: absolute; z-index: -1; border: var(--border); }
.blob--a { width: 44%; aspect-ratio: 1; border-radius: 50%; background: var(--pink); top: -7%; right: -15%; }
.blob--b { width: 36%; aspect-ratio: 1; border-radius: 28%; background: var(--yellow); bottom: 10%; left: -17%; transform: rotate(-14deg); }

.badge { position: absolute; right: -28px; bottom: -28px; width: 124px; aspect-ratio: 1; display: grid; place-items: center; background: var(--yellow); border: var(--border); border-radius: 50%; }
.badge svg { position: absolute; inset: 0; animation: spin 14s linear infinite; }
.badge text { font: 700 11px var(--f-body); fill: var(--ink); }
.badge__dot { width: 26px; height: 26px; border-radius: 50%; background: var(--pink); border: var(--border); }

.fade { animation: fade .8s ease both; animation-delay: 1s; }
@keyframes rise { from { transform: translateY(110%); } }
@keyframes reveal { from { clip-path: inset(100% 0 0 0); } }
@keyframes fade { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { to { transform: translateX(-50%); } }

/* Бегущая строка */
.marquee { margin: 72px calc(-1 * clamp(20px, 4vw, 56px)) 0; padding: 14px 0; overflow: hidden; background: var(--ink); color: var(--bg); transform: rotate(-1.6deg); }
.marquee__track { display: flex; width: max-content; animation: slide 28s linear infinite; }
.marquee__track span { display: flex; align-items: center; font-family: var(--f-display); font-weight: 800; font-size: clamp(1.4rem, 3vw, 2.2rem); letter-spacing: -.02em; white-space: nowrap; }
.marquee__track span::after { content: "✦"; margin: 0 28px; color: var(--yellow); }

/* ---------- 6. Projects ---------- */
.section-head { max-width: 1280px; margin: 0 auto 48px; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 40px); }
.card:first-child { grid-column: 1 / -1; }
.card__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--c); border: var(--border); border-radius: 28px; box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.card:first-child .card__media { aspect-ratio: 21 / 9; }
.card:hover .card__media { transform: translate(-4px, -4px); box-shadow: 9px 9px 0 var(--ink); }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }

/* Заглушка, пока нет картинки проекта */
.card__media:not(.has-img)::before, .card__media:not(.has-img)::after { content: ""; position: absolute; border: var(--border); transition: transform .6s var(--ease); }
.card__media:not(.has-img)::before { width: 36%; aspect-ratio: 1; border-radius: 50%; right: 9%; top: 14%; background: #fff; }
.card__media:not(.has-img)::after { width: 28%; height: 44%; border-radius: 22px; left: 9%; bottom: -10%; background: var(--ink); }
.card:hover .card__media::before { transform: translate(-14px, 12px) rotate(12deg); }
.card:hover .card__media::after { transform: translateY(-14px); }

.card__body { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 4px 0; }
.card h3 { font-size: 1.5rem; letter-spacing: -.02em; }
.card__meta { padding: 4px 14px; background: #fff; border: var(--border); border-radius: 999px; font-size: .85rem; font-weight: 600; white-space: nowrap; }

/* ---------- 7. Contacts ---------- */
.contact { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr .8fr; gap: 64px; align-items: end; min-height: calc(100vh - 260px); }
.contact__mail { display: inline-block; margin-top: 32px; padding: 10px 24px; background: var(--pink); border: var(--border); border-radius: 999px; box-shadow: var(--shadow); font-family: var(--f-display); font-weight: 800; font-size: clamp(1.2rem, 2.6vw, 2rem); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.contact__mail:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.socials { display: grid; gap: 12px; }
.socials a { display: flex; justify-content: space-between; padding: 16px 22px; background: #fff; border: var(--border); border-radius: 18px; font-weight: 700; transition: transform .25s var(--ease), background .25s; }
.socials a:hover { transform: translateX(8px); background: var(--mint); }

/* ---------- 8. Шторка перехода (цвет зависит от страницы) ---------- */
.wipe { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--blue); color: #fff; transform: translateY(100%); pointer-events: none; }
.wipe[data-page="projects"] { background: var(--pink); color: var(--ink); }
.wipe[data-page="contacts"] { background: var(--yellow); color: var(--ink); }
.wipe__label { font-family: var(--f-display); font-weight: 800; font-size: clamp(3rem, 12vw, 9rem); letter-spacing: -.04em; }

/* ---------- 9. Мобильная версия ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__visual { width: min(320px, 78%); margin: 24px 0 24px 8px; }
  .grid, .contact { grid-template-columns: 1fr; }
  .card:first-child .card__media { aspect-ratio: 4 / 3; }
  .contact { gap: 40px; }
  .nav__cta { display: none; }
  .marquee { margin-top: 56px; }
}
@media (max-width: 480px) { .menu a { padding: 7px 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
