/* =========================================
   TTA History — Premium Dark Theme
   Matches /reg/ design system
   ========================================= */

:root {
    --bg-primary: #0d0d0f;
    --bg-secondary: #15151a;
    --bg-card: #1a1a22;
    --bg-card-hover: #22222d;
    --gold: #d4a017;
    --gold-light: #e8b84b;
    --gold-dark: #b8890f;
    --text-primary: #f0ece4;
    --text-secondary: #9a968e;
    --text-muted: #6b6860;
    --border: rgba(212, 160, 23, 0.12);
    --border-hover: rgba(212, 160, 23, 0.25);
    --success: #4ade80;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --max-width: 1100px;
    --transition: 0.25s cubic-bezier(.4, 0, .2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* === HEADER === */
.site-header {
    background: linear-gradient(180deg, #111114 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.header-logo img {
    height: 140px !important;
    width: auto;
    max-height: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -0.02em;
}

.site-subtitle {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.header-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-btn:hover,
.nav-btn.active {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(212, 160, 23, 0.08);
}

/* === HERO === */
.hero {
    position: relative;
    background: linear-gradient(135deg, #111114 0%, #1a1510 50%, #111114 100%);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(212, 160, 23, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 20px 50px;
    position: relative;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.hero h1 .gold {
    color: var(--gold);
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

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

.hero-stat .num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
    display: block;
    line-height: 1;
}

.hero-stat .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

/* === PAGE NAV === */
.page-nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 68px;
    z-index: 90;
}

.page-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.page-nav a {
    padding: 14px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.page-nav a:hover {
    color: var(--text-primary);
    border-bottom-color: var(--border-hover);
}

.page-nav a.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* === CONTENT === */
.content-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.content-section {
    margin-bottom: 48px;
}

.content-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.02em;
}

.content-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 28px 0 12px;
}

.content-section p {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.content-section ul,
.content-section ol {
    margin: 12px 0 20px 24px;
    font-size: 0.95rem;
    line-height: 1.8;
}

.content-section li {
    margin-bottom: 6px;
}

/* === CARDS === */
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.info-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.info-card h3 {
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* === SPEC TABLE === */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
}

.spec-table th,
.spec-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.spec-table th {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(212, 160, 23, 0.05);
}

.spec-table td {
    color: var(--text-primary);
}

.spec-table tr:hover td {
    background: rgba(212, 160, 23, 0.03);
}

.spec-label {
    color: var(--text-secondary);
    font-weight: 600;
    min-width: 180px;
}

/* === QUOTE BLOCK === */
.quote-block {
    background: rgba(212, 160, 23, 0.06);
    border-left: 3px solid var(--gold);
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.quote-block p {
    font-style: italic;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 8px;
}

.quote-block .attribution {
    font-style: normal;
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 600;
}

/* === FAQ === */
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-question {
    padding: 18px 24px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    user-select: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--gold);
    font-weight: 300;
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item.open .faq-question::after {
    content: '−';
}

.faq-answer {
    display: none;
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

.faq-item.open .faq-answer {
    display: block;
}

/* === HOVER IMAGE POPUP === */
.img-hover-link {
    position: relative;
    color: var(--gold);
    cursor: pointer;
    border-bottom: 1px dashed var(--gold);
}

.img-hover-link img {
    display: none;
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    width: 320px;
    max-width: 80vw;
    border-radius: var(--radius);
    border: 2px solid var(--gold);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.img-hover-link:hover img {
    display: block;
    opacity: 1;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
    cursor: zoom-in;
}

/* === HOVER IMAGE LIGHTBOX === */
.hover-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: hoverLbFade 0.2s ease;
}

.hover-lightbox.active {
    display: flex;
}

@keyframes hoverLbFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hover-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    border: 2px solid var(--gold);
}

/* === AUCTION TABLE === */
.bat-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 16px;
    font-size: 0.85rem;
}

.bat-table thead {
    background: rgba(212, 175, 55, 0.10);
}

.bat-table th {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
    text-align: center;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--gold);
    white-space: nowrap;
}

.bat-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    text-align: center;
    vertical-align: middle;
}

.bat-table tbody tr {
    transition: background 0.15s ease;
}

.bat-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.bat-table tr:hover td {
    background: rgba(212, 175, 55, 0.05);
}

.bat-table a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.4);
}

.bat-table a:hover {
    border-bottom-color: var(--gold);
}

/* Mobile: convert table to stacked cards */
@media (max-width: 768px) {

    .bat-table,
    .bat-table thead,
    .bat-table tbody,
    .bat-table th,
    .bat-table td,
    .bat-table tr {
        display: block;
    }

    .bat-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
    }

    .bat-table tbody tr {
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        margin-bottom: 12px;
        padding: 16px;
    }

    .bat-table tbody tr:hover td {
        background: transparent;
    }

    .bat-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 6px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

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

    .bat-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gold);
        text-transform: uppercase;
        font-size: 0.7rem;
        letter-spacing: 0.04em;
        text-align: left;
        flex-shrink: 0;
        margin-right: 12px;
    }
}

/* === PUBLICATION LIST === */
.pub-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pub-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.pub-list li:last-child {
    border-bottom: none;
}

.pub-list li strong {
    color: var(--text-primary);
}

.pub-list li em {
    color: var(--gold);
}

/* === PRODUCTION GRID === */
.prod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.prod-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

.prod-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.prod-card .number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
    display: block;
    line-height: 1;
}

.prod-card .desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.4;
}

/* === IMAGE GALLERY === */
.img-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.img-row img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: block;
}

/* === FOOTER === */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 32px 20px;
    text-align: center;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

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

.footer-copy {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-sub {
        font-size: 0.95rem;
    }

    .hero-inner {
        padding: 40px 16px 36px;
    }

    .hero-stats {
        gap: 24px;
    }

    .content-wrap {
        padding: 24px 16px 60px;
    }

    .content-section h2 {
        font-size: 1.3rem;
    }

    .spec-table {
        font-size: 0.8rem;
    }

    .spec-table th,
    .spec-table td {
        padding: 8px 10px;
    }

    .header-inner {
        padding: 10px 14px;
    }

    .page-nav a {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.4rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

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

    .header-nav {
        display: none;
    }
}

/* === LINK STYLE === */
.content-section a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 160, 23, 0.3);
    transition: var(--transition);
}

.content-section a:hover {
    border-bottom-color: var(--gold);
}

/* === BREADCRUMB === */
.breadcrumb {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--gold);
}

.breadcrumb span {
    margin: 0 6px;
}

/* === HIGHLIGHT CALLOUT === */
.callout {
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.08), rgba(212, 160, 23, 0.03));
    border: 1px solid var(--border-hover);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin: 24px 0;
}

.callout h4 {
    color: var(--gold);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.callout p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
}