:root {
    --bg: #FBF7F2;
    --bg-card: #FFFFFF;
    --ink: #2B231C;
    --ink-soft: #6B5E52;
    --accent: #C1712F;
    --accent-dark: #9C5722;
    --border: #E9DFD3;
    --success-bg: #EFF6EC;
    --success-ink: #3A6B32;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

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

.wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.logo span { color: var(--accent); }
.nav { display: flex; gap: 24px; }
.nav a { color: var(--ink-soft); font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: none; }

/* Hero */
.hero {
    padding: 72px 0 64px;
    text-align: center;
    background:
        radial-gradient(ellipse 900px 420px at 50% -80px, rgba(193, 113, 47, 0.08), transparent),
        var(--bg);
}
.hero-visual {
    max-width: 680px;
    margin: 48px auto 0;
}
.hero-visual svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 28px 64px -28px rgba(43, 35, 28, 0.28), 0 0 0 1px var(--border);
}
.hs circle, .hs .hs-ring {
    transform-box: fill-box;
    transform-origin: center;
}
.hs .hs-ring {
    animation: hs-pulse 2.4s ease-out infinite;
}
.hs-2 .hs-ring { animation-delay: 0.8s; }
.hs-3 .hs-ring { animation-delay: 1.6s; }
@keyframes hs-pulse {
    0%   { transform: scale(0.6); opacity: 0.9; }
    70%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hs .hs-ring { animation: none; }
}
.badge {
    display: inline-block;
    background: var(--success-bg);
    color: var(--success-ink);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 42px;
    line-height: 1.15;
    margin: 0 0 18px;
    letter-spacing: -0.02em;
}
.hero p.lead {
    font-size: 18px;
    color: var(--ink-soft);
    max-width: 620px;
    margin: 0 auto 32px;
}

/* Waitlist form */
.waitlist-form {
    display: flex;
    gap: 10px;
    max-width: 460px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.waitlist-form input[type=text] {
    flex: 1 1 260px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    background: var(--bg-card);
    color: var(--ink);
}
.waitlist-form input[type=text]:focus {
    outline: none;
    border-color: var(--accent);
}
.btn {
    display: inline-block;
    padding: 14px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; transform: translateY(-1px); }
.btn { box-shadow: 0 6px 18px -6px rgba(193, 113, 47, 0.45); transition: background .15s, transform .15s, box-shadow .15s; }
.form-hint { font-size: 13px; color: var(--ink-soft); margin-top: 12px; }
.flash-success {
    max-width: 460px;
    margin: 0 auto;
    background: var(--success-bg);
    color: var(--success-ink);
    padding: 14px 18px;
    border-radius: 10px;
    font-weight: 500;
}
.flash-error { color: #B23A2E; font-size: 13px; margin-top: 8px; }

/* How it works */
.how {
    padding: 48px 0;
    border-top: 1px solid var(--border);
}
.how h2 { text-align: center; font-size: 26px; margin-bottom: 40px; }
.how-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.how-step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    transition: transform .18s, box-shadow .18s;
}
.how-step:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px -20px rgba(43, 35, 28, 0.25);
}
.how-step .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 14px;
}
.how-step h3 { margin: 0 0 8px; font-size: 17px; }
.how-step p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* Articles */
.section-title {
    font-size: 26px;
    margin: 0 0 8px;
}
.section-sub { color: var(--ink-soft); margin: 0 0 36px; }
.articles-list {
    padding: 56px 0;
    border-top: 1px solid var(--border);
}
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    display: block;
    color: var(--ink);
}
.article-card { transition: transform .18s, box-shadow .18s, border-color .18s; }
.article-card:hover {
    border-color: var(--accent);
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 16px 36px -20px rgba(43, 35, 28, 0.25);
}
.article-card .cat {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-dark);
    font-weight: 700;
}
.article-card h3 { margin: 10px 0 8px; font-size: 18px; line-height: 1.3; }
.article-card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

.article-page { padding: 48px 0 72px; }
.article-page .cat {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-dark);
    font-weight: 700;
}
.article-page h1 { font-size: 34px; margin: 12px 0 24px; line-height: 1.2; }
.article-body { max-width: 700px; font-size: 16.5px; }
.article-body p { margin: 0 0 20px; }
.article-body h2 { font-size: 21px; margin: 32px 0 14px; }
.article-body ul { padding-left: 22px; margin: 0 0 20px; }
.article-body li { margin-bottom: 8px; }
.back-link { display: inline-block; margin-bottom: 24px; font-weight: 500; }

/* Static pages */
.page { padding: 56px 0 72px; max-width: 700px; }
.page h1 { font-size: 32px; margin-bottom: 20px; }
.page p { margin-bottom: 18px; color: var(--ink-soft); }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 24px;
}
.site-footer .wrap {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13.5px;
    color: var(--ink-soft);
}
.site-footer a { color: var(--ink-soft); }

/* Upload page */
.wrap-narrow { max-width: 560px; }
.upload-page { padding: 56px 0 80px; }
.upload-page h1 { font-size: 30px; margin-bottom: 10px; }
.upload-form { margin-top: 32px; }

.dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    border: 2px dashed var(--border);
    border-radius: 16px;
    background: var(--bg-card);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--accent); }
.dropzone input[type=file] { display: none; }
.dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--ink-soft);
    font-weight: 500;
    padding: 24px;
    text-align: center;
}
.dropzone-icon {
    font-size: 28px;
    color: var(--accent);
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--success-bg);
    background: #F3E7D9;
    margin-bottom: 6px;
}
.dropzone-hint { font-size: 13px; color: var(--ink-soft); font-weight: 400; }
.dropzone-preview { width: 100%; max-height: 360px; object-fit: cover; display: block; }

.field-group { margin-top: 24px; }
.field-label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 10px; }

.style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.style-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    cursor: pointer;
    font-size: 14.5px;
    transition: border-color .15s, background .15s;
}
.style-option:has(input:checked) {
    border-color: var(--accent);
    background: #FBF0E4;
    font-weight: 600;
}
.style-option input { accent-color: var(--accent); }

.field-group input[type=text] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    background: var(--bg-card);
    color: var(--ink);
}
.field-group input[type=text]:focus { outline: none; border-color: var(--accent); }

.btn-block { width: 100%; margin-top: 28px; text-align: center; }
.flash-error-box {
    background: #FBEAE7;
    color: #B23A2E;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin: 20px 0;
}

/* Result page */
.result-page { padding: 48px 0 80px; }
.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}
.src-thumb {
    width: 64px; height: 64px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.variants-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.variant-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.variant-card img { width: 100%; display: block; }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 64px 24px;
    color: var(--ink-soft);
    text-align: center;
}
.spinner {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
    .hero h1 { font-size: 30px; }
    .how-steps { grid-template-columns: 1fr; }
    .article-grid { grid-template-columns: 1fr; }
    .style-grid { grid-template-columns: 1fr; }
    .variants-grid { grid-template-columns: 1fr; }
}
