@font-face {
    font-family: "General Sans";
    src: url("./fonts/GeneralSans-Variable.woff2") format("woff2");
    font-style: normal;
    font-weight: 200 700;
    font-display: swap;
}

:root {
    --jcb-ink: #0d1724;
    --jcb-ink-soft: #111b29;
    --jcb-accent: #ff4a18;
    --jcb-accent-ink: #c93509;
    --jcb-accent-deep: #ad2e06;
    --jcb-shell: #f2f5f5;
    --jcb-body: #151b24;
    --jcb-muted: #66717f;
    --jcb-rule: #dce2e5;
    /* Brand orange applied to core commerce elements (buttons, badges,
       cart count, stock states, links, focus rings). */
    --accent: #ff4a18;
    --accent-dark: #c93509;
    --accent-soft: #fde6d8;
}

html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--jcb-shell);
    color: var(--jcb-body);
    font-family: "General Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
    color: var(--jcb-ink);
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.06;
    text-wrap: balance;
}
a { color: inherit; }
.shell { width: min(calc(100% - 2.5rem), 1240px); margin-inline: auto; }
.overline {
    margin: 0;
    color: var(--jcb-accent-ink);
    font-size: .72rem;
    font-weight: 650;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.overline--dark { color: var(--jcb-accent); }
.jcb-rule {
    display: block;
    width: 64px;
    height: 2px;
    margin-top: .8rem;
    background: var(--jcb-accent);
}
.button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0 1.75rem;
    font-size: .94rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.button:hover { transform: translateY(-2px); }
.button--accent { background: var(--jcb-accent-ink); color: #fff; }
.button--accent:hover { background: var(--jcb-accent-deep); }
.button--primary { background: var(--jcb-accent); border-color: transparent; color: #0d1724; }
.button--primary:hover { background: #ff6a3d; border-color: transparent; color: #0d1724; }
.button--outline { border-color: var(--jcb-ink); color: var(--jcb-ink); }
.button--outline:hover { background: var(--jcb-ink); color: #fff; }

.jcb-topbar { background: var(--jcb-ink); color: rgba(255,255,255,.72); font-size: .78rem; }
.jcb-topbar__inner {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.jcb-topbar a { text-decoration: none; }
.jcb-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #fff;
    border-bottom: 1px solid var(--jcb-rule);
    transition: box-shadow .2s;
}
.jcb-header.is-scrolled { box-shadow: 0 10px 30px rgba(13,23,36,.09); }
.header-main { display: flex; min-height: 88px; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; margin-right: auto; text-decoration: none; }
.brand__logo { display: block; width: auto; height: 58px; object-fit: contain; }
.desktop-nav > ul {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.desktop-nav li { position: relative; }
.desktop-nav a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: var(--jcb-ink);
    font-size: .9rem;
    font-weight: 550;
    text-decoration: none;
}
.desktop-nav a:hover { color: var(--jcb-accent-ink); }
.desktop-nav ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    margin: 0;
    padding: .7rem;
    background: #fff;
    border: 1px solid var(--jcb-rule);
    box-shadow: 0 14px 30px rgba(13,23,36,.1);
    list-style: none;
}
.header-actions { display: flex; align-items: center; gap: .8rem; }
.jcb-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--jcb-rule);
    border-radius: 6px;
    overflow: hidden;
}
.jcb-search input {
    width: 0;
    min-width: 0;
    border: 0;
    padding: 0;
    background: transparent;
    transition: width .25s, padding .25s;
}
.jcb-search:focus-within input { width: 150px; padding: .65rem; }
.jcb-search button { width: 42px; height: 42px; border: 0; background: #fff; color: var(--jcb-ink); font-size: 1.25rem; }
.jcb-account, .cart-link { font-size: .86rem; font-weight: 600; text-decoration: none; }
.cart-link { display: flex; align-items: center; gap: .35rem; }
.mobile-nav, .site-nav-wrap { display: none; }

.jcb-hero {
    position: relative;
    padding-bottom: 0;
    overflow: hidden;
    background: var(--jcb-ink);
    color: #fff;
}
.jcb-hero__media { position: absolute; inset: 0; }
.jcb-hero__media video { width: 100%; height: 100%; object-fit: cover; object-position: 68% center; opacity: .48; }
.jcb-hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(13,23,36,.98), rgba(13,23,36,.88) 45%, rgba(13,23,36,.2));
}
.jcb-hero__inner {
    position: relative;
    display: flex;
    min-height: 680px;
    align-items: center;
    padding-block: 5rem 8rem;
}
.jcb-hero__copy { max-width: 680px; }
.jcb-hero h1 { max-width: 670px; margin: 1.25rem 0 0; color: #fff; font-size: clamp(2.65rem, 5.2vw, 4.8rem); }
.jcb-hero__copy > p:not(.overline) { max-width: 570px; margin: 1.6rem 0 0; color: rgba(255,255,255,.76); font-size: 1.08rem; line-height: 1.75; }
.jcb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; margin-top: 2.25rem; }
.jcb-text-link {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    gap: .5rem;
    border-bottom: 1px solid rgba(255,255,255,.4);
    color: #fff;
    font-size: .94rem;
    font-weight: 600;
    text-decoration: none;
}
.jcb-pillar-rail {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: -6.5rem;
    box-shadow: 0 20px 50px rgba(13,23,36,.16);
}
.jcb-pillar-rail a {
    display: flex;
    min-height: 156px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.8rem;
    text-decoration: none;
}
.jcb-pillar-rail a:nth-child(1) { background: #fff; color: var(--jcb-ink); }
.jcb-pillar-rail a:nth-child(2) { background: var(--jcb-ink-soft); color: #fff; }
.jcb-pillar-rail a:nth-child(3) { background: var(--jcb-accent-ink); color: #fff; }
.jcb-pillar-rail strong { font-size: 1.06rem; }
.jcb-pillar-rail span { margin-top: .55rem; font-size: .84rem; line-height: 1.5; opacity: .78; }

.jcb-profile { padding: 8rem 0; background: var(--jcb-shell); }
.jcb-profile__grid { display: grid; grid-template-columns: 1.04fr .96fr; align-items: center; gap: 7rem; }
.jcb-profile__copy h2 { max-width: 650px; margin: 1.5rem 0; font-size: clamp(2rem, 3.5vw, 3rem); }
.jcb-rich-text { color: var(--jcb-muted); font-size: 1rem; line-height: 1.8; }
.jcb-rich-text p + p { margin-top: 1rem; }
.jcb-profile__copy .button { margin-top: 2rem; }
.jcb-profile__portrait { position: relative; min-height: 560px; }
.jcb-profile__portrait > span {
    position: absolute;
    inset: 2.5rem 0 0;
    background-color: var(--jcb-ink);
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 58px 58px;
    border-bottom: 6px solid var(--jcb-accent);
    border-radius: 6px;
}
.jcb-profile__portrait img { position: absolute; right: 0; bottom: 0; width: auto; height: 108%; filter: drop-shadow(0 24px 36px rgba(13,23,36,.28)); }

.jcb-impact { position: relative; padding: 7.5rem 0; overflow: hidden; background: var(--jcb-ink); color: #fff; }
.jcb-impact::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 96px 96px;
}
.jcb-impact__grid { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 7rem; }
.jcb-impact h2 { max-width: 670px; margin: 0; color: #fff; font-size: clamp(2.4rem, 4.8vw, 4rem); }
.jcb-impact p { max-width: 570px; color: rgba(255,255,255,.7); line-height: 1.75; }
.jcb-impact dl { display: grid; gap: 1px; margin: 0; background: rgba(255,255,255,.1); }
.jcb-impact dl div {
    display: flex;
    min-height: 115px;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem 2rem 1.5rem 2.5rem;
    background: var(--jcb-ink-soft);
    border-left: 3px solid var(--jcb-accent);
}
.jcb-impact dt { order: 2; margin-top: .45rem; color: rgba(255,255,255,.62); font-size: .75rem; letter-spacing: .13em; text-transform: uppercase; }
.jcb-impact dd { order: 1; margin: 0; color: var(--jcb-accent); font-size: 2.6rem; font-weight: 650; line-height: 1; }

.jcb-speaking { padding: 7.5rem 0; background: var(--jcb-shell); text-align: center; }
.jcb-speaking h2 { max-width: 700px; margin: 1.25rem auto; font-size: clamp(2.1rem, 4vw, 3.25rem); }
.jcb-speaking > div > p:not(.overline) { max-width: 680px; margin: 0 auto; color: var(--jcb-muted); line-height: 1.75; }
.jcb-speaking .button { margin-top: 2rem; }

.catalogue-hero { background: var(--jcb-ink); color: #fff; }
.catalogue-browser { padding-block: 4.5rem 7rem; }
.product-grid { gap: 2rem; }
.jcb-book-card {
    overflow: visible;
    border: 1px solid var(--jcb-rule);
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    transition: transform .22s, border-color .22s;
    padding: 1.25rem;
}
.jcb-book-card:hover { transform: translateY(-5px); box-shadow: none; border-color: #c3ccd2; }
.jcb-book-card .product-card__media { width: 76%; margin-inline: auto; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 3px; background: transparent; box-shadow: 0 18px 38px rgba(13,23,36,.16); }
.jcb-book-card .product-card__media > img { object-fit: cover; }
.jcb-book-card .product-card__body { padding: 1.1rem .25rem 0; background: transparent; }
.jcb-book-card h2 { font-size: 1.15rem; }
.jcb-book-card .overline { margin-bottom: .55rem; }
.product-price span { color: var(--jcb-accent-ink); font-weight: 650; }

.jcb-footer { background: var(--jcb-ink); color: rgba(255,255,255,.7); }
.jcb-footer h2, .jcb-footer a { color: #fff; }
.jcb-footer img { max-width: 230px; height: auto; }

@media (max-width: 1050px) {
    .desktop-nav, .jcb-account, .jcb-search { display: none; }
    .mobile-nav { display: block; position: relative; }
    .mobile-nav summary { display: flex; min-height: 44px; align-items: center; gap: .5rem; cursor: pointer; list-style: none; }
    .mobile-nav nav {
        position: absolute;
        top: calc(100% + 1.2rem);
        right: 0;
        width: min(82vw, 320px);
        padding: 1rem;
        background: #fff;
        border: 1px solid var(--jcb-rule);
        box-shadow: 0 18px 45px rgba(13,23,36,.15);
    }
    .mobile-nav ul { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }
    .mobile-nav a { display: flex; padding: .75rem; text-decoration: none; }
    .jcb-profile__grid, .jcb-impact__grid { grid-template-columns: 1fr; gap: 4rem; }
    .jcb-profile__portrait { width: min(100%, 520px); margin-inline: auto; }
    .jcb-impact dl { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
    .shell { width: min(calc(100% - 2rem), 1240px); }
    .jcb-topbar__inner { justify-content: center; }
    .jcb-topbar__inner span { display: none; }
    .header-main { min-height: 74px; }
    .brand__logo { height: 46px; max-width: 190px; }
    .jcb-hero { padding-bottom: 4rem; }
    .jcb-hero__inner { min-height: 590px; padding-block: 4rem 8rem; }
    .jcb-hero__media::after { background: rgba(13,23,36,.76); }
    .jcb-hero h1 { font-size: 2.65rem; }
    .jcb-pillar-rail { grid-template-columns: 1fr; margin-top: -6rem; }
    .jcb-pillar-rail a { min-height: 126px; }
    .jcb-profile, .jcb-impact, .jcb-speaking { padding-block: 5.5rem; }
    .jcb-profile__portrait { min-height: 430px; }
    .jcb-impact__grid { gap: 3rem; }
    .jcb-impact dl { grid-template-columns: 1fr; }
    .jcb-impact dl div { min-height: 104px; }
    .jcb-actions { align-items: flex-start; flex-direction: column; }
    .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .button, .jcb-header, .jcb-search input, .jcb-book-card { transition: none; }
    .button:hover, .jcb-book-card:hover { transform: none; }
    .jcb-hero__media video { display: none; }
    .jcb-hero__media { background: url("./images/hero-teaching-poster.webp") center / cover no-repeat; }
}
