/* ══════════════════════════════════════════════════
   Preppie Shared Stylesheet — preppie.css
   Shared across all public HTML pages.
   ══════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
    --primary: #4A90D9;
    --primary-dark: #5BA3EC;
    --background: #0F172A;
    --surface: #1E293B;
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --accent: #38BDF8;
    --success: #00C853;
    --warning: #FF9100;
    --error: #EF5350;

    /* Light Mode */
    --light-primary: #4A90D9;
    --light-bg: #F5F7FA;
    --light-surface: #FFFFFF;
    --light-text: #2D3748;
    --light-text-muted: #64748B;
}

/* ── Reset & Base ── */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

/* ── Page Layout ── */
.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

/* ── Header ── */
.header {
    text-align: center;
    padding: 48px 0 32px;
}

.header svg {
    margin-bottom: 16px;
}

.header-logo {
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    border-radius: 16px;
}

h1 {
    color: var(--text);
    font-size: 2rem;
    margin: 0 0 8px;
    font-weight: 800;
}

.tagline {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.subhead {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.effective {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* ── Headings ── */
h2 {
    color: var(--accent);
    font-size: 1.25rem;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

h3 {
    color: var(--text);
    font-size: 1rem;
    margin: 20px 0 8px;
    font-weight: 700;
}

/* ── Cards ── */
.card {
    background: var(--surface);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.card p,
.card li {
    color: var(--text-muted);
    margin: 0 0 8px;
}

.card p:last-child {
    margin-bottom: 0;
}

.card ul {
    padding-left: 20px;
    margin: 8px 0 0;
}

.card li {
    margin-bottom: 6px;
}

.card strong {
    color: var(--text);
}

.card a {
    color: var(--primary);
    text-decoration: none;
}

.card a:hover {
    text-decoration: underline;
}

/* ── Card Variants ── */
.highlight {
    border-left: 3px solid var(--primary);
    padding-left: 16px;
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 8px;
}

.badge-privacy {
    background: rgba(74, 144, 217, 0.15);
    color: var(--primary);
}

.badge-science {
    background: rgba(0, 200, 83, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(255, 145, 0, 0.15);
    color: var(--warning);
}

/* ── Privacy Badge (hero) ── */
.privacy-badge {
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 16px;
}

.privacy-badge .shield {
    font-size: 40px;
    flex-shrink: 0;
}

.badge-title {
    color: var(--text);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.badge-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ── Code ── */
code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--accent);
}

/* ── Stats Row ── */
.stats-row {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}

.stat-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.stat-box .number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-box .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── CTA ── */
.cta-section {
    text-align: center;
    padding: 32px 0;
}

.cta-button,
.cta-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover,
.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 217, 0.3);
}

.cta-secondary {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    margin-top: 16px;
}

.cta-secondary:hover {
    text-decoration: underline;
}

/* ── Buttons ── */
.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    margin-right: 12px;
    margin-bottom: 8px;
}

.btn-outlined {
    display: inline-block;
    background: transparent;
    color: var(--primary);
    padding: 10px 26px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid var(--primary);
    cursor: pointer;
    margin-right: 12px;
    margin-bottom: 8px;
}

.btn-text {
    display: inline-block;
    color: var(--primary);
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    background: none;
    cursor: pointer;
    margin-bottom: 8px;
}

/* ── Footer ── */
.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ── Tables ── */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

td {
    padding: 8px 12px;
    color: var(--text);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Feature Grid ── */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.feature-card {
    background: var(--surface);
    border-radius: 14px;
    padding: 20px 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.feature-card .icon {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
}

.feature-card .title {
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.feature-card .desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ── Before / After ── */
.before-after {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-around;
}

.ba-col {
    text-align: center;
    flex: 1;
}

.ba-col .emoji {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.ba-col .week {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.ba-col .quote {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.ba-arrow {
    font-size: 32px;
    color: var(--text-muted);
}

/* ── Social Proof ── */
.social-proof {
    text-align: center;
    padding: 28px;
}

.social-proof .label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.social-proof p {
    color: var(--text);
    font-size: 1rem;
}

/* ── Mock Timer ── */
.timer-mock {
    display: flex;
    justify-content: center;
    margin: 24px 0 16px;
}

.timer-ring {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 0deg 240deg, rgba(255, 255, 255, 0.08) 240deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.timer-inner {
    width: 152px;
    height: 152px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.timer-inner .time {
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.timer-inner .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.timer-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
}

.timer-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

/* ── Mock Streak Calendar ── */
.streak-mock {
    margin: 20px 0 8px;
}

.streak-row {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
    align-items: center;
}

.streak-label {
    width: 42px;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: left;
    flex-shrink: 0;
}

.streak-dot {
    flex: 1;
    height: 16px;
    border-radius: 3px;
    max-width: 28px;
}

.streak-header {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    padding-left: 42px;
}

.streak-header span {
    flex: 1;
    font-size: 0.6rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 28px;
}

.streak-header .sun {
    color: var(--primary);
    font-weight: 700;
}

.streak-legend {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    justify-content: center;
}

.streak-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.streak-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* ── Style Guide Specifics ── */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.color-swatch {
    border-radius: 12px;
    padding: 20px 16px 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.color-swatch .name {
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.color-swatch .hex {
    font-size: 0.75rem;
    opacity: 0.8;
    font-family: monospace;
}

.type-sample {
    margin: 8px 0;
}

.type-sample .label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.logo-grid {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    margin: 12px 0;
}

.logo-variant {
    text-align: center;
}

.logo-variant .bg-dark {
    background: var(--background);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-variant .bg-light {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 16px;
}

.logo-variant .caption {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 6px;
}

.spacing-demo {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin: 12px 0;
}

.spacing-box {
    background: var(--primary);
    opacity: 0.5;
    border-radius: 4px;
}

.spacing-label {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-align: center;
    margin-top: 4px;
}

.component-demo {
    margin: 12px 0;
}

.icon-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.icon-item {
    text-align: center;
    width: 60px;
}

.icon-item .emoji {
    font-size: 28px;
    margin-bottom: 4px;
}

.icon-item .name {
    color: var(--text-muted);
    font-size: 0.65rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .stats-row {
        flex-direction: column;
    }

    h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .before-after {
        flex-direction: column;
    }

    .ba-arrow {
        transform: rotate(90deg);
    }
}