:root {
    --bg: #222224;
    --surface: #2a2a2d;
    --surface-light: #303034;
    --line: #454549;
    --text: #f1f0ed;
    --muted: #a4a3a3;
    --accent: #eabf54;
    --blue: #6da8c9;
    --green: #79c98a;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "DM Sans", sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
    font: inherit;
}

.container {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(34, 34, 36, .94);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
}

.nav-wrap,
.footer-wrap {
    display: flex;
    align-items: center;
    min-height: 76px;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand img {
    display: block;
    height: 42px;
    object-fit: contain;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 32px;
    align-items: center;
    margin-left: auto;
    color: var(--muted);
    font-size: 14px;
}

.main-nav a:hover,
.main-nav .active {
    color: var(--text);
}

.main-nav .active {
    position: relative;
}

.main-nav .active::after {
    background: var(--accent);
    bottom: -29px;
    content: "";
    height: 2px;
    left: 0;
    position: absolute;
    width: 100%;
}

.discord-link {
    border: 1px solid var(--line);
    padding: 9px 15px;
    color: var(--text) !important;
}

.discord-link span,
.button span {
    color: var(--accent);
    margin-left: 7px;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: 8px;
}

.hero {
    padding-bottom: 100px;
    padding-top: 108px;
}

.eyebrow,
.panel-kicker {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0 0 14px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: "Space Grotesk", sans-serif;
}

h1 {
    font-size: clamp(42px, 6vw, 76px);
    letter-spacing: -3px;
    line-height: 1.02;
    margin-bottom: 24px;
}

h1 em {
    color: var(--blue);
    font-style: normal;
}

.hero-text {
    color: var(--muted);
    font-size: 17px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 34px;
}

.button {
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 12px 18px;
    transition: .2s ease;
}

.button-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #222224;
}

.button-primary span,
.button-buy span {
    color: #222224;
}

.button-primary:hover {
    background: #f4ce6e;
}

.button-quiet:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.shop-section {
    border-top: 1px solid var(--line);
    padding-bottom: 110px;
    padding-top: 72px;
}

.section-heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 35px;
}

.section-heading h2 {
    font-size: 42px;
    letter-spacing: -1.5px;
    margin: 0;
}

.section-heading>p {
    color: var(--muted);
    font-size: 14px;
    text-align: right;
}

.section-art {
    height: 78px;
    margin: 0 auto -5px;
    object-fit: contain;
    width: 118px;
}

.terms-art {
    height: 64px;
    width: 105px;
}

.product-layout {
    display: block;
}

.product-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 220px;
    padding: 20px;
    position: relative;
    text-align: left;
    transition: .2s ease;
    width: 100%;
}

.product-card:hover,
.product-card.is-selected {
    background: var(--surface-light);
    border-color: var(--accent);
    transform: translateX(4px);
}

.product-card.is-selected {
    box-shadow: inset 3px 0 0 var(--accent);
}

.product-icon {
    align-items: center;
    background: rgba(234, 191, 84, .12);
    color: var(--accent);
    display: flex;
    font-size: 19px;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.product-info {
    display: grid;
    gap: 3px;
}

.product-info strong {
    font: 600 24px "Space Grotesk", sans-serif;
    letter-spacing: -.5px;
}

.product-info small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.arrow {
    bottom: 16px;
    color: var(--muted);
    font-size: 25px;
    position: absolute;
    right: 18px;
}

.rank-nova .product-icon {
    color: var(--blue);
}

.rank-noble .product-icon {
    color: var(--accent);
}

.rank-overlord .product-icon {
    color: #bd9ce4;
}

.rank-conqueror .product-icon,
.pack-grinder .product-icon {
    color: #ee8b59;
}

.pack-weekly .product-icon {
    color: var(--green);
}

.pack-explorer .product-icon {
    color: #bd9ce4;
}

.details-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 30px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.details-title {
    font-size: 29px;
    margin-bottom: 22px;
}

.benefits {
    border-top: 1px solid var(--line);
    list-style: none;
    margin: 0;
    padding: 15px 0;
    min-height: 145px;
}

.benefits li {
    color: var(--muted);
    font-size: 13px;
    padding: 4px 0 4px 18px;
    position: relative;
}

.benefits li::before {
    color: var(--accent);
    content: "✦";
    font-size: 10px;
    left: 0;
    position: absolute;
    top: 7px;
}

.price-row {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
}

.price-row span {
    color: var(--muted);
    font-size: 13px;
}

.price {
    color: var(--accent);
    font: 600 29px "Space Grotesk", sans-serif;
}

.button-buy {
    background: var(--accent);
    border-color: var(--accent);
    color: #222224;
    margin-top: auto;
}

.button-buy:hover {
    background: #f4ce6e;
}

.terms-section {
    border-top: 1px solid var(--line);
    padding-bottom: 105px;
    padding-top: 72px;
}

.terms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.terms-grid article {
    background: var(--surface);
    padding: 23px;
    min-height: 185px;
}

.terms-grid span {
    color: var(--accent);
    font-size: 12px;
}

.terms-grid h3 {
    font-size: 18px;
    margin: 13px 0 9px;
}

.terms-grid p {
    color: var(--muted);
    font-size: 12px;
    margin: 0;
}

.terms-preview {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    display: flex;
    gap: 30px;
    justify-content: space-between;
    padding: 26px 30px;
}

.terms-preview p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
    max-width: 620px;
}

.terms-page {
    padding-bottom: 100px;
    padding-top: 85px;
}

.terms-hero {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 40px;
    margin-bottom: 45px;
    padding-bottom: 45px;
}

.terms-hero img {
    height: 160px;
    object-fit: contain;
    width: 220px;
}

.terms-hero h1 {
    font-size: clamp(40px, 6vw, 68px);
    margin-bottom: 15px;
}

.terms-hero p:not(.eyebrow) {
    color: var(--muted);
    font-size: 16px;
    max-width: 650px;
}

.terms-full {
    grid-template-columns: repeat(2, 1fr);
}

.terms-full article {
    min-height: 165px;
}

.back-link {
    color: var(--accent);
    display: inline-block;
    font-size: 14px;
    margin-top: 35px;
}

.back-link:hover {
    color: var(--text);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #1d1d1f;
}

.footer-wrap {
    justify-content: space-between;
    gap: 20px;
}

.footer-wrap>p {
    color: var(--muted);
    font-size: 12px;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 22px;
    color: var(--muted);
    font-size: 12px;
}

.footer-links a:hover {
    color: var(--accent);
}

.copyright {
    align-items: center;
    border-top: 1px solid var(--line);
    color: #77777a;
    display: flex;
    font-size: 11px;
    justify-content: space-between;
    padding: 15px 0;
}

.toast {
    background: var(--text);
    bottom: 24px;
    color: var(--bg);
    opacity: 0;
    padding: 12px 17px;
    pointer-events: none;
    position: fixed;
    right: 24px;
    transform: translateY(15px);
    transition: .25s;
    font-size: 13px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.modal-open {
    overflow: hidden;
}

.product-modal {
    align-items: center;
    display: none;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 20;
}

.product-modal.is-open {
    display: flex;
}

.modal-backdrop {
    background: rgba(0, 0, 0, .72);
    inset: 0;
    position: absolute;
}

.modal-content {
    animation: modal-in .2s ease-out;
    background: var(--surface);
    border: 1px solid var(--accent);
    box-shadow: 0 20px 80px rgba(0, 0, 0, .45);
    display: grid;
    grid-template-columns: minmax(190px, .75fr) 1fr;
    max-height: min(700px, calc(100vh - 48px));
    max-width: 720px;
    overflow: auto;
    position: relative;
    width: 100%;
}

.modal-close {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font-size: 29px;
    line-height: 1;
    padding: 14px;
    position: absolute;
    right: 4px;
    top: 2px;
    z-index: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal-art {
    background: #19191b;
    height: 100%;
    min-height: 360px;
    object-fit: contain;
    padding: 25px;
    width: 100%;
}

.modal-copy {
    display: flex;
    flex-direction: column;
    padding: 42px 32px 32px;
}

.modal-copy h2 {
    font-size: 34px;
    letter-spacing: -1px;
    margin: 0 0 20px;
}

.modal-benefits {
    border-top: 1px solid var(--line);
    list-style: none;
    margin: 0;
    padding: 14px 0;
}

.modal-benefits li {
    color: var(--muted);
    font-size: 13px;
    padding: 4px 0 4px 18px;
    position: relative;
}

.modal-benefits li::before {
    color: var(--accent);
    content: "✦";
    font-size: 10px;
    left: 0;
    position: absolute;
    top: 7px;
}

.modal-buy {
    width: 100%;
}

.modal-navigation {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.modal-nav {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    cursor: pointer;
    flex: 1;
    font-size: 12px;
    padding: 10px 8px;
}

.modal-nav:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.modal-nav:disabled {
    cursor: not-allowed;
    opacity: .3;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 32px, 540px);
    }

    .nav-wrap {
        min-height: 66px;
    }

    .menu-toggle {
        display: grid;
        gap: 4px;
        margin-left: auto;
    }

    .menu-toggle span {
        background: var(--text);
        display: block;
        height: 2px;
        width: 21px;
    }

    .main-nav {
        background: var(--surface);
        border: 1px solid var(--line);
        display: none;
        flex-direction: column;
        gap: 0;
        left: 16px;
        margin: 0;
        padding: 8px;
        position: absolute;
        right: 16px;
        top: 65px;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        padding: 12px;
        width: 100%;
    }

    .main-nav .active::after {
        display: none;
    }

    .hero {
        padding-bottom: 72px;
        padding-top: 75px;
    }

    .hero-actions {
        flex-wrap: wrap;
    }

    .section-heading {
        align-items: start;
        display: block;
    }

    .section-heading>p {
        text-align: left;
        margin-top: 15px;
    }

    .section-heading h2 {
        font-size: 36px;
    }

    .section-art {
        margin: 22px auto -8px;
    }

    .product-list {
        grid-template-columns: 1fr;
    }

    .product-card {
        min-height: 0;
    }

    .details-panel {
        min-height: 0;
    }

    .terms-grid {
        grid-template-columns: 1fr;
    }

    .terms-grid article {
        min-height: auto;
    }

    .terms-preview {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-wrap {
        align-items: flex-start;
        flex-direction: column;
        padding: 24px 0;
    }

    .footer-links {
        flex-wrap: wrap;
    }

    .modal-content {
        grid-template-columns: 1fr;
        max-height: calc(100vh - 32px);
    }

    .modal-art {
        height: 180px;
        min-height: 0;
        padding: 12px;
    }

    .modal-copy {
        padding: 25px 22px 22px;
    }

    .modal-copy h2 {
        font-size: 29px;
    }

    .terms-page {
        padding-top: 55px;
    }

    .terms-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .terms-hero img {
        height: 130px;
        width: 180px;
    }

}