/* ── WiTG Shared Styles ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --red: #fc0000;
    --red-soft: #fff0f0;
    --red-deep: #cc0000;
    --bg: #ffffff;
    --bg-card: #f8f8f8;
    --text: #000000;
    --text-secondary: #333333;
    --text-muted: #666666;
    --border: #e0e0e0;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    overflow-x: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    font-family: 'DM Serif Display', serif;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }

/* ── Navigation ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: none;
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-family: 'DM Serif Display', serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }

.nav-links > li > a {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s;
}

.nav-links > li > a:hover { color: #fff; }

.nav-links > li > a.active {
    color: #fff;
    font-weight: 600;
}

.nav-cta {
    background: var(--red);
    color: #fff !important;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.nav-cta:hover { background: var(--red-deep); }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
}

/* ── Nav Auth ── */
.nav-sign-in {
    color: #fff !important;
    font-weight: 600 !important;
}

.nav-user {
    position: relative;
    cursor: pointer;
}

.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    transition: border-color 0.2s;
}

.nav-user-avatar:hover {
    border-color: var(--red);
}

.nav-user-initial {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--red-soft);
    color: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    border: 2px solid var(--border);
}

.nav-user-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    min-width: 160px;
    overflow: hidden;
    z-index: 200;
}

.nav-user-menu.open { display: block; }

.nav-user-menu a {
    display: block;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: background 0.15s;
}

.nav-user-menu a:hover {
    background: var(--bg);
}

/* ── Page Header ── */
.page-header {
    padding: 120px 2rem 3rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.75rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.subtitle-box {
    display: inline-block;
    background: var(--red-soft);
    color: var(--red);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.4rem 1rem;
    margin-top: 0.5rem;
    border: 1px solid var(--red);
}

/* ── Footer ── */
footer {
    border-top: none;
    padding: 3rem 2rem;
    background: var(--red);
    text-align: center;
    margin-top: auto;
}

.footer-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.footer-brand {
    font-family: 'DM Serif Display', serif;
    font-size: 1rem;
    color: #fff;
    display: block;
    margin-bottom: 0.75rem;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

.footer-copy {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

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

.btn-primary:hover { background: var(--red-deep); }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--text);
}

/* ── Tag Pills ── */
.tag-pill {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #f3f3f3;
    color: #333;
    text-transform: capitalize;
    border: 1px solid #e0e0e0;
}

.tag-pill-outline {
    background: transparent;
    border: 1px solid #ccc;
    color: #555;
}

/* Override color variations — unified monochrome */
.tag-pill.tag-color-1,
.tag-pill.tag-color-2,
.tag-pill.tag-color-3,
.tag-pill.tag-color-4,
.tag-pill.tag-color-5,
.tag-pill.tag-color-6,
.tag-pill.tag-color-7,
.tag-pill.tag-color-8,
.tag-pill.tag-color-9,
.tag-pill.tag-color-10,
.tag-pill.tag-color-11,
.tag-pill.tag-color-12 {
    background: #f3f3f3;
    color: #333;
    border: 1px solid #e0e0e0;
}

/* ── Loading ── */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.875rem;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #000;
        backdrop-filter: blur(16px);
        padding: 1rem 2rem 1.5rem;
        gap: 0.75rem;
        border-bottom: 2px solid #333;
    }

    .page-header h1 { font-size: 2rem; }

    .nav-user-menu {
        position: static;
        box-shadow: none;
        border: none;
        margin-top: 0.25rem;
    }
}
