/* Главная: мозаика, автор, три товара на размытых фото.
   Один шрифт Geist, размеры по шкале Tailwind, одна кривая движения. */

:root {
  --bg: #e9e9e7;
  --card: #ffffff;
  --ink: #111111;
  --muted: #8a8a86;
  --line: #dcdcd8;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --pad: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font: 400 16px/24px Geist, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.04em; text-wrap: balance; }
p { text-wrap: pretty; }
button { font: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 8px 12px; border-radius: 9999px; background: var(--ink); color: #fff; font-size: 14px; transform: translateY(-200%); transition: transform 500ms var(--ease); }
.skip:focus { transform: none; }
.kicker { font-size: 12px; line-height: 16px; color: var(--muted); }

/* ---------- Кнопки-пилюли с точкой ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 9999px; border: 1px solid transparent;
  background: var(--ink); color: #fff; font-weight: 500; font-size: 16px; line-height: 24px; cursor: pointer; white-space: nowrap;
  transition: transform 300ms var(--ease), background-color 500ms var(--ease), color 500ms var(--ease), border-color 500ms var(--ease);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill:active { transform: scale(0.98); }
.pill:hover { background: #333; }
.pill-light { background: #fff; color: var(--ink); }
.pill-light:hover { background: #e6e6e3; }
.pill-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.4); }
.pill-ghost::before { display: none; }
.pill-ghost:hover { background: rgb(255 255 255 / 0.12); border-color: #fff; }
.pill-sm { padding: 8px 16px; font-size: 14px; line-height: 20px; }

/* ---------- Мозаика ---------- */
.mosaic {
  position: relative; background: var(--ink); display: grid; gap: 8px; padding: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.8fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 0.9fr);
  height: 100svh; min-height: 620px;
}
.mosaic > img { min-width: 0; min-height: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; opacity: 0; transform: scale(1.06); }
.mosaic > img.ok { animation: tile 1400ms var(--ease) forwards; }
@keyframes tile { to { opacity: 1; transform: none; } }
.m1 { grid-column: 1 / 3; object-position: 50% 40%; } .m2 { grid-column: 3 / 5; object-position: 50% 55%; }
.m3 { grid-column: 1; object-position: 50% 40%; } .m4 { grid-column: 2 / 4; object-position: 50% 62%; } .m5 { grid-column: 4; }
.m6 { grid-column: 1 / 3; object-position: 50% 45%; } .m7 { grid-column: 3 / 5; object-position: 50% 60%; }
.mosaic > .m6.ok, .mosaic > .m7.ok { animation-name: tile-dim; }
@keyframes tile-dim { to { opacity: 1; transform: none; filter: brightness(0.6); } }
.top { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px; color: #fff; font-size: 14px; line-height: 20px; }
.top ul { display: flex; gap: 32px; margin-left: auto; }
.top ul a { opacity: 0.85; transition: opacity 400ms var(--ease); }
.top ul a:hover { opacity: 1; }
.top .brand { font-weight: 500; }
.name { position: absolute; left: 24px; right: 24px; bottom: 16px; z-index: 2; display: flex; align-items: center; gap: 32px; color: #fff; pointer-events: none; }
.name span { font-size: min(128px, 10vw); line-height: 1; font-weight: 600; letter-spacing: -0.05em; white-space: nowrap; }
.name i { flex: 1; height: 2px; background: rgb(255 255 255 / 0.7); }

/* ---------- Об авторе ---------- */
.author { padding: 120px var(--pad) 96px; }
.author > .kicker { text-align: center; }
.manifest { max-width: 760px; margin: 24px auto 80px; text-align: center; font-size: 30px; line-height: 36px; font-weight: 500; letter-spacing: -0.02em; }
.author-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--card); border-radius: 24px; padding: 8px; max-width: 1280px; margin: 0 auto; }
.author-photo { border-radius: 16px; overflow: hidden; min-height: 520px; }
.author-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 0% 50%; }
.author-text { padding: 40px; display: grid; gap: 16px; align-content: start; }
.author-text h2 { font-size: 48px; line-height: 1; margin-bottom: 8px; }
.author-text > p { color: #55534f; font-size: 16px; line-height: 24px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.stats b { display: block; font-size: 36px; line-height: 40px; font-weight: 500; letter-spacing: -0.03em; }
.stats span { font-size: 14px; line-height: 20px; color: var(--muted); }
.books-title { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-top: 16px; }
.books li > * { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); font-weight: 500; transition: padding 500ms var(--ease); }
.books li > a:hover { padding-left: 8px; }
.books small { color: var(--muted); font-weight: 400; font-size: 14px; }
.tag { flex: none; font-style: normal; font-size: 12px; line-height: 16px; padding: 4px 12px; border-radius: 9999px; background: var(--bg); color: #55534f; font-weight: 500; }
.tag-on { background: var(--ink); color: #fff; }
.tag-off { color: var(--muted); }

/* ---------- Товар на размытом фото ---------- */
.product { position: relative; isolation: isolate; overflow: hidden; margin: 8px; border-radius: 24px; color: #fff; padding: 96px 64px; background: #2a2825; }
.product-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); }
.product-in { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; max-width: 1280px; margin: 0 auto; }
.product-flip .product-in { grid-template-columns: 1fr 1.15fr; }
.product-flip .stage { order: 2; }
.stage { display: grid; place-items: center; }
.stage img { height: auto; filter: drop-shadow(0 32px 48px rgb(0 0 0 / 0.5)); }
.stage-book img { transform: scale(1.15); }
.stage-photo img { border-radius: 8px; box-shadow: 0 32px 64px rgb(0 0 0 / 0.45); filter: none; transition: transform 900ms var(--ease); }
.stage-photo a:hover img { transform: scale(1.02); }
.stage-cover img { width: min(100%, 440px); border-radius: 8px; box-shadow: 0 32px 64px rgb(0 0 0 / 0.5); filter: none; }
.info { display: grid; gap: 24px; align-content: center; }
.info .kicker { color: rgb(255 255 255 / 0.7); }
.info h2 { font-size: 60px; line-height: 1; }
.info .sub { margin-top: -16px; font-size: 20px; line-height: 28px; color: rgb(255 255 255 / 0.85); }
.lead { font-size: 18px; line-height: 28px; color: rgb(255 255 255 / 0.82); max-width: 560px; }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; border-top: 1px solid rgb(255 255 255 / 0.2); padding-top: 16px; font-size: 14px; line-height: 20px; color: rgb(255 255 255 / 0.7); }
.specs b { display: block; color: #fff; font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -0.02em; }
.months { display: flex; flex-wrap: wrap; gap: 8px; }
.months li { padding: 4px 12px; border-radius: 9999px; background: rgb(255 255 255 / 0.12); border: 1px solid rgb(255 255 255 / 0.18); font-size: 14px; line-height: 20px; }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 8px; }
.price { display: grid; }
.price b { font-size: 48px; line-height: 1; font-weight: 500; letter-spacing: -0.04em; }
.price .price-soon { font-size: 30px; line-height: 36px; letter-spacing: -0.02em; }
.price > span { font-size: 14px; line-height: 20px; color: rgb(255 255 255 / 0.7); margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 1280px; margin: 64px auto 0; }
.thumbs a { border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; cursor: zoom-in; background: rgb(255 255 255 / 0.08); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease), opacity 500ms var(--ease); opacity: 0.85; }
.thumbs a:hover img { transform: scale(1.05); opacity: 1; }

/* ---------- Как заказать ---------- */

/* ---------- Подвал ---------- */
.foot { background: var(--ink); color: #fff; padding: 48px var(--pad) 24px; display: grid; gap: 64px; }
.foot-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 14px; line-height: 20px; color: #9a9a96; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { transition: color 400ms var(--ease); }
.foot-links a:hover { color: #fff; }
.foot-name { font-size: min(128px, 16vw); line-height: 1; letter-spacing: -0.05em; font-weight: 600; }
.foot-copy { font-size: 12px; line-height: 16px; color: #6f6f6b; }

/* ---------- Просмотр фото ---------- */
.lb { border: 0; padding: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgb(17 17 17 / 0.96); color: #fff; }
.lb[open] { display: grid; place-items: center; }
.lb::backdrop { background: transparent; }
.lb img { max-width: calc(100vw - 160px); max-height: calc(100dvh - 96px); object-fit: contain; border-radius: 4px; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 9999px; border: 1px solid rgb(255 255 255 / 0.25); background: rgb(255 255 255 / 0.08); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; transition: background-color 400ms var(--ease); }
.lb-btn:hover { background: rgb(255 255 255 / 0.2); }
.lb-close { top: 24px; right: 24px; }
.lb-prev { left: 24px; top: calc(50% - 24px); font-size: 30px; }
.lb-next { right: 24px; top: calc(50% - 24px); font-size: 30px; }
.lb-count { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; font-size: 14px; color: #9a9a96; }

/* ---------- Окно заказа в светлой теме ---------- */
.od {
  --od-bg: #ffffff; --od-card: #f3f3f1; --od-line: #e2e2de; --od-text: #111111; --od-muted: #8a8a86;
  --od-accent: #111111; --od-accent-2: #111111; --od-bad: #d93a2b;
  font-family: Geist, system-ui, sans-serif; border-radius: 24px; box-shadow: 0 32px 80px rgb(0 0 0 / 0.25);
  margin: auto; /* общий сброс отступов убирал центровку окна */
}
@media (max-width: 480px) { .od { margin: auto 0 0; border-radius: 24px 24px 0 0; } }
.od .od-title, .od .od-total, .od .od-item-info b, .od .od-done h3 { font-family: Geist, system-ui, sans-serif; font-weight: 500; letter-spacing: -0.02em; }
.od .od-submit { background: #111; box-shadow: none; border-radius: 9999px; font-family: Geist, system-ui, sans-serif; font-weight: 500; }
.od .od-submit:hover { background: #333; box-shadow: none; filter: none; }
.od .od-seg input:checked + span { background: #fff; border-color: #111; }
.od input:focus, .od textarea:focus { box-shadow: 0 0 0 3px rgb(17 17 17 / 0.12); }

/* ---------- Появление ---------- */
/* Печать фотографий: пример на стене */
.prints { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 8px; margin: 8px; padding: 8px; border-radius: 24px; position: relative; isolation: isolate; overflow: hidden; background: #3a3128; color: #fff; }
.prints-text { padding: 56px 48px; display: grid; gap: 24px; align-content: center; }
.prints-text .kicker { color: rgb(255 255 255 / 0.6); }
.prints-text h2 { font-size: 48px; line-height: 1; }
.prints-text .lead { color: rgb(255 255 255 / 0.75); font-size: 18px; line-height: 28px; }
.prints-photo { margin: 0; border-radius: 16px; overflow: hidden; min-height: 520px; }
.prints-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }

.reveal { opacity: 0; transform: translateY(48px); filter: blur(8px); transition: opacity 1000ms var(--ease), transform 1000ms var(--ease), filter 1000ms var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .mosaic > img { opacity: 1; transform: none; filter: none; transition: none; animation: none; }
  .m6, .m7 { filter: brightness(0.6); }
}

/* ---------- Планшет ---------- */
@media (max-width: 1024px) {
  .prints { grid-template-columns: 1fr; }
  .prints-text { padding: 40px 24px; }
  .prints-photo { min-height: 0; aspect-ratio: 3 / 2; }
  .product { padding: 64px 32px; }
  .product-in, .product-flip .product-in { grid-template-columns: 1fr; gap: 40px; }
  .product-flip .stage { order: 0; }
  .stage img { max-height: 420px; width: auto; }
  .stage-book img { max-height: none; width: 100%; transform: none; }
  .author-grid { grid-template-columns: 1fr; }
  .author-photo { min-height: 0; aspect-ratio: 3 / 2; }
}

/* ---------- Телефон ---------- */
@media (max-width: 720px) {
  :root { --pad: 16px; }
  .mosaic { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); grid-auto-flow: dense; height: 100svh; min-height: 560px; }
  .m1, .m2, .m3, .m5, .m6, .m7 { grid-column: auto; } .m4 { grid-column: 1 / 3; }
  .top ul { display: none; }
  .name { left: 16px; right: 16px; gap: 12px; }
  .name span { font-size: 11vw; } .name i { display: none; } .name span:last-child { margin-left: auto; }
  .author { padding: 64px 8px; }
  .manifest { font-size: 24px; line-height: 32px; margin: 16px 8px 48px; }
  .author-text { padding: 24px 16px; }
  .author-text h2 { font-size: 36px; line-height: 40px; }
  .stats b { font-size: 30px; line-height: 36px; }
  .product { padding: 48px 16px; border-radius: 16px; }
  .info h2 { font-size: 36px; line-height: 40px; }
  .lead { font-size: 16px; line-height: 24px; }
  .price b { font-size: 36px; }
  .specs b { font-size: 20px; line-height: 28px; }
  .thumbs { grid-template-columns: 1fr 1fr; margin-top: 40px; }
  .actions, .actions .pill { width: 100%; justify-content: center; }
  .actions .pill { flex: 1; }
  .lb img { max-width: 100vw; max-height: calc(100dvh - 160px); }
  .lb-prev, .lb-next { top: auto; bottom: 16px; } .lb-count { bottom: 32px; }
}
