:root {
    --orange:#f29a2e;
    --orange-bright:#ffad42;
    --steel:#c7cbd0;
    --white:#f4f4f4;
    --muted:#bcc1c7;
    --black:#050607;
    --panel:rgba(7,9,11,.78);
    --header-height:138px;
    --max-width:1760px;
}

* {
    box-sizing:border-box;
}

html {
    scroll-behavior:smooth;
    scroll-padding-top:var(--header-height);
    background:var(--black);
}

body {
    margin:0;
    min-height:100vh;
    color:var(--white);
    font-family:"Inter",Arial,sans-serif;
    background:linear-gradient(rgba(0,0,0,.18),rgba(0,0,0,.32)),url("assets/agentx-background.jpg") center center/cover fixed no-repeat;
}

body:before {
    content:"";
    position:fixed;
    inset:0;
    z-index:-1;
    pointer-events:none;
    background:linear-gradient(90deg,rgba(0,0,0,.3),transparent 32%,rgba(0,0,0,.22)),radial-gradient(circle at center,transparent 10%,rgba(0,0,0,.26) 88%);
}

.site-header {
    min-height:var(--header-height);
    display:grid;
    grid-template-columns:minmax(280px,420px) 1fr minmax(220px,280px);
    align-items:center;
    gap:3rem;
    padding:14px clamp(28px,4.5vw,84px);
    background:rgba(5,6,7,.94);
    border-bottom:2px solid rgba(242,154,46,.85);
    position:sticky;
    top:0;
    z-index:30;
    box-shadow:0 12px 38px rgba(0,0,0,.45);
    backdrop-filter:blur(5px);
}

.brand {
    display:block;
    width:min(100%,410px);
}

.brand img {
    display:block;
    width:100%;
    height:auto;
}

.main-nav {
    display:flex;
    justify-content:center;
    gap:clamp(36px,5vw,86px);
}

.main-nav a {
    color:var(--steel);
    text-decoration:none;
    text-transform:uppercase;
    letter-spacing:.12em;
    font-family:"Barlow Condensed",Arial,sans-serif;
    font-size:clamp(1.25rem,1.4vw,1.7rem);
    font-weight:600;
    position:relative;
}

.main-nav a:after {
    content:"";
    position:absolute;
    left:0;
    right:100%;
    bottom:-10px;
    height:2px;
    background:var(--orange);
    transition:right .2s ease;
}

.main-nav a:hover,.main-nav a:focus-visible {
    color:var(--orange-bright);
}

.main-nav a:hover:after,.main-nav a:focus-visible:after {
    right:0;
}

.copyright {
    justify-self:end;
    text-align:right;
    color:var(--muted);
    font-size:.96rem;
    line-height:1.35;
}

.copyright span {
    display:block;
}

main {
    width:100%;
}

.intro {
    width:min(var(--max-width),100%);
    min-height:calc(100vh - var(--header-height));
    margin:0 auto;
    padding:clamp(36px,4vw,70px) clamp(28px,4.5vw,84px) 50px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:28px;
}

.intro-panel {
    width:min(900px,100%);
    padding: 20px 34px;
    background:linear-gradient(90deg,rgba(4,5,6,.82),rgba(4,5,6,.48));
    border-left:4px solid var(--orange);
}

.eyebrow {
    margin:0 0 8px;
    color:var(--orange-bright);
    text-transform:uppercase;
    letter-spacing:.16em;
    font-family:"Barlow Condensed",Arial,sans-serif;
    font-weight:600;
    font-size:1.08rem;
}

h1,h2 {
    margin:0;
    font-family:"Barlow Condensed",Arial,sans-serif;
    text-transform:uppercase;
    line-height:.98;
}

h1 {
    color: var(--white);
    font-size: clamp(2.8rem, 4.25vw, 5.2rem);
    letter-spacing: .035em;
    line-height: .90;
}

.intro-copy {
    margin:18px 0 0;
    color:var(--steel);
    font-size:1.16rem;
}

.book-grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(180px,1fr));
    gap:clamp(20px,2.5vw,42px);
    align-items:end;
}

.book-card {
    appearance:none;
    border:1px solid rgba(199,203,208,.3);
    padding:12px 12px 15px;
    background:rgba(7,9,11,.75);
    cursor:pointer;
    transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease,background .2s ease;
}

.book-card img {
    display:block;
    width:100%;
    aspect-ratio:2/3;
    object-fit:cover;
    box-shadow:0 18px 38px rgba(0,0,0,.5);
}

.book-card span {
    display:block;
    margin-top:12px;
    color:var(--steel);
    text-transform:uppercase;
    letter-spacing:.16em;
    font-family:"Barlow Condensed",Arial,sans-serif;
    font-weight:600;
    font-size:1rem;
}

.book-status {
    display:block;
    margin-top:6px;
    color:var(--orange-bright);
    font-style:normal;
    font-size:.82em;
    letter-spacing:.12em;
}

.book-card:hover,.book-card:focus-visible,.book-card.active {
    transform:translateY(-8px);
    border-color:var(--orange);
    background:rgba(13,15,18,.88);
    box-shadow:0 0 0 1px rgba(242,154,46,.18),0 24px 52px rgba(0,0,0,.48);
}

.book-card.active span {
    color:var(--orange-bright);
}

.details-section {
    min-height:100vh;
    padding:calc(var(--header-height) + 46px) clamp(28px,4.5vw,84px) 70px;
    display:flex;
    justify-content:center;
    align-items:flex-start;
}

.details-shell {
    width:min(1480px,100%);
    display:grid;
    grid-template-columns:minmax(320px,470px) minmax(520px,1fr);
    gap:clamp(44px,6vw,100px);
    align-items:center;
    padding:clamp(28px,3vw,50px);
    background:var(--panel);
    border-top:2px solid var(--orange);
    box-shadow:0 28px 90px rgba(0,0,0,.48);
}

.detail-cover-wrap {
    justify-self:center;
    width:min(100%,450px);
}

#detail-cover {
    display:block;
    width:100%;
    height:auto;
    max-height:720px;
    object-fit:contain;
    border:1px solid rgba(199,203,208,.35);
    box-shadow:0 26px 65px rgba(0,0,0,.62);
}

.detail-copy h2 {
    color:var(--white);
    font-size:clamp(2.7rem,4vw,5rem);
    letter-spacing:.025em;
}

.synopsis {
    margin-top:26px;
    color:var(--white);
    font-size:clamp(1.08rem,1.2vw,1.42rem);
    line-height:1.55;
}

.synopsis p {
    margin:0 0 1em;
}

.buy-button {
    display:inline-block;
    margin-top:18px;
    padding:15px 28px;
    color:#080909;
    background:var(--orange);
    text-decoration:none;
    text-transform:uppercase;
    letter-spacing:.12em;
    font-family:"Barlow Condensed",Arial,sans-serif;
    font-size:1.25rem;
    font-weight:700;
    border:1px solid var(--orange-bright);
    transition:background .2s ease,transform .2s ease;
}

.buy-options {
    margin-top: 18px;
}

.buy-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.buy-buttons .buy-button {
    margin-top: 0;
}

.amazon-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

.coming-soon-panel {
    margin-top:18px;
    padding:16px 28px;
    width:max-content;
    max-width:100%;
    color:#080909;
    background:var(--orange);
    border:1px solid var(--orange-bright);
    text-transform:uppercase;
    letter-spacing:.14em;
    font-family:"Barlow Condensed",Arial,sans-serif;
    font-size:1.35rem;
    font-weight:700;
}

[hidden] {
    display:none !important;
}

.buy-button:hover,.buy-button:focus-visible {
    background:var(--orange-bright);
    transform:translateY(-2px);
}

footer {
    padding:22px 28px 30px;
    text-align:center;
    color:var(--muted);
    background:rgba(4,5,6,.93);
    border-top:1px solid rgba(242,154,46,.35);
}

footer p {
    margin:0;
}

@media(max-width:1180px) {
    :root {
        --header-height:auto;
    }

    html {
        scroll-padding-top:0;
    }

    .site-header {
        position:static;
        grid-template-columns:1fr;
        justify-items:center;
        gap:22px;
        padding-bottom:28px;
    }

    .copyright {
        justify-self:center;
        text-align:center;
    }

    .intro {
        min-height:auto;
    }

    .book-grid {
        grid-template-columns:repeat(2,minmax(180px,1fr));
    }

    .details-section {
        padding-top:70px;
    }

    .details-shell {
        grid-template-columns:1fr;
    }

    .detail-copy {
        max-width:860px;
        margin-inline:auto;
    }

}

@media(max-width:700px) {
    body {
        background-attachment:scroll;
    }

    .site-header {
        padding-inline:18px;
    }

    .brand {
        width:min(100%,360px);
    }

    .main-nav {
        flex-wrap:wrap;
        gap:20px 28px;
    }

    .intro,.details-section {
        padding-left:18px;
        padding-right:18px;
    }

    .book-grid {
        grid-template-columns:1fr 1fr;
        gap:16px;
    }

    .book-card {
        padding:8px 8px 12px;
    }

    .details-shell {
        padding:24px 18px 32px;
    }

    .detail-copy h2 {
        font-size:2.7rem;
    }

}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior:auto;
    }

    .book-card,.main-nav a:after,.buy-button {
        transition:none;
    }

}

/* In-depth page */
.depth-button {
    display:inline-block;
    margin-top:24px;
    padding:13px 24px;
    color:#080909;
    background:var(--orange);
    border:1px solid var(--orange-bright);
    text-decoration:none;
    text-transform:uppercase;
    letter-spacing:.12em;
    font-family:"Barlow Condensed",Arial,sans-serif;
    font-size:1.14rem;
    font-weight:700;
    transition:background .2s ease,transform .2s ease;
}

.depth-button:hover,.depth-button:focus-visible {
    background:var(--orange-bright);
    transform:translateY(-2px);
}

.depth-page {
    width:100%;
}

.depth-hero {
    width:min(var(--max-width),100%);
    margin:0 auto;
    padding:clamp(52px,6vw,92px) clamp(28px,4.5vw,84px) 36px;
}

.depth-hero-panel {
    width:min(980px,100%);
    padding:28px 34px;
    background:linear-gradient(90deg,rgba(4,5,6,.88),rgba(4,5,6,.58));
    border-left:4px solid var(--orange);
}

.depth-hero-panel h1 {
    margin:0;
}

.depth-hero-panel > p:last-child {
    margin:20px 0 0;
    color:var(--steel);
    font-size:1.15rem;
    line-height:1.6;
}

.depth-books {
    width:min(1480px,100%);
    margin:0 auto;
    padding:20px clamp(28px,4.5vw,84px) 90px;
    display:grid;
    gap:48px;
}

.depth-book {
    display:grid;
    grid-template-columns:minmax(220px,330px) minmax(0,1fr);
    gap:clamp(34px,5vw,72px);
    align-items:start;
    padding:clamp(24px,3vw,42px);
    background:var(--panel);
    border-top:2px solid var(--orange);
    box-shadow:0 24px 70px rgba(0,0,0,.42);
}

.depth-cover img {
    display:block;
    width:100%;
    height:auto;
    border:1px solid rgba(199,203,208,.35);
    box-shadow:0 22px 55px rgba(0,0,0,.58);
}

.depth-copy h2 {
    color:var(--white);
    font-size:clamp(2.5rem,3.7vw,4.6rem);
    letter-spacing:.025em;
}

.depth-copy > p:not(.eyebrow) {
    color:var(--white);
    font-size:clamp(1.03rem,1.15vw,1.28rem);
    line-height:1.65;
    margin:18px 0 0;
}

@media(max-width:900px) {
    .depth-book {
        grid-template-columns:1fr;
    }

    .depth-cover {
        width:min(360px,100%);
        margin-inline:auto;
    }
}

@media(max-width:700px) {
    .depth-hero,.depth-books {
        padding-left:18px;
        padding-right:18px;
    }

    .depth-hero-panel {
        padding:24px 22px;
    }

    .depth-book {
        padding:24px 18px 30px;
    }

    .depth-copy h2 {
        font-size:2.6rem;
    }
}

@media(prefers-reduced-motion:reduce) {
    .depth-button {
        transition:none;
    }
}

