:root {
    --navy-950: #071526;
    --navy-900: #0f2747;
    --navy-800: #163b69;
    --blue-600: #2c6bc2;
    --blue-500: #3d82df;
    --gold-500: #d9a441;
    --gold-300: #f0cf85;
    --slate-900: #0f172a;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --danger: #b42318;
    --danger-soft: #fff1f0;
    --success: #087443;
    --success-soft: #ecfdf3;
    --warning: #9a3412;
    --warning-soft: #fff7ed;
    --shadow-xl: 0 30px 80px rgba(7, 21, 38, 0.16);
    --shadow-md: 0 12px 30px rgba(15, 39, 71, 0.09);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--slate-900);
    background:
        radial-gradient(circle at 12% 8%, rgba(61, 130, 223, 0.13), transparent 32rem),
        linear-gradient(160deg, #f8fbff 0%, #eef4fb 48%, #f8fafc 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

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

button {
    -webkit-tap-highlight-color: transparent;
}

[hidden] {
    display: none !important;
}

.ambient {
    position: fixed;
    z-index: -1;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    filter: blur(3px);
    opacity: 0.32;
    pointer-events: none;
}

.ambient-one {
    top: -15rem;
    right: -10rem;
    background: radial-gradient(circle, rgba(44, 107, 194, 0.42), transparent 68%);
}

.ambient-two {
    bottom: -20rem;
    left: -15rem;
    background: radial-gradient(circle, rgba(217, 164, 65, 0.30), transparent 68%);
}

.page-shell {
    width: min(100% - 32px, 980px);
    margin: 0 auto;
    padding: 44px 0 30px;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 22px;
    align-items: center;
    margin-bottom: 24px;
    padding: 30px 32px;
    overflow: hidden;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(125deg, rgba(255, 255, 255, 0.08), transparent 44%),
        linear-gradient(135deg, var(--navy-950), var(--navy-800));
    box-shadow: var(--shadow-xl);
}

.hero::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    right: -150px;
    bottom: -220px;
    border: 46px solid rgba(217, 164, 65, 0.14);
    border-radius: 50%;
}

.brand-mark {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.19), rgba(255, 255, 255, 0.06));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.brand-mark span {
    color: var(--gold-300);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 47px;
    font-weight: 700;
    line-height: 1;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--gold-300);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.hero h1 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.65rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.hero-copy {
    max-width: 720px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.98rem;
}

.form-card,
.notice {
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.form-card {
    padding: 8px 34px 34px;
}

.form-section {
    padding: 32px 0;
    border-bottom: 1px solid var(--slate-200);
}

.form-section:last-of-type {
    border-bottom: 0;
}

.section-heading {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 22px;
}

.step {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    color: var(--navy-900);
    border: 1px solid #e7ca8c;
    border-radius: 13px;
    background: linear-gradient(145deg, #fff8e8, #f8e3b1);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.section-heading h2 {
    margin: 0;
    color: var(--navy-900);
    font-size: 1.18rem;
    line-height: 1.2;
}

.section-heading p {
    margin: 5px 0 0;
    color: var(--slate-500);
    font-size: 0.9rem;
}

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

.field {
    position: relative;
    min-width: 0;
}

.field.span-2 {
    grid-column: span 2;
}

.field label {
    display: inline-block;
    margin: 0 0 8px;
    color: var(--slate-700);
    font-size: 0.86rem;
    font-weight: 750;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 52px;
    color: var(--slate-900);
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    outline: none;
    background: #fbfdff;
    padding: 13px 15px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.field textarea {
    min-height: 116px;
    resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: #a8bad0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--blue-500);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(61, 130, 223, 0.13);
}

.field input.invalid,
.field select.invalid,
.field textarea.invalid {
    border-color: var(--danger);
    background: #fffafa;
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.08);
}

.field input::placeholder,
.field textarea::placeholder {
    color: #94a3b8;
}

.field-help {
    display: block;
    margin-top: 7px;
    color: var(--slate-500);
    font-size: 0.78rem;
}

.field-error {
    display: block;
    min-height: 1px;
    margin-top: 7px;
    color: var(--danger);
    font-size: 0.78rem;
    font-weight: 650;
}

.counter {
    position: absolute;
    right: 13px;
    bottom: 10px;
    color: var(--slate-500);
    font-size: 0.72rem;
    pointer-events: none;
}

.weekday-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.weekday-fieldset legend {
    margin: 0 0 5px;
    padding: 0;
    color: var(--slate-700);
    font-size: 0.86rem;
    font-weight: 750;
}

.weekday-intro {
    margin: 0 0 13px;
    color: var(--slate-500);
    font-size: 0.82rem;
}

.weekday-picker {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.weekday-option {
    position: relative;
    display: flex;
    min-height: 92px;
    margin: 0;
    padding: 13px 8px 12px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    text-align: center;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    background: #fbfdff;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
    -webkit-tap-highlight-color: transparent;
}

.weekday-option:hover {
    border-color: #8ca9ca;
    transform: translateY(-1px);
}

.weekday-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.weekday-option:focus-within {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(61, 130, 223, 0.13);
}

.weekday-option.selected {
    color: var(--navy-900);
    border-color: var(--blue-500);
    background: linear-gradient(145deg, rgba(61, 130, 223, 0.12), rgba(217, 164, 65, 0.09)), #ffffff;
    box-shadow: 0 8px 20px rgba(44, 107, 194, 0.10);
}

.weekday-short {
    color: var(--blue-600);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.11em;
}

.weekday-option strong {
    font-size: 0.86rem;
    line-height: 1.15;
}

.weekday-check {
    position: absolute;
    top: 7px;
    right: 8px;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: #ffffff;
    border-radius: 50%;
    background: var(--blue-600);
    font-size: 0.72rem;
    font-weight: 900;
    opacity: 0;
    transform: scale(0.65);
    transition: opacity 140ms ease, transform 140ms ease;
}

.weekday-option.selected .weekday-check {
    opacity: 1;
    transform: scale(1);
}

.weekday-fieldset.invalid .weekday-picker {
    padding: 5px;
    margin: -5px;
    border-radius: calc(var(--radius-md) + 4px);
    box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.18);
}

.weekday-meta {
    margin-top: 3px;
}

.upload-panel {
    padding: 22px;
    border: 1px dashed #9bb3cf;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(61, 130, 223, 0.05), rgba(217, 164, 65, 0.05)),
        #fbfdff;
}

.hidden-file-inputs {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.upload-button,
.text-button,
.submit-button,
.secondary-button,
.confirm-button {
    cursor: pointer;
    border: 0;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 18px;
    color: var(--navy-900);
    border: 1px solid #b9c8da;
    border-radius: 13px;
    background: var(--white);
    font-weight: 800;
    box-shadow: 0 5px 14px rgba(15, 39, 71, 0.07);
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.upload-button.primary {
    color: var(--white);
    border-color: var(--blue-600);
    background: linear-gradient(135deg, var(--blue-600), var(--navy-800));
}

.upload-button:hover,
.upload-button:focus-visible {
    transform: translateY(-1px);
    border-color: var(--blue-500);
    box-shadow: 0 8px 18px rgba(15, 39, 71, 0.12);
}

.upload-guidance {
    margin-top: 15px;
    color: var(--slate-500);
    font-size: 0.8rem;
}

.photo-status {
    margin-top: 16px;
    color: var(--slate-700);
    font-size: 0.88rem;
    font-weight: 700;
}

.photo-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    background: var(--slate-100);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item span {
    position: absolute;
    right: 6px;
    bottom: 6px;
    max-width: calc(100% - 12px);
    overflow: hidden;
    padding: 3px 6px;
    color: var(--white);
    border-radius: 7px;
    background: rgba(7, 21, 38, 0.75);
    font-size: 0.65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(6px);
}

.text-button {
    margin-top: 13px;
    padding: 0;
    color: var(--danger);
    background: transparent;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.privacy-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 8px 0 24px;
    padding: 14px 16px;
    color: var(--slate-600);
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    background: var(--slate-100);
    font-size: 0.82rem;
}

.privacy-note p {
    margin: 0;
}

.privacy-icon {
    color: var(--gold-500);
    font-size: 0.78rem;
    transform: translateY(3px) rotate(45deg);
}

.submit-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 58px;
    padding: 0 21px 0 24px;
    color: var(--white);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--navy-900), var(--blue-600));
    font-size: 1rem;
    font-weight: 850;
    box-shadow: 0 13px 28px rgba(15, 39, 71, 0.25);
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(15, 39, 71, 0.31);
}

.submit-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.submit-arrow {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.15rem;
}

.notice {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 20px;
    padding: 20px;
}

.notice.success {
    border-color: #a8e0c6;
    background: var(--success-soft);
}

.notice.warning {
    border-color: #fed7aa;
    background: var(--warning-soft);
}

.notice.error {
    border-color: #f3b8b3;
    background: var(--danger-soft);
}

.notice-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--white);
    border-radius: 50%;
    background: var(--success);
    font-weight: 900;
}

.notice.warning .notice-icon {
    background: var(--warning);
}

.notice.error .notice-icon {
    background: var(--danger);
}

.notice h2 {
    margin: 1px 0 4px;
    font-size: 1rem;
}

.notice p,
.notice ul {
    margin: 0;
    color: var(--slate-700);
    font-size: 0.88rem;
}

.notice ul {
    padding-left: 18px;
}

.protocol-label {
    margin-top: 12px !important;
    color: var(--slate-500) !important;
    font-size: 0.72rem !important;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.protocol-value {
    display: inline-block;
    margin-top: 3px;
    color: var(--navy-900);
    font-size: 1.05rem;
    letter-spacing: 0.05em;
}

.page-footer {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    padding: 24px 0 4px;
    color: var(--slate-500);
    font-size: 0.76rem;
    text-align: center;
}

.page-footer strong {
    color: var(--navy-900);
    letter-spacing: 0.08em;
}

.honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 21, 38, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 30px 90px rgba(7, 21, 38, 0.42);
    text-align: center;
    animation: modalIn 180ms ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 15px;
    color: var(--white);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--blue-500), var(--navy-900));
    font-size: 1.2rem;
    font-weight: 900;
}

.modal-card h2 {
    margin: 0;
    color: var(--navy-900);
    font-size: 1.35rem;
}

.modal-card p {
    margin: 10px 0;
    color: var(--slate-600);
}

.confirmed-email {
    display: block;
    max-width: 100%;
    margin: 14px 0;
    overflow-wrap: anywhere;
    padding: 13px;
    color: var(--navy-900);
    border: 1px solid #b8cbea;
    border-radius: 12px;
    background: #f4f8ff;
    font-size: 1rem;
}

.modal-help {
    font-size: 0.82rem;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 22px;
}

.secondary-button,
.confirm-button {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 13px;
    font-weight: 800;
}

.secondary-button {
    color: var(--slate-700);
    border: 1px solid var(--slate-300);
    background: var(--white);
}

.confirm-button {
    color: var(--white);
    background: linear-gradient(135deg, var(--navy-900), var(--blue-600));
}

.sending-overlay {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--white);
    background: rgba(7, 21, 38, 0.9);
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sending-overlay span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
}

.spinner {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--gold-300);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

body.modal-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 20px, 980px);
        padding-top: 15px;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 23px 21px;
        border-radius: 23px;
    }

    .brand-mark {
        width: 58px;
        height: 58px;
        border-radius: 17px;
    }

    .brand-mark span {
        font-size: 37px;
    }

    .hero-copy {
        font-size: 0.9rem;
    }

    .form-card {
        padding: 4px 18px 24px;
        border-radius: 23px;
    }

    .form-section {
        padding: 26px 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .field.span-2 {
        grid-column: auto;
    }

    .weekday-picker {
        grid-template-columns: repeat(5, minmax(72px, 1fr));
        overflow-x: auto;
        padding: 3px 2px 8px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .weekday-option {
        min-height: 86px;
        scroll-snap-align: start;
    }

    .photo-preview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .upload-panel {
        padding: 17px;
    }

    .upload-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .upload-button {
        min-width: 0;
        padding: 0 12px;
    }

    .modal-card {
        padding: 25px 20px;
    }

    .modal-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .section-heading {
        gap: 11px;
    }

    .step {
        width: 38px;
        height: 38px;
    }

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

    .upload-actions {
        grid-template-columns: 1fr;
    }
}

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