/* RILA --- app.css */

/* 1. Variables & Global Styles */
:root {
    --brand: #5B8DEF;
    --brand-light: rgba(91, 141, 239, 0.15);
    --ink: #000000;
    --ink-secondary: #555;
    --bg: #f9f9f9;
    --bg-secondary-solid: #ffffff;
    --bg-secondary-glass: rgba(255, 255, 255, 0.6);
    --border: rgba(0, 0, 0, 0.1);
    --border-glass: rgba(255, 255, 255, 0.2);
    --success: #28a745;
    --error: #dc3545;

    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #ffffff;
        --ink-secondary: #a0a0a0;
        --bg: #121212;
        --bg-secondary-solid: #1e1e1e;
        --bg-secondary-glass: rgba(30, 30, 30, 0.7);
        --border: rgba(255, 255, 255, 0.1);
        --border-glass: rgba(255, 255, 255, 0.15);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    background-image: linear-gradient(170deg, var(--brand-light) 0%, transparent 30%);
    color: var(--ink);
    margin: 0;
    line-height: 1.6;
    font-size: 1.125rem; /* 18px */
}

/* 2. Layout & Structure */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header, main > section, footer {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    header, main > section, footer {
        padding: 3.5rem 0;
    }
}

/* 3. Typography */
h1, h2, h3 {
    margin: 0 0 1rem 0;
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    color: var(--brand);
}

p, li {
    max-width: 65ch;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

/* 4. Components */
.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: var(--brand);
    color: #fff;
}

.btn-secondary {
    background-color: var(--bg-secondary-solid);
    color: var(--ink);
    border-color: var(--border);
}

.logo {
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--ink);
}

/* 5. Header & Navigation */
header {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.sticky-cta {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    z-index: 100;
}

@media (max-width: 768px) {
    .sticky-cta {
        display: none;
    }
}

/* 6. Hero Section */
.hero {
    text-align: center;
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.hero h1 {
    max-width: 22ch;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 1.25rem;
    color: var(--ink-secondary);
    max-width: 50ch;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
}

.hero .actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* 7. Glassmorphism Cards */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.step, .form-container {
    background-color: var(--bg-secondary-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.07);
}

.step h3 {
    margin-top: 0;
}

/* 8. Features & FAQ */
.features-list, .faq-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}

.features-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--brand);
    font-weight: 700;
}

.faq-list {
    max-width: 70ch;
    margin: 2rem auto;
}

.faq-list dt {
    font-weight: 600;
    margin-top: 1.5rem;
}

.faq-list dd {
    margin-left: 0;
    color: var(--ink-secondary);
}

/* 9. Form */
.form-container {
    max-width: 550px;
    margin: 4rem auto 0 auto;
}

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

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

.form-group input[type="email"], .form-group select {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background-color: var(--bg-secondary-solid);
    color: var(--ink);
    font-size: 1rem;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-light);
}

.checkbox-group {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.checkbox-group input {
    margin-right: 0.75rem;
    width: 1.15em;
    height: 1.15em;
}

.honeypot {
    position: absolute;
    left: -5000px;
    visibility: hidden;
}

.form-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.form-feedback.success {
    background-color: var(--success);
    color: #fff;
}

.form-feedback.error {
    background-color: var(--error);
    color: #fff;
}

.privacy-note {
    font-size: 0.875rem;
    color: var(--ink-secondary);
    text-align: center;
    margin-top: 1.5rem;
}

/* 10. Footer */
footer {
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--ink-secondary);
    font-size: 0.9rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

footer nav {
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

#variant-badge {
    display: inline-block;
    background-color: var(--bg-secondary-solid);
    color: var(--ink-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    margin-top: 1rem;
    border: 1px solid var(--border);
}

/* 11. Accessibility & Animations */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--brand);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

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