:root {
    --ink: #101828;
    --muted: #667085;
    --line: #e4e7ec;
    --soft: #f6f7fb;
    --panel: #ffffff;
    --accent: #155eef;
    --accent-2: #12b76a;
    --violet: #7a5af8;
    --shadow: 0 24px 70px rgba(16, 24, 40, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.shell {
    width: min(1160px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(228, 231, 236, 0.85);
    backdrop-filter: blur(16px);
}

.nav {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    background:
        linear-gradient(135deg, var(--accent), var(--violet) 54%, var(--accent-2));
    box-shadow: 0 12px 28px rgba(21, 94, 239, 0.24);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #344054;
    font-weight: 650;
    font-size: 0.95rem;
}

.hero {
    display: grid;
    grid-template-columns: 1.04fr 0.96fr;
    gap: 52px;
    align-items: center;
    padding: 92px 0 72px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    padding: 6px 11px;
    color: #344054;
    background: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0;
    max-width: 820px;
    font-size: clamp(3rem, 7vw, 6.3rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
}

.hero p,
.section-heading p {
    color: var(--muted);
    font-size: 1.14rem;
    max-width: 720px;
}

.hero-actions,
.form-footer,
.preview-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 13px 20px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 35px rgba(16, 24, 40, 0.12);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.button-primary {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.button-secondary {
    background: #fff;
}

.hero-panel {
    border: 1px solid var(--line);
    border-radius: 32px;
    padding: 18px;
    background: linear-gradient(180deg, #fff, #f8fafc);
    box-shadow: var(--shadow);
}

.preview-window {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid #d0d5dd;
    background: #fff;
}

.preview-toolbar {
    display: flex;
    gap: 8px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

.preview-toolbar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #98a2b3;
}

.preview-art {
    min-height: 420px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(21, 94, 239, 0.12), rgba(18, 183, 106, 0.1)),
        repeating-linear-gradient(90deg, rgba(16, 24, 40, 0.06) 0 1px, transparent 1px 28px),
        repeating-linear-gradient(0deg, rgba(16, 24, 40, 0.05) 0 1px, transparent 1px 28px);
}

.image-card-float {
    padding: 18px 22px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 24px 70px rgba(16, 24, 40, 0.14);
    font-weight: 850;
}

.section {
    padding: 76px 0;
}

.section-muted {
    background: var(--soft);
}

.section-heading {
    margin-bottom: 26px;
}

.section-heading h2,
.preview-header h1 {
    margin: 12px 0 8px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.workspace-card,
.upload-card,
.image-preview-card,
.info-panel,
.feature-grid article {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.workspace-card,
.upload-card {
    padding: 26px;
}

.field-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
}

textarea,
input[type="file"] {
    font: inherit;
}

textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid #d0d5dd;
    border-radius: 18px;
    padding: 18px;
    color: var(--ink);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.12);
}

.form-footer {
    justify-content: space-between;
    margin-top: 16px;
}

.form-footer p {
    margin: 0;
    color: var(--muted);
}

.drop-zone {
    min-height: 280px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 10px;
    border: 1.5px dashed #b2bdd0;
    border-radius: 22px;
    background: #fbfcff;
    cursor: pointer;
    padding: 30px;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.drop-zone.is-dragging {
    border-color: var(--accent);
    background: #eff6ff;
}

.drop-zone input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
}

.drop-icon {
    width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: #111827;
    font-size: 2rem;
    line-height: 1;
}

.drop-zone strong {
    font-size: 1.25rem;
}

.drop-zone small {
    color: var(--muted);
}

.upload-card .button {
    margin-top: 18px;
    width: 100%;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.feature-grid article {
    padding: 24px;
}

.feature-grid span {
    color: var(--accent);
    font-weight: 900;
}

.feature-grid h3 {
    margin: 12px 0 8px;
    font-size: 1.25rem;
}

.feature-grid p {
    color: var(--muted);
    margin: 0;
}

.preview-page {
    padding: 72px 0;
}

.preview-header {
    margin-bottom: 28px;
}

.preview-header p {
    color: var(--muted);
}

.preview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 0.8fr;
    gap: 24px;
    align-items: start;
}

.image-preview-card {
    padding: 16px;
    margin: 0;
}

.image-preview-card img {
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--line);
}

.info-panel {
    padding: 24px;
}

.info-panel h2 {
    margin-top: 0;
}

dl {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
}

dl div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

dt {
    color: var(--muted);
    font-weight: 700;
}

dd {
    margin: 0;
    font-weight: 800;
    text-align: right;
}

.prompt-box {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: #f9fafb;
    margin-bottom: 18px;
}

.prompt-box p,
.milestone-note {
    margin: 8px 0 0;
    color: var(--muted);
}

.preview-actions .button {
    width: 100%;
}

.alert {
    margin: 18px 0 0;
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid #fedf89;
    background: #fffaeb;
    color: #93370d;
}

.alert-error {
    border-color: #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.footer {
    margin-top: 48px;
    padding: 42px 0;
    color: #d0d5dd;
    background: #101828;
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.footer .brand {
    color: #fff;
}

.footer p {
    max-width: 420px;
    color: #98a2b3;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.dev-page code {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 2px 6px;
    background: #f9fafb;
}

.dev-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.dev-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}

.dev-test-image {
    width: min(420px, 100%);
    margin: 18px 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: #fff;
    box-shadow: var(--shadow);
}

.dev-test-image img {
    border-radius: 18px;
}

.dev-details {
    margin-top: 22px;
}

@media (max-width: 900px) {
    .hero,
    .preview-layout,
    .feature-grid,
    .dev-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 56px;
    }
}

@media (max-width: 640px) {
    .nav {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 0;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-actions,
    .form-footer,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }
}
