:root {
    --bg: #050505;
    --bg-soft: #0d0d0d;
    --panel: #121212;
    --line: #3b1212;
    --text: #f3e9e9;
    --muted: #c59a9a;
    --brand: #b30000;
    --brand-soft: #5a0000;
    --good: #d64a4a;
    --glow-rgb: 179, 0, 0;
    --radius: 4px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}

.container {
    width: min(1120px, calc(100% - 2.5rem));
    margin: 0 auto;
}

a { color: #792929; text-decoration: none; }
a:hover { color: var(--brand); }

/* Header */
.site-header {
    border-bottom: 1px solid var(--line);
    background: #070707;
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand img { width: 30px; height: 30px; }

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

nav a {
    color: var(--muted);
    font-size: 0.92rem;
}

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

/* Hero (Modern Centered/Right Layout) */
.hero {
    position: relative;
    padding: 8rem 0 12rem;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    background: url("../resources/hero-bg.png") center / cover no-repeat;
    color: white;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(5,5,5,0.7) 0%, rgba(5,5,5,0.3) 50%, rgba(5,5,5,1) 100%);
    z-index: 0;
}

.hero-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: flex-end; /* Aligned to right as per your design */
}

.hero-content {
    max-width: 650px;
    text-align: right;
}

.hero-text {
    display: flex;
    flex-direction: column-reverse;
    margin-bottom: 2rem;
}

.eyebrow {
    color: var(--good);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: 0.2s ease;
}

.btn.primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.btn.primary:hover { background: #d00000; transform: translateY(-1px); }

.btn.ghost {
    background: transparent;
    color: var(--text);
}

.btn.ghost:hover { border-color: var(--brand); background: rgba(179,0,0,0.05); }

.btn.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Sections */
.section { padding: 4rem 0; }
.section-head { margin-bottom: 2rem; }
.section-head h2 { font-size: 1.6rem; margin: 0; }
.section-head p { color: var(--muted); margin-top: 0.4rem; }

/* Releases (Modern Featured/Archive Layout) */
#releases { margin-top: -6rem; position: relative; z-index: 10; }

.latest-release-card {
    background: var(--panel);
    border: 1px solid var(--brand);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.card-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--brand);
    color: rgb(255, 255, 255);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 10px;
}

.card-main { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.card-info h3 { font-size: 1.8rem; margin: 0.3rem 0; }
.release-date { color: var(--good); font-size: 0.9rem; }
.release-meta { display: flex; gap: 1.2rem; margin-top: 1rem; color: var(--muted); font-size: 0.85rem; }

.card-actions { display: flex; flex-direction: column; gap: 0.8rem; min-width: 200px; }

/* Inline Patch Notes Styling */
.patch-notes-toggle { margin-top: 0.5rem; }
.patch-notes-toggle summary { list-style: none; outline: none; }
.patch-notes-toggle summary::-webkit-details-marker { display: none; }

.notes-content {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.notes-content ul { padding-left: 1.2rem; margin: 0; }
.notes-content li { margin-bottom: 0.4rem; color: var(--muted); }

/* Archive List */
.archive-section { margin-top: 3rem; }
.archive-section h4 { border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; margin-bottom: 1rem; }

.archive-list { display: flex; flex-direction: column; gap: 0.5rem; }
.archive-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.archive-row { padding: 0.8rem 1.2rem; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.archive-row:hover { background: #1a1a1a; }

.row-left { display: flex; align-items: center; gap: 1rem; }
.chevron::before { content: '▶'; font-size: 0.6rem; color: var(--brand); display: inline-block; transition: 0.2s; }
.archive-item[open] .chevron::before { transform: rotate(90deg); }

.row-date { color: var(--muted); font-size: 0.85rem; }
.row-right { display: flex; align-items: center; gap: 1.5rem; }
.row-tag { font-size: 0.8rem; color: var(--muted); text-transform: capitalize; }

/* Grids */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.tool-card { background: var(--panel); border: 1px solid var(--tool-color); padding: 1.2rem; border-radius: var(--radius); }
.tool-card-image { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid var(--line); }
.tool-type { font-size: 0.7rem; text-transform: uppercase; color: var(--tool-color); font-weight: 700; margin: 0; }
.tool-card h3 { margin: 0.5rem 0; }
.tool-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.2rem; }

.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.spec-grid article { background: var(--panel); border: 1px solid var(--line); padding: 1.2rem; border-radius: var(--radius); }
.spec-grid ul { padding-left: 1.2rem; color: var(--muted); font-size: 0.9rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.contact-grid a { background: var(--panel); border: 1px solid var(--line); padding: 1rem; border-radius: var(--radius); color: var(--text); display: flex; justify-content: space-between; align-items: center; }
.contact-grid a:hover { border-color: var(--brand); }
.contact-icon { width: 20px; opacity: 0.8; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 2rem 0; margin-top: 4rem; }
.footer-wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.footer-left p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.footer-right { display: flex; align-items: center; gap: 0.8rem; font-size: 0.85rem; color: var(--muted); }
.footer-right img { height: 45px; opacity: 0.9; }

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero { padding: 6rem 0 8rem; }
    .hero-content { text-align: left; }
    .hero-container, .hero-actions { justify-content: flex-start; }
    #releases { margin-top: 0; }
    .card-main { flex-direction: column; }
    .archive-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .row-right { width: 100%; justify-content: space-between; }
}