/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */
/* MyFrost Creator Hub - Clean, Minimalist, Modern Dark Theme */

:root {
    --bg-main: #0a0e17;
    --bg-surface: #111726;
    --bg-card: #151d30;
    --bg-card-hover: #1a253c;
    --border-subtle: #1e293b;
    --border-medium: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --color-accent: #06b6d4;
    --color-accent-hover: #22d3ee;
    --color-indigo: #6366f1;
    --color-emerald: #10b981;
    --color-amber: #f59e0b;
    --color-rose: #f43f5e;
    
    --font-heading: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --transition: all 0.18s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: clip;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.75;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-accent-hover);
}

h1, h2, h3, h4, h5 {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    overflow-wrap: anywhere;
    min-width: 0;
}

/* Header & Nav */
.hub-header {
    position: sticky;
    top: 0;
    z-index: 99;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

.hub-nav-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hub-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
}

.brand-accent {
    color: var(--color-accent);
}

.brand-badge {
    background: rgba(6, 182, 212, 0.12);
    color: var(--color-accent);
    border: 1px solid rgba(6, 182, 212, 0.25);
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}

.hub-desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-item {
    font-size: 0.92rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
}

.nav-item:hover, .nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.hub-nav-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.btn-tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(6, 182, 212, 0.1);
    color: var(--color-accent);
    border: 1px solid rgba(6, 182, 212, 0.3);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-tool-link:hover {
    background: var(--color-accent);
    color: #0a0e17;
}

.indicator-dot {
    width: 7px;
    height: 7px;
    background: var(--color-emerald);
    border-radius: 50%;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.45rem;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
}

.hub-mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1rem 1.25rem 1.5rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    gap: 0.6rem;
}

.hub-mobile-menu.open {
    display: flex;
}

.mobile-cta-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.btn-block-action {
    display: block;
    text-align: center;
    background: var(--color-accent);
    color: #0a0e17;
    font-weight: 700;
    padding: 0.65rem;
    border-radius: var(--radius-sm);
}

.btn-block-subtle {
    display: block;
    text-align: center;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    padding: 0.65rem;
    border-radius: var(--radius-sm);
}

/* Page Layout */
.page-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

.page-wrap.narrow {
    max-width: 820px;
}

/* Hero Section */
.hero-box {
    padding: 3rem 0 2rem;
    max-width: 880px;
}

.hero-tag {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.hero-box h1 {
    font-size: clamp(2rem, 4vw, 2.85rem);
    font-weight: 800;
    margin-bottom: 1.15rem;
    line-height: 1.35;
    letter-spacing: normal;
}

.hero-lead {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-main {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--color-accent);
    color: #0a0e17;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
}

.btn-main:hover {
    background: var(--color-accent-hover);
    color: #0a0e17;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-sm);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-accent);
    color: #fff;
}

/* Section Title */
.section-header {
    margin: 3.5rem 0 1.5rem;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}

.section-header h2 {
    font-size: 1.65rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Tools Cards */
.tools-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.tool-featured-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.tool-featured-card:hover {
    border-color: var(--border-medium);
    background: var(--bg-card);
}

.tool-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tool-tag {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.tool-tag.emerald {
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.tool-tag.cyan {
    background: rgba(6, 182, 212, 0.12);
    color: var(--color-accent);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.tool-featured-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
}

.tool-featured-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.tool-points {
    list-style: none;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tool-points li {
    font-size: 0.88rem;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-points li::before {
    content: "✓";
    color: var(--color-emerald);
    font-weight: 700;
}

.tool-actions-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
}

/* Articles Grid */
.articles-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.article-summary-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.article-summary-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-2px);
    background: var(--bg-card);
}

.card-top-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.card-category {
    font-family: var(--font-mono);
    color: var(--color-accent);
    font-weight: 600;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    line-height: 1.45;
}

.article-summary-card:hover .card-title {
    color: var(--color-accent);
}

.card-excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.card-footer-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.read-link {
    color: var(--color-accent);
    font-weight: 600;
}

/* Article Reading View */
.article-header-area {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.breadcrumbs-bar {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.breadcrumbs-bar a {
    color: var(--text-secondary);
}

.article-title-main {
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-info-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.toc-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
}

.toc-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.6rem;
}

.toc-items-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.toc-items-list li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.toc-items-list li a:hover {
    color: var(--color-accent);
}

.article-content {
    font-size: 1.02rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.75rem 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-subtle);
    scroll-margin-top: 5rem;
}

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-accent);
    margin: 1.75rem 0 0.6rem;
    scroll-margin-top: 5rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content ul, .article-content ol {
    margin: 0.75rem 0 1.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.callout-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 1.15rem 1.35rem;
    margin: 1.75rem 0;
}

.callout-box.tip {
    border-left: 3px solid var(--color-accent);
}

.callout-box.warning {
    border-left: 3px solid var(--color-amber);
}

.callout-box-title {
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.35rem;
}

.table-responsive {
    overflow-x: auto;
    margin: 1.75rem 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    background: var(--bg-surface);
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 700;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.article-cta-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
}

.article-cta-box h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.article-cta-box p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 580px;
    margin: 0 auto 1.25rem;
}

/* Contact & Forms */
.contact-grid-wrap {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

.contact-channels {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.channel-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.channel-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.channel-info h4 {
    font-size: 0.98rem;
    margin-bottom: 0.2rem;
}

.channel-info p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
}

.contact-form-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.form-row {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.45rem;
}

.form-control {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.92rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
}

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

/* Footer */
.hub-footer {
    background: #070a10;
    border-top: 1px solid var(--border-subtle);
    padding: 3.5rem 1.25rem 2rem;
    margin-top: auto;
}

.footer-wrap {
    max-width: 1140px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.65;
    margin: 1rem 0 1.25rem;
    max-width: 360px;
}

.footer-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-emerald);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
}

.pulse-green {
    width: 6px;
    height: 6px;
    background: var(--color-emerald);
    border-radius: 50%;
}

.footer-heading {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links-list a {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

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

.footer-bottom-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.85rem;
}

.footer-bottom-links {
    display: flex;
    gap: 0.65rem;
}

.footer-bottom-links a {
    color: var(--text-muted);
}

.footer-bottom-links a:hover {
    color: var(--color-accent);
}

/* Mobile responsive */
@media (max-width: 860px) {
    .hub-desktop-nav {
        display: none;
    }
    .nav-toggle {
        display: flex;
    }
    .contact-grid-wrap {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 580px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .btn-tool-link {
        display: none;
    }
    .hero-box {
        padding: 2rem 0 1.5rem;
    }
}

/* Fix Tool Card layout */
.tool-featured-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tool-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.tool-tag {
    font-size: 0.78rem;
    font-family: var(--font-body);
    font-weight: 500;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    line-height: 1.3;
}

.tool-actions-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tool-actions-row a.btn-main,
.tool-actions-row a.btn-outline {
    flex: 1 1 auto;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0.75rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
}

/* Filter buttons styling */
.filter-btn {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.filter-btn:hover {
    border-color: var(--color-accent);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--color-accent) !important;
    color: #0b0f17 !important;
    border-color: var(--color-accent) !important;
    font-weight: 600;
}


/* ==========================================================================
   ENHANCED ARTICLE TYPOGRAPHY & SPACING (2026 Polish)
   ========================================================================== */

.article-content,
.article-body {
    font-size: 1.08rem;
    line-height: 1.9;
    color: #cbd5e1;
    letter-spacing: 0.01em;
}

.article-content p,
.article-body p {
    margin-bottom: 1.65rem;
    line-height: 1.9;
}

.article-content .lead,
.article-content .lead-text,
.article-body .lead-text {
    font-size: 1.2rem;
    line-height: 1.85;
    color: #e2e8f0;
    margin-bottom: 2.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.article-content h2,
.article-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin: 3.25rem 0 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.4;
    scroll-margin-top: 5rem;
}

.article-content h3,
.article-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-accent);
    margin: 2.25rem 0 0.85rem;
    line-height: 1.45;
    scroll-margin-top: 5rem;
}

.article-content ul,
.article-content ol,
.article-body ul,
.article-body ol {
    margin: 1rem 0 1.75rem 1.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.article-content li,
.article-body li {
    line-height: 1.8;
}

.article-content li strong,
.article-body li strong {
    color: #f8fafc;
}

.article-tool-cta {
    background: linear-gradient(145deg, rgba(6, 182, 212, 0.08) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: var(--radius-md);
    padding: 2.25rem;
    margin: 3.5rem 0 2rem;
    text-align: center;
}

.article-tool-cta h3 {
    font-size: 1.45rem;
    color: #ffffff;
    margin-bottom: 0.65rem;
}

.article-tool-cta p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
