/* ==========================================================================
   Hero — front page & subpage variants
   ========================================================================== */

/* Frontpage Hero — ice-beam diagonal, with full-bleed background image */
.ab-hero {
    position: relative;
    background: var(--ab-cryo-bg);
    color: var(--ab-white);
    overflow: hidden;
    padding: clamp(90px, 12vw, 160px) 0 clamp(70px, 9vw, 140px);
    isolation: isolate;
}

/* Background image layer — covers the whole hero section */
.ab-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.35;
}
.ab-hero__bg::after {
    /* Darken the image slightly so the ice-beam and content remain dominant */
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(10,30,42,0.55) 0%, rgba(10,30,42,0.30) 50%, rgba(10,30,42,0.65) 100%);
}

.ab-hero__beam {
    position: absolute;
    top: -10%; left: -10%;
    width: 80%; height: 130%;
    background: var(--ab-ice-beam);
    opacity: 0.20;
    filter: blur(60px);
    transform: rotate(-12deg);
    pointer-events: none;
    z-index: -1;
}
.ab-hero__grain {
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    mix-blend-mode: overlay; opacity: 0.45;
    z-index: -1;
}

.ab-hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}
.ab-hero__copy { display: flex; flex-direction: column; gap: 22px; max-width: 620px; }

.ab-hero__title {
    line-height: 0.95;
    letter-spacing: -0.02em;
}
.ab-hero__title .ab-text-ice    { color: var(--ab-ice-300); display: inline-block; }
.ab-hero__title .ab-text-accent { color: var(--ab-orange-500); display: inline-block; }

.ab-hero__copy .ab-lead { color: var(--ab-ice-100); max-width: 58ch; }

/* Equal-width CTA buttons — 2-column grid */
.ab-hero__cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 8px;
    max-width: 460px;
}
.ab-hero__cta .ab-btn {
    width: 100%;
    justify-content: center;
    padding-left: 20px;
    padding-right: 20px;
}

/* Minimal inline USPs — no boxes, just text with orange-dot separators */
.ab-hero__usps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 26px;
    padding: 0;
    list-style: none;
    font-family: var(--ab-font-body);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
}
.ab-hero__usps li {
    display: inline-flex;
    align-items: baseline;
}
.ab-hero__usps li span {
    font-family: var(--ab-font-display);
    color: var(--ab-white);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    margin-right: 6px;
}
.ab-hero__usps li:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--ab-orange-500);
    border-radius: 50%;
    margin: 0 18px;
    vertical-align: middle;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .ab-hero__cta { grid-template-columns: 1fr; max-width: none; }
    .ab-hero__usps { gap: 8px 0; font-size: 0.72rem; letter-spacing: 0.10em; }
    .ab-hero__usps li:not(:last-child)::after { margin: 0 12px; }
}

/* Outer wrapper — does NOT clip, so spec badges can sit on the edges. */
/* Square aspect so cover-fit works equally well on desktop and mobile. */
.ab-hero__visual {
    position: relative;
    aspect-ratio: 1/1;
}
/* Inner clipper — holds the image; THIS is where overflow:hidden lives. */
.ab-hero__visual-img {
    position: absolute;
    inset: 0;
    border-radius: var(--ab-radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--ab-petrol-700);
}
.ab-hero__visual-img img,
.ab-hero__visual-img video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ab-hero__visual-img::after {
    content:'';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,30,42,0.18) 0%, transparent 35%, transparent 65%, rgba(10,30,42,0.30) 100%);
    pointer-events: none;
}

/* Floating spec cards — matches the "Se ydelser" ghost button style for cohesion */
.ab-hero__spec {
    position: absolute;
    z-index: 5;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--ab-radius-md);
    color: var(--ab-white);
}
.ab-hero__spec--top    { top: -22px; left: -22px; }
.ab-hero__spec--bottom { bottom: -22px; right: -22px; text-align: right; }
.ab-hero__spec strong  { display: block; font-family: var(--ab-font-display); font-size: 1.6rem; line-height: 1; color: var(--ab-orange-500); letter-spacing: 0.01em; }
.ab-hero__spec small   { display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ab-white); margin-top: 6px; white-space: nowrap; opacity: 0.85; }

/* Subpage hero — image as primary background, cryo gradient as overlay */
.ab-page-hero {
    background: var(--ab-petrol-700);
    color: var(--ab-white);
    /* padding-bottom intentionally matches crumbs' padding-top below
       so the gap above and below the crumbs text is symmetric */
    padding: clamp(56px, 7vw, 96px) 0 clamp(20px, 2.5vw, 32px);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
/* Background image — full visibility, covers section */
.ab-page-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* Gradient mesh overlay sitting on top of the image — provides the
   cryo-industrial mood while keeping text legible. Tuned for ~60-80%
   coverage so the image shows through without dominating. */
.ab-page-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 80% at 10% 0%,  rgba(0, 194, 212, 0.28) 0%, transparent 55%),
        radial-gradient(80%  60% at 90% 100%, rgba(255, 106, 26, 0.10) 0%, transparent 65%),
        linear-gradient(135deg,
            rgba(10, 30, 42, 0.78) 0%,
            rgba(10, 30, 42, 0.55) 50%,
            rgba(10, 30, 42, 0.85) 100%);
}
.ab-page-hero::before {
    content:''; position:absolute; left: -10%; top: -20%;
    width: 50%; height: 140%;
    background: var(--ab-ice-beam); opacity: 0.15; filter: blur(80px); transform: rotate(-14deg);
    z-index: -1;
    pointer-events: none;
}
.ab-page-hero__inner { position: relative; z-index: 1; max-width: 760px; }

/* Stack the hero's direct children vertically so crumbs can be pushed
   to the bottom via `order` regardless of HTML position. */
.ab-page-hero .ab-container { display: flex; flex-direction: column; }

/* Breadcrumbs → bottom of hero with a subtle top divider */
.ab-page-hero__crumbs {
    order: 99;
    margin-top: clamp(32px, 4vw, 56px);
    /* This MUST match .ab-page-hero's padding-bottom so the gap above
       and below the crumbs text reads as symmetric */
    padding-top: clamp(20px, 2.5vw, 32px);
    border-top: 1px solid rgba(255,255,255,0.10);
}

/* Tighten h1 line-height in page-hero so the leading-space above the
   first visual letter is minimised. Without this, single-line h1s
   appear to have a larger gap from the eyebrow than multi-line ones,
   because the line-box has ~5% leading regardless of content. */
.ab-page-hero h1 {
    line-height: 0.95;
    margin: 0;
}

/* Just a touch more breathing room between eyebrow pill and h1 */
.ab-page-hero .ab-eyebrow { margin-bottom: clamp(10px, 1.2vw, 16px); }
.ab-page-hero__inner h1 { color: var(--ab-white); margin: 12px 0 18px; }
.ab-page-hero .ab-lead { color: var(--ab-ice-100); }
.ab-page-hero__crumbs {
    display: flex; gap: 10px; align-items: center;
    font-family: var(--ab-font-mono); font-size: 0.78rem;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--ab-ice-200);
}
.ab-page-hero__crumbs a { color: var(--ab-ice-300); }
.ab-page-hero__crumbs a:hover { color: var(--ab-petrol-700); }
.ab-page-hero__crumbs .sep { color: var(--ab-petrol-700); }

/* Scope: any .ab-text-accent (default orange) inside the subpage hero becomes
   dark petrol — same treatment as Laserrensning on the front-page hero. */
.ab-page-hero .ab-text-accent { color: var(--ab-petrol-700); }

/* ==========================================================================
   Dry-ice fog video overlay — used on heroes + footer.
   Source is a black-bg + cyan-fog mp4 clip; mix-blend-mode: screen drops
   the black so only the fog particles overlay the underlying bg.
   ========================================================================== */
.ab-fog-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    opacity: 0.22;
    mix-blend-mode: screen;
    z-index: 1;
}
.ab-hero,
.ab-page-hero { position: relative; overflow: hidden; }
.ab-hero > .ab-container,
.ab-page-hero > .ab-container { position: relative; z-index: 3; }

/* Footer variant — pinned to the absolute bottom of the footer with a fixed
   height. Video is the FIRST child of <footer> in the markup, so it naturally
   paints behind the in-flow content without z-index gymnastics. isolation:
   isolate scopes mix-blend-mode to the footer so the screen blend can read
   the footer's bg as its backdrop. */
.ab-footer { position: relative; overflow: hidden; isolation: isolate; }
.ab-footer .ab-fog-video {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 220px;
    opacity: 0.32;
}
@media (max-width: 700px) {
    .ab-footer .ab-fog-video { height: 150px; }
}

/* Hero CTA strip */
.ab-strip {
    background: var(--ab-petrol-700);
    color: var(--ab-ice-100);
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ab-strip__inner { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
.ab-strip__items { display: flex; gap: 28px; flex-wrap: wrap; font-family: var(--ab-font-mono); font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; }
.ab-strip__items li { display: flex; align-items: center; gap: 8px; }
.ab-strip__items strong { color: var(--ab-orange-500); }

@media (max-width: 900px) {
    .ab-hero__inner { grid-template-columns: 1fr; gap: 50px; }
    .ab-hero__visual { aspect-ratio: 4/3; }
    .ab-hero__spec--top { top: -14px; left: -10px; }
    .ab-hero__spec--bottom { bottom: -14px; right: -10px; }
    .ab-hero__spec strong { font-size: 1.4rem; }
}
@media (max-width: 480px) {
    .ab-hero__spec { padding: 12px 14px; }
    .ab-hero__spec strong { font-size: 1.2rem; }
    .ab-hero__spec small { font-size: 0.65rem; letter-spacing: 0.1em; }
}
