:root {
  --bg: #ffffff;
  --surface: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, .1);
  --dark: #0f0f10;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --r-lg: 28px;
  --r-md: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -.025em; }
p { margin: 0; text-wrap: pretty; }
figure { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--ink); color: #fff; }
:focus-visible { outline: 2px solid #0071e3; outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)); }
section { padding-block: clamp(72px, 10vw, 128px); }

.skip { position: fixed; left: 16px; top: -64px; z-index: 200; padding: 12px 18px; background: var(--ink); color: #fff; text-decoration: none; border-radius: 12px; transition: top .2s var(--ease); }
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* Кнопки */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  border: 1px solid transparent; background: var(--ink); color: #fff;
  font: 500 1.0625rem/1 var(--font); text-decoration: none;
  cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none;
  transition: background-color .15s ease-out, color .15s ease-out;
}
.pill--sm { min-height: 34px; padding: 0 16px; font-size: .875rem; }
.pill--light { background: #fff; color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .pill:hover { background: #3a3a3c; }
  .pill--light:hover { background: #e8e8ed; }
}

.more { color: #0066cc; text-decoration: none; font-weight: 500; touch-action: manipulation; }
.more::after { content: "\00a0›"; }
@media (hover: hover) and (pointer: fine) { .more:hover { text-decoration: underline; text-underline-offset: .2em; } }

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.header::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--line); opacity: 0; transition: opacity .2s ease-out; }
.header.is-scrolled::after { opacity: 1; }
.header__in { display: flex; align-items: center; gap: 28px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: .9375rem; font-weight: 600; margin-right: auto; min-width: 0; }
.brand img { width: 36px; height: 36px; flex-shrink: 0; }
.nav { display: flex; gap: 28px; }
.nav a { font-size: .875rem; color: #424245; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--ink); } }
.burger { display: none; flex-shrink: 0; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; border-radius: 1px; background: var(--ink); transition: transform .3s var(--ease); }
.burger span:first-child { top: 18px; } .burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Первый экран */
.hero { padding-block: clamp(40px, 7vw, 80px) clamp(72px, 9vw, 112px); overflow: hidden; }
.hero__text { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero__logo { width: 120px; height: 120px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(3.5rem, 11vw, 7rem); line-height: 1; letter-spacing: -.04em; }
.hero__lead { font-size: clamp(1.1875rem, 2.2vw, 1.5rem); line-height: 1.35; color: var(--muted); max-width: 30em; margin-top: 20px; }
.hero__cta { display: flex; align-items: center; gap: 16px 28px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }

.strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  max-width: 1200px; margin: clamp(48px, 7vw, 80px) auto 0; padding-inline: 20px;
}
.strip img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-lg); outline: 1px solid rgba(0,0,0,.06); outline-offset: -1px; }
.strip img:nth-child(2) { translate: 0 32px; }

/* Услуги */
.services {
  background-color: #141415;
  background-image:
    radial-gradient(circle, rgba(220,220,226,.5) 1.4px, transparent 2px),
    linear-gradient(45deg, transparent 49.4%, rgba(255,255,255,.05) 50%, transparent 50.6%),
    linear-gradient(-45deg, transparent 49.4%, rgba(255,255,255,.05) 50%, transparent 50.6%);
  background-size: 64px 64px;
  background-position: 0 0, 32px 32px, 32px 32px;
  color: #f5f5f7;
}
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px 40px; flex-wrap: wrap; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: #a1a1a6; max-width: 28em; }
.services h2 { color: #fff; }
.cards { display: flex; flex-wrap: wrap; gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-md); overflow: hidden; }
.card { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; padding: clamp(28px, 3.5vw, 40px); background: rgba(22,22,23,.95); }
@media (hover: hover) and (pointer: fine) { .card { transition: background-color .3s ease-out; } .card:hover { background: rgba(34,34,36,.97); } }
.card h3 { font: 500 2.25rem/1.05 "Cormorant Garamond", Georgia, serif; color: #ececef; margin: 0 0 .2em; overflow-wrap: anywhere; hyphens: auto; }
.card__lead { font: italic 400 1.25rem/1.35 "Cormorant Garamond", Georgia, serif; color: #cfced3; margin-bottom: .7em; }
.card__text { color: #a3a2a7; font-size: .9375rem; line-height: 1.6; }
.prices { list-style: none; margin: 18px 0 28px; padding: 0; }
.prices li { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; font-size: .9375rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.prices li > span:first-child { min-width: 0; }
.prices .dots { flex: 1; min-width: 12px; border-bottom: 1px dotted rgba(255,255,255,.25); translate: 0 -4px; }
.prices b { font-weight: 600; white-space: nowrap; flex-shrink: 0; color: #fff; font-variant-numeric: tabular-nums; }
.card .pill { margin-top: auto; align-self: flex-start; background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
@media (hover: hover) and (pointer: fine) { .card .pill:hover { background: #fff; color: var(--ink); } }
.card--cta { background: rgba(38,38,40,.95); }
.card--cta h3 { font-size: 2rem; }
.card--cta p { color: #a3a2a7; margin-bottom: 28px; }
.services :focus-visible { outline-color: #2997ff; }

/* Студия */
.studio__in { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.studio__text { grid-column: 1 / -1; max-width: 34em; margin-bottom: clamp(24px, 4vw, 40px); }
.studio__text p { color: var(--muted); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.45; margin-top: 16px; }
.studio__in img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-lg); outline: 1px solid rgba(0,0,0,.06); outline-offset: -1px; }
.studio__b img { object-position: center 60%; }

/* Мастер */
.master { background: var(--dark); color: #f5f5f7; }
.master__in { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 7vw, 88px); align-items: center; }
.master__photo { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; border-radius: var(--r-lg); outline: 1px solid rgba(255,255,255,.1); outline-offset: -1px; }
.master h2 { color: #fff; }
.master__role { color: #a1a1a6; margin-top: 8px; }
.master p:not(.master__role) { color: #d2d2d7; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.45; margin: 24px 0 32px; max-width: 30em; }
.master :focus-visible { outline-color: #2997ff; }

/* Контакты */
.info { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 32px; margin: 40px 0; }
.info dt { color: var(--muted); font-size: .875rem; }
.info dd { margin: 6px 0 0; font: 600 1.375rem/1.35 var(--display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.info a { text-decoration: none; }
.contacts__actions { display: flex; align-items: center; gap: 16px 28px; flex-wrap: wrap; }
.socials { display: contents; }
.socials a { color: #0066cc; text-decoration: none; font-weight: 500; }

.footer { border-top: 1px solid var(--line); padding-block: 24px calc(24px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: .8125rem; }

.fab-wrap { display: none; }

/* Адаптив */
@media (max-width: 820px) {
  .header .pill--sm { display: none; }
  .burger { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    padding: 4px 20px 20px; background: rgba(255,255,255,.96);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden;  }
  .nav a { font-size: 1.375rem; font-weight: 600; color: var(--ink); padding: 12px 0; letter-spacing: -.02em; }

  .strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: 4px; }
  .strip::-webkit-scrollbar { display: none; }
  .strip img { scroll-snap-align: start; }
  .strip img:nth-child(2) { translate: none; }

  .master__in { grid-template-columns: 1fr; }
  .master__photo { max-width: 440px; }

  .fab-wrap {
    display: block; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
  }
  .fab { width: 100%; pointer-events: auto; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
  .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 480px) {
  .studio__in { grid-template-columns: 1fr; }
  .studio__b img { aspect-ratio: 4 / 3; }
  .brand span { font-size: .875rem; }
}

.js-anim .hero__text > *, .js-anim .strip img { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-anim .hero__text > *, .js-anim .strip img { opacity: 1; }
}
@media (prefers-reduced-transparency: reduce) {
  .header, .nav { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
