/* PR #2 — Canonical component families + legacy class aliases.
   Legacy rules remain in styles.css; identical values = zero visual change. */

/* ===== Buttons ===== */
.btn,
.ghost-btn,
.landing-cta,
.forge-button,
.calibration-btn,
.meta-btn,
.icon-btn {
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.btn-primary,
.forge-button {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
    color: #0a0a10;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: 0 2px 12px var(--gold-glow);
}

.btn-primary {
    padding: 12px 24px;
    font-size: 14px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px var(--gold-glow);
}

.forge-button {
    width: 100%;
    padding: 18px 24px;
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px var(--gold-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.25s ease;
}

.forge-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--peacock-grad);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.forge-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 32px var(--gold-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.forge-button:hover::before { opacity: 0.15; }
.forge-button:active { transform: translateY(0); }
.forge-button > * { position: relative; z-index: 1; }

.btn-secondary,
.landing-cta.secondary {
    border: 1px solid #2a2e36;
    color: #d4a853;
    background: transparent;
}

.landing-cta {
    min-height: 48px;
    min-width: 48px;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.landing-cta.primary {
    background: linear-gradient(135deg, #0e8a8a, #10b981);
    color: #fff;
    border: none;
}

.btn-ghost,
.ghost-btn {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-ghost:hover,
.ghost-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-danger,
.ghost-btn.danger {
    color: rgba(239, 68, 68, 0.85);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover,
.ghost-btn.danger:hover {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.08);
}

.btn-icon,
.icon-btn,
.meta-btn {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn {
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.icon-btn:hover {
    color: var(--gold);
    background: var(--gold-glow);
}

.meta-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
}

.meta-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: rotate(30deg);
}

.calibration-btn {
    background: transparent;
    border: 1px dashed var(--border-medium);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
}

.calibration-btn:hover {
    border-color: var(--gold-deep);
    color: var(--text-secondary);
}

.calibration-btn.flagged {
    border-color: var(--gold);
    border-style: solid;
    color: var(--gold);
    background: var(--gold-glow);
}

/* ===== Cards ===== */
.card,
.glass-panel,
.console-card,
.output-card,
.cp-panel,
.landing-stack-card {
    border-radius: var(--radius-lg);
    position: relative;
}

.card-glass,
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

.card-glass::before,
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.console-card,
.output-card {
    padding: 32px;
}

.card-flat,
.cp-panel {
    padding: 24px 26px;
}

.landing-stack-card {
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #2a2e36;
    background: #12151a;
}

.card-gold,
.headline-card {
    border-color: var(--border-gold);
}

.card-compact {
    padding: 20px;
}

/* ===== Pills ===== */
.pill,
.agent-pill,
.cp-data-pill,
.profile-pill,
.presence-pill,
.nav-badge {
    font-family: var(--font-mono);
    border-radius: 999px;
    transition: all 0.2s ease;
}

.pill,
.agent-pill {
    font-size: 11px;
    letter-spacing: 0.1em;
    padding: 6px 12px;
    border: 1px solid var(--border-medium);
    color: var(--text-muted);
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.3);
}

.pill-muted,
.agent-pill {
    color: var(--text-muted);
}

.pill-gold,
.agent-pill.active,
.profile-pill {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-glow);
}

.agent-pill.active {
    box-shadow: 0 0 12px var(--gold-glow);
}

.pill-success,
.agent-pill.complete,
.presence-pill {
    border-color: var(--peacock-2);
    color: var(--peacock-2);
    background: rgba(16, 185, 129, 0.08);
}

.presence-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 10px;
    color: rgba(167, 243, 208, 0.9);
}

.cp-data-pill {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 4px 10px;
    border: 1px solid var(--border-medium);
    background: rgba(0, 0, 0, 0.25);
}

.profile-pill {
    font-size: 11px;
    letter-spacing: 0.05em;
    padding: 5px 10px;
}

.nav-badge,
.pill-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    background: var(--gold);
    color: #0a0a10;
    font-size: 10px;
    font-weight: 600;
}

/* ===== Form fields ===== */
.field-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 10px;
    margin-top: 20px;
}

.field-label:first-child { margin-top: 0; }

.field-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    margin-top: -4px;
    line-height: 1.5;
}

.field-hint a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px dotted var(--gold-deep);
}

.input,
.textarea,
.select,
.text-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.2s ease;
    outline: none;
}

.input:focus,
.textarea:focus,
.select:focus,
.text-input:focus {
    border-color: var(--gold);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.input::placeholder,
.text-input::placeholder {
    color: var(--text-faint);
}

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

.select,
select.text-input,
select.input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23d4a853' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .input,
    .textarea,
    .select,
    .text-input,
    textarea,
    select,
    input {
        font-size: 16px;
    }
}
