@import "fonts.css";

/* ============================================================
   Scribla — сайт. Переработан 22 августа 2026.

   Что изменилось и почему. Прежняя страница была рассказом на 24 экрана
   с терракотовой картой на весь первый экран, рисованным телефоном
   и роликом с пером; на замере 96 % визитов были короче 30 секунд.
   Теперь — девять разделов, продукт показан настоящими экранами
   и записью экрана, терракота осталась только кнопке и одной полосе
   «Скачать». Палитра та же, что в приложении и на карточке в магазине:
   менять её нельзя, три поверхности продукта должны выглядеть одной
   вещью. Антиква — только в строке «сказали» перед примерами.

   Подписи и приглушённые тона считаны на контраст: 4.5:1 на пергаменте,
   карточке и утопленном фоне одновременно.
   ============================================================ */

:root {
  --terra:      #B85A28;
  --terra-dark: #8C3F1B;
  --terra-lite: #E78E58;
  --ink:        #241A15;
  --parch:      #F5EDE3;
  --paper:      #FBF6F0;

  --bg:        var(--paper);
  --bg-alt:    var(--parch);
  --bg-card:   #FFFFFF;
  --text:      var(--ink);
  --text-soft: #5E4E42;
  --text-mute: #6F5D4E;
  --line:      #E3D5C4;
  --accent:      var(--terra);
  --accent-text: #A44E20;
  --accent-on:   #fff;
  --band:      #A64F22;
  --band-text: #F7EFE3;
  --band-soft: #F1DCCB;

  --shadow:    0 1px 2px rgba(36,26,21,.05), 0 8px 24px -12px rgba(36,26,21,.18);
  --shadow-lg: 0 2px 4px rgba(36,26,21,.06), 0 24px 60px -24px rgba(36,26,21,.28);

  --sans: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "EB Garamond", ui-serif, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 66rem;
  --header: 64px;
  --nav-strip: 0px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #17100D;
    --bg-alt:    #1D1410;
    --bg-card:   #211712;
    --text:      #F0E4D6;
    --text-soft: #CDB9A6;
    --text-mute: #A8937F;
    --line:      #35251C;
    --accent:      #E78E58;
    --accent-text: #F0A472;
    --accent-on:   #1A120E;
    --band:      #8C3F1B;
    --band-text: #F7EFE3;
    --band-soft: #E9CDB8;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.45), 0 24px 60px -24px rgba(0,0,0,.75);
  }
}

/* ---------------------------------------------------------- основа */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto;
  background: var(--bg-card); padding: .6rem 1rem; border-radius: 8px; box-shadow: var(--shadow-lg); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
section { padding-block: clamp(3.5rem, 8vw, 6rem); scroll-margin-top: calc(var(--header) + var(--nav-strip) + 12px); }
section + section { border-top: 1px solid var(--line); }

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; text-wrap: balance; font-weight: 800; line-height: 1.1; }
h1 { font-size: clamp(2.25rem, 5.2vw, 3.75rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); margin-bottom: .8rem; }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0; }
p + p { margin-top: .8rem; }
.lead { font-size: 1.15rem; color: var(--text-soft); max-width: 40rem; text-wrap: pretty; }
.note { color: var(--text-mute); font-size: .95rem; max-width: 36rem; margin-top: 1.6rem; }
kbd { font: 600 .9em/1 var(--sans); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: .15em .45em; background: var(--bg-card); }
code { font: .85em var(--mono); }

/* ---------------------------------------------------------- кнопки */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 700 1rem/1 var(--sans); letter-spacing: -0.01em;
  min-height: 48px; padding: .9rem 1.4rem;
  border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-on); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--terra-dark); }
@media (prefers-color-scheme: dark) { .btn-primary:hover { background: #F0A472; } }
.btn-ghost { background: var(--bg-card); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--text-mute); }
.btn[disabled], .btn[aria-disabled=true] { opacity: .5; cursor: not-allowed; }
.btn .apple { width: 1.05em; height: 1.05em; flex: none; margin-top: -.12em; }
.free { display: inline-block; vertical-align: middle; margin-left: .35rem; padding: .2em .55em; border-radius: 999px; font: 700 .7rem/1.3 var(--sans); letter-spacing: .02em; text-transform: uppercase; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }


/* ---------------------------------------------------------- шапка */

.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.top.stuck { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 1rem; height: var(--header); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; min-height: 44px; }
.brand img.mark { width: 32px; height: 32px; border-radius: 50%; }
.brand img.word { height: 38px; width: auto; }
.nav { display: flex; gap: 1.4rem; }
.nav a { color: var(--text-soft); text-decoration: none; font-size: .95rem; font-weight: 600; padding-block: .9rem; white-space: nowrap; }
.nav a:hover { color: var(--text); }
.top-cta { min-height: 40px; padding: .6rem 1.05rem; font-size: .92rem; flex: none; }

.lang-menu { position: relative; flex: none; }
.lang-menu summary {
  list-style: none; cursor: pointer; user-select: none;
  font-size: .85rem; font-weight: 700; color: var(--text-mute);
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  gap: .35rem; border-radius: 8px; padding-inline: .5rem;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ""; width: 0; height: 0; border: 4px solid transparent; border-top: 5px solid currentColor; border-bottom: 0; margin-top: 2px; }
.lang-menu[open] summary { color: var(--text); }
.lang-menu:not([open]) .lang { display: none; }
.lang {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20;
  display: flex; flex-direction: column; gap: .15rem; padding: .35rem;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.lang a { color: var(--text-soft); text-decoration: none; font-weight: 700; font-size: .85rem; border-radius: 8px; min-width: 96px; min-height: 40px; display: inline-flex; align-items: center; padding-inline: .8rem; white-space: nowrap; }
.lang a[aria-current] { color: var(--accent-on); background: var(--accent); }

/* Узкие экраны: навигация лентой под шапкой, как и раньше. */
@media (max-width: 56em) {
  :root { --nav-strip: 2.9rem; }
  .top { padding-bottom: var(--nav-strip); }
  .top .wrap { gap: .6rem; }
  .brand img.word { height: 30px; }
  .nav {
    position: absolute; left: 0; right: 0; top: var(--header);
    min-height: var(--nav-strip); gap: 0; overflow-x: auto; scrollbar-width: none;
    border-top: 1px solid var(--line); padding-inline: 1.25rem;
    mask-image: linear-gradient(to right, #000 calc(100% - 1.5rem), transparent);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 1.5rem), transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: .75rem .7rem; font-size: .9rem; }
  .nav a:first-child { padding-left: 0; }
}

/* ---------------------------------------------------------- первый экран */

.hero { padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 56.0625em) { .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 3rem; } }
.hero-text { max-width: 36rem; }
.hero h1 { margin-bottom: 1.1rem; }
.hero .lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.2rem; margin-top: 1.6rem; }
/* Без JS: телефон кнопкой, мак строкой. Класс на <html> переключает. */
.hero-cta [data-dev=mac], .hero-also[data-also=ios] { display: none; }
html.is-mac .hero-cta [data-dev=ios], html.is-mac .hero-also[data-also=mac] { display: none; }
html.is-mac .hero-cta [data-dev=mac], html.is-mac .hero-also[data-also=ios] { display: inline-flex; }
html.is-ios .hero-also { display: none; }
.hero-also { font-weight: 600; color: var(--text-soft); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: .1em; }
.hero-also:hover { color: var(--text); border-color: var(--text-mute); }
.next { margin-top: 1rem; padding: .8rem 1rem; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--line); font-size: .92rem; max-width: 40rem; }
.hero-demo-mac { display: none; }
html.is-mac .hero-demo { display: none; }
html.is-mac .hero-demo-mac { display: grid; gap: 1.4rem; justify-items: center; align-content: center; }
.hero-demo-mac .hud-rec { width: min(100%, 24rem); }
.hero-pair { display: grid; gap: .5rem; width: min(100%, 26rem); }
.hero-free { margin-top: 1rem; font-weight: 700; font-size: 1rem; color: var(--text); }
.hero-free + .hero-meta { margin-top: .4rem; }
.hero-meta { display: none; margin-top: .9rem; font-size: .85rem; color: var(--text-mute); max-width: 36ch; }
html.is-mac .hero-meta[data-dev=mac] { display: block; }
html.is-ios .hero-meta-ios { display: block; }
html.is-ios .hero-cta [data-dev=mac] { display: none; }
html.is-other .hero-cta, html.is-other .hero-meta { display: none; }

.hero-alt { margin-top: 1.4rem; display: grid; gap: .9rem; }
.hero-alt-h { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.hero-alt-p { color: var(--text-soft); font-size: .95rem; max-width: 40ch; }
.hero-alt-row { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.hero-alt-side { display: grid; gap: .8rem; max-width: 22rem; }
.hero-qr { width: 160px; height: 160px; background: #fff; border-radius: 14px; padding: 8px; border: 1px solid var(--line); box-shadow: var(--shadow); flex: none; }
.hero-alt-form { margin-top: .4rem; }
.hero-alt-form .hero-alt-p { font-size: .88rem; color: var(--text-mute); }
.hero-alt-form { display: grid; gap: .5rem; }
.hero-alt-fields { display: flex; gap: .5rem; flex-wrap: wrap; }
.hero-alt-fields input { flex: 1 1 13rem; }
.hero-alt .msg:empty { display: none; }

/* Телефон — настоящая запись экрана. Рамка минимальная: экран и скругление. */
.hero-demo { margin: 0; position: relative; justify-self: center; width: min(100%, 19.5rem); }
.phone {
  border-radius: 34px; overflow: hidden; background: #000;
  border: 6px solid #1B1614; box-shadow: var(--shadow-lg);
  aspect-ratio: 886 / 1920;
}
.phone video { width: 100%; height: 100%; object-fit: cover; }
.film-sound {
  position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .45rem;
  font: 600 .82rem/1 var(--sans); color: #fff;
  background: rgba(20, 12, 8, .62); border: 1px solid rgba(255,255,255,.25);
  padding: .5rem .85rem; border-radius: 999px; cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.film-sound svg { fill: currentColor; }
.film-sound[aria-pressed=true] [data-film-wave] { opacity: .35; }

/* ---------------------------------------------------------- режимы */

.modes { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.mode {
  display: grid; gap: .5rem 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line);
  grid-template-columns: 1fr;
}
@media (min-width: 48em) { .mode { grid-template-columns: 7rem 1fr 1fr; align-items: baseline; } }
.mode-name { font-weight: 800; letter-spacing: -0.01em; }
.mode-said, .mode-got { display: grid; gap: .15rem; }
.mode-said i, .mode-got i { font: 600 .7rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-mute); font-style: normal; }
.mode-said { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--text-soft); }
.mode-got { font-weight: 600; }

/* ---------------------------------------------------------- три шага */

.steps { list-style: none; counter-reset: step; margin: 2rem 0 0; padding: 0; display: grid; gap: 2rem; }
@media (min-width: 48em) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.step { counter-increment: step; display: grid; gap: .6rem; align-content: start; }
.step img { max-width: 17rem; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--bg-alt); margin-bottom: .6rem; }
.step h3::before { content: counter(step) " · "; color: var(--accent-text); }
.step p { color: var(--text-soft); font-size: .98rem; }

/* ---------------------------------------------------------- mac */

.mac-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 56.0625em) { .mac-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.facts { margin: 1.4rem 0 1.6rem; padding: 0 0 0 1.1rem; color: var(--text-soft); display: grid; gap: .4rem; }
.sha { margin-top: 1rem; font-size: .82rem; color: var(--text-mute); }
.sha summary { cursor: pointer; list-style: none; display: inline; }
.sha summary::-webkit-details-marker { display: none; }
.sha summary::after { content: ' ›'; }
.sha[open] summary::after { content: ' ⌄'; }
.sha code { display: block; word-break: break-all; color: var(--text-soft); font-size: .74rem; line-height: 1.5; }
.mac-visual { display: grid; gap: 1.25rem; justify-items: end; }
/* Тени у плашки и карточки свои, снятые вместе с окном: здесь ничего не добавляем. */
.mac-visual .hud-rec { width: min(100%, 22rem); }
.mac-visual .hud-answer { width: 100%; }
.mac-keys { display: flex; gap: .6rem; align-items: center; font-size: 2rem; color: var(--text-mute); }
.mac-keys kbd { font-size: 1.6rem; padding: .4em .6em; border-radius: 12px; }

/* ---------------------------------------------------------- приватность */

.privacy-grid { display: grid; gap: 1.5rem 2.5rem; margin-top: 1.8rem; }
@media (min-width: 48em) { .privacy-grid { grid-template-columns: repeat(3, 1fr); } }
.fact h3 { margin-bottom: .4rem; }
.fact p { color: var(--text-soft); font-size: .98rem; }

/* ---------------------------------------------------------- скачать */

.download { background: var(--band); color: var(--band-text); border-top: 0; }
.download h2 { color: var(--band-text); }
.download .lead { color: var(--band-text); }
.dl-grid { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 40em) { .dl-grid { grid-template-columns: repeat(2, minmax(0, 22rem)); } }
.dl-card { background: var(--bg-card); color: var(--text); border-radius: 20px; padding: 1.5rem; display: grid; gap: .9rem; align-content: start; justify-items: start; box-shadow: var(--shadow-lg); }
.dl-card h3 { font-size: 1.25rem; }
.dl-badge img { height: 52px; width: auto; }
.dl-meta { color: var(--text-mute); font-size: .88rem; }
.download :where(a, button):focus-visible { outline-color: var(--band-text); }

/* ---------------------------------------------------------- вопросы */

.faq { margin-top: 1.2rem; border-top: 1px solid var(--line); max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; font-weight: 700; font-size: 1.05rem; padding: 1rem 2.2rem 1rem 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .4rem; top: 1.35rem; width: .55rem; height: .55rem;
  border-right: 2px solid var(--text-mute); border-bottom: 2px solid var(--text-mute); transform: rotate(45deg);
  transition: transform .15s;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.55rem; }
.faq details p { color: var(--text-soft); padding-bottom: 1.1rem; max-width: 44rem; }
.faq details p + p { margin-top: .5rem; }

/* ---------------------------------------------------------- связь: форма и переводы */

.contact { background: var(--bg-alt); border-top: 1px solid var(--line); }
.contact > summary { cursor: pointer; list-style: none; padding-block: 1.4rem; font-weight: 600; color: var(--text-soft); }
.contact > summary::-webkit-details-marker { display: none; }
.contact > summary .wrap { display: block; }
.contact > summary .wrap::after { content: ' ›'; }
.contact[open] > summary .wrap::after { content: ' ⌄'; }
.contact > summary:hover { color: var(--text); }
.contact .wrap { max-width: 44rem; }
.contact section { padding-block: clamp(2.5rem, 6vw, 4rem); }
.contact section + section { border-top: 1px solid var(--line); }
.contact h2 { font-size: 1.5rem; }
.contact .lead { font-size: 1rem; }
.panel { margin-top: 1.4rem; display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label, .field .lbl { font-weight: 700; font-size: .95rem; }
.hint { color: var(--text-mute); font-weight: 400; font-size: .88rem; }
input, textarea {
  font: inherit; color: var(--text); background: var(--bg-card);
  border: 1px solid var(--line); border-radius: 12px; padding: .75rem 1rem; width: 100%; min-height: 48px;
}
textarea { min-height: 8rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--text-mute); opacity: .8; }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: #B3261E; }
.counter { color: var(--text-mute); font-size: .85rem; }
.drop { border: 1.5px dashed var(--line); border-radius: 12px; background: var(--bg-card); }
.drop.is-over { border-color: var(--accent); }
.drop-face { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; cursor: pointer; color: var(--text-soft); font-size: .95rem; }
.drop-face b { color: var(--accent-text); }
.shots { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; }
.shots li { display: grid; grid-template-columns: 56px 1fr auto; gap: .8rem; align-items: center; font-size: .9rem; }
.shots img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.shots .who { display: grid; } .shots .who span { color: var(--text-mute); font-size: .85rem; }
.drop-x { border: 0; background: var(--bg-alt); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; color: var(--text-soft); }
.msg { display: none; padding: .7rem 1rem; border-radius: 10px; font-size: .95rem; }
.msg.on { display: block; }
.msg.ok { background: #E4F1E2; color: #2E6B2A; }
.msg.err { background: #FBE7E5; color: #B3261E; }
@media (prefers-color-scheme: dark) { .msg.ok { background: #1C3320; color: #9AD39A; } .msg.err { background: #3A1F1D; color: #F28B82; } }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
@media (max-width: 30em) { .amounts { grid-template-columns: 1fr; } }
.amount {
  font: 700 1rem var(--sans); min-height: 48px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--text);
}
.amount[aria-pressed=true] { border-color: var(--accent); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent); }
#support .btn-primary { width: 100%; }
#support .note { margin-top: 0; }

/* ---------------------------------------------------------- подвал */

footer { padding: 2.5rem 0 3.5rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--text-mute); }
.f-links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-bottom: 1rem; }
.f-links a { color: var(--text-soft); text-decoration: none; font-weight: 600; }
.f-links a:hover { color: var(--text); }
.f-about { max-width: 60ch; }
.f-about a { color: inherit; }

/* Без движения — без автопрокрутки и переходов. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Бейдж App Store чёрный; в тёмной теме — белый вариант через инверсию (в нём нет цвета). */
@media (prefers-color-scheme: dark) { .hero-badge img, .dl-badge img { filter: invert(1); } }
