/* ═══════════════════════════════════════════════
   Bejco Cases — Frontend Styles
   Kort matcher referencer-kortene; klik åbner detalje-modal
   ═══════════════════════════════════════════════ */

.bc-section {
    --bc-blue-deep: #00458a;
    --bc-red: #e2161c;
    --bc-cream: #f7f0da;
    --bc-white: #ffffff;
    --bc-ink-900: #0a1628;
    --bc-ink-700: #2a3748;
    --bc-ink-500: #5a6578;
    --bc-ease-out: cubic-bezier(0.23, 1, 0.32, 1);

    font-family: 'Source Sans 3', system-ui, sans-serif;
    color: var(--bc-ink-700);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.bc-section *,
.bc-section *::before,
.bc-section *::after { box-sizing: border-box; }

/* ── Tom tilstand ── */
.bc-section--empty {
    display: flex;
    justify-content: center;
}

.bc-emptystate {
    width: 100%;
    max-width: 560px;
    text-align: center;
    padding: clamp(48px, 7vw, 80px) clamp(28px, 5vw, 48px);
    border-radius: 24px;
    background: var(--bc-bg, #f4f7fb);
}

.bc-emptystate__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 22px;
    border-radius: 50%;
    background: #fff;
    color: var(--bc-blue-deep);
}
.bc-emptystate__icon svg { width: 32px; height: 32px; }

.bc-emptystate .bc-emptystate__title,
.bc-emptystate h3.bc-emptystate__title {
    font-family: 'Oswald', system-ui, sans-serif !important;
    font-size: clamp(1.375rem, 2.6vw, 1.875rem) !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.01em !important;
    color: var(--bc-ink-900) !important;
    margin: 0 0 12px !important;
}

.bc-emptystate__text {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--bc-ink-500);
    margin: 0;
    max-width: 42ch;
    margin-left: auto;
    margin-right: auto;
}

/* ── Grid ── */
.bc-section .bc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}
.bc-section[data-cols="2"] .bc-grid {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1024px) {
    .bc-section .bc-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 640px) {
    .bc-section .bc-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ── Card ── */
.bc-section .bc-card {
    position: relative;
    display: block;
    aspect-ratio: 590/420;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 69, 138, 0.04), 0 2px 6px rgba(0, 69, 138, 0.04);
    isolation: isolate;
    transition: transform 420ms var(--bc-ease-out), box-shadow 420ms ease;
    cursor: pointer;
    background: #0a1628;
    outline: none;
    text-decoration: none;
    color: inherit;

    /* Stagger entrance — initial state */
    opacity: 0;
    transform: translateY(28px);
    will-change: opacity, transform;
}

.bc-section.is-visible .bc-card {
    animation: bc-card-in 800ms var(--bc-ease-out) forwards;
    animation-delay: calc(var(--bc-i, 0) * 90ms);
}

@keyframes bc-card-in {
    to { opacity: 1; transform: translateY(0); }
}

.bc-section .bc-card:focus-visible {
    box-shadow: 0 0 0 3px var(--bc-cream), 0 0 0 5px var(--bc-blue-deep);
}

@media (hover: hover) and (pointer: fine) {
    .bc-section .bc-card:hover {
        box-shadow: 0 12px 28px rgba(0, 69, 138, 0.08), 0 24px 56px rgba(0, 69, 138, 0.1);
        transform: translateY(-4px);
    }
    .bc-section .bc-card:hover .bc-card-img {
        transform: scale(1.06);
        filter: saturate(1.05);
    }
}

/* ── Image ── */
.bc-section .bc-card-img {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.02);
    filter: saturate(0.95);
    transition: transform 900ms var(--bc-ease-out), filter 600ms ease;
}
.bc-section .bc-card-img--empty {
    background: linear-gradient(135deg, #0a1628, #00458a);
}

/* Rigtig <img> bag baggrundslaget — usynlig, kun for SEO/crawl */
.bc-section .bc-card-seo-img {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

/* ── Overlay ── */
.bc-section .bc-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg,
        rgba(10, 22, 40, 0) 30%,
        rgba(10, 22, 40, 0.45) 58%,
        rgba(10, 22, 40, 0.9) 100%);
    pointer-events: none;
}

/* ── Billed-tæller-badge ── */
.bc-section .bc-card-count {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(10, 22, 40, 0.55);
    backdrop-filter: blur(6px);
    color: var(--bc-white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    line-height: 1;
}
.bc-section .bc-card-count svg { width: 13px; height: 13px; }

/* ── Body ── */
.bc-section .bc-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 24px 28px 26px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--bc-white);
}

.bc-section .bc-card-customer {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bc-cream);
    margin: 0;
}

.bc-section .bc-card .bc-card-title,
.bc-section h3.bc-card-title {
    font-family: 'Oswald', system-ui, sans-serif !important;
    font-weight: 500 !important;
    font-size: 1.25rem !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
    color: var(--bc-white) !important;
    margin: 0 !important;
    max-width: 440px;
}

.bc-section .bc-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.bc-section .bc-card-chip {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--bc-white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1.3;
}

/* ── Læs mere CTA ── */
.bc-section .bc-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--bc-cream);
    transition: color 280ms ease;
}

.bc-section .bc-card-cta-arrow {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bc-red);
    color: var(--bc-white);
    transition: transform 420ms var(--bc-ease-out), background-color 280ms ease;
}
.bc-section .bc-card-cta-arrow svg { width: 14px; height: 14px; }

@media (hover: hover) and (pointer: fine) {
    .bc-section .bc-card:hover .bc-card-cta { color: var(--bc-white); }
    .bc-section .bc-card:hover .bc-card-cta-arrow { transform: translateX(3px); }
}

@media (max-width: 720px) {
    .bc-section .bc-card-body { padding: 20px 24px 22px; }
    .bc-section .bc-card .bc-card-title,
    .bc-section h3.bc-card-title { font-size: 1.125rem !important; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .bc-section .bc-card,
    .bc-section .bc-card-img {
        transition: none !important;
        transform: none !important;
        animation: none !important;
        opacity: 1 !important;
    }
}

/* ═══════════════════════════════════════════════
   Single case — /cases/{slug}/
   ═══════════════════════════════════════════════ */

.bc-single {
    --bc-blue-deep: #00458a;
    --bc-red: #e2161c;
    --bc-cream: #f7f0da;
    --bc-white: #ffffff;
    --bc-ink-900: #0a1628;
    --bc-ink-700: #2a3748;
    --bc-ink-500: #5a6578;
    --bc-border: #e5e9ef;
    --bc-bg: #f4f7fb;
    --bc-ease-out: cubic-bezier(0.23, 1, 0.32, 1);

    font-family: 'Source Sans 3', system-ui, sans-serif;
    color: var(--bc-ink-700);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding: 0 0 clamp(60px, 9vw, 120px);
}

.bc-single *,
.bc-single *::before,
.bc-single *::after { box-sizing: border-box; }

.bc-single__container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 72px);
}

/* ── Top-banner — matcher [page_banner] shortcode ── */
.bc-single .page-banner {
    position: relative;
    max-width: var(--container-max, 1800px);
    margin: 16px var(--gutter, clamp(24px, 5vw, 72px)) clamp(40px, 6vw, 72px);
    min-height: 480px;
    max-height: 560px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 20px;
    background: #0b1a2d;
    box-shadow: var(--shadow-hero, 0 40px 80px -40px rgba(0, 69, 138, 0.4), 0 0 0 1px rgba(0, 69, 138, 0.06));
    isolation: isolate;

    opacity: 0;
    transform: translateY(40px);
    animation: bc-banner-enter 1100ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) 100ms forwards;
}

@keyframes bc-banner-enter {
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1944px) {
    .bc-single .page-banner { margin-left: auto; margin-right: auto; }
}
@media (max-width: 1100px) {
    .bc-single .page-banner { min-height: 420px; }
}
@media (max-width: 960px) {
    .bc-single .page-banner { min-height: 380px; border-radius: 14px; }
}
@media (max-width: 560px) {
    .bc-single .page-banner { border-radius: 12px; min-height: 340px; }
}

.bc-single .page-banner__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    border-radius: inherit;
}

.bc-single .page-banner__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    opacity: 0;
    transform: scale(1.06);
    animation: bc-banner-img-enter 1800ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) 200ms forwards;
}

@keyframes bc-banner-img-enter {
    to { opacity: 1; transform: scale(1); }
}

.bc-single .page-banner__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background:
        linear-gradient(100deg,
            rgba(0, 69, 138, 0.78) 0%,
            rgba(0, 69, 138, 0.55) 35%,
            rgba(40, 133, 193, 0.28) 65%,
            rgba(247, 240, 218, 0.22) 100%),
        linear-gradient(180deg,
            rgba(10, 22, 40, 0.35) 0%,
            rgba(10, 22, 40, 0) 30%,
            rgba(10, 22, 40, 0) 60%,
            rgba(10, 22, 40, 0.55) 100%);
    pointer-events: none;
}

.bc-single .page-banner__grid {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at 70% 30%, black 10%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 70% 30%, black 10%, transparent 75%);
    opacity: 0;
    animation: bc-banner-grid-fade 1600ms ease-out 700ms forwards;
    border-radius: inherit;
    pointer-events: none;
}

@keyframes bc-banner-grid-fade {
    to { opacity: 1; }
}

.bc-single .page-banner__inner {
    position: relative;
    z-index: 4;
    width: 100%;
    padding: clamp(60px, 9vh, 100px) clamp(32px, 5vw, 72px) clamp(40px, 6vh, 64px);
}

@media (max-width: 960px) {
    .bc-single .page-banner__inner { padding-top: clamp(48px, 7vh, 72px); }
}

.bc-single .page-banner__text { max-width: 720px; }

.bc-single .page-banner__text > * {
    opacity: 0;
    transform: translateY(16px);
    animation: bc-banner-rise 900ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) forwards;
}
.bc-single .page-banner__text > *:nth-child(1) { animation-delay: 600ms; }
.bc-single .page-banner__text > *:nth-child(2) { animation-delay: 750ms; }
.bc-single .page-banner__text > *:nth-child(3) { animation-delay: 900ms; }
.bc-single .page-banner__text > *:nth-child(4) { animation-delay: 1050ms; }

@keyframes bc-banner-rise {
    to { opacity: 1; transform: translateY(0); }
}

.bc-single .page-banner .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bejco-cream, #f7f0da);
}
.bc-single .page-banner .eyebrow::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--bejco-red, #e2161c);
    border-radius: 2px;
}

.bc-single .page-banner__title {
    margin: 16px 0 16px;
    font-family: 'Oswald', system-ui, sans-serif;
    font-weight: 600;
    font-size: clamp(2.25rem, 4.6vw, 3.75rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 24px rgba(0, 30, 60, 0.35);
}

.bc-single .page-banner__intro {
    margin: 0 0 20px;
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.55;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88);
    max-width: 620px;
    text-shadow: 0 1px 12px rgba(0, 30, 60, 0.35);
}

.bc-single .page-banner__breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 500;
    text-shadow: 0 1px 8px rgba(0, 30, 60, 0.3);
    flex-wrap: wrap;
}
.bc-single .page-banner__breadcrumb a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    transition: color 220ms ease;
}
.bc-single .page-banner__breadcrumb svg {
    width: 12px;
    height: 12px;
    color: var(--bejco-cream, #f7f0da);
    flex-shrink: 0;
}
.bc-single .page-banner__breadcrumb-current {
    color: var(--bejco-cream, #f7f0da);
    font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
    .bc-single .page-banner__breadcrumb a:hover { color: var(--bejco-cream, #f7f0da); }
}

@media (prefers-reduced-motion: reduce) {
    .bc-single .page-banner,
    .bc-single .page-banner__text > *,
    .bc-single .page-banner__img,
    .bc-single .page-banner__grid {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Layout ── */
.bc-single__layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: start;
}

@media (max-width: 920px) {
    .bc-single__layout { grid-template-columns: 1fr; gap: 36px; }
}

/* ── Galleri ── */
.bc-single__media {
    position: sticky;
    top: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (max-width: 920px) {
    .bc-single__media { position: static; }
}

.bc-single__stage {
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    background: #0a1628;
    aspect-ratio: 4/3;
}
.bc-single__stage--empty {
    background: linear-gradient(135deg, #0a1628, #00458a);
}

.bc-single__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #0a1628;
}

.bc-single__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bc-single__thumb {
    width: 84px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    background: var(--bc-bg);
    cursor: pointer;
    padding: 0;
    opacity: 0.7;
    transition: opacity 200ms ease, border-color 200ms ease, transform 320ms var(--bc-ease-out);
}
.bc-single__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bc-single__thumb:hover { opacity: 1; transform: translateY(-2px); }
.bc-single__thumb.is-active {
    opacity: 1;
    border-color: var(--bc-blue-deep);
}

/* ── Info ── */
.bc-single__info { padding-top: 4px; }

.bc-single__desc {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--bc-ink-500);
}
.bc-single__desc p { margin: 0 0 16px; }
.bc-single__desc p:last-child { margin-bottom: 0; }

.bc-single__desc h2 {
    font-family: 'Oswald', system-ui, sans-serif;
    font-size: clamp(1.375rem, 2.4vw, 1.75rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--bc-ink-900);
    margin: 32px 0 14px;
}
.bc-single__desc h3 {
    font-family: 'Oswald', system-ui, sans-serif;
    font-size: clamp(1.125rem, 1.8vw, 1.375rem);
    font-weight: 500;
    line-height: 1.25;
    color: var(--bc-ink-900);
    margin: 26px 0 12px;
}
.bc-single__desc h2:first-child,
.bc-single__desc h3:first-child { margin-top: 0; }

.bc-single__desc ul,
.bc-single__desc ol {
    margin: 0 0 16px;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bc-single__desc li { line-height: 1.6; }

.bc-single__desc a {
    color: var(--bc-blue-deep);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 200ms ease;
}
.bc-single__desc a:hover { color: var(--bc-red); }

.bc-single__desc strong { color: var(--bc-ink-900); font-weight: 700; }
.bc-single__desc em { font-style: italic; }

/* ── Specs ── */
.bc-single__specs {
    margin: 32px 0 0;
    padding: 0;
    border-top: 1px solid var(--bc-border);
}

.bc-single__spec {
    display: grid;
    grid-template-columns: 38% 1fr;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid var(--bc-border);
}
.bc-single__spec.is-valueonly { grid-template-columns: 1fr; }
.bc-single__spec.is-valueonly dt { display: none; }

.bc-single__spec dt {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bc-ink-500);
    margin: 0;
    align-self: center;
}

.bc-single__spec dd {
    font-family: 'Oswald', system-ui, sans-serif;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--bc-ink-900);
    margin: 0;
    line-height: 1.35;
    align-self: center;
}

/* ── Tilbage-CTA i bunden ── */
.bc-single__footer {
    margin-top: clamp(48px, 7vw, 80px);
    padding-top: clamp(32px, 4vw, 48px);
    border-top: 1px solid var(--bc-border);
    display: flex;
    justify-content: center;
}

.bc-single__cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 16px 28px 16px 18px;
    border-radius: 999px;
    background: var(--bc-blue-deep);
    color: var(--bc-white);
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: background-color 280ms ease, transform 420ms var(--bc-ease-out);
}

.bc-single__cta-arrow {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bc-red);
    color: var(--bc-white);
    transition: transform 420ms var(--bc-ease-out);
}
.bc-single__cta-arrow svg { width: 16px; height: 16px; }

@media (hover: hover) and (pointer: fine) {
    .bc-single__cta:hover {
        background: #003a75;
        transform: translateY(-2px);
    }
    .bc-single__cta:hover .bc-single__cta-arrow { transform: translateX(-3px); }
}
