@font-face {
    font-family: "SF Pro Text";
    src: url("/static/fonts/SF-Pro-Text-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SF Pro Text";
    src: url("/static/fonts/SF-Pro-Text-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SF Pro Text";
    src: url("/static/fonts/SF-Pro-Text-Semibold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SF Pro Text";
    src: url("/static/fonts/SF-Pro-Text-Bold.ttf") format("truetype");
    font-weight: 700 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SF Pro Text";
    src: url("/static/fonts/SF-Pro-Text-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-muted: #f5f5f4;
    --surface-soft: #fafafa;
    --text: #0c0c0c;
    --text-secondary: #6b6b6b;
    --muted: #8f8f8f;
    --border: rgba(12, 12, 12, 0.08);
    --border-hover: rgba(12, 12, 12, 0.15);
    --accent: #0c0c0c;
    --premium-accent: #a3794a;
    --premium-accent-soft: rgba(163, 121, 74, 0.08);
    --premium-rail-bg: #0c0c0c;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.07);
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.09);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;

    --container-width: 1376px;
    --container-padding: 2rem;
}

html {
    scrollbar-gutter: stable;
}

@media (min-width: 1024px) {
    :root {
        --container-padding: 4rem;
    }
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    letter-spacing: -0.012em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 0% 0%, color-mix(in srgb, var(--surface-muted) 40%, transparent), transparent 60%),
        radial-gradient(ellipse 60% 40% at 100% 100%, color-mix(in srgb, var(--surface-muted) 20%, transparent), transparent 60%);
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: min(var(--container-width), calc(100% - var(--container-padding)));
    margin: 0 auto;
}

/* ── Typography ── */

h1, h2, h3, h4 {
    margin: 0;
    letter-spacing: -0.03em;
    font-weight: 800;
    line-height: 1.15;
}

h1 { font-size: 2rem; letter-spacing: -0.04em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-2xs { font-size: 0.65rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

/* ── Cards ── */

.card,
.section,
.wizard-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: all 0.25s ease;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

/* ── Buttons ── */

.btn,
.button,
.submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    text-decoration: none !important;
    font-size: 0.875rem;
    padding: 10px 22px;
    line-height: 1;
    font-family: inherit;
}

.btn:active {
    transform: scale(0.97);
}

.btn.primary,
.submit {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.btn.primary:hover,
.submit:hover {
    opacity: 0.88;
}

.btn.secondary {
    background: var(--surface-muted);
    color: var(--text);
    border-color: var(--border);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--surface-muted);
}

.btn-sm {
    font-size: 0.78rem;
    padding: 7px 16px;
}

.btn-full {
    width: 100%;
    height: 48px;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
}

/* ── Form Elements ── */

.form-field,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="search"],
textarea,
select {
    min-height: 46px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 0 14px;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 500;
    background: var(--surface-muted);
    color: var(--text);
    outline: none;
    width: 100%;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.form-field:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--premium-accent);
    background: var(--bg);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--premium-accent) 12%, transparent);
}

textarea.form-field,
textarea {
    padding: 12px 14px;
    min-height: 100px;
    resize: vertical;
}

::placeholder {
    color: var(--muted);
    font-weight: 400;
}

/* ── Badge Pill ── */

.badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

/* ── Grid Utilities ── */

.grid { display: grid; gap: 20px; }

@media (min-width: 768px) {
    .grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ── Premium Modal ── */

.premium-modal {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-xl);
    padding: 0;
    width: min(500px, 90vw);
    max-height: 80vh;
    overflow: hidden;
    color: var(--text);
    outline: none;
}

.premium-modal::backdrop {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.02em;
}

.modal-close {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--text);
    color: var(--bg);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 86px);
    overscroll-behavior: contain;
}

/* ── Dark Mode ── */

html[data-theme="dark"] {
    --bg: #000000;
    --surface: #0a0a0a;
    --surface-muted: #141414;
    --surface-soft: #080808;
    --text: #f0f0f0;
    --text-secondary: #8a8a8a;
    --muted: #6b6b6b;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --accent: #f0f0f0;
    --premium-accent: #c49a6c;
    --premium-accent-soft: rgba(196, 154, 108, 0.12);
    --premium-rail-bg: #0a0a0a;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.4);
}

/* ── Score Badge ── */

.score-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    font-family: "SF Mono", SFMono-Regular, menlo, monospace;
    background: var(--premium-accent-soft);
    color: var(--premium-accent);
}

.score-badge svg {
    width: 10px;
    height: 10px;
}

/* ── Tag Pill ── */

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 500;
    background: var(--surface-muted);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.tag-pill:hover {
    background: var(--premium-accent-soft);
    color: var(--premium-accent);
}

/* ── Category Badge ── */

.cat-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 600;
    background: var(--surface-muted);
    color: var(--muted);
}

/* ── Pill Button (tabs/filters) ── */

.pill-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    background: var(--surface-muted);
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.pill-btn:hover {
    background: var(--surface);
    color: var(--text);
}

.pill-btn.active {
    background: var(--text);
    color: var(--bg);
}

/* ── Stat Box ── */

.stat-box {
    background: var(--surface-muted);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    text-align: center;
}

.stat-box-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: 2px;
}

.stat-box-value.gold {
    color: var(--premium-accent);
}

.stat-box-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Compose Box ── */

.compose-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-xs);
}

.compose-box-inner {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.compose-box-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: var(--text);
    outline: none;
    font-family: inherit;
    font-weight: 500;
    padding: 4px 0;
}

.compose-box-input::placeholder {
    color: var(--muted);
    font-weight: 400;
}

.compose-box-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ── Brand Mention Card ── */

.brand-mention {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.brand-mention:hover {
    border-color: var(--premium-accent);
    background: var(--premium-accent-soft);
}

.brand-mention-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--premium-accent);
    flex-shrink: 0;
}

.brand-mention-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    transition: color 0.2s ease;
}

.brand-mention:hover .brand-mention-name {
    color: var(--premium-accent);
}

/* ── Featured Card (hero in grid) ── */

.featured-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.25s ease;
    height: 220px;
    min-width: 0;
}

.featured-card:hover {
    border-color: var(--premium-accent);
    box-shadow: var(--shadow-md);
}

.featured-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-card:hover img {
    transform: scale(1.05);
}

.featured-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.15) 50%, transparent 100%);
}

.featured-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
}

.featured-card-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-top: 6px;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.featured-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.65);
    font-weight: 500;
}

.featured-card-growth {
    font-weight: 700;
    color: var(--premium-accent);
}

/* ── Hover Card Lift ── */

.hover-lift {
    transition: all 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ── Image Cover Card ── */

.cover-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #000;
    min-height: 220px;
}

.cover-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.cover-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.cover-card-body {
    position: relative;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 220px;
}

/* ── Activity Row ── */

.activity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.activity-row:last-child {
    border-bottom: none;
}

.activity-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.activity-value {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    font-family: "SF Mono", SFMono-Regular, menlo, monospace;
}

/* ── Progress Bar ── */

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--surface-muted);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--premium-accent);
    transition: width 0.7s ease;
}

/* ── Responsive ── */

@media (max-width: 767px) {
    .card,
    .section,
    .hero {
        border-radius: var(--radius-md);
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
}
