/* =========================================
   UI.CSS - COMPONENTS
   ========================================= */

/* --- TYPOGRAPHY CLASSES --- */
.headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-2xl);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-sm);
}

.subheadline {
    font-size: var(--text-sm);
    color: var(--muted-ivory);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    margin-bottom: var(--spacing-lg);
}

.body-text {
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--muted-ivory);
    margin-bottom: var(--spacing-md);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--spacing-md);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s var(--ease-ios);
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--ivory);
    color: var(--near-black);
    border-color: var(--ivory);
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-secondary {
    background-color: transparent;
    color: var(--ivory);
    border-color: rgba(243, 238, 229, 0.3);
}

.btn-secondary:hover {
    border-color: var(--ivory);
}

.btn-secondary:active {
    transform: scale(0.98);
    background-color: rgba(243, 238, 229, 0.05);
}

.btn-text {
    background: none;
    border: none;
    color: var(--muted-ivory);
    font-size: var(--text-xs);
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: var(--spacing-sm);
}

/* --- FORMS & INPUTS (iOS Feel) --- */
.form-group {
    margin-bottom: var(--spacing-lg);
    text-align: left;
}

.label {
    display: block;
    font-size: var(--text-xs);
    color: var(--gold-hint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.input,
.textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    color: var(--ivory);
    padding: var(--spacing-md);
    font-family: var(--font-body);
    font-size: var(--text-base);
    transition: all 0.3s var(--ease-ios);
    -webkit-appearance: none;
    appearance: none;
}

.input:focus,
.textarea:focus {
    outline: none;
    border-color: var(--accent-crimson);
    background: rgba(255, 255, 255, 0.08);
}

.textarea {
    min-height: 120px;
    resize: none;
}

/* --- SELECTORS (Radio/Checkbox Custom) --- */
.choice-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.choice-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s var(--ease-ios);
}

.choice-label:hover {
    background: rgba(255, 255, 255, 0.06);
}

.choice-label input[type="radio"],
.choice-label input[type="checkbox"] {
    accent-color: var(--accent-crimson);
    width: 1.2rem;
    height: 1.2rem;
}

.choice-label.selected {
    border-color: var(--ivory);
    background: rgba(255, 255, 255, 0.1);
}

/* --- CARDS & PANELS --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    padding: var(--spacing-xl) var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

/* =========================================
   RESPONSIVE OPTIMIZATIONS
   ========================================= */

/* --- MOBILE FIRST (320px+) --- */
@media (min-width: 320px) {
    .headline {
        font-size: 2rem;
    }

    .btn {
        font-size: 0.85rem;
        padding: 14px;
    }
}

/* --- SMALL DEVICES (375px+) --- */
@media (min-width: 375px) {
    .headline {
        font-size: 2.2rem;
    }

    .glass-panel {
        padding: var(--spacing-2xl) var(--spacing-xl);
    }
}

/* --- MEDIUM DEVICES (768px+ Tablet) --- */
@media (min-width: 768px) {
    .headline {
        font-size: 2.5rem;
    }

    .body-text {
        font-size: 1.05rem;
    }

    .btn {
        font-size: 0.95rem;
        padding: 16px 24px;
        max-width: 400px;
    }

    .choice-grid {
        flex-direction: row;
        gap: var(--spacing-md);
    }

    .choice-label {
        flex: 1;
    }

    .input,
    .textarea {
        font-size: 1.05rem;
    }
}

/* --- LARGE DEVICES (1024px+ Desktop) --- */
@media (min-width: 1024px) {
    .headline {
        font-size: 3rem;
    }

    .subheadline {
        font-size: 1rem;
    }

    .body-text {
        font-size: 1.1rem;
        line-height: 1.7;
    }

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(177, 18, 26, 0.3);
    }
}

/* --- TOUCH OPTIMIZATION --- */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .choice-label,
    .input,
    .textarea {
        min-height: 44px;
    }

    .choice-label input[type="radio"],
    .choice-label input[type="checkbox"] {
        width: 1.5rem;
        height: 1.5rem;
    }
}