/**
 * LORIS.PRO Blog - Article Stylesheet
 * Version: 2.2.0 - Natural colors, professional hover
 *
 * Design System:
 * - Vertical rhythm: 48px base, 24px half
 * - Max content width: 720px
 * - Fonts: Orbitron (display), Saira (body)
 * - Primary: #d9913a
 */

:root {
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Saira', sans-serif;
    --primary: #d9913a;
    --primary-dim: #b87830;
    --primary-glow: rgba(217, 145, 58, 0.15);
    --bg: #0a0a0b;
    --surface: #111113;
    --text: #fafafa;
    --text-dim: #a1a1aa;
    --text-muted: #71717a;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.12);
    --radius: 6px;
    --content-width: 720px;
    --spacing: 48px;
    --spacing-half: 24px;
}

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

/* Anti-flash: hide until i18n complete */
body {
    opacity: 0;
    transition: opacity 0.2s ease;
}

body.i18n-ready {
    opacity: 1;
}

/* Skip to content - Accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--bg);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    z-index: 9999;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 12px;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

::selection {
    background: var(--primary);
    color: var(--bg);
}

/* Links - Proper hover/focus states */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s, opacity 0.2s;
}

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

a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Scroll Progress Bar - identical to loris.pro */
.top-accent {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary);
    z-index: 1001;
    transition: width 0.1s linear;
}

.top-accent::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 8px 3px rgba(255, 255, 255, 0.6), 0 0 16px 6px rgba(217, 145, 58, 0.5);
}

/* Hero Section */
.hero {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--spacing) var(--spacing-half) 0;
}

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

.hero-image {
    width: 100%;
    aspect-ratio: 21/9;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: var(--spacing-half);
    opacity: 0.85;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-image:hover {
    opacity: 1;
    transform: scale(1.01);
}

.hero-content {
    padding-bottom: var(--spacing);
    border-bottom: 1px solid var(--border);
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(26px, 5vw, 40px);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text);
    text-wrap: balance;
}

.hero-lead {
    font-size: 18px;
    color: var(--text-dim);
    line-height: 1.7;
}

.hero-meta {
    margin-top: var(--spacing-half);
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.hero-meta span {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Separator dot between meta items */
.hero-meta span:not(:last-child)::after {
    content: '·';
    margin-left: 8px;
    color: var(--text-muted);
}

/* Brand in meta */
.meta-brand {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s;
    white-space: nowrap;
    display: inline-block;
}

.meta-brand:hover {
    opacity: 0.7 !important;
    color: var(--primary) !important;
}

.meta-brand:hover .brand-pro {
    color: var(--text) !important;
}

.meta-brand .brand-pro {
    color: var(--text);
    display: inline;
}

/* Article Body */
.article {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--spacing) var(--spacing-half) var(--spacing);
}

/* Answer Capsule - GEO Optimization */
.answer-capsule {
    margin: 0 0 var(--spacing);
    padding: var(--spacing-half) 28px;
    background: linear-gradient(135deg, var(--primary-glow), transparent);
    border-left: 2px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.answer-capsule p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    margin: 0;
}

/* Content Typography */
.content h2 {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    margin: var(--spacing) 0 20px;
    color: var(--text);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.content h2:first-child {
    margin-top: 0;
}

.content p {
    margin-bottom: 24px;
    color: var(--text-dim);
    font-size: 16px;
    line-height: 1.75;
}

.content ul,
.content ol {
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
    color: var(--text-dim);
}

.content li {
    margin-bottom: 14px;
    padding-left: 20px;
    position: relative;
    font-size: 15px;
}

.content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

.content ol {
    counter-reset: list-counter;
}

.content ol li::before {
    counter-increment: list-counter;
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
}

.content li strong {
    color: var(--text);
}

/* Stats Block */
.stats-block {
    margin: var(--spacing) 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-item {
    padding: 20px 16px;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.stat-item:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--primary);
    display: block;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Source Card - Clean single border approach */
.source-card {
    margin: var(--spacing) 0;
    padding: var(--spacing-half);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
}

.source-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.source-icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
    opacity: 0.8;
}

.source-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.source-card blockquote {
    font-size: 14px;
    color: var(--text-dim);
    font-style: italic;
    margin: 0;
    line-height: 1.7;
}

.source-card cite {
    display: block;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
    font-style: normal;
}

.source-card cite a {
    color: var(--primary);
}

/* FAQ Section */
.faq-section {
    margin: var(--spacing) 0;
}

.faq-section h2 {
    margin-bottom: var(--spacing-half);
}

.faq-item {
    margin-bottom: 12px;
    padding: 18px 20px;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: rgba(217, 145, 58, 0.3);
}

.faq-question {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 14px;
}

.faq-answer {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.7;
    margin: 0;
}

/* Citations */
.citations {
    margin-top: var(--spacing);
    padding-top: var(--spacing-half);
    border-top: 1px solid var(--border);
}

.citations h3 {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.citations ol {
    padding-left: 0;
    counter-reset: citation-counter;
}

.citations li {
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-dim);
    padding-left: 24px;
    position: relative;
}

.citations li::before {
    counter-increment: citation-counter;
    content: '[' counter(citation-counter) ']';
    position: absolute;
    left: 0;
    font-family: var(--font-display);
    font-size: 10px;
    color: var(--text-muted);
}

.citations a {
    color: var(--primary);
}

/* Site Footer */
.site-footer {
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--spacing-half) var(--spacing-half);
}

.footer-author {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-author:hover {
    opacity: 0.7;
}

.footer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.footer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    transform: scale(1.5);
}

.footer-name {
    font-weight: 500;
    color: var(--primary);
    font-size: 14px;
}

.footer-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* =====================
   RESPONSIVE
   ===================== */

/* Tablet */
@media (max-width: 900px) {
    .stats-block {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .stat-item {
        padding: 16px 12px;
    }

    .stat-number {
        font-size: 20px;
    }
}

/* Large Mobile */
@media (max-width: 680px) {
    :root {
        --spacing: 40px;
        --spacing-half: 20px;
    }

    .stats-block {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        text-align: left;
    }

    .stat-number {
        order: 2;
        font-size: 20px;
    }

    .stat-label {
        order: 1;
        margin-top: 0;
    }
}

/* Mobile */
@media (max-width: 540px) {
    .hero {
        padding: 32px var(--spacing-half) 0;
    }

    .hero-image {
        margin-bottom: 20px;
        aspect-ratio: 16/9;
        border-radius: 4px;
    }

    .hero-content {
        padding-bottom: 28px;
    }

    h1 {
        font-size: 24px;
        line-height: 1.25;
    }

    .hero-lead {
        font-size: 15px;
    }

    .hero-meta {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .hero-meta span:first-child {
        display: none;
    }

    .hero-meta span:first-child::after {
        display: none;
    }

    .article {
        padding: 28px var(--spacing-half) var(--spacing);
    }

    .answer-capsule {
        padding: 18px 20px;
        margin-bottom: 28px;
    }

    .answer-capsule p {
        font-size: 14px;
    }

    .source-card {
        padding: 18px;
    }

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

    .footer-author {
        flex-direction: column;
        gap: 14px;
    }

    .footer-avatar {
        width: 52px;
        height: 52px;
    }
}

/* =====================
   ACCESSIBILITY
   ===================== */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .top-accent {
        transition: none;
    }

    .hero-image {
        transition: none;
    }
}

/* =====================
   PRINT STYLES
   ===================== */

@media print {
    :root {
        --bg: #fff;
        --text: #000;
        --text-dim: #333;
        --text-muted: #666;
        --primary: #000;
    }

    body {
        background: #fff;
        color: #000;
    }

    .top-accent,
    .skip-link {
        display: none !important;
    }

    .hero-image {
        filter: none;
        opacity: 1;
        break-inside: avoid;
    }

    .hero-content {
        border-bottom: 1px solid #ccc;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .citations a::after {
        content: " (" attr(href) ")";
        font-size: 10px;
        color: #666;
    }

    .stat-item,
    .faq-item,
    .source-card {
        border-color: #ccc;
        break-inside: avoid;
    }

    .footer-author {
        padding: 0;
    }

    .footer-avatar img {
        filter: none;
        opacity: 1;
    }
}
