:root {
  --paper: #f5f3ee;
  --ink: #181a17;
  --muted: #6f726a;
  --line: #dcd9d0;
  --green: #183f35;
  --green-light: #dfe9e4;
  --accent: #e76f51;
  --white: #fffefa;
  font-family: 'Avenir Next', Avenir, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 13%, rgba(231, 111, 81, .12), transparent 23rem),
    linear-gradient(rgba(24, 26, 23, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 26, 23, .025) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 28px 28px, 28px 28px, auto;
}

button, input { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.page-shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.04em;
  text-decoration: none;
}

.brand-mark {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--white);
  background: var(--green);
  box-shadow: 0 7px 18px rgba(24, 63, 53, .2);
}

.brand-mark svg, .link-icon svg, .submit-button svg, .download-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.privacy-note { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.privacy-note i { width: 7px; height: 7px; border-radius: 50%; background: #3e9a71; box-shadow: 0 0 0 4px rgba(62,154,113,.12); }

.hero { padding: 104px 0 62px; text-align: center; }

.eyebrow {
  display: inline-flex;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--green);
  background: rgba(255,255,255,.45);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin: 22px auto 20px;
  max-width: 820px;
  font-size: clamp(52px, 7vw, 92px);
  line-height: .98;
  letter-spacing: -.065em;
}

h1 em {
  color: var(--green);
  font-family: Iowan Old Style, Baskerville, Georgia, serif;
  font-weight: 600;
  letter-spacing: -.045em;
}

.hero-copy { max-width: 660px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.7; }

.url-form { max-width: 900px; margin: 42px auto 0; }

.input-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 20px;
  border: 1px solid #cecac0;
  border-radius: 19px;
  background: rgba(255, 254, 250, .92);
  box-shadow: 0 18px 45px rgba(43, 43, 35, .08), 0 2px 8px rgba(43, 43, 35, .04);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.input-shell:focus-within { border-color: var(--green); box-shadow: 0 22px 55px rgba(24,63,53,.13); transform: translateY(-1px); }
.input-shell.invalid { border-color: #c95037; }

.link-icon { display: grid; place-items: center; color: #8a8d85; flex: 0 0 auto; }

.input-shell input {
  width: 100%;
  min-width: 0;
  padding: 13px 0;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}

.input-shell input::placeholder { color: #a5a69f; }

.paste-button {
  padding: 10px 13px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.paste-button:hover { color: var(--ink); background: #efede7; }

.submit-button, .download-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 0;
  color: var(--white);
  background: var(--green);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.submit-button { align-self: stretch; flex: 0 0 auto; padding: 0 22px; border-radius: 13px; }
.submit-button svg { width: 17px; }
.submit-button:hover, .download-button:hover { background: #245a4c; box-shadow: 0 10px 22px rgba(24,63,53,.2); transform: translateY(-1px); }
.submit-button:disabled { opacity: .65; cursor: wait; transform: none; }

.form-message { min-height: 24px; padding: 9px 8px 0; color: var(--muted); font-size: 13px; text-align: left; }
.form-message.error { color: #ad402c; }

.platforms { display: flex; justify-content: center; flex-wrap: wrap; gap: 11px; margin-top: 24px; }
.platforms span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
.platforms b { min-width: 23px; height: 23px; padding: 0 5px; display: grid; place-items: center; border-radius: 7px; color: #fff; font-size: 9px; font-style: normal; }
.platforms .yt { background: #ff0033; }
.platforms .ozon { background: #005bff; font-size: 12px; }
.platforms .vk { background: #07f; }
.platforms .rutube { background: #151515; color: #25f196; font-size: 12px; }
.platforms .more { color: var(--ink); background: #ddd9d0; font-size: 14px; }

.result-card {
  max-width: 900px;
  margin: 4px auto 74px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(250px, 41%) 1fr;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 25px 60px rgba(43,43,35,.08);
  text-align: left;
  animation: reveal .35s ease both;
}

.result-card[hidden] { display: none; }

@keyframes reveal { from { opacity: 0; transform: translateY(12px); } }

.thumb-wrap { position: relative; min-height: 240px; border-radius: 16px; overflow: hidden; background: var(--green-light); }
.thumb-wrap img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.duration { position: absolute; right: 10px; bottom: 10px; padding: 4px 7px; border-radius: 6px; color: #fff; background: rgba(0,0,0,.72); font-size: 11px; font-weight: 700; }
.duration:empty { display: none; }

.result-content { padding: 12px 14px 12px 0; min-width: 0; }
.result-kicker { margin-bottom: 10px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.result-content h2 { margin: 0; font-size: clamp(21px, 3vw, 29px); line-height: 1.25; letter-spacing: -.035em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.result-content > p { min-height: 20px; margin: 8px 0 22px; color: var(--muted); font-size: 13px; }

.quality-fieldset { margin: 0 0 22px; padding: 0; border: 0; }
.quality-fieldset legend { margin-bottom: 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
.quality-list { display: flex; flex-wrap: wrap; gap: 7px; }
.quality-list label { position: relative; }
.quality-list input { position: absolute; opacity: 0; pointer-events: none; }
.quality-list span { display: block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; transition: .15s ease; }
.quality-list input:checked + span { border-color: var(--green); color: #fff; background: var(--green); }
.quality-list input:focus-visible + span { outline: 3px solid rgba(24,63,53,.2); outline-offset: 2px; }

.download-button { width: 100%; min-height: 48px; border-radius: 12px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps article { min-height: 226px; padding: 42px 36px; border-right: 1px solid var(--line); }
.steps article:last-child { border-right: 0; }
.steps article > span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.steps h3 { margin: 28px 0 10px; font-size: 18px; letter-spacing: -.02em; }
.steps p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 72px; padding: 88px 36px; border-bottom: 1px solid var(--line); }
.faq-intro > span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.faq h2 { margin: 16px 0 14px; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -.045em; }
.faq-intro p { max-width: 390px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 22px 38px 22px 0; list-style: none; font-size: 15px; font-weight: 700; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 5px; top: 19px; color: var(--green); font-size: 22px; font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: -6px 42px 22px 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

footer { display: flex; justify-content: space-between; gap: 30px; padding: 34px 0 46px; color: var(--muted); font-size: 11px; line-height: 1.5; }
footer p { margin: 0; max-width: 440px; }
footer p:last-child { text-align: right; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.download-frame { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 24px, 620px); }
  .topbar { height: 72px; }
  .hero { padding: 74px 0 46px; }
  h1 { font-size: clamp(46px, 14vw, 68px); }
  .hero-copy { font-size: 15px; }
  .input-shell { padding: 9px 9px 9px 16px; flex-wrap: wrap; }
  .link-icon { display: none; }
  .input-shell input { width: calc(100% - 88px); flex: 1 1 auto; }
  .submit-button { width: 100%; min-height: 50px; }
  .result-card { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .thumb-wrap { min-height: 220px; }
  .result-content { padding: 18px 8px 8px; }
  .steps { grid-template-columns: 1fr; }
  .steps article { min-height: auto; padding: 28px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .steps article:last-child { border-bottom: 0; }
  .steps h3 { margin-top: 12px; }
  .faq { grid-template-columns: 1fr; gap: 36px; padding: 64px 10px; }
  footer { flex-direction: column; }
  footer p:last-child { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
