/* =====================================================================
   ClavCast — Design System
   Premium gen-Z aesthetic with glassmorphism, gradients, and dark mode
   ===================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&family=Inter:wght@400;500;600&display=swap');

/* --- CSS Custom Properties --- */
:root {
    /* Colors — Light Mode */
    --bg-primary: #f8f6ff;
    --bg-secondary: #efe9ff;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.25);
    --bg-glass-strong: rgba(255, 255, 255, 0.6);

    --text-primary: #1a1035;
    --text-secondary: #4a3f6b;
    --text-muted: #6b5c91;
    /* Improved contrast for accessibility */
    --text-accent: #a855f7;

    --accent-primary: #a855f7;
    --accent-secondary: #6366f1;
    --accent-tertiary: #ec4899;
    --accent-glow: rgba(168, 85, 247, 0.3);

    /* Platform Colors */
    --color-x: #000000;
    --color-reddit: #FF4500;
    --color-threads: #000000;
    --color-bluesky: #0085FF;

    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-card: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(99, 102, 241, 0.1));
    --gradient-button: linear-gradient(135deg, #a855f7, #6366f1);
    --gradient-button-hover: linear-gradient(135deg, #9333ea, #4f46e5);
    --gradient-x: linear-gradient(135deg, #1d9bf0, #0c7abf);

    --border-color: rgba(168, 85, 247, 0.1);
    --border-glass: rgba(255, 255, 255, 0.2);

    --shadow-sm: 0 2px 8px rgba(26, 16, 53, 0.04);
    --shadow-md: 0 8px 32px rgba(26, 16, 53, 0.08);
    --shadow-lg: 0 16px 64px rgba(26, 16, 53, 0.1);
    --shadow-glow: 0 0 40px rgba(168, 85, 247, 0.15);
    --shadow-button: 0 4px 16px rgba(168, 85, 247, 0.2);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Refined Easing */
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Dark Mode --- */
[data-theme="dark"] {
    --bg-primary: #0a0814;
    /* Slightly more tinted */
    --bg-secondary: #120d26;
    --bg-card: rgba(20, 15, 45, 0.7);
    --bg-card-hover: rgba(30, 20, 60, 0.9);
    --bg-glass: rgba(20, 15, 45, 0.5);
    --bg-glass-strong: rgba(20, 15, 45, 0.8);

    --text-primary: #f0ecff;
    --text-secondary: #a9a1c6;
    --text-muted: #6b5c91;
    --text-accent: #c084fc;

    --accent-primary: #c084fc;
    --accent-secondary: #818cf8;
    --accent-tertiary: #f472b6;
    --accent-glow: rgba(192, 132, 252, 0.25);

    /* Platform Colors — Dark Mode Adjustments */
    --color-x: #ffffff;
    --color-threads: #ffffff;

    --gradient-hero: linear-gradient(135deg, #1a1035 0%, #2d1b69 50%, #1a1035 100%);
    --gradient-card: linear-gradient(135deg, rgba(192, 132, 252, 0.06), rgba(129, 140, 248, 0.06));

    --border-color: rgba(192, 132, 252, 0.1);
    --border-glass: rgba(192, 132, 252, 0.08);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(192, 132, 252, 0.1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--transition-slow), color var(--transition-slow);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
}

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

/* --- Animated Background --- */
.bg-animated {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.bg-animated::before,
.bg-animated::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.bg-animated::before {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.bg-animated::after {
    width: 500px;
    height: 500px;
    background: var(--accent-tertiary);
    bottom: -200px;
    right: -100px;
    animation-delay: -10s;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: float 25s ease-in-out infinite;
}

.bg-orb--1 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    top: 40%;
    left: 50%;
    animation-delay: -5s;
}

.bg-orb--2 {
    width: 300px;
    height: 300px;
    background: var(--accent-primary);
    top: 60%;
    right: 20%;
    animation-delay: -15s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 50px) scale(0.95);
    }

    75% {
        transform: translate(40px, 20px) scale(1.05);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s var(--ease-out-quart) both;
}

.animate-scale-in {
    animation: scaleIn 0.5s var(--ease-out-expo) both;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    ::before,
    ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
        transition-delay: -1ms !important;
    }
}

[data-theme="dark"] .bg-animated::before,
[data-theme="dark"] .bg-animated::after {
    opacity: 0.15;
}

[data-theme="dark"] .bg-orb {
    opacity: 0.08;
}

/* --- Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-xl);
    min-height: calc(100vh - 80px);
}

/* --- Header / Nav --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--gradient-button);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    display: inline-flex;
    align-items: center;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0 var(--space-md);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast) var(--ease-out-quart);
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.01em;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-glass-strong);
}

.nav-link.active,
.nav-link--active {
    color: var(--accent-primary);
    background: var(--bg-glass-strong);
}

/* --- Theme Toggle --- */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background: var(--bg-glass-strong);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: rotate(15deg);
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: var(--space-3xl) 0 var(--space-2xl);
    animation: fadeInUp 0.8s ease-out;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-lg);
}

.hero__title span {
    background: var(--gradient-button);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.6;
}

/* --- Login Buttons --- */
.login-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all var(--transition-base) var(--ease-out-quart);
    letter-spacing: 0.01em;
}

.login-btn:active {
    transform: scale(0.96);
}

.login-btn--x {
    background: var(--color-x);
    color: var(--bg-primary);
    padding: 0.9rem 2.5rem;
    font-size: 1.05rem;
    box-shadow: var(--shadow-md);
}

.login-btn--x:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 10px 20px -10px rgba(0, 0, 0, 0.4);
}

.login-btn--reddit {
    color: var(--color-reddit);
    border-color: var(--color-reddit);
}

.login-btn--reddit:hover {
    background: var(--color-reddit);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(255, 69, 0, 0.3);
}

.login-btn--threads {
    color: var(--text-primary);
    border-color: var(--border-color);
}

.login-btn--threads:hover {
    background: var(--color-threads);
    color: var(--bg-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.2);
}

.login-btn--bluesky {
    color: var(--color-bluesky);
    border-color: var(--color-bluesky);
}

.login-btn--bluesky:hover {
    background: var(--color-bluesky);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(0, 133, 255, 0.3);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base) var(--ease-out-quart);
    user-select: none;
    min-height: 44px;
    letter-spacing: 0.02em;
}

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

.btn--primary {
    background: var(--gradient-button);
    color: white;
    box-shadow: var(--shadow-button);
}

.btn--primary:hover {
    background: var(--gradient-button-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-button), var(--shadow-glow);
}

.btn--secondary {
    background: var(--bg-glass-strong);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn--secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

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

.btn--ghost:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.btn--sm {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
}

/* --- Grid & Cards --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    backdrop-filter: blur(12px);
    transition: all var(--transition-base) var(--ease-out-quart);
}

.card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 20px 40px -20px rgba(168, 85, 247, 0.2);
    border-color: var(--accent-primary);
}

.card__image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

/* --- Persona View --- */
.card--persona {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    max-width: 640px;
    margin: 0 auto;
    background: transparent;
    border: none;
    backdrop-filter: none;
    animation: fadeInUp 0.8s var(--ease-out-expo) both;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.persona__avatar {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-full);
    border: 4px solid var(--accent-primary);
    box-shadow: var(--shadow-glow);
    margin-bottom: var(--space-xl);
    object-fit: cover;
    animation: scaleIn 0.8s var(--ease-out-expo) 0.2s both;
    flex-shrink: 0;
}

.persona__name {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.02em;
    animation: fadeInUp 0.6s var(--ease-out-quart) 0.4s both;
    line-height: 1.1;
}

.persona__username {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.6s var(--ease-out-quart) 0.5s both;
}

.persona__description {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto var(--space-2xl);
    animation: fadeInUp 0.6s var(--ease-out-quart) 0.6s both;
}

/* --- Archetype Selector --- */
.archetype-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.archetype-header__title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    background: var(--gradient-button);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-xs);
}

.archetype-header__subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.archetype-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
    max-width: 900px;
    margin: 0 auto;
}

.archetype-card {
    padding: var(--space-xl) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base) var(--ease-out-quart);
    animation: fadeInUp 0.6s var(--ease-out-quart) both;
}

.archetype-card:nth-child(1) {
    animation-delay: 0.0s;
}

.archetype-card:nth-child(2) {
    animation-delay: 0.05s;
}

.archetype-card:nth-child(3) {
    animation-delay: 0.1s;
}

.archetype-card:nth-child(4) {
    animation-delay: 0.15s;
}

.archetype-card:nth-child(5) {
    animation-delay: 0.2s;
}

.archetype-card:nth-child(6) {
    animation-delay: 0.25s;
}

.archetype-card:nth-child(7) {
    animation-delay: 0.3s;
}

.archetype-card:nth-child(8) {
    animation-delay: 0.35s;
}

.archetype-card:nth-child(9) {
    animation-delay: 0.40s;
}

.archetype-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 30px var(--accent-glow);
}

.archetype-card:active {
    transform: translateY(-2px) scale(0.98);
}

.archetype-card__emoji {
    font-size: 2.2rem;
    margin-bottom: var(--space-sm);
    display: block;
}

.archetype-card__name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 2px;
    display: block;
    color: #fff;
}

.archetype-card__tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: var(--space-sm);
}

.archetype-card__pill {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--gradient-card);
    color: var(--accent-primary);
}

/* Archetype card image styles (persona page) */
.archetype-card__image-wrap {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

.archetype-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform var(--transition-slow);
}

.archetype-card:hover .archetype-card__image {
    transform: scale(1.08);
}

.archetype-card__emoji-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* --- Platform Section --- */
.platform-section {
    margin-top: var(--space-3xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--border-glass);
}

.platform-cards {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.platform-card {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition-base);
}

.platform-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.platform-card--connected {
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.2);
    cursor: default;
}

/* --- Dictionary --- */
.dictionary__search-wrapper {
    max-width: 500px;
    margin: 0 auto var(--space-xl);
    position: relative;
    transition: transform var(--transition-base) var(--ease-out-quart);
}

.dictionary__search-wrapper:focus-within {
    transform: scale(1.02);
}

.dictionary__search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 1;
}

.dictionary__search {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    padding-left: 48px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border-color);
    background: var(--bg-glass-strong);
    backdrop-filter: blur(10px);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast) var(--ease-out-quart);
}

.dictionary__search:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-lg);
    background: var(--bg-card);
}

.dictionary__filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.filter-chip {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base) var(--ease-out-quart);
}

.filter-chip:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.filter-chip--active {
    background: var(--gradient-button);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-button);
}

.dictionary__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.term-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base) var(--ease-out-quart);
    animation: fadeInUp 0.5s var(--ease-out-quart) both;
}

.term-card:nth-child(1) {
    animation-delay: 0.0s;
}

.term-card:nth-child(2) {
    animation-delay: 0.05s;
}

.term-card:nth-child(3) {
    animation-delay: 0.1s;
}

.term-card:nth-child(4) {
    animation-delay: 0.15s;
}

.term-card:nth-child(5) {
    animation-delay: 0.2s;
}

.term-card:nth-child(6) {
    animation-delay: 0.25s;
}

.term-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
}

.term-card__name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.term-card__category {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: var(--space-sm);
    display: block;
}

.term-card__definition {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.term-card__example {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    border-left: 2px solid var(--accent-primary);
    padding-left: var(--space-sm);
}

/* --- Section Titles --- */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    text-align: center;
    background: var(--gradient-button);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--space-2xl);
}

/* --- How It Works --- */
.how-it-works {
    margin-bottom: var(--space-3xl);
    animation: fadeInUp 0.8s var(--ease-out-quart) 0.2s both;
}

.steps-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 900px;
    margin: var(--space-xl) auto 0;
}

.step-item {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
}

.step-item__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-button);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: var(--space-md);
}

.step-item__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.step-item__text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Step 2: Archetype Preview Thumbnails */
.step-archetype-preview {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-md);
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.step-archetype-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 56px;
}

.step-archetype-thumb img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    object-position: top center;
    border: 2px solid var(--border-glass);
    transition: all var(--transition-fast);
}

.step-archetype-thumb:hover img {
    border-color: var(--accent-primary);
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--accent-glow);
}

.step-archetype-thumb span {
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* --- Persona Showcase --- */
.persona-showcase-section {
    margin-bottom: var(--space-3xl);
    animation: fadeInUp 0.8s var(--ease-out-quart) 0.4s both;
}

.persona-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 1100px;
    margin: 0 auto;
}

.persona-showcase-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: all var(--transition-base) var(--ease-out-quart);
    color: inherit;
}

.persona-showcase-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg), 0 20px 40px -20px rgba(168, 85, 247, 0.25);
    border-color: var(--accent-primary);
}

.persona-showcase-card__image-wrap {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.persona-showcase-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform var(--transition-slow);
}

.persona-showcase-card:hover .persona-showcase-card__image {
    transform: scale(1.05);
}

.persona-showcase-card__pill {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: #fff;
    letter-spacing: 0.05em;
}

.persona-showcase-card__body {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.persona-showcase-card__name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.persona-showcase-card__tagline {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-md);
}

.persona-showcase-card__description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    margin-bottom: var(--space-lg);
}

.persona-showcase-card__cta {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-primary);
    transition: color var(--transition-fast);
}

.persona-showcase-card:hover .persona-showcase-card__cta {
    color: var(--accent-secondary);
}

.persona-showcase-more {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: var(--space-xl);
}

/* Archetype card delay for 9th item (Top G) */
.archetype-card:nth-child(9) {
    animation-delay: 0.4s;
}

/* --- Connected Badge (persona page) --- */
.connected-badge-section {
    margin-top: var(--space-xl);
    display: flex;
    justify-content: center;
}

.connected-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: #22c55e;
}

.connected-badge__icon {
    width: 14px;
    height: 14px;
    fill: var(--text-primary);
}

.connected-badge__check {
    font-size: 0.75rem;
}

/* --- Persona Archetype Image (persona page) --- */
.persona__archetype-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--border-glass);
    margin-bottom: var(--space-md);
    animation: scaleIn 0.6s var(--ease-out-expo) 0.3s both;
}

/* --- Share Section (persona page) --- */
.share-section {
    text-align: center;
    animation: fadeInUp 0.6s var(--ease-out-quart) both;
}

.share-section__buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Platform Share Buttons */
.btn--x {
    background: #000;
    color: #fff;
    border: none;
}

.btn--x:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn--x {
    background: #fff;
    color: #000;
}

[data-theme="dark"] .btn--x:hover {
    background: #e0e0e0;
}

.btn--bluesky {
    background: #0085FF;
    color: #fff;
    border: none;
}

.btn--bluesky:hover {
    background: #006acc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 133, 255, 0.3);
}

.btn--threads {
    background: #000;
    color: #fff;
    border: none;
}

.btn--threads:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn--threads {
    background: #fff;
    color: #000;
}

[data-theme="dark"] .btn--threads:hover {
    background: #e0e0e0;
}

/* --- Toast --- */
.toast {
    position: fixed;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all var(--transition-base);
}

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

/* --- Footer --- */
.footer {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-glass);
    line-height: 1.8;
}

/* --- Utilities --- */
.hidden {
    display: none;
}

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

.mt-xl {
    margin-top: var(--space-xl);
}

/* --- Easter Egg: Mogger Mode --- */
.mogger-mode {
    filter: contrast(1.1) saturate(1.2);
}

.mogger-mode .bg-orb {
    opacity: 0.4;
    filter: blur(40px);
    mix-blend-mode: color-dodge;
}

.mogger-mode .header__logo {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .main {
        padding: var(--space-xl) var(--space-md);
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .archetype-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .login-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .steps-row {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .step-item {
        padding: var(--space-md);
    }

    .step-archetype-preview {
        max-width: 320px;
    }

    .persona-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .persona-showcase-card__image-wrap {
        height: 220px;
    }

    .archetype-card__image-wrap {
        height: 110px;
    }
}

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

    .archetype-card__image-wrap {
        height: 90px;
    }
}