* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
}

.video-container {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.thank-you-page {
    justify-content: center;
}

.thank-you-card {
    position: relative;
    z-index: 3;
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.thank-you-card h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.thank-you-card p {
    color: #555;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.thank-you-note {
    color: #333;
    font-weight: 500;
}

.thank-you-button {
    display: inline-block;
    text-decoration: none;
    margin-top: 0.5rem;
}

#background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 1;
    object-fit: cover;
    pointer-events: none;
}

#background-video::-webkit-media-controls {
    display: none !important;
}

#background-video::-webkit-media-controls-enclosure {
    display: none !important;
}

.sound-toggle {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(8px);
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.sound-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.sound-toggle-icon {
    display: inline-flex;
}

.sound-toggle .sound-on {
    display: none;
}

.sound-toggle.is-unmuted .sound-on {
    display: inline-flex;
}

.sound-toggle.is-unmuted .sound-off {
    display: none;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.school-header {
    position: absolute;
    top: max(3rem, calc(3rem + env(safe-area-inset-top, 0)));
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeInUpCentered 1.5s ease-out;
    will-change: opacity;
}

.school-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(1px 1px 4px rgba(0, 0, 0, 0.5));
}

.school-name-container {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.8rem;
    justify-content: center;
}

.school-name {
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.2;
}

.school-location {
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 400;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    margin: 0;
    line-height: 1.2;
}

.punchline {
    position: absolute;
    right: 3rem;
    bottom: 20%;
    z-index: 3;
    color: white;
    animation: fadeInUp 1.5s ease-out;
    text-align: right;
}

.tagline-bold {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
    letter-spacing: 0.5px;
    margin: 0;
    margin-bottom: 0.5rem;
    white-space: nowrap;
}

.opening-date {
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
    letter-spacing: 0.5px;
    margin: 0;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.form-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    padding: 0.9rem 2.5rem;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
}

.form-link:hover {
    background: white;
    color: #0014A8;
    border-color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.form-section {
    min-height: 100vh;
    background: #0014A8; /* Fallback color */
    background: radial-gradient(circle at center, #0014A8 0%, #000050 100%);
    padding: 5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-container {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
}

.form-container h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    text-align: center;
}

.form-container > p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.form-disclaimer {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-right: 2px solid #ffc107;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.form-disclaimer p {
    margin: 0;
    color: #856404;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
}

.form-disclaimer strong {
    color: #664d03;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-group:last-of-type {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid #0014A8;
    outline-offset: 2px;
    border-color: #0014A8;
}

.form-group input:invalid:not(:focus):not(:placeholder-shown),
.form-group textarea:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #d32f2f;
}

.required-indicator {
    color: #d32f2f;
    font-weight: 600;
}

.help-text {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.4rem;
    font-style: normal;
    line-height: 1.4;
}

.error-message {
    display: block;
    color: #d32f2f;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    min-height: 1.2rem;
}

.checkbox-group {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 400;
    line-height: 1.6;
    color: #333;
}

.checkbox-label span {
    flex: 1;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:focus {
    outline: 2px solid #0014A8;
    outline-offset: 2px;
}

.privacy-note {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #555;
    line-height: 1.6;
}

.privacy-note a {
    color: #0014A8;
    text-decoration: underline;
}

.privacy-note a:hover {
    color: #0020C8;
}

.form-status {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    min-height: 1.5rem;
    display: none;
}

.form-status:not(:empty) {
    display: block;
}

.form-status.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.form-status.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

.submit-button {
    position: relative;
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.button-loading {
    display: none;
}

.submit-button.loading .button-text {
    display: none;
}

.submit-button.loading .button-loading {
    display: inline;
}

.submit-button .button-text {
    display: inline;
}

.submit-button {
    width: 100%;
    padding: 1.2rem;
    background: #0014A8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 1rem;
}

.submit-button.state-default:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 20, 168, 0.4);
    background: #0020C8;
}

.submit-button.state-default:active {
    transform: translateY(0);
}

.submit-button.state-submitting {
    background: #3b4fd6;
    box-shadow: 0 6px 16px rgba(59, 79, 214, 0.35);
}

.submit-button.state-success {
    background: #1f8f4a;
    box-shadow: 0 6px 16px rgba(31, 143, 74, 0.35);
}

.submit-button.state-error {
    background: #b00020;
    box-shadow: 0 6px 16px rgba(176, 0, 32, 0.35);
}

.form-note {
    margin-top: 1.5rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.direct-link {
    color: #0014A8;
    text-decoration: none;
    font-weight: 500;
}

.direct-link:hover {
    text-decoration: underline;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUpCentered {
    from {
        opacity: 0;
        transform: translate(-50%, 30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .school-header {
        top: 2rem;
        gap: 1rem;
        width: 100%;
        padding: 0 1rem;
    }
    
    .school-logo {
        height: 45px;
    }
    
    .school-name {
        font-size: 1.8rem;
        font-weight: 700;
        letter-spacing: 1px;
    }
    
    .school-location {
        font-size: 1.6rem;
        font-weight: 400;
        letter-spacing: 2px;
    }
    
    .form-link {
        font-size: 0.95rem;
        padding: 0.7rem 1.8rem;
        font-weight: 600;
    }
    
    .tagline-bold {
        font-size: clamp(0.85rem, 4vw, 1.2rem);
        text-align: center;
        white-space: nowrap;
    }
    
    .opening-date {
        font-size: 1rem;
        margin-bottom: 1.2rem;
        text-align: center;
    }
    
    .punchline {
        left: 50%;
        right: auto;
        bottom: max(1.5rem, calc(1.5rem + env(safe-area-inset-bottom, 0)));
        transform: translateX(-50%);
        text-align: center;
        width: 90%;
        max-width: 400px;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    
    .form-container {
        padding: 2rem 1.5rem;
    }
    
    .form-container h2 {
        font-size: 2rem;
    }
    
    .thank-you-card {
        padding: 2rem 1.5rem;
    }
    
    .thank-you-card h2 {
        font-size: 1.9rem;
    }
    
    .form-disclaimer {
        padding: 1rem 1.25rem;
        background: #fff3cd;
        border-left: 4px solid #ffc107;
        border-right: 2px solid #ffc107;
        box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    }
    
    .form-disclaimer p {
        font-size: 0.9rem;
        color: #856404;
    }
    
    .form-disclaimer strong {
        color: #664d03;
    }

    .sound-toggle {
        bottom: 1.5rem;
        left: 1.5rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .school-header {
        top: 1.5rem;
        gap: 0.8rem;
        width: 100%;
        padding: 0 1rem;
    }
    
    .school-logo {
        height: 35px;
    }
    
    .school-name-container {
        flex-direction: row;
        align-items: baseline;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .school-name {
        font-size: clamp(1.2rem, 4vw, 1.5rem);
        font-weight: 700;
        letter-spacing: 1px;
    }
    
    .school-location {
        font-size: clamp(1rem, 3.5vw, 1.3rem);
        font-weight: 400;
        letter-spacing: 1.5px;
    }
    
    .form-link {
        font-size: clamp(0.75rem, 3vw, 0.85rem);
        padding: 0.6rem 1.5rem;
        font-weight: 600;
        width: auto;
        display: inline-block;
    }
    
    .tagline-bold {
        font-size: clamp(0.75rem, 3.5vw, 1rem);
        text-align: center;
        white-space: nowrap;
    }
    
    .opening-date {
        font-size: clamp(0.9rem, 4vw, 1rem);
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .punchline {
        left: 50%;
        right: auto;
        bottom: max(1rem, calc(1rem + env(safe-area-inset-bottom, 0)));
        transform: translateX(-50%);
        text-align: center;
        width: 90%;
        max-width: 350px;
        padding-bottom: env(safe-area-inset-bottom, 0);
        margin-bottom: 0;
    }
    
    .form-link {
        margin-top: 0.5rem;
    }

    .sound-toggle {
        bottom: 1rem;
        left: 1rem;
        width: 38px;
        height: 38px;
    }
    
    .thank-you-card {
        padding: 1.75rem 1.25rem;
    }
    
    .thank-you-card h2 {
        font-size: 1.7rem;
    }
    
    .thank-you-card p {
        font-size: 0.95rem;
    }
    
    .form-disclaimer {
        background: #fff3cd;
        border-left: 4px solid #ffc107;
        border-right: 2px solid #ffc107;
        padding: 1rem;
        box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    }
    
    .form-disclaimer p {
        font-size: 0.85rem;
        color: #856404;
        line-height: 1.5;
    }
    
    .form-disclaimer strong {
        color: #664d03;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

