:root {
  --bg: #16040a;
  --bg-2: #210810;
  --ink: #f7e9ec;
  --muted: #c4a3ab;
  --rose: #f0a6b6;
  --line: rgba(247, 233, 236, .14);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);
  --pad: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Geologica', system-ui, sans-serif; font-weight: 300;
  font-size: 17px; line-height: 1.55;
  overflow-x: clip; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--rose); color: var(--bg); padding: 8px 14px; }

/* шапка */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad);
  transition: background-color 300ms ease, backdrop-filter 300ms ease;
}
.bar.scrolled { background: rgba(22, 4, 10, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: block; padding: 6px 0; }
.brand img { height: 18px; width: auto; }
.foot-logo { height: 12px; width: auto; align-self: center; opacity: .8; }
.bar-r { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button {
  font: inherit; font-size: 13px; font-weight: 500; color: var(--muted);
  background: none; border: 0; border-radius: 999px; padding: 6px 11px; min-height: 32px; cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.pill {
  font-size: 14px; font-weight: 500; background: var(--rose); color: var(--bg);
  border-radius: 999px; padding: 10px 18px; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.pill:active, .case-link:active, .contact-list a:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .pill:hover { background: var(--ink); } }

/* перший екран */
.hero {
  display: grid; grid-template-columns: 1fr minmax(0, 44vw); grid-template-rows: 1fr auto;
  min-height: 100svh; padding: 78px var(--pad) 48px; column-gap: 4vw;
}
.hero-photo {
  grid-column: 2; grid-row: 1 / 3; border-radius: 22px; overflow: hidden;
  height: calc(100svh - 126px); min-height: 520px; max-height: 1000px;
  animation: reveal 1200ms var(--ease-out) both; position: relative;
}
.hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(22, 4, 10, .62), rgba(22, 4, 10, 0) 38%); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; animation: settle 1600ms var(--ease-out) both; }
.hero-name {
  grid-column: 1 / 3; grid-row: 1; align-self: end; z-index: 2; position: relative;
  font-weight: 200; font-size: clamp(68px, 14.6vw, 250px); line-height: .84; letter-spacing: -.055em;
  color: var(--ink); margin-bottom: .1em; pointer-events: none; text-shadow: 0 2px 30px rgba(22, 4, 10, .35);
}
.hero-name .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-name .ln > span { display: inline-block; animation: rise 1000ms var(--ease-out) both; }
.hero-name .ln:nth-child(1) > span { animation-delay: 250ms; }
.hero-name .ln:nth-child(2) > span { animation-delay: 340ms; padding-left: .9em; }
.hero-text { grid-column: 1; grid-row: 2; max-width: 34em; animation: fade 800ms ease 700ms both; }
.role { color: var(--rose); font-weight: 400; font-size: clamp(18px, 1.6vw, 22px); }
.lead { font-size: clamp(22px, 2.3vw, 32px); line-height: 1.25; margin-top: 10px; letter-spacing: -.01em; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-top: 28px; font-size: 15px; color: var(--muted); }
.facts li { border-top: 1px solid var(--line); padding: 10px 0 12px; }

@keyframes reveal { from { clip-path: inset(100% 0 0 0 round 22px); } to { clip-path: inset(0 0 0 0 round 22px); } }
@keyframes settle { from { transform: scale(1.14); } to { transform: none; } }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* кейси */
.cases { padding: clamp(60px, 10vw, 140px) var(--pad) 0; }
.case {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 28px);
  max-width: 1440px; margin: 0 auto clamp(96px, 14vw, 200px);
}
.case-title {
  grid-column: 1 / -1; font-weight: 250; font-size: clamp(42px, 8.4vw, 136px);
  line-height: .92; letter-spacing: -.045em; margin-bottom: clamp(20px, 3vw, 40px);
}
.case-shot { grid-column: 1 / -1; grid-row: 2; }
.has-live .case-shot { grid-column: 1 / 9; }
.case-shot img {
  width: 100%; border-radius: 18px;
  clip-path: inset(0 0 0 0 round 18px);
  transition: clip-path 1100ms var(--ease-io), transform 1100ms var(--ease-io);
}
.js .case-shot:not(.in) img { clip-path: inset(18% 8% 18% 8% round 18px); transform: scale(1.06); }

.live {
  grid-column: 9 / -1; grid-row: 2; display: flex; flex-direction: column;
  border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--line);
  height: 0; min-height: 100%;
  transition: transform 160ms var(--ease-out);
}
.live-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px;
  background: #2c0d15; color: var(--muted); font-size: 12px; flex: none;
}
.live-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(247, 233, 236, .22); }
.live-bar span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-view { position: relative; flex: 1; overflow: hidden; min-height: 0; }
.live-view img { width: 100%; will-change: transform; }
.js .live.on .live-view img { animation: glide var(--dur, 30s) ease-in-out 600ms infinite alternate; }
@media (hover: hover) and (pointer: fine) { .live:hover .live-view img { animation-play-state: paused; } }
@keyframes glide { to { transform: translateY(var(--shift, 0px)); } }

.case-info {
  grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: subgrid;
  margin-top: clamp(24px, 3vw, 44px);
}
.case-desc { grid-column: 1 / 7; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.28; letter-spacing: -.01em; max-width: 22em; }
.case-list { grid-column: 8 / -1; color: var(--muted); font-size: 16px; }
.case-list li { border-top: 1px solid var(--line); padding: 9px 0; }
.case-link {
  grid-column: 8 / -1; justify-self: start; margin-top: 22px;
  display: inline-flex; flex-direction: column; gap: 2px;
  transition: transform 160ms var(--ease-out);
}
.case-link span { font-size: 13px; color: var(--muted); }
.case-link b { font-weight: 500; font-size: 18px; border-bottom: 1.5px solid var(--rose); padding-bottom: 2px; }
@media (hover: hover) and (pointer: fine) { .case-link:hover b { color: var(--rose); } }

/* контакти */
.contact { background: var(--bg-2); padding: clamp(72px, 10vw, 150px) var(--pad); }
.contact-title { font-weight: 250; font-size: clamp(38px, 6.4vw, 104px); line-height: .98; letter-spacing: -.04em; max-width: 14em; }
.contact-list { margin-top: clamp(32px, 5vw, 64px); max-width: 1440px; }
.contact-list li { border-top: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list a {
  display: block; padding: clamp(14px, 2vw, 24px) 0; font-size: clamp(22px, 3.2vw, 46px);
  letter-spacing: -.02em; overflow-wrap: anywhere;
  transition: color 200ms ease, transform 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .contact-list a:hover { color: var(--rose); } }
.figma { display: inline-block; margin-top: 36px; font-weight: 500; border-bottom: 1.5px solid var(--rose); padding-bottom: 2px; }
.foot { display: flex; justify-content: space-between; gap: 16px; padding: 22px var(--pad) calc(22px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--muted); background: var(--bg-2); border-top: 1px solid var(--line); }

/* планшет і телефон */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; grid-template-rows: auto; padding-top: 68px; }
  .hero-photo { grid-column: 1; grid-row: 1; height: auto; min-height: 0; aspect-ratio: 4 / 4.6; }
  .hero-photo::after { background: linear-gradient(0deg, rgba(22, 4, 10, .7), rgba(22, 4, 10, 0) 40%); }
  .hero-name { grid-column: 1; grid-row: 2; margin-top: -.62em; font-size: clamp(64px, 21vw, 150px); }
  .hero-text { grid-row: 3; margin-top: 18px; }
  .has-live .case-shot, .live { grid-column: 1 / -1; }
  .live { grid-row: 3; margin-top: 16px; height: min(118vw, 560px); }
  .case-info { grid-row: 4; }
  .case-desc, .case-list, .case-link { grid-column: 1 / -1; }
  .case-list { margin-top: 22px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .pill { padding: 9px 14px; font-size: 13px; }
  .lang button { padding: 6px 9px; }
  .brand img { height: 12px; }
  .facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-photo, .hero-photo img, .hero-name .ln > span { animation: none; }
  .hero-text { animation: fade 300ms ease both; }
  .js .case-shot:not(.in) img { clip-path: inset(0 0 0 0 round 18px); transform: none; }
  .case-shot img { transition: none; }
  .js .live.on .live-view img { animation: none; }
  .live-view { overflow-y: auto; }
}
