/* Local Font Face Definition */
@font-face {
    font-family: 'Playfair Display';
    src: url('../font/PlayfairDisplay-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../font/PlayfairDisplay-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

:root {
    /* A-ROSA Brand Colors */
    --arosa-dune: #EAE5D8;
    --arosa-sand: #F0E1C7;
    --arosa-forest: #5F5B50;
    --arosa-creme: #F3E6DF;
    --arosa-mountains: #E2E6E8;
    --arosa-white: #FFFFFF;
    --arosa-black: #000000;
    --arosa-metallic: #5E5137;
    
    /* Functional colors */
    --arosa-primary: var(--arosa-forest);
    --arosa-primary-hover: #4a463d;
    --arosa-secondary: var(--arosa-sand);
    --arosa-bg-light: var(--arosa-dune);
    --arosa-text: var(--arosa-black);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    color: var(--arosa-text);
    background-color: var(--arosa-white);
    overflow-x: hidden;
    line-height: 1.4;
}

/* Header */
.header-section {
    background-color: var(--arosa-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
    filter: brightness(0) saturate(100%);
}

.logo:hover {
    transform: scale(1.05);
}

/* Hero Section */
.hero-section {
    background-color: var(--arosa-dune);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(240, 225, 199, 0.3) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

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

.min-vh-50 {
    min-height: 50vh;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif !important;
    font-weight: 500 !important;
    color: var(--arosa-text);
    line-height: 1.1;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* Override Bootstrap display-4 */
.display-4 {
    font-family: 'Playfair Display', serif !important;
    font-weight: 500 !important;
}

.hero-content h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: var(--arosa-black);
}

.hero-content .lead {
    color: var(--arosa-text);
    font-weight: 300;
    font-size: 1.1rem;
}

.prize-highlight {
    background-color: var(--arosa-white);
    padding: 30px;
    border-radius: 0;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--arosa-forest);
}

.prize-list {
    list-style: none;
    padding: 0;
}

.prize-list li {
    padding: 10px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.prize-list i {
    color: var(--arosa-forest);
    margin-right: 10px;
    font-size: 1.3rem;
}

/* Form Card */
.form-card {
    background: var(--arosa-white);
    padding: 40px;
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.form-control {
    border: 1px solid var(--arosa-mountains);
    border-radius: 0;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
}

.form-control:focus {
    border-color: var(--arosa-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 107, 60, 0.1);
}

.form-label {
    color: var(--arosa-text);
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.25em;
    border: 2px solid #e0e0e0;
}

.form-check-input:checked {
    background-color: var(--arosa-primary);
    border-color: var(--arosa-primary);
}

.btn-primary {
    background-color: var(--arosa-black);
    border: none;
    border-radius: 0;
    padding: 15px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    background-color: var(--arosa-forest);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover::before {
    left: 100%;
}

/* Features Section */
.features-section {
    background-color: var(--arosa-creme);
}

.feature-card {
    background: var(--arosa-white);
    padding: 40px 30px;
    border-radius: 0;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    color: var(--arosa-forest);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    color: var(--arosa-text);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Footer */
.footer-section {
    background-color: var(--arosa-forest);
    color: var(--arosa-white);
    padding: 30px 0;
    margin-top: 80px;
}

.footer-section a {
    color: var(--arosa-sand);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--arosa-white);
    text-decoration: underline;
}

/* Modal Styling */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background-color: var(--arosa-primary);
    color: white;
    border-radius: 15px 15px 0 0;
    border: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .form-card {
        padding: 30px 20px;
    }
    
    .prize-highlight {
        padding: 20px;
        margin-top: 30px;
    }
    
    .feature-card {
        margin-bottom: 20px;
    }
    
    .logo {
        height: 40px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .btn-primary {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .form-card {
        padding: 25px 15px;
        border-radius: 15px;
    }
}

/* Loading States */
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

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

/* Alert Styling */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-success {
    background-color: var(--arosa-creme);
    color: var(--arosa-text);
    border-left: 4px solid var(--arosa-forest);
    border-radius: 0;
    padding: 30px;
    text-align: center;
}

.alert-success h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    margin-bottom: 15px;
}

.alert-danger {
    background-color: rgba(244, 67, 54, 0.1);
    color: #c62828;
    border-left: 4px solid #f44336;
    border-radius: 0;
    padding: 30px;
    text-align: center;
}

/* Honeypot styling - keep it invisible */
#website {
    position: absolute;
    left: -9999px;
    height: 0;
    width: 0;
    opacity: 0;
}

/* Legal Text */
.legal-text {
    padding: 15px;
    background-color: var(--arosa-mountains);
    border-radius: 0;
    border: 1px solid var(--arosa-mountains);
}

.legal-text a {
    color: var(--arosa-primary);
    text-decoration: underline;
}

.legal-text a:hover {
    color: var(--arosa-primary-hover);
}

/* Quiz Section */
.quiz-section {
    background: var(--arosa-sand);
    border-radius: 0;
    padding: 30px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.quiz-section::before {
    content: '?';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 150px;
    color: rgba(240, 225, 199, 0.3);
    transform: rotate(-15deg);
    font-weight: bold;
}

.quiz-question {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--arosa-text);
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

.quiz-answers {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.quiz-answer {
    background: var(--arosa-white);
    border: 2px solid var(--arosa-mountains);
    border-radius: 0;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    font-weight: 300;
    font-family: 'Open Sans', sans-serif;
}

.quiz-answer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    transition: left 0.5s;
}

.quiz-answer:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--arosa-forest);
    background-color: var(--arosa-creme);
}

.quiz-answer:hover::before {
    left: 100%;
}

.quiz-answer.selected {
    background-color: var(--arosa-forest);
    color: var(--arosa-white);
    border-color: var(--arosa-forest);
    transform: scale(1.05);
}

.quiz-answer.correct {
    background-color: #4caf50;
    color: white;
    border-color: #4caf50;
    animation: correctAnswer 0.6s ease;
}

.quiz-answer.incorrect {
    background-color: #f44336;
    color: white;
    border-color: #f44336;
    animation: shake 0.5s ease;
}

@keyframes correctAnswer {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.quiz-feedback {
    text-align: center;
    margin-top: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quiz-feedback.show {
    opacity: 1;
}

.quiz-feedback.correct {
    color: #4caf50;
}

.quiz-feedback.incorrect {
    color: #f44336;
}

.quiz-icon {
    font-size: 2rem;
    margin-right: 10px;
    vertical-align: middle;
}

/* Disabled state for form when quiz not answered */
.form-section {
    transition: opacity 0.3s ease;
}

.form-section.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Typography Additions */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif !important;
    font-weight: 500 !important;
}

/* Subheadlines should use Open Sans Semibold */
.subheadline {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
}

/* Body text */
p {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    line-height: 1.4;
}

/* Small text and captions */
small {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    font-size: 0.875rem;
    line-height: 1.4;
}

.form-card h2 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    margin-bottom: 30px;
    font-size: 1.5rem;
}