:root {
    --green: #0e4434;
    --cream: #f3e9d2;
    --red: #d2232a;
    --red-dark: #a8191f;
    --ink: #1d1a14;
    --muted: #5b5446;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    min-height: max(100vh, 720px);
    overflow-x: hidden;
    position: relative;
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    color: var(--cream);
    background-color: var(--green);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M32 22l2.6 7.4L42 32l-7.4 2.6L32 42l-2.6-7.4L22 32l7.4-2.6z' fill='%23f3e9d2' fill-opacity='.11'/%3E%3Ccircle cx='0' cy='0' r='2.2' fill='%23f3e9d2' fill-opacity='.16'/%3E%3Ccircle cx='64' cy='0' r='2.2' fill='%23f3e9d2' fill-opacity='.16'/%3E%3Ccircle cx='0' cy='64' r='2.2' fill='%23f3e9d2' fill-opacity='.16'/%3E%3Ccircle cx='64' cy='64' r='2.2' fill='%23f3e9d2' fill-opacity='.16'/%3E%3C/svg%3E");
    -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'DM Mono', ui-monospace, monospace; font-size: 13px; letter-spacing: .04em; }

.ribbon-v, .ribbon-h {
    position: absolute;
    z-index: 0;
    background: var(--red) repeating-linear-gradient(90deg, transparent 0 6px, rgba(255, 255, 255, .07) 6px 7px);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 0 10px 30px rgba(0, 0, 0, .25);
}
.ribbon-v { top: 0; bottom: 0; left: 64%; width: 84px; }
.ribbon-h {
    left: 0; right: 0; top: 56%; height: 84px;
    background-image: repeating-linear-gradient(0deg, transparent 0 6px, rgba(255, 255, 255, .07) 6px 7px);
}

header, h1, footer { position: relative; z-index: 1; }
header { padding: 36px 48px 0; display: flex; justify-content: space-between; }

h1 {
    padding: 28px 48px 0;
    font-weight: 800;
    font-variation-settings: 'wdth' 78;
    font-size: clamp(72px, 13vw, 210px);
    line-height: .84;
    letter-spacing: -.025em;
    max-width: 9ch;
}
h1 span { display: block; color: var(--red); }

.tag {
    position: absolute; z-index: 2;
    left: calc(64% - 210px); top: calc(56% - 40px);
    width: 400px;
    background: var(--cream); color: var(--ink);
    padding: 30px 30px 28px 56px;
    transform: rotate(-4deg);
    clip-path: polygon(30px 0, 100% 0, 100% 100%, 30px 100%, 0 calc(100% - 30px), 0 30px);
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .35));
}
.tag::before {
    content: ''; position: absolute; left: 22px; top: 50%;
    width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
    background: var(--green); box-shadow: inset 0 0 0 3px #d8cbad;
}
.tag h2 { font-weight: 700; font-size: 30px; letter-spacing: -.02em; line-height: 1; }
.tag p { font-size: 15px; color: var(--muted); margin: 8px 0 20px; }

.field { display: flex; align-items: baseline; gap: 10px; border-bottom: 2px dashed #b6a985; padding-bottom: 6px; }
.field:focus-within { border-bottom-color: var(--red); }
.field span { font-family: 'DM Mono', monospace; font-size: 13px; color: var(--red-dark); }
.field input {
    flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
    font: 500 18px 'Bricolage Grotesque', sans-serif; color: var(--ink);
}
.field input::placeholder { color: #a89d82; }

#submit {
    margin-top: 18px; width: 100%;
    border: 0; border-radius: 6px; background: var(--ink); color: var(--cream);
    font: 600 16px 'Bricolage Grotesque', sans-serif; padding: 14px;
    cursor: pointer; transition: background .2s;
}
#submit:hover, #submit:focus-visible { background: var(--red); }
#submit:disabled { opacity: .6; cursor: wait; }

.link {
    border: 0; background: none; padding: 0; cursor: pointer;
    font: 400 13px 'DM Mono', monospace; color: var(--red-dark); text-decoration: underline;
}
.field input[readonly] { color: var(--muted); }

/* Interest picker: the tag grows and moves up so it stays on screen. */
body.picking .tag { width: 480px; top: 150px; left: calc(64% - 250px); transform: rotate(-2deg); }
body.picking .facts, body.picking footer { display: none; }
.interests { margin-top: 14px; }
.chips { border: 0; margin: 0 0 12px; padding: 0; }
.chips legend { font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: .04em; color: var(--red-dark); margin-bottom: 8px; text-transform: uppercase; }
.chip {
    margin: 0 6px 6px 0; padding: 6px 12px; border-radius: 999px;
    border: 1.5px solid #b6a985; background: transparent; color: var(--ink);
    font: 500 14px 'Bricolage Grotesque', sans-serif; cursor: pointer; transition: background .15s, border-color .15s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.chip:disabled { opacity: .4; cursor: not-allowed; }

.message { margin-top: 14px; font-size: 15px; }
.message:empty { display: none; }
.message.error { color: var(--red-dark); }
.message.success { font-weight: 700; font-size: 22px; line-height: 1.15; color: var(--red-dark); }

form.done .field, form.done #submit { display: none; }
form.closed .field, form.closed #submit { display: none; }

.facts {
    position: absolute; z-index: 1; left: 48px; bottom: 40px;
    display: flex; gap: 40px;
}
.facts b { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-size: 34px; font-weight: 700; letter-spacing: -.02em; }

footer { position: absolute; right: 48px; bottom: 40px; opacity: .6; }

@media (max-width: 900px) {
    body { min-height: 100vh; padding-bottom: 40px; }
    header { padding: 24px; }
    h1 { padding: 12px 24px 0; }
    .ribbon-v { left: auto; right: 28px; width: 56px; }
    .ribbon-h { top: 380px; height: 56px; }
    .tag { position: relative; left: auto; top: auto; margin: 60px 20px 0; width: auto; transform: rotate(-2deg); }
    body.picking .tag { width: auto; top: auto; left: auto; transform: none; }
    body.picking .facts, body.picking footer { display: flex; }
    .facts { position: relative; margin: 48px 24px 0; flex-wrap: wrap; gap: 24px; left: auto; bottom: auto; }
    footer { position: static; margin: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
