:root {
    --bg: #111111;
    --bg-elevated: #161616;
    --bg-soft: #1c1c1c;
    --gold: #d4af37;
    --gold-soft: rgba(212, 175, 55, 0.2);
    --gold-muted: rgba(212, 175, 55, 0.45);
    --text: #f0f0f0;
    --muted: #a8a29a;
    --line: rgba(212, 175, 55, 0.2);
    --line-subtle: rgba(255, 255, 255, 0.06);
    --radius: 4px;
    --header-h: 72px;
    --font: "Segoe UI", "Avenir Next", "Helvetica Neue", sans-serif;
    --display: "Georgia", "Times New Roman", "Palatino Linotype", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(900px 420px at 50% -20%, rgba(212, 175, 55, 0.06), transparent 55%),
        var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

.preview-banner {
    position: sticky;
    top: 0;
    z-index: 80;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem 1rem;
    padding: .75rem 1.25rem;
    background: linear-gradient(90deg, #d4af37, #b8922e);
    color: #1a1408;
    font-size: .92rem;
    font-weight: 600;
}
.preview-banner a {
    margin-left: auto;
    font-weight: 800;
    color: #1a1408;
    text-decoration: underline;
}

/* ===== Header ===== */
.tg-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    background: rgba(17, 17, 17, 0.92);
    border-bottom: 1px solid var(--line-subtle);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tg-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-shrink: 0;
}
.tg-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f0d78c, #d4af37 45%, #8a7020);
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35);
}
.tg-brand-name {
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: .95rem;
    color: var(--gold);
}

.tg-nav {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.tg-nav a {
    color: var(--muted);
    font-size: .88rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color .2s ease;
    position: relative;
}
.tg-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.tg-nav a:hover,
.tg-nav a.is-active { color: var(--text); }
.tg-nav a.is-active::after,
.tg-nav a:hover::after { transform: scaleX(1); }

.tg-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-left: auto;
}

.tg-search {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-width: 190px;
    padding: .5rem .85rem;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--muted);
}
.tg-search input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: .65rem 1.2rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: .78rem;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: var(--gold);
    color: #1a1408;
    border-color: var(--gold);
}
.btn-primary:hover { background: #e0c04a; }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}
.btn-ghost:hover {
    border-color: var(--gold-muted);
    color: var(--gold);
}

.mobile-toggle {
    display: none;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--text);
    width: 40px;
    height: 40px;
    cursor: pointer;
}

/* ===== Shell ===== */
.tg-main {
    width: min(1200px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 1.75rem 0 3.5rem;
}

/* ===== Panoramic Une ===== */
.tg-une {
    position: relative;
    min-height: clamp(380px, 62vh, 620px);
    margin: 0 0 2.5rem;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    isolation: isolate;
}
.tg-une-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: transform 1.4s ease;
}
.tg-une:hover .tg-une-media { transform: scale(1.06); }
.tg-une::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(0deg, rgba(17, 17, 17, 0.92) 0%, rgba(17, 17, 17, 0.35) 45%, rgba(17, 17, 17, 0.2) 100%),
        linear-gradient(90deg, rgba(17, 17, 17, 0.55) 0%, transparent 55%);
}
.tg-une-body {
    position: relative;
    z-index: 2;
    min-height: inherit;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: .9rem;
    padding: clamp(1.75rem, 5vw, 3.25rem);
    max-width: 760px;
}
.tg-kicker {
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
}
.tg-une-title {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
.tg-une-excerpt {
    margin: 0;
    max-width: 52ch;
    color: #e6e1d8;
    font-size: 1.05rem;
    line-height: 1.6;
}
.tg-une-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .7rem;
    color: var(--muted);
    font-size: .9rem;
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .28rem .65rem;
    border: 1px solid var(--gold-soft);
    color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ===== Sections / Grid ===== */
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1.25rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--line);
}
.section-head h2 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.section-head p {
    margin: .3rem 0 0;
    color: var(--muted);
    font-size: .92rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated);
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.card:hover {
    border-color: rgba(212, 175, 55, 0.55);
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}
.card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0d0d0d;
}
.card-media img,
.card-media .cover-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.card:hover .card-media img,
.card:hover .card-media .cover-fallback {
    transform: scale(1.04);
}
.cover-fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #2a2418, #161616);
    color: rgba(212, 175, 55, 0.45);
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: 0.2em;
}
.card-body {
    padding: 1rem 1.05rem 1.2rem;
    display: grid;
    gap: .55rem;
}
.card-title {
    margin: 0;
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    color: var(--muted);
    font-size: .8rem;
}

/* ===== Article ===== */
.article-page {
    display: grid;
    gap: 1.35rem;
    max-width: 820px;
}
.article-page h1,
.article-page .hero-title {
    margin: .4rem 0;
    font-family: var(--display);
    font-size: clamp(2rem, 4.2vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
}
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    align-items: center;
    color: var(--muted);
    font-size: .9rem;
}
.article-cover {
    border: 1px solid var(--line);
    overflow: hidden;
    max-height: 460px;
}
.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.article-content {
    max-width: 680px;
    line-height: 1.8;
    color: #e8e4dc;
    font-size: 1.05rem;
}
.article-content h2,
.article-content h3 {
    color: #fff;
    font-family: var(--display);
    margin-top: 1.75rem;
}
.article-content a {
    color: var(--gold);
    border-bottom: 1px solid var(--gold-soft);
}
.article-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 2px solid var(--gold);
    background: rgba(212, 175, 55, 0.06);
    color: #f5efe3;
    font-family: var(--display);
    font-style: italic;
}

.empty {
    padding: 2.5rem;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--muted);
    text-align: center;
}

.tg-footer {
    margin-top: 1rem;
    padding: 2rem clamp(1.25rem, 4vw, 3rem);
    border-top: 1px solid var(--line);
    background: #0e0e0e;
    color: var(--muted);
}
.tg-footer-inner {
    width: min(1200px, 100%);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}
.tg-footer a:hover { color: var(--gold); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.tg-une, .card { animation: fadeIn .55s ease both; }

@media (max-width: 980px) {
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .tg-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: .85rem;
        padding: 1rem 1.25rem 1.25rem;
        background: #141414;
        border-bottom: 1px solid var(--line);
    }
    .tg-nav.is-open { display: flex; }
    .mobile-toggle { display: inline-grid; place-items: center; }
}

@media (max-width: 640px) {
    .articles-grid { grid-template-columns: 1fr; }
    .tg-search { min-width: 0; width: 130px; }
    .tg-actions .btn-ghost { display: none; }
}
