/* PhotoLive: дизайн-система сайта.
   Токены сверху, компоненты ниже. Одна палитра (лес: глубокий зелёный + нефрит
   на холодно-белом), один акцент, одна система скруглений:
   кнопки круглые, карточки и фото 14px, поля 10px. */

:root {
  --bg: #F4F5F2;
  --surface: #FBFCFA;
  --surface-2: #EAEDE9;
  --ink: #1C221F;
  --muted: #5B655F;
  --line: #D9DFDA;
  --line-strong: #86928B;
  --accent: #2F7A66;
  --accent-strong: #245F50;
  --accent-soft: #E1EEE8;
  --accent-ink: #FFFFFF;
  --deep: #17332B;
  --deep-ink: #EAF1EC;
  --deep-muted: #A3BBAF;
  --danger: #A8432A;
  --danger-soft: #F6E5DF;
  --r-card: 14px;
  --r-input: 10px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgb(28 34 31 / .06), 0 18px 40px -18px rgb(28 34 31 / .28);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121715;
    --surface: #191F1C;
    --surface-2: #222A26;
    --ink: #E7EBE7;
    --muted: #9BA69F;
    --line: #2A332E;
    --line-strong: #5F6D66;
    --accent: #5FBFA4;
    --accent-strong: #7ACFB7;
    --accent-soft: #1C2E28;
    --accent-ink: #0F1A16;
    --deep: #0E1F1A;
    --deep-ink: #EAF1EC;
    --deep-muted: #9DB5A9;
    --danger: #E08A70;
    --danger-soft: #34211B;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 18px 40px -18px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.container { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 46rem); margin-inline: auto; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.01em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 1.6rem + 3.8vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); }
h3 { font: 700 1.15rem/1.3 var(--font-body); margin: 0; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--accent); }
p { margin: 0; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34rem; text-wrap: pretty; }
.muted { color: var(--muted); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: 0 1.5rem;
  border-radius: var(--r-pill); border: 1px solid transparent;
  font: 700 1rem var(--font-body); text-decoration: none; white-space: nowrap;
  cursor: pointer; color: inherit; background: none;
  transition: transform 160ms var(--ease-out), background-color 200ms ease,
              border-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { min-height: 2.75rem; padding: 0 1.1rem; font-size: .9rem; }
.btn-lg { min-height: 3.5rem; padding: 0 2rem; font-size: 1.05rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 1.25rem; height: 4.25rem; }
.brand {
  font-family: var(--font-display); font-size: 1.55rem; font-weight: 700;
  color: var(--ink); text-decoration: none; letter-spacing: -.01em; line-height: 1;
}
.nav { display: flex; gap: 1.4rem; margin-left: auto; font-size: .95rem; font-weight: 600; }
.nav a { color: var(--ink); text-decoration: none; padding: .6rem 0; transition: color 150ms ease; }
.nav a:hover { color: var(--accent); }
.langs { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-pill); margin: 0; }
.langs button {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  min-height: 2.5rem; min-width: 2.5rem;
  font: 700 .72rem/1 var(--font-body); padding: 0 .55rem; border-radius: var(--r-pill);
  transition: background-color 150ms ease, color 150ms ease;
}
.langs button.on { background: var(--ink); color: var(--bg); }
.langs button:not(.on):hover { color: var(--ink); }
@media (max-width: 900px) {
  .nav { display: none; }
  .langs { margin-left: auto; }
}
@media (max-width: 480px) {
  .site-header .header-cta { display: none; }
}

/* ---------- секции ---------- */
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; margin-top: .8rem; text-wrap: pretty; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.5rem, 5vw, 5rem) clamp(3rem, 6vw, 5rem); }
.hero .container { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) {
  .hero .container { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 4rem; }
}
.hero-copy .lede { margin: 1.4rem 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.demo {
  cursor: pointer;
  position: relative; width: 100%; aspect-ratio: 3 / 4;
  border-radius: var(--r-card); overflow: hidden;
  background: var(--surface-2);
}
.demo img, .demo video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.demo video { opacity: 0; transition: opacity 900ms ease; }
.demo.is-playing video { opacity: 1; }
.hero-demo { max-width: 24rem; margin-inline: auto; }
.hero-demo .demo { box-shadow: var(--shadow); }
.demo-caption {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem;
  margin-top: .8rem; font-size: .85rem; color: var(--muted);
}

/* ---------- примеры ---------- */
.examples {
  display: grid; gap: 1.25rem;
  grid-auto-flow: column; grid-auto-columns: min(72%, 17rem);
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.examples::-webkit-scrollbar { display: none; }
@media (min-width: 760px) {
  .examples { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; }
}
.example { margin: 0; scroll-snap-align: start; }
.example figcaption { margin-top: .7rem; font-size: .92rem; }
.example figcaption b { display: block; }
.example figcaption span { color: var(--muted); }

/* ---------- как это работает ---------- */
.how .container { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) {
  .how .container { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 4rem; }
  .how .how-photo { order: -1; }
}
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 1.6rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; }
.steps li::before {
  content: counter(step);
  font-family: var(--font-display); font-size: 2.7rem; font-weight: 600; line-height: 1;
  color: var(--accent);
}
.steps h3 { margin-bottom: .3rem; }
.steps p { color: var(--muted); }
.how-photo { border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow); }

/* ---------- форма заказа ---------- */
.order { background: var(--surface); border-block: 1px solid var(--line); }
.order-form { display: grid; gap: 2rem; }
@media (min-width: 900px) {
  .order-form { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3.5rem; align-items: start; }
}
.dropzone {
  position: relative; display: grid; place-items: center; text-align: center;
  aspect-ratio: 4 / 5; padding: 1.5rem;
  min-height: 14rem;
  border: 2px dashed var(--line-strong); border-radius: var(--r-card);
  background: var(--bg); overflow: hidden; cursor: pointer;
  transition: border-color 200ms ease, background-color 200ms ease;
}
@media (max-width: 899px) { .dropzone { aspect-ratio: 4 / 3; } }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.has-file { border-style: solid; border-color: var(--line); }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  background: var(--surface-2);
}
.dropzone-hint { display: grid; gap: .4rem; justify-items: center; max-width: 17rem; }
.dropzone-hint b { font-size: 1.05rem; }
.dropzone-hint span { color: var(--muted); font-size: .9rem; }
.dropzone.has-file .dropzone-hint { display: none; }
.dropzone-change {
  position: absolute; left: 50%; bottom: .9rem; transform: translateX(-50%);
  display: none; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); pointer-events: none;
}
.dropzone.has-file .dropzone-change { display: inline-flex; }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }

.field { display: grid; gap: .45rem; margin-bottom: 1.35rem; }
.field > label, .field > legend { font-weight: 700; font-size: .95rem; padding: 0; }
/* Подпись и кнопка подсказки в одну строку, но на узком экране кнопка
   уходит на свою строку, а не сжимает подпись до переносов посреди слова. */
.field-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.field-head label { margin: 0; }
.field-head .suggest { margin-left: auto; flex: none; }
.field .hint { font-size: .85rem; color: var(--muted); }
fieldset.field { border: 0; margin-inline: 0; padding: 0; min-width: 0; }
input[type="text"], input[type="email"], textarea {
  width: 100%; padding: .8rem .95rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-input);
  background: var(--bg); color: var(--ink); font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
textarea { resize: vertical; min-height: 4.5rem; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
::placeholder { color: var(--muted); opacity: .8; }

.choices { display: grid; gap: .6rem; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 480px) { .choices { grid-template-columns: 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.choice label {
  display: block; padding: .8rem .95rem; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--r-input); background: var(--bg);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms var(--ease-out);
}
.choice label:active { transform: scale(.98); }
.choice input:checked + label { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice label b { display: block; font-size: .98rem; }
.choice label span { display: block; font-size: .85rem; color: var(--muted); }
.choice--mode label { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.choice--mode label strong { font-weight: 800; white-space: nowrap; }

.errorlist { list-style: none; margin: 0; padding: 0; color: var(--danger); font-size: .9rem; }
.errorlist.nonfield { background: var(--danger-soft); padding: .8rem 1rem; border-radius: var(--r-input); margin-bottom: 1.2rem; }
.form-note { font-size: .88rem; color: var(--muted); margin-top: 1rem; }

/* ---------- цены ---------- */
.plans { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan {
  display: grid; gap: 1.1rem; align-content: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 1.75rem;
}
.plan--featured { border-color: var(--accent); box-shadow: var(--shadow); }
.plan h3 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.plan .price { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: .9rem; font-weight: 500; color: var(--muted); margin-left: .35rem; letter-spacing: 0; }
.plan p { color: var(--muted); }
.plan ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; }
.plan li::marker { color: var(--accent); }
.plan .btn { justify-self: start; margin-top: .4rem; }
.plan-soon {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.75rem; border: 1px dashed var(--line-strong); border-radius: var(--r-card);
  color: var(--muted);
}
@media (min-width: 760px) { .plan-soon { grid-column: 1 / -1; } }
.plan-soon b { color: var(--ink); }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: .3rem .65rem; border-radius: var(--r-pill);
}

/* ---------- доверие ---------- */
.trust { background: var(--deep); color: var(--deep-ink); }
.trust .container { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .trust .container { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; } }
.trust h2 { color: var(--deep-ink); margin-bottom: 1.8rem; }
.trust-photo { border-radius: var(--r-card); overflow: hidden; }
.trust-grid { display: grid; gap: 1.6rem 2rem; }
@media (min-width: 600px) { .trust-grid { grid-template-columns: 1fr 1fr; } }
.trust-grid h3 { color: var(--deep-ink); margin-bottom: .35rem; }
.trust-grid p { color: var(--deep-muted); font-size: .98rem; }

/* ---------- вопросы ---------- */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 0; font-weight: 700; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  font-family: var(--font-display); font-size: 1.7rem; line-height: 1; color: var(--accent);
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.25rem; color: var(--muted); max-width: 40rem; }

/* ---------- финальный призыв ---------- */
.cta-final .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: clamp(1.75rem, 4vw, 3rem); background: var(--accent-soft); border-radius: var(--r-card);
}
.cta-final h2 { max-width: 28rem; }

/* ---------- подвал ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; font-size: .9rem; color: var(--muted); }
.site-footer .container { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .site-footer .container { grid-template-columns: 1fr auto; align-items: start; } }
.site-footer .brand { font-size: 1.3rem; display: inline-block; margin-bottom: .5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-links a { color: var(--ink); text-decoration: none; display: inline-block; padding: .6rem 0; }
.footer-links a:hover { color: var(--accent); }
.footer-note { max-width: 36rem; }

/* ---------- страницы заказа ---------- */
.page { padding-block: clamp(2.5rem, 5vw, 4rem); }
.page h1 { font-size: clamp(2.2rem, 1.5rem + 2.5vw, 3.2rem); margin-bottom: .6rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 1.5rem; margin: 1.25rem 0;
}
.card video { border-radius: var(--r-input); background: #000; width: 100%; max-height: 70vh; object-fit: contain; }
.status {
  display: inline-block; padding: .25rem .8rem; border-radius: var(--r-pill);
  font-size: .82rem; font-weight: 700; border: 1px solid var(--line); background: var(--surface);
}
.status[data-status="moderation"] { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); }
.status[data-status="ready"] { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.status[data-status="failed"] { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.orders { display: grid; gap: .75rem; }
.orders .card { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between; }
.progress {
  height: 4px; border-radius: 2px; background: var(--accent-soft); overflow: hidden; margin-top: 1rem;
}
.progress::after {
  content: ""; display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 2px;
  animation: slide 1.4s var(--ease-in-out) infinite;
}
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- движение ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .hero-copy > * { animation: rise 700ms var(--ease-out) both; }
  .hero-copy > :nth-child(2) { animation-delay: 70ms; }
  .hero-copy > :nth-child(3) { animation-delay: 140ms; }
  .hero-demo { animation: rise 900ms var(--ease-out) 120ms both; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .demo video { transition: none; }
  .progress::after { animation: none; width: 100%; opacity: .5; }
}
@media (hover: hover) and (pointer: fine) {
  .example .demo { transition: transform 300ms var(--ease-out); }
  .example:hover .demo { transform: translateY(-3px); }
}

/* ---------- формат «ảnh gốc và video AI»: оригинал вставкой в углу ---------- */
.hero h1 { font-size: clamp(2.3rem, 1.3rem + 2.9vw, 3.5rem); }
.demo-inset {
  position: absolute; left: .8rem; bottom: .8rem; width: 27%;
  border-radius: 8px; overflow: hidden;
  border: 2px solid rgb(255 255 255 / .92);
  box-shadow: 0 6px 18px rgb(0 0 0 / .35);
}
.demo-inset img { position: static; aspect-ratio: 3 / 4; object-fit: cover; }
.demo-inset span {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: .6rem; font-weight: 700; letter-spacing: .04em; text-align: center;
  color: #fff; background: rgb(0 0 0 / .5); padding: .18rem 0;
}

/* ---------- ссылка «поделиться» ---------- */
.share input {
  font-size: .85rem; font-family: "IBM Plex Mono", ui-monospace, monospace;
  background: var(--bg); cursor: text;
}
