@import url('hub-design-tokens.css');
/**
 * TikImpact Hub — Frontend Styles
 *
 * Mobile-first responsive design.
 * Hub-specific header/footer for brand separation.
 *
 * @package TikImpact_Hub
 */

/* === Design Tokens === */
:root {
    --hub-primary: #6366f1;
    --hub-primary-hover: #4f46e5;
    --hub-surface: #ffffff;
    --hub-surface-alt: #f8fafc;
    --hub-text: #0f172a;
    --hub-text-muted: #64748b;
    --hub-border: #e2e8f0;
    --hub-success: #22c55e;
    --hub-warning: #f59e0b;
    --hub-danger: #ef4444;
    --hub-radius: 8px;
    --hub-radius-lg: 16px;
    --hub-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --hub-shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
    --hub-container: 1200px;
    --hub-space-xs: 0.5rem;
    --hub-space-sm: 1rem;
    --hub-space-md: 1.5rem;
    --hub-space-lg: 2rem;
    --hub-space-xl: 3rem;
    --hub-space-section: clamp(3rem, 2rem + 4vw, 6rem);
    --hub-text-base: 1rem;
    --hub-text-lg: 1.125rem;
    --hub-text-xl: 1.25rem;
    --hub-text-2xl: 1.5rem;
    --hub-text-3xl: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
    --hub-text-hero: clamp(2rem, 1rem + 4vw, 3.5rem);
    --hub-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --hub-duration: 200ms;
    --hub-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
.tik-hub-frontend {
    font-family: var(--hub-font);
    color: var(--hub-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.tik-hub-container {
    max-width: var(--hub-container);
    margin: 0 auto;
    padding: 0 var(--hub-space-md);
}

/* === Buttons === */
.tik-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: 2px solid transparent;
    border-radius: var(--hub-radius);
    font-weight: 600;
    font-size: var(--hub-text-base);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--hub-duration) var(--hub-ease);
}
.tik-btn--primary {
    background: var(--hub-primary);
    color: #fff;
}
.tik-btn--primary:hover, .tik-btn--primary:focus-visible {
    background: var(--hub-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--hub-shadow-lg);
}
.tik-btn--outline {
    background: transparent;
    color: var(--hub-primary);
    border-color: var(--hub-primary);
}
.tik-btn--outline:hover, .tik-btn--outline:focus-visible {
    background: var(--hub-primary);
    color: #fff;
}
.tik-btn--sm { padding: 0.375rem 0.875rem; font-size: 0.875rem; }
.tik-btn--lg { padding: 0.875rem 2rem; font-size: var(--hub-text-lg); }
.tik-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* === Header === */
.tik-hub-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--hub-surface);
    border-bottom: 1px solid var(--hub-border);
    padding: var(--hub-space-sm) 0;
}
.tik-hub-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tik-hub-header__logo-text {
    font-size: var(--hub-text-xl);
    color: var(--hub-text);
    text-decoration: none;
}
.tik-hub-header__logo-text strong { color: var(--hub-primary); }
.tik-hub-nav__list {
    display: flex;
    align-items: center;
    gap: var(--hub-space-md);
    list-style: none;
    margin: 0;
    padding: 0;
}
.tik-hub-nav__list a {
    color: var(--hub-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--hub-duration);
}
.tik-hub-nav__list a:hover { color: var(--hub-primary); }
.tik-hub-header__toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.tik-hub-header__toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--hub-text);
    transition: all var(--hub-duration);
}

@media (max-width: 768px) {
    .tik-hub-header__toggle { display: flex; }
    .tik-hub-header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--hub-surface);
        border-bottom: 1px solid var(--hub-border);
        padding: var(--hub-space-sm);
    }
    .tik-hub-header__nav.is-open { display: block; }
    .tik-hub-nav__list { flex-direction: column; gap: var(--hub-space-sm); }
}

/* === Hero === */
.tik-hub-hero {
    text-align: center;
    padding: var(--hub-space-section) 0;
    background: linear-gradient(135deg, #f0f0ff 0%, #fdf4ff 50%, #fef3f2 100%);
}
.tik-hub-hero__title {
    font-size: var(--hub-text-hero);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 var(--hub-space-md);
    letter-spacing: -0.02em;
}
.tik-hub-hero__subtitle {
    font-size: var(--hub-text-lg);
    color: var(--hub-text-muted);
    max-width: 640px;
    margin: 0 auto var(--hub-space-lg);
}
.tik-hub-hero__ctas {
    display: flex;
    gap: var(--hub-space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* === Section Titles === */
.tik-section-title {
    font-size: var(--hub-text-3xl);
    font-weight: 700;
    text-align: center;
    margin: 0 0 var(--hub-space-xl);
    letter-spacing: -0.01em;
}

/* === How It Works === */
.tik-hub-how { padding: var(--hub-space-section) 0; }
.tik-hub-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--hub-space-lg);
}
.tik-hub-step {
    text-align: center;
    padding: var(--hub-space-lg);
}
.tik-hub-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--hub-primary);
    color: #fff;
    font-weight: 700;
    font-size: var(--hub-text-xl);
    margin-bottom: var(--hub-space-sm);
}
.tik-hub-step__title {
    font-size: var(--hub-text-xl);
    margin: 0 0 var(--hub-space-xs);
}
.tik-hub-step__desc { color: var(--hub-text-muted); margin: 0; }

@media (max-width: 768px) {
    .tik-hub-steps { grid-template-columns: 1fr; }
}

/* === Stats === */
.tik-hub-stats {
    padding: var(--hub-space-section) 0;
    background: var(--hub-surface-alt);
}
.tik-hub-stats__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--hub-space-lg);
    text-align: center;
}
.tik-hub-stat__number {
    display: block;
    font-size: var(--hub-text-3xl);
    font-weight: 800;
    color: var(--hub-primary);
}
.tik-hub-stat__label {
    color: var(--hub-text-muted);
    font-size: var(--hub-text-base);
}

@media (max-width: 640px) {
    .tik-hub-stats__grid { grid-template-columns: 1fr; }
}

/* === Models === */
.tik-hub-models { padding: var(--hub-space-section) 0; }
.tik-hub-models__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--hub-space-md);
}
.tik-hub-model-card {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius-lg);
    padding: var(--hub-space-lg);
    text-align: center;
    transition: box-shadow var(--hub-duration), transform var(--hub-duration);
}
.tik-hub-model-card:hover {
    box-shadow: var(--hub-shadow-lg);
    transform: translateY(-4px);
}
.tik-hub-model-card__icon { font-size: 2rem; display: block; margin-bottom: var(--hub-space-sm); }
.tik-hub-model-card h3 { margin: 0 0 var(--hub-space-xs); }
.tik-hub-model-card p { color: var(--hub-text-muted); margin: 0; font-size: 0.9375rem; }

@media (max-width: 1024px) { .tik-hub-models__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .tik-hub-models__grid { grid-template-columns: 1fr; } }

/* === FAQ === */
.tik-hub-faq {
    padding: var(--hub-space-section) 0;
    background: var(--hub-surface-alt);
}
.tik-hub-faq__list { max-width: 800px; margin: 0 auto; }
.tik-hub-faq__item {
    border-bottom: 1px solid var(--hub-border);
    padding: var(--hub-space-md) 0;
}
.tik-hub-faq__item summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tik-hub-faq__item summary::after { content: '+'; font-size: 1.5rem; color: var(--hub-text-muted); }
.tik-hub-faq__item[open] summary::after { content: '-'; }
.tik-hub-faq__item p { color: var(--hub-text-muted); margin: var(--hub-space-sm) 0 0; }

/* === Bottom CTA === */
.tik-hub-bottom-cta {
    text-align: center;
    padding: var(--hub-space-section) 0;
}
.tik-hub-bottom-cta h2 {
    font-size: var(--hub-text-3xl);
    margin: 0 0 var(--hub-space-lg);
}

/* === Footer === */
.tik-hub-footer {
    background: var(--hub-text);
    color: #fff;
    padding: var(--hub-space-xl) 0 var(--hub-space-lg);
}
.tik-hub-footer__inner {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--hub-space-xl);
}
.tik-hub-footer__logo { font-size: var(--hub-text-xl); }
.tik-hub-footer__logo strong { color: var(--hub-primary); }
.tik-hub-footer__tagline { color: #94a3b8; margin-top: var(--hub-space-xs); }
.tik-hub-footer__links { display: flex; gap: var(--hub-space-xl); }
.tik-hub-footer__col h4 { margin: 0 0 var(--hub-space-sm); font-size: var(--hub-text-base); }
.tik-hub-footer__col ul { list-style: none; margin: 0; padding: 0; }
.tik-hub-footer__col li { margin-bottom: var(--hub-space-xs); }
.tik-hub-footer__col a { color: #94a3b8; text-decoration: none; }
.tik-hub-footer__col a:hover { color: #fff; }
.tik-hub-footer__copy {
    grid-column: 1 / -1;
    color: #64748b;
    border-top: 1px solid #334155;
    padding-top: var(--hub-space-md);
    margin-top: var(--hub-space-md);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .tik-hub-footer__inner { grid-template-columns: 1fr; }
    .tik-hub-footer__links { flex-direction: column; gap: var(--hub-space-md); }
}

/* === Opportunity Cards (shared between listing and landing) === */
.tik-hub-opp-card {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    padding: var(--hub-space-md);
    transition: box-shadow var(--hub-duration);
}
.tik-hub-opp-card:hover { box-shadow: var(--hub-shadow-lg); }
.tik-hub-opp-card__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--hub-space-sm); }
.tik-hub-opp-card__title { font-size: var(--hub-text-lg); font-weight: 600; margin: 0; }
.tik-hub-opp-card__title a { color: var(--hub-text); text-decoration: none; }
.tik-hub-opp-card__title a:hover { color: var(--hub-primary); }
.tik-hub-opp-card__badges { display: flex; gap: var(--hub-space-xs); flex-wrap: wrap; }

/* === Badges and Tags === */
.tik-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.tik-badge--paid { background: #dbeafe; color: #1d4ed8; }
.tik-badge--sample { background: #dcfce7; color: #15803d; }
.tik-badge--cost_split { background: #fef3c7; color: #92400e; }
.tik-badge--credit { background: #f3e8ff; color: #7c3aed; }
.tik-badge--trial { background: #ecfdf5; color: #047857; border: 1px solid #6ee7b7; }
.tik-badge--featured { background: #fffbeb; color: #b45309; }
.tik-badge--verified { color: #3b82f6; }
.tik-badge--company { color: #22c55e; }

/* === Status badges (3 signals: color + icon + text) === */
.tik-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--hub-radius);
    font-size: 0.8125rem;
    font-weight: 600;
}
.tik-status--draft { background: #f1f5f9; color: #64748b; }
.tik-status--open { background: #dbeafe; color: #1e40af; }
.tik-status--applied { background: #e0f2fe; color: #0369a1; }
.tik-status--matched { background: #dcfce7; color: #15803d; }
.tik-status--escrow_funded { background: #d1fae5; color: #047857; }
.tik-status--content_submitted { background: #fef3c7; color: #92400e; }
.tik-status--content_approved { background: #dcfce7; color: #15803d; }
.tik-status--revision_requested { background: #fef3c7; color: #b45309; }
.tik-status--published { background: #ede9fe; color: #6d28d9; }
.tik-status--completed { background: #dcfce7; color: #15803d; }
.tik-status--settled { background: #f0fdf4; color: #166534; }
.tik-status--cancelled { background: #fee2e2; color: #991b1b; }
.tik-status--disputed { background: #fef2f2; color: #dc2626; }

/* === Multi-step Form === */
.tik-wizard { max-width: 800px; margin: 0 auto; }
.tik-wizard__progress {
    display: flex;
    gap: 0;
    margin-bottom: var(--hub-space-xl);
}
.tik-wizard__step-indicator {
    flex: 1;
    text-align: center;
    padding: var(--hub-space-sm);
    border-bottom: 3px solid var(--hub-border);
    color: var(--hub-text-muted);
    font-weight: 500;
    font-size: 0.875rem;
}
.tik-wizard__step-indicator.is-active {
    border-bottom-color: var(--hub-primary);
    color: var(--hub-primary);
}
.tik-wizard__step-indicator.is-complete {
    border-bottom-color: var(--hub-success);
    color: var(--hub-success);
}
.tik-wizard__panel { display: none; }
.tik-wizard__panel.is-active { display: block; }
.tik-wizard__actions {
    display: flex;
    justify-content: space-between;
    margin-top: var(--hub-space-xl);
    padding-top: var(--hub-space-md);
    border-top: 1px solid var(--hub-border);
}

/* === Form Fields === */
.tik-field { margin-bottom: var(--hub-space-md); }
.tik-field label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--hub-space-xs);
    font-size: 0.9375rem;
}
.tik-field__help {
    color: var(--hub-text-muted);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}
.tik-field input[type="text"],
.tik-field input[type="url"],
.tik-field input[type="email"],
.tik-field input[type="number"],
.tik-field textarea,
.tik-field select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    font-size: var(--hub-text-base);
    font-family: inherit;
    transition: border-color var(--hub-duration);
}
.tik-field input:focus,
.tik-field textarea:focus,
.tik-field select:focus {
    outline: none;
    border-color: var(--hub-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.tik-field--error input,
.tik-field--error textarea,
.tik-field--error select { border-color: var(--hub-danger); }
.tik-field__error-msg { color: var(--hub-danger); font-size: 0.8125rem; margin-top: 0.25rem; }

/* === Timeline Component === */
.tik-timeline { position: relative; padding-left: 2rem; }
.tik-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--hub-border);
}
.tik-timeline__item {
    position: relative;
    padding-bottom: var(--hub-space-lg);
}
.tik-timeline__dot {
    position: absolute;
    left: -1.625rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--hub-border);
    border: 2px solid var(--hub-surface);
}
.tik-timeline__item.is-current .tik-timeline__dot { background: var(--hub-primary); box-shadow: 0 0 0 4px rgba(99,102,241,0.2); }
.tik-timeline__item.is-complete .tik-timeline__dot { background: var(--hub-success); }
.tik-timeline__date { color: var(--hub-text-muted); font-size: 0.8125rem; }
.tik-timeline__title { font-weight: 600; margin: 0.25rem 0; }
.tik-timeline__desc { color: var(--hub-text-muted); font-size: 0.9375rem; }

/* === Profile Cards === */
.tik-profile-card {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius-lg);
    overflow: hidden;
}
.tik-profile-card__hero { position: relative; padding: var(--hub-space-xl) var(--hub-space-lg); background: linear-gradient(135deg, #eef2ff, #fdf4ff); }
.tik-profile-card__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid var(--hub-surface);
    object-fit: cover;
}
.tik-profile-card__name { font-size: var(--hub-text-2xl); font-weight: 700; margin: var(--hub-space-sm) 0 0; }
.tik-profile-card__body { padding: var(--hub-space-lg); }

/* === Messaging UI === */
.tik-inquiry {
    max-width: 600px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius-lg);
    padding: var(--hub-space-lg);
}
.tik-inquiry__messages { max-height: 400px; overflow-y: auto; margin-bottom: var(--hub-space-md); }
.tik-inquiry__msg {
    padding: var(--hub-space-sm);
    margin-bottom: var(--hub-space-sm);
    border-radius: var(--hub-radius);
    max-width: 80%;
}
.tik-inquiry__msg--sent { background: var(--hub-primary); color: #fff; margin-left: auto; }
.tik-inquiry__msg--received { background: var(--hub-surface-alt); }
.tik-inquiry__form { display: flex; gap: var(--hub-space-sm); }
.tik-inquiry__form textarea { flex: 1; min-height: 60px; resize: vertical; }

/* === Coming Soon Placeholder === */
.tik-hub-coming-soon {
    text-align: center;
    padding: var(--hub-space-section) 0;
}
.tik-hub-coming-soon h1 {
    font-size: var(--hub-text-3xl);
    margin: 0 0 var(--hub-space-md);
}
.tik-hub-coming-soon p {
    color: var(--hub-text-muted);
    font-size: var(--hub-text-lg);
    margin: 0 0 var(--hub-space-lg);
}
