/* ─── Design tokens (matches app DesignSystem dark+amber) ─────────────────── */
:root {
    --bg:          #1a1410;
    --surface-1:   #221a14;
    --surface-2:   #2b2118;
    --border:      #3a2d20;
    --border-soft: #2f241a;

    --ink:         #f4ebe0;
    --ink-dim:     rgba(244, 235, 224, .65);
    --ink-faint:   rgba(244, 235, 224, .42);

    --amber:       #fbbf24;
    --amber-hover: #fcd34d;
    --amber-faint: rgba(251, 191, 36, .10);
    --amber-soft:  rgba(251, 191, 36, .25);

    --radius:      8px;
    --radius-lg:   12px;

    --container:   1100px;
    --gutter:      24px;

    --font:        -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
    --font-mono:   ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-hover); text-decoration: underline; }

h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--surface-2);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--amber);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.accent { color: var(--amber); }

/* ─── Nav ─────────────────────────────────────────────────────────────────── */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(26, 20, 16, .85);
    backdrop-filter: saturate(150%) blur(12px);
    -webkit-backdrop-filter: saturate(150%) blur(12px);
    border-bottom: 1px solid var(--border-soft);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand__icon { color: var(--amber); font-size: 14px; }

.nav__links {
    display: flex;
    align-items: center;
    gap: 22px;
}
.nav__links a {
    color: var(--ink-dim);
    font-size: 15px;
    font-weight: 500;
}
.nav__links a:hover { color: var(--ink); text-decoration: none; }

@media (max-width: 640px) {
    .nav__links { gap: 14px; }
    .nav__links a:not(.btn) { display: none; }
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 150ms ease;
    text-decoration: none;
    line-height: 1;
}

.btn--primary {
    background: var(--amber);
    color: #1a1410;
    border-color: var(--amber);
}
.btn--primary:hover {
    background: var(--amber-hover);
    color: #1a1410;
    text-decoration: none;
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--border);
}
.btn--ghost:hover {
    border-color: var(--amber-soft);
    background: var(--amber-faint);
    color: var(--ink);
    text-decoration: none;
}

.btn--small { padding: 7px 14px; font-size: 14px; }
.btn--large { padding: 14px 28px; font-size: 16px; }

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.hero {
    padding: 90px 0 80px;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(251, 191, 36, 0.06), transparent 70%),
        var(--bg);
    text-align: center;
}

.hero__inner { max-width: 820px; margin: 0 auto; }

.hero__title {
    font-size: clamp(36px, 6vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    font-weight: 700;
}

.hero__sub {
    font-size: clamp(17px, 2vw, 20px);
    color: var(--ink-dim);
    margin: 0 auto 36px;
    max-width: 640px;
}

.hero__cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.hero__note {
    color: var(--ink-faint);
    font-size: 14px;
    margin: 0;
}

/* ─── Sections common ─────────────────────────────────────────────────────── */

section {
    padding: 80px 0;
    border-top: 1px solid var(--border-soft);
}

.section__title {
    font-size: clamp(28px, 4vw, 38px);
    text-align: center;
    margin-bottom: 18px;
    letter-spacing: -0.025em;
}

.section__lead {
    text-align: center;
    color: var(--ink-dim);
    font-size: 18px;
    max-width: 640px;
    margin: 0 auto 52px;
}

/* ─── Problem ─────────────────────────────────────────────────────────────── */

.problem__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.problem__card {
    background: var(--surface-1);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
}

.problem__icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.problem__card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.problem__card p {
    color: var(--ink-dim);
    margin: 0;
    font-size: 15px;
}

/* ─── Features ────────────────────────────────────────────────────────────── */

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature {
    background: var(--surface-1);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.feature__num {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--amber);
    letter-spacing: 0.1em;
    margin-bottom: 14px;
    opacity: 0.8;
}

.feature h3 {
    font-size: 19px;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.feature p {
    color: var(--ink-dim);
    margin: 0 0 18px;
    font-size: 15px;
}

/* Screenshot слот в feature card.
   Стратегия: img element полностью отсутствует пока скриншоты не сделаны.
   Когда скрипт сделает реальные PNG'и — раскомментировать <img> в HTML; CSS уже готов
   их показать (img::valid → position:absolute, inset:0, перекроет placeholder).
   Пока placeholder показывает "Скриншот появится здесь" + dashed border. */
.feature__screenshot {
    position: relative;
    margin-top: auto;
    background: var(--surface-2);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    min-height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feature__screenshot::before {
    content: "Скриншот появится здесь";
    color: var(--ink-faint);
    font-size: 13px;
    letter-spacing: 0.02em;
    pointer-events: none;
}
.feature__screenshot img {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius) - 1px);
}

/* Feature card flex чтобы screenshot прижимался к низу (равная высота карточек) */
.feature {
    display: flex;
    flex-direction: column;
}

/* ─── Testimonials ────────────────────────────────────────────────────────── */

.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.testimonial {
    background: var(--surface-1);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.testimonial__quote {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.55;
    font-style: italic;
    position: relative;
    padding-left: 14px;
    border-left: 2px solid var(--amber-soft);
}

.testimonial__author {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.testimonial__name {
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.testimonial__role {
    color: var(--ink-faint);
    font-size: 13px;
}

/* ─── Showcase (PDF preview) ──────────────────────────────────────────────── */

.showcase__frame {
    position: relative;
    background: var(--surface-1);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 720px;
    margin: 0 auto;
    min-height: 320px;
    overflow: hidden;
}
.showcase__frame::before {
    content: "Здесь будет реальный экспорт PDF из приложения";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-faint);
    font-size: 14px;
    text-align: center;
    padding: 20px;
    pointer-events: none;
}
.showcase__img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ─── Story ───────────────────────────────────────────────────────────────── */

.story__inner { max-width: 720px; }

.story__body {
    color: var(--ink-dim);
    font-size: 17px;
    line-height: 1.7;
}

.story__body p { margin: 0 0 16px; }

.story__sig {
    color: var(--ink);
    font-weight: 500;
    margin-top: 24px !important;
}

/* ─── Beta form ───────────────────────────────────────────────────────────── */

.beta__form {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.beta__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.beta__label {
    font-size: 13px;
    color: var(--ink-dim);
    font-weight: 500;
}

.beta__input {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--ink);
    padding: 12px 14px;
    font-size: 15px;
    font-family: var(--font);
    transition: border-color 150ms ease, background 150ms ease;
}

.beta__input::placeholder { color: var(--ink-faint); }

.beta__input:focus {
    outline: none;
    border-color: var(--amber-soft);
    background: var(--surface-2);
}

/* Select — наследует .beta__input + native arrow заменим на SVG для консистентного вида */
.beta__select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23fbbf24' stroke-width='1.5'><path d='M1 1.5l5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    padding-right: 38px;
    cursor: pointer;
}
.beta__select option {
    background: var(--surface-1);
    color: var(--ink);
}
.beta__select:invalid { color: var(--ink-faint); }  /* "Выбери из списка" — dim до выбора */

.beta__honey {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.beta__submit {
    margin-top: 8px;
}

.beta__status {
    min-height: 24px;
    font-size: 14px;
    text-align: center;
    padding: 8px 0;
}

.beta__status.is-error {
    color: #f87171;
}

.beta__status.is-success {
    color: #4ade80;
}

.beta__privacy {
    font-size: 13px;
    color: var(--ink-faint);
    text-align: center;
    margin: 0;
    line-height: 1.6;
}

/* Success-блок — заменяет форму после успешной отправки */
.beta__success {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    padding: 36px 28px;
    background: var(--surface-1);
    border: 1px solid var(--amber-soft);
    border-radius: var(--radius-lg);
}

.beta__success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--amber-faint);
    color: var(--amber);
    font-size: 28px;
    font-weight: 700;
}

.beta__success-title {
    font-size: 22px;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.beta__success-text {
    color: var(--ink-dim);
    font-size: 15px;
    margin: 0 0 10px;
    line-height: 1.6;
}
.beta__success-text:last-child { margin-bottom: 0; }

/* ─── FAQ ─────────────────────────────────────────────────────────────────── */

.faq {
    background: var(--surface-1);
}

.faq .container { max-width: 760px; }

.faq__item {
    border-bottom: 1px solid var(--border-soft);
    padding: 18px 0;
}

.faq__item:first-of-type {
    border-top: 1px solid var(--border-soft);
    margin-top: 30px;
}

.faq__item summary {
    cursor: pointer;
    font-weight: 500;
    font-size: 17px;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 24px;
    position: relative;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
    content: "+";
    color: var(--amber);
    font-size: 22px;
    font-weight: 300;
    transition: transform 200ms ease;
}

.faq__item[open] summary::after { transform: rotate(45deg); }

.faq__item p {
    color: var(--ink-dim);
    margin: 12px 0 0;
    font-size: 15px;
    line-height: 1.65;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.footer {
    background: var(--surface-1);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
}

.footer__inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 720px) {
    .footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
    .footer__col:first-child { grid-column: 1 / -1; }
}

.footer__col h4 {
    color: var(--ink);
    font-size: 14px;
    margin-bottom: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer__col li {
    margin-bottom: 8px;
}

.footer__col a {
    color: var(--ink-dim);
    font-size: 14px;
}

.footer__col a:hover {
    color: var(--amber);
    text-decoration: none;
}

.footer__tagline {
    color: var(--ink-dim);
    font-size: 14px;
    margin-top: 12px;
}

.footer__bottom {
    border-top: 1px solid var(--border-soft);
    padding-top: 24px;
}

.footer__bottom p {
    color: var(--ink-faint);
    font-size: 13px;
    text-align: center;
    margin: 0;
}

/* ─── Reduce motion (accessibility) ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
