@font-face {
    font-family: 'Homenaje';
    src: url('Homenaje-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: #000000;
    color: white;
    font-family: 'Georgia', serif;
}

/* Fade sequence overlay */
.fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

.fade-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('background2.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
}

.fade-overlay.fade-in .fade-background {
    animation: fadeIn 2s ease-in forwards;
}

.fade-overlay.fade-out .fade-background {
    animation: fadeOut 1s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Homepage content (hidden initially) */
.homepage {
    min-height: 100vh;
    width: 100%;
    background: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.homepage.visible {
    opacity: 1;
}

/* Logo container - centered at top, touching viewport border */
.logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    padding-top: 0;
    margin-bottom: 1rem;
}

.logo {
    max-width: 90%;
    height: auto;
    object-fit: contain;
    max-height: 15vh;
}

/* Copy container - centered under logo */
.copy-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    margin-bottom: 2rem;
    margin-top: 0;
}

/* Shaping container - centered below text */
.shaping-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    margin-bottom: 2rem;
}

.shaping {
    max-width: 90%;
    height: auto;
    object-fit: contain;
    max-height: 7.5vh;
}

.copy-content {
    max-width: 800px;
    text-align: center;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Homenaje', sans-serif;
}

.copy-content p {
    margin-bottom: 1.5rem;
    font-size: 1.375rem;
    opacity: 0;
}

@keyframes fadeInText {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.copy-content p:last-child {
    margin-bottom: 0;
}

.cta-container {
    margin-top: 3rem;
    text-align: center;
    opacity: 0;
    animation: fadeInText 1s ease-in forwards;
}

.cta-container.fade-in {
    animation: fadeInText 1s ease-in forwards;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #5d7cff, #4aa3ff);
    color: #02060f;
    text-decoration: none;
    border-radius: 6px;
    font-family: 'Homenaje', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.cta-button:active {
    transform: translateY(0);
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .logo {
        max-height: 12.5vh;
    }
    
    .shaping {
        max-height: 6.25vh;
    }
    
    .logo-container {
        padding: 0 1rem;
        margin-bottom: 0.5rem;
    }
    
    .shaping-container {
        margin-bottom: 1.5rem;
    }
    
    .copy-container {
        padding: 0 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .copy-content {
        max-width: 100%;
    }
    
    .copy-content p {
        font-size: 1.25rem;
        margin-bottom: 1.2rem;
    }
}

@media (max-width: 480px) {
    .logo {
        max-height: 10vh;
    }
    
    .shaping {
        max-height: 5vh;
    }
    
    .copy-container {
        padding: 0 1rem;
        margin-bottom: 1rem;
    }
    
    .copy-content p {
        font-size: 1.1875rem;
        margin-bottom: 1rem;
        line-height: 1.6;
    }
}

/* Auto-resize handling */
@media (orientation: portrait) {
    .logo {
        max-width: 85%;
    }
    
    .shaping {
        max-width: 85%;
    }
}

@media (orientation: landscape) {
    .logo {
        max-height: 20vh;
    }
    
    .shaping {
        max-height: 6.875vh;
    }
}

/* Application Form Styles */
.application-page {
    min-height: 100vh;
    width: 100%;
    background: #000000;
    padding: 2rem 1rem;
    font-family: 'Homenaje', sans-serif;
    color: rgba(255, 255, 255, 0.9);
}

.application-container {
    max-width: 800px;
    margin: 0 auto;
}

.application-header {
    text-align: center;
    margin-bottom: 3rem;
}

.application-header h1 {
    font-size: 2.5rem;
    margin: 1rem 0;
    letter-spacing: 0.02em;
}

.back-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: rgba(255, 255, 255, 1);
}

.application-form {
    width: 100%;
}

.form-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.form-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.section-note {
    font-size: 1rem;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: normal;
}

.required {
    color: #ff6b6b;
}

.helper-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
    font-style: italic;
}

/* Color "optional" text in yellow */
.optional-text {
    color: #ffd700 !important;
}

/* Color "critical" text in red */
.critical-text {
    color: #ff6b6b !important;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    font-family: 'Homenaje', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    cursor: pointer;
}

/* Length Selector Styles */
.length-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.length-arrow {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    font-family: 'Homenaje', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.length-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.length-arrow:active {
    transform: scale(0.95);
}

.length-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.length-input {
    width: 80px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    font-family: 'Homenaje', sans-serif;
    padding: 0;
    cursor: default;
}

.length-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.length-label {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Homenaje', sans-serif;
}

.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    margin-right: 0.75rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: rgba(255, 255, 255, 0.8);
}

.word-count {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
}

.form-submit {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.submit-btn {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #5d7cff, #4aa3ff);
    color: #02060f;
    border: none;
    border-radius: 6px;
    font-family: 'Homenaje', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.submit-btn:active {
    transform: translateY(0);
}

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

.form-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* URL Input Container Styles */
.url-input-container {
    margin-bottom: 0.5rem;
}

.url-input-wrapper {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.url-input-wrapper .url-input {
    flex: 1;
}

.remove-url-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.4);
    border-radius: 4px;
    color: #ff6b6b;
    font-family: 'Homenaje', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
}

.remove-url-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.6);
}

.add-url-btn {
    padding: 0.6rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    font-family: 'Homenaje', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease;
    margin-top: 0.5rem;
}

.add-url-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.success-message {
    text-align: center;
    padding: 3rem 1rem;
}

.success-message h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.success-message p {
    font-size: 1.375rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Responsive adjustments for form */
@media (max-width: 768px) {
    .application-header h1 {
        font-size: 2rem;
    }
    
    .form-section h2 {
        font-size: 1.5rem;
    }
    
    .form-group label {
        font-size: 1rem;
    }
    
    .application-page {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .application-header h1 {
        font-size: 1.75rem;
    }
    
    .form-section h2 {
        font-size: 1.3rem;
    }
    
    .submit-btn {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
}
