:root {
    color-scheme: light;
    --paper: #f3efe4;
    --ink: #111;
    --red: #e2362b;
    --blue: #1d4ea2;
    --yellow: #f5c418;
    --font: Futura, "Century Gothic", "Avenir Next", "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

[hidden],
.icons {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--paper);
    color: var(--ink);
}

h1,
h2,
p,
dl,
dd {
    margin: 0;
}

.page {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 560px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 20px
        calc(22px + env(safe-area-inset-bottom, 0px));
}

.art {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.art-shape {
    position: absolute;
    display: block;
}

.art-circle {
    top: 70px;
    left: -14vw;
    width: min(78vw, 420px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--yellow);
}

.art-square {
    top: 150px;
    right: -8vw;
    width: min(46vw, 250px);
    aspect-ratio: 1;
    background: var(--blue);
    transform: rotate(14deg);
}

.art-triangle {
    top: 330px;
    right: 6vw;
    width: min(52vw, 290px);
    aspect-ratio: 1.15;
    background: var(--red);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.art-bar {
    top: 420px;
    left: -6vw;
    width: min(70vw, 380px);
    height: 12px;
    background: var(--ink);
    transform: rotate(-8deg);
}

.art-dot {
    top: 112px;
    left: 60%;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ink);
}

.page-contact .art-shape {
    transition: inset 1s, transform 1s, background-color 1s;
}

.is-submitted .art-circle {
    top: 400px;
    left: 42vw;
    background: var(--red);
}

.is-submitted .art-square {
    top: 120px;
    right: 50vw;
    background: var(--yellow);
    transform: rotate(-30deg);
}

.is-submitted .art-triangle {
    top: 150px;
    right: -4vw;
    background: var(--blue);
    transform: rotate(180deg);
}

.is-submitted .art-bar {
    top: 260px;
    transform: rotate(12deg);
}

.site-header,
.site-main,
.site-footer {
    position: relative;
}

.site-header,
.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.site-header {
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo svg {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
}

.invitation-number {
    white-space: nowrap;
    letter-spacing: 0.14em;
}

.site-main {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.hero {
    margin-top: 36px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 20px;
    padding: 6px 12px;
    background: var(--ink);
    color: var(--paper);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(2.5rem, 13vw, 4.75rem);
    font-weight: 700;
    line-height: 0.97;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

h1 > span {
    display: block;
    width: fit-content;
    padding-right: 8px;
    background: var(--paper);
}

.page-contact h1 {
    font-size: clamp(2.25rem, 12vw, 4.375rem);
}

.accent {
    color: var(--red);
    font-weight: inherit;
}

.lead {
    width: fit-content;
    max-width: 32ch;
    margin-top: 18px;
    padding: 6px 6px 6px 0;
    background: var(--paper);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.45;
}

.page-content,
.contact-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.page-content {
    flex: 1;
    justify-content: center;
    padding: 46px 0 30px;
}

.cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 164px;
    height: 164px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper);
    box-shadow: 0 0 0 8px var(--paper), 0 0 0 11px var(--ink);
    font: 700 15px var(--font);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s;
}

.cta:active {
    transform: scale(0.93);
}

.cta:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 14px;
}

.cta:disabled {
    cursor: wait;
}

.cta svg {
    width: 30px;
    height: 30px;
}

.caption {
    padding: 4px 8px;
    background: var(--paper);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 4px solid var(--ink);
}

.facts div {
    padding: 12px 8px 0 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.facts dt {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.facts div:nth-child(1) dt {
    color: var(--red);
}

.facts div:nth-child(2) dt {
    color: var(--blue);
}

.facts div:nth-child(3) dt {
    color: #795a00;
}

.contact-form,
.field {
    width: 100%;
}

.field label {
    display: block;
    width: fit-content;
    margin-bottom: 8px;
    padding-right: 8px;
    background: var(--paper);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.field-row {
    display: flex;
    border: 4px solid var(--ink);
    background: #fff;
}

.field-row:focus-within {
    box-shadow: 6px 6px 0 var(--red);
}

.field-row.has-error {
    border-color: var(--red);
}

.field-row input,
.field-row select {
    min-height: 64px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font: 700 20px var(--font);
}

.field-row input {
    flex: 1;
    min-width: 0;
    padding: 0 16px;
}

.field-row select {
    width: 102px;
    padding: 0 12px;
    border-right: 4px solid var(--ink);
    background: var(--yellow);
    cursor: pointer;
}

.form-error {
    min-height: 20px;
    margin-top: 8px;
    color: #a5231b;
    font-size: 13px;
    font-weight: 700;
}

.form-error:not(:empty) {
    width: fit-content;
    padding: 2px 4px;
    background: var(--paper);
}

.legal {
    max-width: 34ch;
    padding: 2px 6px;
    background: var(--paper);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
}

.thanks {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.tick {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--ink);
    box-shadow: 0 0 0 8px var(--paper), 0 0 0 11px var(--ink);
}

.tick svg {
    width: 44px;
    height: 44px;
    stroke: var(--yellow);
}

.thanks h2,
.thanks p {
    padding: 4px 8px;
    background: var(--paper);
}

.thanks h2 {
    font-size: 28px;
    text-transform: uppercase;
}

.thanks p {
    max-width: 30ch;
    font-weight: 600;
    line-height: 1.45;
}

.page-instructions .page-content {
    justify-content: flex-start;
    align-items: flex-start;
}

.instructions {
    width: 100%;
    padding: 20px;
    border: 4px solid var(--ink);
    background: #fff;
    box-shadow: 6px 6px 0 var(--yellow);
    font-size: 1.125rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.instructions > * + * {
    margin-top: 1em;
}

.back {
    padding: 4px 8px;
    background: var(--paper);
    color: var(--blue);
    font-weight: 700;
}

.site-footer {
    margin-top: 22px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.page-contact .site-footer,
.page-instructions .site-footer {
    padding-top: 12px;
    border-top: 4px solid var(--ink);
}

@media (prefers-reduced-motion: reduce) {
    .cta,
    .page-contact .art-shape {
        transition: none;
    }
}
