:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;

    --ink: #2a211c;
    --muted: #76675b;
    --paper: #fffdf8;
    --cream: #f5ecdc;
    --orange: #e85d2a;
    --orange-dark: #bd3f17;
    --blue: #075d76;
    --blue-dark: #053848;
    --line: rgba(55, 39, 29, 0.14);
    --green: #277653;
    --shadow: 0 25px 70px rgba(68, 43, 24, 0.14);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}


html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 6%, #fff7e9 0, transparent 25rem),
        linear-gradient(180deg, #f7f0e4 0, #fffdf9 48%, #f3e8d8 100%);
}

button,
input {
    font: inherit;
}

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

button,
a {
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
.upload-area:focus-within {
    outline: 3px solid rgba(7, 93, 118, 0.25);
    outline-offset: 3px;
}

.site-header {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #fff8e8;
    background: var(--blue);
    border: 4px solid #f7dca4;
    border-radius: 15px;
    font-family: Georgia, serif;
    font-size: 24px;
    font-weight: 900;
    transform: rotate(-3deg);
    box-shadow: 3px 4px 0 var(--ink);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-family: Georgia, serif;
    font-size: 20px;
}

.brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.header-badge {
    padding: 9px 14px;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 74px 70px;
    display: grid;
    grid-template-columns: 1.06fr 0.94fr;
    gap: 60px;
    align-items: center;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 38px;
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--orange-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2em;
}

.hero h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(52px, 6.2vw, 84px);
    line-height: 0.97;
    letter-spacing: -0.04em;
}

.hero h1 em {
    display: block;
    margin-top: 12px;
    color: var(--orange);
    font-weight: inherit;
}

.hero-description {
    max-width: 610px;
    margin: 28px 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.feature-list {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 11px;
    list-style: none;
    color: #53473e;
    font-size: 14px;
    font-weight: 700;
}

.feature-list li::before {
    content: "✓";
    margin-right: 10px;
    color: var(--green);
}

.hero-art {
    display: grid;
    place-items: center;
}

.hero-badge {
    width: min(390px, 100%);
    aspect-ratio: 0.88;
    padding: 42px 25px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff5da;
    background:
        radial-gradient(circle, #08708c 0 33%, transparent 34%),
        linear-gradient(145deg, #08718d, #04465a);
    border: 14px solid #f6ddb0;
    border-radius: 38% 38% 30% 30% / 18% 18% 28% 28%;
    outline: 8px solid #3a251b;
    box-shadow:
        0 22px 30px rgba(33, 24, 19, 0.22),
        inset 0 0 0 4px #e75d28;
    transform: rotate(2deg);
}

.hero-badge-top {
    font-family: Georgia, serif;
    font-size: clamp(64px, 8vw, 104px);
    font-weight: 900;
    line-height: 0.8;
    text-shadow: 5px 5px 0 #38241b;
}

.hero-badge-middle {
    width: 110%;
    margin-top: 22px;
    padding: 10px;
    text-align: center;
    background: var(--orange);
    border: 4px solid #38241b;
    font-family: Georgia, serif;
    font-size: clamp(20px, 3vw, 34px);
    font-weight: 900;
    transform: rotate(-2deg);
}

.hero-paw {
    flex: 1;
    display: grid;
    place-items: center;
    font-size: clamp(80px, 10vw, 130px);
    filter: sepia(1) saturate(0.7);
}

.hero-badge-bottom {
    width: 85%;
    padding: 10px;
    color: #38241b;
    text-align: center;
    background: #f7e4bf;
    border: 4px solid #38241b;
    border-radius: 999px;
    font-family: Georgia, serif;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.creator-section {
    width: min(1180px, calc(100% - 40px));
    margin: 100px auto;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 40px;
}

.section-heading h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: clamp(36px, 5vw, 58px);
    letter-spacing: -0.035em;
}

.section-heading > p:last-child {
    color: var(--muted);
    line-height: 1.7;
}

.creator-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.8fr);
    gap: 30px;
    align-items: start;
}

.creator-card,
.result-card {
    background: rgba(255, 253, 248, 0.94);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.creator-card {
    overflow: hidden;
}

.step-block {
    padding: 32px;
    border-bottom: 1px solid var(--line);
}

.step-block:last-child {
    border-bottom: 0;
}

.step-heading {
    margin-bottom: 24px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.step-number {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: white;
    background: var(--blue);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 900;
}

.step-heading h3 {
    margin: 1px 0 5px;
    font-family: Georgia, serif;
    font-size: 22px;
}

.step-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.upload-area {
    min-height: 290px;
    padding: 18px;
    display: grid;
    place-items: center;
    overflow: hidden;
    cursor: pointer;
    background: #f7efe2;
    border: 2px dashed #cdb69e;
    border-radius: 20px;
}

.upload-area.dragging {
    background: #e8f3f4;
    border-color: var(--blue);
}

.upload-placeholder {
    display: grid;
    justify-items: center;
    gap: 9px;
    color: var(--muted);
}

.upload-placeholder strong {
    color: var(--ink);
}

.upload-placeholder small {
    font-size: 12px;
}

.upload-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: white;
    background: var(--orange);
    border-radius: 50%;
    font-size: 28px;
    font-weight: 300;
}

.local-preview {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    border-radius: 14px;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 20px;
}

.field {
    min-width: 0;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

.field label,
.field legend {
    display: block;
    margin-bottom: 8px;
    color: #4d4037;
    font-size: 13px;
    font-weight: 800;
}

.field input[type="text"] {
    width: 100%;
    min-height: 50px;
    padding: 0 15px;
    color: var(--ink);
    background: white;
    border: 1px solid #cdbfaf;
    border-radius: 12px;
}

.field input[type="text"]:focus {
    border-color: var(--blue);
}

.field small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
}

.segmented-control {
    min-height: 50px;
    padding: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #eee4d6;
    border-radius: 12px;
}

.segmented-control label {
    margin: 0;
    cursor: pointer;
}

.segmented-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-control span {
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 9px;
}

.segmented-control input:checked + span {
    color: white;
    background: var(--blue);
}

.final-step {
    background: rgba(245, 236, 220, 0.5);
}

.primary-button,
.secondary-button {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border-radius: 13px;
    font-weight: 900;
    text-decoration: none;
}

.primary-button {
    width: 100%;
    padding: 0 22px;
    color: white;
    background: var(--orange);
    border: 0;
    cursor: pointer;
    box-shadow: 0 8px 0 var(--orange-dark);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 0 var(--orange-dark);
}

.primary-button:active {
    transform: translateY(5px);
    box-shadow: 0 3px 0 var(--orange-dark);
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.secondary-button {
    padding: 0 20px;
    color: var(--blue);
    background: transparent;
    border: 2px solid var(--blue);
}

.text-button {
    padding: 9px 0;
    color: var(--blue);
    background: none;
    border: 0;
    cursor: pointer;
    font-weight: 800;
}

.form-note {
    margin: 18px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 11px;
}

.message {
    margin: 20px 32px 32px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.error-message {
    color: #842e23;
    background: #fff0ed;
    border: 1px solid #edc2ba;
}

.result-card {
    min-height: 600px;
    padding: 28px;
    position: sticky;
    top: 22px;
}

.empty-result,
.loading-result {
    min-height: 540px;
    display: grid;
    place-content: center;
    justify-items: center;
    text-align: center;
}

.empty-badge {
    width: 100px;
    height: 100px;
    display: grid;
    place-items: center;
    background: var(--cream);
    border: 2px dashed #c9ae91;
    border-radius: 50%;
    font-size: 46px;
}

.empty-result h3,
.loading-result h3 {
    margin: 24px 0 8px;
    font-family: Georgia, serif;
    font-size: 26px;
}

.empty-result p,
.loading-result p {
    max-width: 340px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.spinner {
    width: 66px;
    height: 66px;
    border: 7px solid #e8d8c7;
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 900ms linear infinite;
}

.loading-label {
    margin-top: 24px !important;
    color: var(--orange-dark) !important;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.15em;
}

.progress-track {
    width: min(330px, 80%);
    height: 8px;
    margin-top: 30px;
    overflow: hidden;
    background: #eadfce;
    border-radius: 99px;
}

.progress-bar {
    width: 12%;
    height: 100%;
    background: var(--orange);
    border-radius: inherit;
    transition: width 1s ease;
}

.result-label {
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    font-size: 13px;
    font-weight: 900;
}

.success-indicator {
    padding: 7px 10px;
    color: var(--green);
    background: #e8f5ed;
    border-radius: 999px;
    font-size: 10px;
    text-transform: uppercase;
}

.result-image-wrap {
    overflow: hidden;
    background:
        linear-gradient(45deg, #eee 25%, transparent 25%),
        linear-gradient(-45deg, #eee 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eee 75%),
        linear-gradient(-45deg, transparent 75%, #eee 75%);
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-size: 20px 20px;
    border-radius: 18px;
}

.result-image-wrap img {
    width: 100%;
    display: block;
}

.result-details {
    margin: 22px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.result-details div {
    padding: 13px;
    background: #f5ede2;
    border-radius: 11px;
}

.result-details small,
.result-details strong {
    display: block;
}

.result-details small {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.13em;
}

.result-details strong {
    font-size: 14px;
}

.result-actions {
    display: grid;
    gap: 13px;
}

footer {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 30px 0 50px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 12px;
}

footer strong {
    color: var(--ink);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .hero {
        padding: 55px 35px;
        grid-template-columns: 1fr;
    }

    .hero-art {
        display: none;
    }

    .creator-grid {
        grid-template-columns: 1fr;
    }

    .result-card {
        position: static;
    }
}

@media (max-width: 600px) {
    .site-header,
    .hero,
    .creator-section,
    footer {
        width: min(100% - 24px, 1180px);
    }

    .header-badge {
        display: none;
    }

    .hero {
        padding: 46px 24px;
        border-radius: 26px;
    }

    .hero h1 {
        font-size: 47px;
    }

    .creator-section {
        margin: 70px auto;
    }

    .creator-card,
    .result-card {
        border-radius: 20px;
    }

    .step-block,
    .result-card {
        padding: 22px;
    }

    .field-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .upload-area {
        min-height: 230px;
    }

    .result-card {
        min-height: auto;
    }

    .empty-result,
    .loading-result {
        min-height: 420px;
    }

    footer {
        flex-direction: column;
    }
}
