/* ============================================================
   Control Apuesta — Landing Page Styles
   Green finance + Modern government design
   ============================================================ */

:root {
    --primary: #1B6B3A;
    --primary-dark: #0E4525;
    --primary-light: #27864D;
    --accent: #2E9B5B;
    --accent-glow: #34D874;
    --gold: #D4A017;
    --gold-light: #F0D060;
    --surface: #FAFDF8;
    --surface-alt: #F0F7F2;
    --card-bg: #FFFFFF;
    --text: #1A2E23;
    --text-secondary: #4A6B55;
    --text-muted: #7A9B88;
    --border: #C8DDD0;
    --border-light: #E2EDE7;
    --error: #D32F2F;
    --error-bg: #FDECEA;
    --success: #2E7D32;
    --success-bg: #E8F5E9;
    --warning: #F57C00;
    --warning-bg: #FFF3E0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.05);
    --shadow-glow: 0 0 30px rgba(46,155,91,0.15);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    background: var(--surface);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ── Top Banner ─────────────────────────────────────────────── */
.top-banner {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.85);
    text-align: center;
    padding: 6px 16px;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-shield {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(27,107,58,0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.header-badge {
    margin-left: auto;
    background: var(--success-bg);
    color: var(--success);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ── Hero Section ───────────────────────────────────────────── */
.hero {
    background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 40%, var(--primary-light) 100%);
    color: #fff;
    padding: 80px 24px 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--surface), transparent);
    pointer-events: none;
}

.hero-inner {
    max-width: 780px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.hero-flag {
    display: inline-flex;
    gap: 0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-flag span {
    display: block;
    height: 6px;
}

.flag-yellow { background: #FCD116; width: 48px; }
.flag-blue   { background: #003893; width: 24px; }
.flag-red    { background: #CE1126; width: 24px; }

.hero-label {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.95);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 18px;
    border-radius: 100px;
    margin-bottom: 28px;
    max-width: 100%;
    word-wrap: break-word;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.hero h1 .highlight {
    color: var(--gold-light);
}

.hero-desc {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.7;
    color: rgba(255,255,255,0.88);
    max-width: 640px;
    margin: 0 auto 40px;
}

.hero-guarantee {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 24px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
    letter-spacing: 0.01em;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 16px 40px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #1A1A1A;
    box-shadow: 0 4px 20px rgba(212,160,23,0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212,160,23,0.45);
}

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

/* ── Hero CTA Pulse Animation ──────────────────────────────── */
.hero .btn-primary {
    animation: ctaPulse 2.5s ease-in-out infinite;
    font-size: 1.15rem;
    padding: 18px 48px;
}

.hero .btn-primary:hover {
    animation: none;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 36px rgba(212,160,23,0.5);
}

@keyframes ctaPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(212,160,23,0.35);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 6px 32px rgba(212,160,23,0.55), 0 0 0 8px rgba(212,160,23,0.1);
        transform: translateY(-2px);
    }
}

/* ── CTA section button pulse ──────────────────────────────── */
.cta-section .btn-primary {
    animation: ctaPulse 2.5s ease-in-out infinite;
}

.cta-section .btn-primary:hover {
    animation: none;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 4px 20px rgba(27,107,58,0.3);
    padding: 18px 40px;
    font-size: 1.1rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(27,107,58,0.4);
}

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

.btn-secondary {
    background: var(--card-bg);
    color: var(--primary);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--surface-alt);
}

.btn .arrow {
    transition: transform var(--transition);
}

.btn:hover .arrow {
    transform: translateX(4px);
}

/* ── Features Grid ──────────────────────────────────────────── */
.features {
    max-width: 1140px;
    margin: -40px auto 0;
    padding: 0 24px 60px;
    position: relative;
    z-index: 2;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
}

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

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ── Info Sections ──────────────────────────────────────────── */
.info-section {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.info-block {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.info-block h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-block h2 .icon-circle {
    width: 36px;
    height: 36px;
    background: var(--surface-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.steps-list {
    list-style: none;
    counter-reset: steps;
}

.steps-list li {
    counter-increment: steps;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.steps-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.steps-list li::before {
    content: counter(steps);
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.steps-list li strong {
    color: var(--primary-dark);
}

/* ── Disclaimer Banner ──────────────────────────────────────── */
.disclaimer-banner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.disclaimer-inner {
    background: var(--warning-bg);
    border: 1px solid #FFE0B2;
    border-left: 4px solid var(--warning);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.disclaimer-inner .warn-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.disclaimer-inner p {
    font-size: 0.9rem;
    color: #5D4037;
    line-height: 1.6;
}

.disclaimer-inner strong {
    color: #BF360C;
}

/* ── CTA Section ────────────────────────────────────────────── */
.cta-section {
    text-align: center;
    padding: 60px 24px 80px;
    background: var(--surface-alt);
    border-top: 1px solid var(--border-light);
}

.cta-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.05rem;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.65);
    padding: 32px 24px;
    margin-top: auto;
    text-align: center;
}

.footer-inner {
    max-width: 1140px;
    margin: 0 auto;
}

.footer-inner p {
    font-size: 0.8rem;
    line-height: 1.7;
    margin-bottom: 4px;
}

.footer-inner .footer-sep {
    width: 40px;
    height: 2px;
    background: rgba(255,255,255,0.15);
    margin: 12px auto;
    border-radius: 1px;
}

/* ══════════════════════════════════════════════════════════════
   PAGE 2 — Registration Form
   ══════════════════════════════════════════════════════════════ */

.form-hero {
    background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    padding: 48px 24px;
    text-align: center;
}

.form-hero h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 10px;
}

.form-hero-guarantee {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 20px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.form-hero p {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto;
    overflow-wrap: break-word;
}

/* ── Form Container ─────────────────────────────────────────── */
.form-section {
    max-width: 720px;
    margin: -32px auto 60px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.form-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.form-progress {
    display: flex;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border-light);
}

.progress-step {
    flex: 1;
    text-align: center;
    padding: 14px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    transition: all var(--transition);
}

.progress-step.active {
    color: var(--primary);
    background: rgba(27,107,58,0.05);
}

.progress-step.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.progress-step.completed {
    color: var(--accent);
}

.progress-step .step-num {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    background: var(--border);
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    margin-right: 6px;
    vertical-align: middle;
    transition: all var(--transition);
}

.progress-step.active .step-num {
    background: var(--primary);
}

.progress-step.completed .step-num {
    background: var(--accent);
}

/* ── Form Body ──────────────────────────────────────────────── */
.form-body {
    padding: 36px 32px 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-group label .required {
    color: var(--error);
    margin-left: 2px;
}

.form-group label .optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.8rem;
}

.form-group .help-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27,107,58,0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-input.error,
.form-textarea.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(211,47,47,0.08);
}

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

.error-message {
    color: var(--error);
    font-size: 0.78rem;
    margin-top: 5px;
    display: none;
}

.error-message.visible {
    display: block;
}

/* ── File Upload Area ───────────────────────────────────────── */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--surface);
    position: relative;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(27,107,58,0.03);
}

.upload-area.has-files {
    border-color: var(--accent);
    background: var(--success-bg);
}

.upload-area .upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.6;
}

.upload-area .upload-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.upload-area .upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-preview {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.file-tag .remove-file {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
}

/* ── Age Input ──────────────────────────────────────────────── */
.age-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.age-group .form-input {
    width: 120px;
    text-align: center;
    flex-shrink: 0;
}

.age-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 8px 14px;
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

/* ── Security Notice ────────────────────────────────────────── */
.security-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 28px;
}

.security-notice .lock-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.security-notice p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Success / Error States ─────────────────────────────────── */
.form-result {
    display: none;
    text-align: center;
    padding: 48px 32px;
}

.form-result.visible {
    display: block;
}

.result-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.form-result h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.form-result p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto 24px;
}

.form-result.success h2 { color: var(--success); }
.form-result.error h2 { color: var(--error); }

/* ── Form Navigation Buttons ────────────────────────────────── */
.form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.form-nav--end {
    justify-content: flex-end;
}

.form-nav--submit .btn-submit {
    flex: 1;
    min-width: 180px;
}

@media (max-width: 480px) {
    .form-nav {
        flex-direction: column-reverse;
        gap: 10px;
    }
    .form-nav .btn {
        width: 100%;
    }
    .form-nav--submit .btn-submit {
        min-width: auto;
    }
}

/* ── Loading Spinner ────────────────────────────────────────── */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ── Upload Warning & Progress Bar ─────────────────────────── */
.upload-warning {
    display: none;
    margin-top: 16px;
    padding: 14px 20px;
    background: #FFF8E1;
    border: 1px solid #FFD54F;
    border-left: 4px solid #FFA000;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 600;
    color: #E65100;
    text-align: center;
    line-height: 1.5;
}

.upload-warning.visible {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.upload-progress-bar {
    margin-top: 10px;
    height: 6px;
    background: rgba(0,0,0,0.08);
    border-radius: 3px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ── File Attached Badge ───────────────────────────────────── */
.file-attached-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    margin-bottom: 8px;
    background: #E8F5E9;
    border: 1px solid #A5D6A7;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 700;
    color: #2E7D32;
}

/* ── Enhanced File Tags ────────────────────────────────────── */
.file-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 4px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.file-tag-ext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 2px 6px;
    background: var(--primary);
    color: #fff;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.file-tag-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text-primary);
}

.file-tag-size {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.upload-area.has-files {
    border-color: var(--primary);
    background: rgba(46, 125, 50, 0.03);
}

/* ── Entrance Animations (JS-triggered, content visible by default) ── */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

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

.hero-flag.animated         { animation: fadeIn 0.6s ease-out; }
.hero-label.animated        { animation: slideUp 0.7s ease-out; }
.hero h1.animated           { animation: slideUp 0.8s ease-out; }
.hero-desc.animated         { animation: slideUp 0.8s ease-out; }
.hero .btn-primary.animated { animation: slideUp 0.7s ease-out, ctaPulse 2.5s ease-in-out 1s infinite; }

.feature-card.animated { animation: slideUp 0.6s ease-out; }
.feature-card.animated:nth-child(2) { animation-delay: 0.08s; }
.feature-card.animated:nth-child(3) { animation-delay: 0.16s; }
.feature-card.animated:nth-child(4) { animation-delay: 0.24s; }

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

/* ── Touch & Mobile Optimization ────────────────────────────── */
@media (pointer: coarse) {
    .btn { min-height: 48px; }
    .form-input, .form-textarea, .form-select { min-height: 48px; font-size: 16px; }
    .upload-area { padding: 32px 16px; }
    .feature-card:hover { transform: none; }
}

/* ── Tablet landscape (1024px) ──────────────────────────────── */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .info-block { padding: 32px 28px; }
}

/* ── Tablet portrait / small tablets (768px) ────────────────── */
@media (max-width: 768px) {
    .hero { padding: 48px 20px 64px; }
    .hero-desc { font-size: 0.95rem; margin-bottom: 32px; }
    .features { margin-top: -28px; padding-bottom: 40px; }
    .features-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .feature-card { padding: 20px 16px; }
    .feature-icon { width: 48px; height: 48px; font-size: 1.3rem; }
    .info-block { padding: 24px 20px; }
    .info-block h2 { font-size: 1.25rem; }
    .info-section { padding-bottom: 40px; }
    .disclaimer-banner { padding-bottom: 40px; }
    .form-body { padding: 24px 20px 28px; }
    .form-section { margin-bottom: 40px; }
    .header-badge { display: none; }
    .age-group { flex-direction: column; align-items: stretch; }
    .age-group .form-input { width: 100%; }
    .cta-section { padding: 40px 20px 56px; }
    .cta-section h2 { font-size: 1.3rem; }

    .progress-step { font-size: 0.7rem; padding: 10px 6px; }
    .progress-step .step-num { display: none; }

    .security-notice { flex-direction: column; text-align: center; }
    .steps-list li { padding: 12px 0; }
}

/* ── Large phones (600px) ───────────────────────────────────── */
@media (max-width: 600px) {
    .features-grid { grid-template-columns: 1fr; gap: 12px; }
    .hero h1 { font-size: 1.65rem; }
    .hero-label { font-size: 0.68rem; padding: 5px 14px; }
    .form-hero { padding: 36px 16px; }
    .form-hero h1 { font-size: 1.4rem; }
    .form-section { margin-top: -24px; padding: 0 12px; margin-bottom: 32px; }
    .form-card { border-radius: var(--radius-lg); }
    .form-body { padding: 20px 16px 24px; }
    .btn-submit { font-size: 1rem; padding: 16px 24px; }
}

/* ── Small phones (480px) ───────────────────────────────────── */
@media (max-width: 480px) {
    .top-banner { font-size: 0.65rem; padding: 5px 10px; }
    .header-inner { padding: 10px 14px; gap: 10px; }
    .logo-shield { width: 38px; height: 38px; font-size: 1.1rem; }
    .logo-title { font-size: 0.88rem; }
    .logo-subtitle { font-size: 0.58rem; }

    .hero { padding: 36px 16px 56px; }
    .hero h1 { font-size: 1.45rem; line-height: 1.25; }
    .hero-desc { font-size: 0.9rem; line-height: 1.6; }
    .hero-flag { margin-bottom: 16px; }
    .hero-label { margin-bottom: 20px; }
    .hero-guarantee { font-size: 0.72rem; padding: 8px 16px; }
    .form-hero-guarantee { font-size: 0.7rem; padding: 7px 14px; }

    .features { padding: 0 12px 32px; margin-top: -24px; }
    .feature-card { padding: 18px 14px; }
    .feature-card h3 { font-size: 0.92rem; }
    .feature-card p { font-size: 0.82rem; }

    .info-section { padding: 0 12px 32px; }
    .info-block { padding: 20px 16px; border-radius: var(--radius); }
    .info-block h2 { font-size: 1.1rem; gap: 8px; }
    .info-block h2 .icon-circle { width: 30px; height: 30px; font-size: 0.85rem; }

    .steps-list li { gap: 10px; font-size: 0.88rem; }
    .steps-list li::before { width: 28px; height: 28px; font-size: 0.75rem; }

    .disclaimer-banner { padding: 0 12px 32px; }
    .disclaimer-inner { flex-direction: column; gap: 8px; padding: 16px; }

    .cta-section { padding: 32px 16px 48px; }
    .cta-section h2 { font-size: 1.15rem; }
    .cta-section p { font-size: 0.92rem; }

    .btn { padding: 14px 24px; font-size: 0.92rem; }
    .btn-primary { padding: 14px 28px; }

    .form-group label { font-size: 0.84rem; }
    .form-input, .form-textarea { font-size: 16px; padding: 11px 14px; }
    .upload-area { padding: 22px 14px; }
    .upload-area .upload-text { font-size: 0.82rem; }
    .upload-area .upload-hint { font-size: 0.7rem; }
    .upload-warning { font-size: 0.8rem; padding: 12px 14px; }
    .file-attached-badge { font-size: 0.82rem; padding: 8px 12px; }
    .file-tag { font-size: 0.78rem; padding: 7px 10px; }
    .file-tag-ext { min-width: 32px; font-size: 0.62rem; }

    .site-footer { padding: 24px 14px; }
    .footer-inner p { font-size: 0.72rem; }

    .form-result { padding: 36px 20px; }
    .result-icon { font-size: 2.8rem; }
    .form-result h2 { font-size: 1.2rem; }
    .form-result p { font-size: 0.9rem; }
}

/* ── Very small phones (360px) ──────────────────────────────── */
@media (max-width: 360px) {
    .hero h1 { font-size: 1.25rem; }
    .hero { padding: 28px 12px 48px; }
    .logo-text { display: none; }
    .form-body { padding: 16px 12px 20px; }
    .progress-step { font-size: 0.62rem; padding: 8px 4px; }
}

/* ── Landscape phones ───────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
    .hero { padding: 32px 24px 48px; }
    .hero h1 { font-size: 1.5rem; }
    .hero-desc { margin-bottom: 24px; }
    .form-hero { padding: 28px 24px; }
}

/* ── Large screens (1400px+) ────────────────────────────────── */
@media (min-width: 1400px) {
    .hero { padding: 100px 24px 110px; }
    .hero-inner { max-width: 860px; }
    .features-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ══════════════════════════════════════════════════════════════
   LEGAL PAGES — Privacy Policy & Terms
   ══════════════════════════════════════════════════════════════ */

.legal-section {
    max-width: 820px;
    margin: -32px auto 60px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.legal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 48px 44px;
}

.legal-updated {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.legal-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 32px 0 12px;
    padding-top: 8px;
}

.legal-card h2:first-of-type {
    margin-top: 0;
}

.legal-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 12px;
}

.legal-card ul,
.legal-card ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-card li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 6px;
}

.legal-card a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-card a:hover {
    color: var(--primary-dark);
}

.legal-highlight {
    background: var(--warning-bg);
    border: 1px solid #FFE0B2;
    border-left: 4px solid var(--warning);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 16px 0;
}

.legal-highlight p,
.legal-highlight li {
    color: #5D4037;
}

.legal-highlight strong {
    color: #BF360C;
}

.legal-footer-note {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.legal-footer-note p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .legal-card { padding: 32px 24px; }
    .legal-section { margin-bottom: 40px; }
}

@media (max-width: 480px) {
    .legal-card { padding: 24px 16px; border-radius: var(--radius-lg); }
    .legal-section { padding: 0 12px; margin-top: -24px; margin-bottom: 32px; }
    .legal-card h2 { font-size: 1.05rem; }
    .legal-card p, .legal-card li { font-size: 0.85rem; }
    .legal-highlight { padding: 16px; }
}

/* ── Footer Links ──────────────────────────────────────────── */
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-dot {
    color: rgba(255,255,255,0.3);
    font-size: 0.7rem;
}

.footer-resolution {
    font-size: 0.72rem !important;
    color: rgba(255,255,255,0.45) !important;
    margin-bottom: 4px;
}

.footer-email {
    font-size: 0.82rem !important;
    margin-bottom: 10px !important;
}

.footer-email a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: color var(--transition), border-color var(--transition);
}

.footer-email a:hover {
    color: #fff;
    border-color: #fff;
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
    .site-header, .top-banner, .site-footer, .btn { display: none; }
    body { background: #fff; }
    .legal-card { box-shadow: none; border: none; padding: 0; }
}
