:root {
    --ink: #2f2540;
    --muted: #6d6474;
    --paper: #fffaf0;
    --paper-soft: #fff4df;
    --blue: #0052cc;
    --blue-dark: #00377b;
    --sky: #7fd7ff;
    --yellow: #ffd13f;
    --pink: #f7a8b8;
    --lilac: #c5b4ee;
    --mint: #a8ddd2;
    --peach: #f5c879;
    --line: rgba(47, 37, 64, 0.18);
    --shadow: 0 18px 50px rgba(47, 37, 64, 0.16);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        linear-gradient(rgba(47, 37, 64, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47, 37, 64, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 20% 15%, rgba(255, 209, 63, 0.24), transparent 20rem),
        radial-gradient(circle at 82% 20%, rgba(127, 215, 255, 0.24), transparent 22rem),
        var(--paper);
    background-size: 34px 34px, 34px 34px, auto, auto, auto;
    overflow-x: hidden;
}

body::after {
    position: fixed;
    inset: 0;
    z-index: -3;
    content: "";
    opacity: 0.55;
    background-image: radial-gradient(rgba(47, 37, 64, 0.12) 0.7px, transparent 0.7px);
    background-size: 9px 9px;
    pointer-events: none;
}

#dream-map {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

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

.hero {
    min-height: 92vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 54px;
    padding: 70px 0 58px;
}

.scrapbook {
    position: relative;
}

.scrapbook::before,
.scrapbook::after {
    position: absolute;
    content: "✦";
    color: var(--yellow);
    font-size: 2.2rem;
    text-shadow: 0 2px 0 #fff;
    animation: sparkle 2.7s ease-in-out infinite;
}

.scrapbook::before {
    top: 16%;
    right: 38%;
}

.scrapbook::after {
    left: 6%;
    bottom: 21%;
    animation-delay: 900ms;
}

.hero__content {
    max-width: 780px;
    animation: riseIn 850ms ease both;
}

.brush-label {
    width: fit-content;
    margin: 0 0 16px;
    border-radius: 999px 48px 999px 52px;
    padding: 8px 18px;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    transform: rotate(-1.5deg);
}

.brush-label--blue {
    background: rgba(127, 215, 255, 0.52);
}

.brush-label--yellow {
    background: rgba(255, 209, 63, 0.5);
}

.paper-ribbon {
    width: fit-content;
    margin-bottom: 6px;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    padding: 8px 28px;
    background: rgba(255, 255, 255, 0.76);
    font-family: "Comic Sans MS", "Trebuchet MS", cursive;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 800;
    transform: rotate(1deg);
    box-shadow: 4px 5px 0 rgba(47, 37, 64, 0.1);
}

h1,
h2,
h3 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(4.8rem, 12vw, 9.6rem);
    font-style: italic;
    line-height: 0.86;
    text-shadow: 0 5px 0 rgba(247, 168, 184, 0.28);
}

h2 {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.2rem, 5vw, 4.1rem);
    line-height: 1;
}

h3 {
    margin-bottom: 26px;
    font-family: "Comic Sans MS", "Trebuchet MS", cursive;
    font-size: clamp(1.25rem, 3vw, 1.7rem);
    line-height: 1.15;
}

.hero__lead {
    max-width: 680px;
    margin: 26px 0 34px;
    color: #4f465c;
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.62;
}

.hero__actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.button {
    min-height: 48px;
    border: 0;
    border-radius: var(--radius);
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    font: inherit;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button:hover {
    transform: translateY(-2px) rotate(-0.4deg);
}

.button--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--blue-dark), var(--blue));
    box-shadow: 0 10px 0 rgba(0, 55, 123, 0.18), 0 18px 36px rgba(0, 82, 204, 0.24);
}

.button--ghost {
    border: 1px dashed var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.button:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
}

.privacy-note {
    color: var(--muted);
    font-weight: 800;
}

.museum-card {
    position: relative;
    min-height: 390px;
    border: 2px solid rgba(47, 37, 64, 0.14);
    border-radius: var(--radius);
    padding: 34px 26px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: visible;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow), 7px 7px 0 rgba(127, 215, 255, 0.22);
    transform: rotate(1.5deg);
    animation: floatPanel 6s ease-in-out infinite;
}

.museum-card::before {
    position: absolute;
    inset: 18px;
    border: 2px solid rgba(0, 82, 204, 0.16);
    border-radius: var(--radius);
    content: "";
    pointer-events: none;
}

.tape {
    position: absolute;
    width: 112px;
    height: 34px;
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.35) 0 7px, transparent 7px 14px),
        rgba(255, 209, 63, 0.72);
    box-shadow: 0 4px 10px rgba(47, 37, 64, 0.12);
}

.tape--top {
    top: -17px;
    right: 28px;
    transform: rotate(7deg);
}

.mini-stars {
    color: var(--blue);
    font-size: 1.55rem;
}

.museum-card p {
    margin: 16px 0 10px;
    color: var(--muted);
    font-family: "Comic Sans MS", "Trebuchet MS", cursive;
    font-weight: 900;
}

.museum-card strong {
    color: var(--blue-dark);
    font-size: 4rem;
    line-height: 1;
}

.museum-card span:not(.tape):not(.doodle-heart) {
    max-width: 230px;
    margin-top: 14px;
    color: #4f465c;
    line-height: 1.45;
}

.doodle-heart {
    position: absolute;
    right: 22px;
    bottom: 14px;
    color: var(--pink);
    font-size: 2.4rem;
}

.survey-stage {
    display: grid;
    grid-template-columns: 0.76fr 1.24fr;
    gap: 38px;
    align-items: start;
    padding: 38px 0 88px;
}

.survey-copy {
    position: sticky;
    top: 24px;
    padding: 16px 0;
}

.survey-copy p:not(.brush-label) {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.doodle-note {
    width: min(100%, 330px);
    margin-top: 28px;
    border-radius: 999px 44px 999px 46px;
    padding: 20px 24px;
    background: rgba(168, 221, 210, 0.45);
    color: #3d4a4a;
    font-family: "Comic Sans MS", "Trebuchet MS", cursive;
    font-weight: 800;
    line-height: 1.5;
    transform: rotate(-1deg);
}

.survey-card {
    position: relative;
    border: 2px solid rgba(47, 37, 64, 0.12);
    border-radius: var(--radius);
    padding: clamp(22px, 4vw, 38px);
    background: rgba(255, 255, 255, 0.83);
    box-shadow: var(--shadow), -8px 8px 0 rgba(247, 168, 184, 0.16);
}

.survey-card::before {
    position: absolute;
    width: 116px;
    height: 34px;
    top: -16px;
    left: 34px;
    content: "";
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.32) 0 7px, transparent 7px 14px),
        rgba(197, 180, 238, 0.72);
    transform: rotate(-4deg);
}

.progress {
    height: 8px;
    margin-bottom: 32px;
    border-radius: 999px;
    background: rgba(47, 37, 64, 0.1);
    overflow: hidden;
}

.progress__bar {
    display: block;
    width: 25%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--mint), var(--yellow), var(--sky), var(--blue));
    transition: width 280ms ease;
}

.step {
    display: none;
}

.step.is-active {
    display: block;
    animation: stepIn 320ms ease both;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

label,
fieldset {
    margin: 0 0 18px;
    border: 0;
    padding: 0;
    display: grid;
    gap: 8px;
    color: #433a4d;
    font-size: 0.95rem;
    font-weight: 900;
}

legend {
    margin-bottom: 14px;
    color: #433a4d;
    font-weight: 900;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 13px 14px;
    color: var(--ink);
    background: rgba(255, 253, 247, 0.94);
    font: inherit;
    font-weight: 700;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(127, 215, 255, 0.24);
    transform: translateY(-1px);
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.option-grid--wide {
    grid-template-columns: 1fr;
}

.option-grid label,
.check-line {
    min-height: 54px;
    border: 1px dashed rgba(47, 37, 64, 0.2);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 253, 247, 0.74);
    font-weight: 800;
}

.option-grid input,
.check-line input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: var(--blue);
}

.captcha-box {
    border: 1px solid rgba(0, 82, 204, 0.18);
    border-radius: var(--radius);
    padding: 18px;
    background: rgba(127, 215, 255, 0.18);
}

.success-panel {
    position: relative;
    margin-top: 26px;
    border: 2px dashed rgba(47, 37, 64, 0.18);
    border-radius: var(--radius);
    padding: 30px;
    background:
        radial-gradient(circle at 88% 14%, rgba(255, 209, 63, 0.34), transparent 8rem),
        rgba(255, 253, 247, 0.94);
    box-shadow: 6px 7px 0 rgba(168, 221, 210, 0.26);
    animation: stepIn 320ms ease both;
}

.success-panel h3 {
    margin-bottom: 14px;
    color: var(--blue-dark);
}

.success-panel p:not(.brush-label) {
    max-width: 620px;
    color: #4f465c;
    line-height: 1.62;
}

.success-panel__spark {
    position: absolute;
    top: 18px;
    right: 24px;
    color: var(--yellow);
    font-size: 2.4rem;
    animation: sparkle 2.7s ease-in-out infinite;
}

#captcha-question {
    color: var(--blue-dark);
    font-size: 1.05rem;
}

.field-hint,
.field-error,
.form-message {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.field-error,
.form-message.is-error {
    color: #b82944;
}

.form-message.is-success {
    color: #0d7a4a;
}

.is-hidden {
    display: none;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes stepIn {
    from {
        opacity: 0;
        transform: translateX(14px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes floatPanel {
    0%,
    100% {
        transform: translateY(0) rotate(1.5deg);
    }
    50% {
        transform: translateY(-12px) rotate(-0.6deg);
    }
}

@keyframes sparkle {
    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.9) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.18) rotate(12deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 900px) {
    .hero,
    .survey-stage {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding-top: 52px;
    }

    .museum-card {
        min-height: 260px;
    }

    .survey-copy {
        position: static;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 22px, 1160px);
    }

    h1 {
        font-size: clamp(3.7rem, 20vw, 5rem);
    }

    .field-grid,
    .option-grid {
        grid-template-columns: 1fr;
    }

    .survey-card {
        padding: 22px 18px;
    }

    .button {
        width: 100%;
    }
}
