@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --navy: #082a48;
    --navy-deep: #041d33;
    --blue: #0d4777;
    --blue-soft: #eaf3f8;
    --yellow: #ffd643;
    --yellow-bright: #ffe169;
    --orange: #ef7a27;
    --cream: #f7f2e8;
    --paper: #fffdf8;
    --ink: #152331;
    --muted: #617180;
    --line: rgba(8, 42, 72, 0.14);
    --green: #28754f;
    --danger: #a52d35;
    --shadow: 0 22px 70px rgba(4, 29, 51, 0.13);
    --display: 'Barlow Condensed', Impact, sans-serif;
    --sans: 'DM Sans', Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(234, 243, 248, 0.65), transparent 420px),
        var(--paper);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    height: 9px;
    background: linear-gradient(90deg, var(--yellow) 0 24%, var(--orange) 24% 32%, var(--blue) 32% 100%);
}

.page-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 42px 0 88px;
}

.narrow-shell {
    width: min(920px, calc(100% - 48px));
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.card,
.package-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    box-shadow: var(--shadow);
}

.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(34px, 5vw, 70px);
    min-height: 390px;
    padding: clamp(38px, 6vw, 72px);
    overflow: hidden;
    align-items: end;
    color: #fff;
    background: var(--navy-deep);
    border: 0;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(4, 29, 51, 0.97) 0%, rgba(4, 29, 51, 0.86) 55%, rgba(4, 29, 51, 0.58) 100%),
        linear-gradient(0deg, rgba(4, 29, 51, 0.8), transparent 60%);
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 15px;
    color: var(--orange);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: var(--yellow);
}

h1,
h2,
h3 {
    margin: 0;
    color: var(--navy);
    font-family: var(--display);
    font-weight: 800;
    line-height: 0.94;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(4rem, 8vw, 7rem);
}

h2 {
    font-size: clamp(2.6rem, 4.5vw, 4.25rem);
}

h3 {
    font-size: 1.75rem;
}

.hero h1 {
    max-width: 800px;
    color: #fff;
}

p {
    color: var(--muted);
    line-height: 1.7;
}

.hero > div:first-child > p {
    max-width: 690px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.05rem;
}

.hero a,
.hero a:visited {
    color: #fff;
    font-weight: 800;
    text-underline-offset: 5px;
}

.hero a:hover {
    color: var(--yellow);
}

.timer-box {
    position: relative;
    min-height: 220px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: rgba(4, 29, 51, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-top: 4px solid var(--yellow);
    border-radius: 4px;
    backdrop-filter: blur(14px);
}

.timer-box span,
.timer-box small {
    color: rgba(255, 255, 255, 1);
}

.timer-box span {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.timer-box strong {
    color: var(--yellow);
    font-family: var(--display);
    font-size: 4.2rem;
    line-height: 0.95;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 26px 0;
}

.package-card {
    position: relative;
    min-width: 0;
    padding: 26px;
    overflow: hidden;
    border-left: 5px solid var(--yellow);
    box-shadow: 0 14px 40px rgba(4, 29, 51, 0.09);
}

.package-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 72px;
    height: 72px;
    pointer-events: none;
}

.package-card h2 {
    font-size: 2rem;
    line-height: 1;
}

.package-card p {
    margin: 13px 0 0;
    font-size: 1rem;
}

.package-card strong {
    display: block;
    margin-top: 17px;
    color: var(--navy);
    font-family: var(--display);
    font-size: 2.4rem;
}

.package-letter {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 19px;
    color: var(--navy-deep);
    background: var(--yellow);
    border: 2px solid var(--navy);
    border-radius: 50%;
    box-shadow: 3px 3px 0 var(--navy);
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 900;
}

.package-card.unavailable {
    border-left-color: var(--danger);
    background: #f7f7f4;
}

.package-card.unavailable > :not(.sold-out) {
    opacity: 0.5;
}

.tag {
    display: inline-flex;
    margin-top: 13px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #18593a;
    background: #eaf7ef;
    font-size: 0.9rem;
    font-weight: 800;
}

.tag.muted {
    color: var(--muted);
    background: var(--blue-soft);
}

.tag.sold-out {
    color: #fff;
    background: var(--danger);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-card,
.payment-card {
    position: relative;
    margin-top: 26px;
    padding: clamp(28px, 5vw, 54px);
    border-top: 5px solid var(--yellow);
}

.form-card::after,
.payment-card::after {
    content: '';
    position: absolute;
    top: -5px;
    right: 0;
    width: 28%;
    height: 5px;
    background: var(--orange);
}

.section-title {
    margin-bottom: 34px;
}

.section-title p {
    margin: 15px 0 0;
}

.participant-card {
    position: relative;
    margin-bottom: 18px;
    padding: clamp(23px, 3vw, 32px);
    overflow: hidden;
    background: linear-gradient(135deg, #fff 0%, var(--blue-soft) 100%);
    border: 1px solid rgba(8, 42, 72, 0.15);
    border-left: 5px solid var(--yellow);
    border-radius: 5px;
}

.participant-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 70px;
    height: 70px;
    background: linear-gradient(225deg, rgba(13, 71, 119, 0.11), transparent 68%);
    pointer-events: none;
}

.participant-header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--line);
}

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

.field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    color: var(--navy);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.025em;
}

input,
select,
textarea {
    width: 100%;
    min-height: 54px;
    padding: 14px 15px;
    color: var(--ink);
    background: #fff;
    border: 1px solid rgba(8, 42, 72, 0.22);
    border-radius: 4px;
    outline: none;
    font: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(8, 42, 72, 0.4);
}

input:focus,
select:focus,
textarea:focus {
    background: #fffef9;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(13, 71, 119, 0.11);
}

.meal-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 8px 0 4px;
}

.meal-title small,
.code-card small {
    color: var(--muted);
    font-weight: 600;
    line-height: 1.45;
}

.meal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.75);
}

.meal-choice label {
    font-size: 0.82rem;
}

.actions-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.btn {
    min-height: 52px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--navy-deep);
    background: var(--yellow);
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn:hover {
    color: var(--navy-deep);
    background: var(--yellow-bright);
    box-shadow: 0 12px 30px rgba(255, 214, 67, 0.25);
    transform: translateY(-2px);
}

.btn.primary {
    color: var(--navy-deep);
    background: var(--yellow);
    box-shadow: 0 12px 34px rgba(255, 214, 67, 0.2);
}

.btn.ghost {
    color: #fff;
    background: var(--navy);
}

.btn.ghost:hover {
    color: #fff;
    background: var(--blue);
}

.btn.remove {
    min-height: 40px;
    padding: 0 15px;
    color: var(--danger);
    background: rgba(165, 45, 53, 0.08);
    border-color: rgba(165, 45, 53, 0.15);
}

.btn.remove:hover {
    color: #fff;
    background: var(--danger);
    box-shadow: none;
}

.btn.card-btn {
    color: #fff;
    background: var(--blue);
}

.btn.card-btn:hover {
    color: #fff;
    background: var(--navy);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.total-box {
    min-width: 190px;
    padding: 15px 19px;
    color: #fff;
    background: var(--navy-deep);
    border: 0;
    border-top: 4px solid var(--yellow);
    border-radius: 4px;
}

.total-box span {
    display: block;
    color: rgba(255, 255, 255, 1);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.total-box strong {
    color: var(--yellow);
    font-family: var(--display);
    font-size: 2.25rem;
    line-height: 1;
}

#message,
.payment-message {
    min-height: 24px;
    margin-top: 18px;
    color: var(--green);
    font-weight: 800;
}

#message.error,
.payment-message.error,
.status-error .eyebrow {
    color: var(--danger);
}

.hidden {
    display: none !important;
}

.status-card {
    position: relative;
    width: 100%;
    padding: clamp(30px, 6vw, 58px);
    overflow: hidden;
    border-top: 5px solid var(--yellow);
}

.status-card::after {
    content: '';
    position: absolute;
    top: -5px;
    right: 0;
    width: 28%;
    height: 5px;
    background: var(--orange);
}

.status-card h1,
.payment-choice-card h1 {
    font-size: clamp(3rem, 7vw, 5rem);
}

.status-card h2 {
    margin-top: 28px;
    font-size: 2.4rem;
}

.status-error {
    border-top-color: var(--danger);
}

.status-error::after {
    background: var(--orange);
}

.inline-link {
    width: fit-content;
    margin-top: 18px;
}

.summary-box,
.payment-option,
.embedded-payment-panel,
.square-card-container,
.notice-box {
    padding: 20px;
    margin: 22px 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--blue-soft);
}

.summary-box p {
    margin: 7px 0;
}

.codes-list {
    display: grid;
    gap: 12px;
    margin: 18px 0 24px;
}

.code-card {
    display: grid;
    gap: 5px;
    padding: 17px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--yellow);
    border-radius: 4px;
    background: #fff;
}

.code-card span {
    color: var(--muted);
}

.code-card code {
    display: inline-flex;
    width: fit-content;
    margin-top: 7px;
    padding: 8px 12px;
    border-radius: 4px;
    color: #18593a;
    background: #eaf7ef;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.small-note {
    font-size: 1rem;
}

.payment-full-shell {
    align-items: start;
    padding-block: 38px;
}

.payment-options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.payment-option h2,
.embedded-payment-panel h2 {
    margin-bottom: 8px;
    font-size: 2rem;
}

.full-width {
    width: 100%;
}

.payment-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0 18px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--blue-soft);
}

.payment-tab {
    padding: 13px 14px;
    border: 0;
    border-radius: 4px;
    color: var(--navy);
    background: transparent;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.payment-tab.active {
    color: var(--navy-deep);
    background: var(--yellow);
}

.payment-tab:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.embedded-payment-panel {
    display: none;
}

.embedded-payment-panel.active {
    display: block;
}

.card-form-shell {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.paypal-card-field {
    min-height: 52px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
}

.card-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.notice-box {
    color: var(--danger);
    background: #fff0f1;
    border-color: rgba(165, 45, 53, 0.2);
    font-weight: 800;
}

.loader {
    width: 52px;
    height: 52px;
    margin: 24px 0 8px;
    border: 5px solid rgba(13, 71, 119, 0.15);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 900px) {
    .page-shell,
    .narrow-shell {
        width: min(100% - 32px, 720px);
        padding-top: 28px;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 46px 34px;
    }

    .hero > div:first-child > p {
        font-size: 0.98rem;
    }

    .timer-box {
        min-height: 0;
    }

    .packages-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-card,
    .payment-card {
        padding: 34px;
    }

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

@media (max-width: 620px) {
    body::before {
        height: 6px;
    }

    .page-shell,
    .narrow-shell {
        width: min(100% - 20px, 540px);
        padding: 16px 0 54px;
    }

    .hero {
        padding: 34px 23px;
        background-position: 58% center;
    }

    .hero::after {
        background: linear-gradient(0deg, rgba(4, 29, 51, 0.98), rgba(4, 29, 51, 0.7));
    }

    h1 {
        font-size: clamp(3.55rem, 18vw, 5rem);
    }

    h2 {
        font-size: clamp(2.65rem, 13vw, 3.8rem);
    }

    .packages-grid,
    .form-grid,
    .payment-options-grid,
    .payment-tabs,
    .card-mini-grid {
        grid-template-columns: 1fr;
    }

    .packages-grid {
        gap: 12px;
        margin: 14px 0;
    }

    .package-card {
        padding: 22px 19px;
    }

    .form-card,
    .payment-card {
        margin-top: 14px;
        padding: 27px 19px;
    }

    .participant-card {
        padding: 22px 17px;
    }

    .participant-header {
        align-items: flex-start;
    }

    .field.full {
        grid-column: auto;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .actions-row {
        align-items: stretch;
        flex-direction: column;
    }

    .actions-row .btn,
    .total-box,
    .payment-card .btn,
    .status-card .btn {
        width: 100%;
    }

    .total-box {
        min-width: 0;
    }

    .status-card {
        padding: 30px 20px;
    }

    .status-card h1,
    .payment-choice-card h1 {
        font-size: clamp(2.8rem, 15vw, 4.2rem);
    }
}

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