:root {
    --bg: #f5f1ea;
    --surface: #fcfaf6;
    --surface-strong: #ffffff;
    --text: #1f1d1a;
    --muted: #68645c;
    --line: #d9d1c4;
    --accent: #3f5a49;
    --accent-soft: #edf1ec;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-color: #b8aa8f var(--bg);
    scrollbar-width: thin;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background: var(--bg);
}

button,
input,
select,
textarea {
    font: inherit;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: var(--bg);
}

*::-webkit-scrollbar-thumb {
    background: #b8aa8f;
    border: 2px solid var(--bg);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #9f8f74;
}

.site-header,
.main-layout,
.site-footer {
    width: min(960px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    padding: 1.5rem 0 0;
}

.hero,
.about-section,
.registration-section {
    border-top: 1px solid var(--line);
}

.site-bar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    font-size: 0.92rem;
}

.brand,
.bar-note,
.eyebrow,
.section-label,
.filter-label {
    margin: 0;
    color: var(--muted);
}

.brand {
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    gap: 2rem;
    align-items: center;
    padding: 3.5rem 0 2rem;
}

.hero-copy {
    align-self: center;
    transform: translateY(-18px);
}

.hero-copy h1,
.section-head h2 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.hero-copy h1 {
    font-family: "Caveat", cursive;
    font-size: clamp(3.2rem, 8vw, 5.4rem);
    font-weight: 700;
    line-height: 0.9;
    margin-top: 0.25rem;
}

.hero-button {
    display: inline-block;
    margin-top: 1.65rem;
    margin-left: 0.4rem;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 0.14em;
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.hero-button:hover,
.hero-button:focus-visible {
    color: var(--text);
}

.section-head h2 {
    font-family: "Cormorant Garamond", serif;
}

.event-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
    align-content: start;
}

.event-meta li {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.event-meta li:last-child {
    border-bottom: none;
}

.event-meta span {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.84rem;
    color: var(--muted);
}

.event-meta strong {
    font-size: 1rem;
    font-weight: 600;
}

.main-layout {
    padding-bottom: 2rem;
}

.about-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
    padding: 1.75rem 0;
}

.about-section .section-label {
    grid-column: 1 / -1;
}

.about-label {
    justify-self: center;
    text-align: center;
    color: var(--text);
    font-family: "Caveat", cursive;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1;
}

.about-item {
    max-width: none;
    padding: 1.15rem 1.3rem 1.35rem;
    background: #efe2b8;
    box-shadow: 10px 10px 0 rgba(31, 29, 26, 0.06);
}

.about-item:nth-of-type(1) {
    transform: rotate(-1deg);
}

.about-item:nth-of-type(2) {
    transform: rotate(1deg);
}

.about-subtitle {
    margin: 0;
    font-family: "Caveat", cursive;
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 700;
    line-height: 1;
}

.about-note-line {
    width: 100%;
    height: 1px;
    margin-top: 0.4rem;
    background: rgba(31, 29, 26, 0.28);
}

.about-text {
    margin: 0.7rem 0 0;
    color: rgba(31, 29, 26, 0.76);
    font-family: "Caveat", cursive;
    font-size: 1.45rem;
    line-height: 1.35;
}

.registration-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    column-gap: 2rem;
    row-gap: 1.5rem;
    align-items: start;
    padding: 1.75rem 0;
}

.site-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0 2rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.site-footer p {
    margin: 0;
}

.footer-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.footer-link:hover,
.footer-link:focus-visible {
    text-decoration: underline;
}

.section-head h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    margin-top: 0.2rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    grid-column: 1;
}

.registration-form {
    display: grid;
    gap: 1rem;
    grid-column: 1;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field span,
.checkbox-row span {
    font-size: 0.94rem;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.9rem 0;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--text);
}

textarea {
    min-height: 88px;
    resize: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-bottom-color: var(--accent);
}

.custom-select {
    position: relative;
}

.select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0.35rem 0.9rem 0.4rem;
    border: none;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.select-trigger:focus-visible {
    outline: none;
    border-bottom-color: var(--accent);
}

.select-value {
    font-size: 1rem;
}

.select-chevron {
    width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: var(--text);
    transform-origin: center;
    transition: transform 0.22s ease, color 0.22s ease;
}

.select-chevron svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.custom-select.is-open .select-chevron {
    transform: rotate(180deg);
    color: var(--accent);
}

.custom-select.is-open .select-trigger {
    border-bottom-color: var(--accent);
}

.select-menu {
    list-style: none;
    margin: 0.55rem 0 0;
    padding: 0.4rem;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border: 1px solid var(--line);
    background: #fbf7ef;
    box-shadow: 0 10px 24px rgba(31, 29, 26, 0.08);
    z-index: 5;
}

.select-option {
    width: 100%;
    padding: 0.75rem 0.8rem;
    border: none;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    font-family: "Manrope", sans-serif;
    font-size: 1rem;
}

.select-option:hover,
.select-option:focus-visible,
.select-option.is-selected {
    outline: none;
    background: var(--accent-soft);
    color: var(--accent);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--muted);
}

.checkbox-row input {
    accent-color: var(--accent);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding-top: 0.5rem;
}

.submit-button {
    border: none;
    border-radius: 999px;
    padding: 0.8rem 1.4rem;
    background: var(--accent);
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.submit-button:hover,
.submit-button:focus-visible {
    opacity: 0.9;
}

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

.feedback {
    min-height: 1.5rem;
    margin: 0;
    font-size: 0.94rem;
}

.feedback[data-state="error"] {
    color: #a34d32;
}

.feedback[data-state="success"] {
    color: var(--accent);
}

.feedback[data-state="info"] {
    color: var(--muted);
}

.participants-note {
    display: grid;
    gap: 0.9rem;
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    margin-top: 0.3rem;
    padding: 1.2rem 1.35rem 1.4rem;
    max-height: 420px;
    background: #efe2b8;
    box-shadow: 10px 10px 0 rgba(31, 29, 26, 0.06);
    transform: rotate(1deg);
    overflow-y: auto;
}

.note-title {
    margin: 0;
    font-family: "Caveat", cursive;
    font-size: 2.05rem;
    font-weight: 700;
    line-height: 1;
}

.note-line {
    width: 100%;
    height: 1px;
    background: rgba(31, 29, 26, 0.28);
}

.participants-list {
    counter-reset: participant;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
}

.participant-card {
    counter-increment: participant;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.7rem;
    row-gap: 0.2rem;
    align-items: start;
    padding-bottom: 0.2rem;
}

.participant-card::before {
    content: counter(participant) ".";
    grid-column: 1;
    grid-row: 1 / span 2;
    font-family: "Caveat", cursive;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(31, 29, 26, 0.82);
    padding-top: 0.2rem;
}

.participant-name {
    margin: 0;
    grid-column: 2;
    font-family: "Caveat", cursive;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.participant-details,
.empty-state {
    margin: 0;
    color: rgba(31, 29, 26, 0.72);
    font-family: "Caveat", cursive;
}

.participant-details {
    grid-column: 2;
    font-size: 1.3rem;
    line-height: 1.2;
}

.empty-state {
    font-size: 1.6rem;
    line-height: 1.2;
}

@media (max-width: 760px) {
    .hero,
    .about-section,
    .registration-section {
        grid-template-columns: 1fr;
    }

    .section-head,
    .site-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .participants-note,
    .registration-form,
    .section-head {
        grid-column: 1;
    }

    .participants-note {
        grid-row: auto;
        margin-top: 0;
    }
}
