/* ═══════════════════════════════════════════════════════════════════
    Enghoff Bilpleje – Custom Styles
    Palette: dark bg · #f0f0f0 text · white accents · Inter font
    ═══════════════════════════════════════════════════════════════════ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0d0d0d;
    --surface: #1a1a1a;
    --surface-2: #242424;
    --text: #f0f0f0;
    --text-muted: #a0a0a0;
    --accent: #ffffff;
    --accent-hover: #d0d0d0;
    --border: #2a2a2a;
    --radius: 8px;
    --radius-lg: 16px;
    --shadow: 0 2px 12px rgba(0,0,0,.20);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.30);
    --section-pad: 6rem 1.5rem;
    --max-w: 1200px;
    --nav-h: 70px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Typography helpers ── */
.section-eyebrow {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: .5rem;
}
.section-heading {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    background: linear-gradient(to right, #36a9e1, #8161a7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.25rem;
}
.section-subheading {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
}
.section-body {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.75;
}
.section-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--section-pad);
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header .section-subheading { margin-bottom: 0; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 2rem;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, box-shadow .2s, opacity .2s;
    border: 2px solid transparent;
    line-height: 1;
}
.btn--primary {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--full { width: 100%; justify-content: center; }
.btn--loading { opacity: .7; cursor: not-allowed; }

/* ── Spinner ── */
.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(0,0,0,.25);
    border-top-color: var(--bg);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════ NAVBAR ═══════════════════ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13,13,13,.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-h);
}
.navbar-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar-brand { display: flex; align-items: center; }
.navbar-logo { height: 65px; width: auto; object-fit: contain; }
.navbar-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-link {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color .15s;
    padding: .25rem 0;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform .2s;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link--instagram {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--text-muted);
}
.nav-link--instagram:hover { color: var(--text); }
.nav-link--instagram::after { display: none; }
.instagram-label { font-size: .85rem; }

/* hamburger */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.toggle-bar {
    display: block;
    width: 24px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
.toggle-bar--open { opacity: 0; }

@media (max-width: 680px) {
    .navbar-toggle { display: flex; }
    .navbar-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 1.25rem;
        box-shadow: var(--shadow-lg);
    }
    .navbar-links--open { display: flex; }
    .instagram-label { display: inline; }
}

/* ═══════════════════ HERO ═══════════════════ */
.hero {
    background: var(--bg);
    padding-top: 5rem;
    padding-bottom: 5rem;
    overflow: hidden;
}
.hero-content {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.hero-eyebrow {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: .75rem;
}
.hero-headline {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    background: linear-gradient(to right, #36a9e1, #8161a7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
}
.hero-body {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 2.5rem;
    max-width: 480px;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-image { position: relative; }
.hero-img {
    width: 100%;
    height: 540px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 860px) {
    .hero-content { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-image { order: -1; }
    .hero-img { height: 300px; }
    .hero-body { max-width: none; }
}

/* ═══════════════════ ABOUT ═══════════════════ */
.about { background: var(--surface); }
.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.about-text .section-heading { margin-top: .25rem; }

@media (max-width: 860px) {
    .about-inner { grid-template-columns: 1fr; gap: 2rem; }
    .about-img { height: 280px; }
}

/* ═══════════════════ SERVICES ═══════════════════ */
.services { background: var(--bg); }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.service-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: box-shadow .2s, transform .2s;
    overflow: hidden;
}
.service-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.service-card--featured {
    border-color: var(--accent);
    border-width: 2px;
    background: var(--bg);
}
.service-card-badge {
    position: absolute;
    top: 0.5rem; right: 0.5rem;
    font-size: .5rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: var(--accent);
    color: var(--bg);
    padding: .25rem .65rem;
    border-radius: 100px;
}
.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.service-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}
.service-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}
.service-card-list { display: flex; flex-direction: column; gap: .5rem; }
.service-card-list li {
    font-size: .9rem;
    color: var(--text-muted);
    padding-left: 1.2rem;
    position: relative;
}
.service-card-list li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* ═══════════════════ BEFORE / AFTER ═══════════════════ */
.before-after { background: var(--surface); }
.ba-wrapper { max-width: 720px; margin: 0 auto; user-select: none; }

.ba-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    cursor: col-resize;
    aspect-ratio: 3/4;
}
.ba-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.ba-img--before { position: absolute; inset: 0; }
.ba-after-layer {
    position: absolute;
    top: 0; left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: width 0s;
}
.ba-img--after {
    position: absolute;
    top: 0; left: 0;
    width: 100%;  /* full image, clipped by parent */
    height: 100%;
    object-fit: cover;
}
.ba-divider {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: #fff;
    box-shadow: 0 0 8px rgba(0,0,0,.4);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ba-divider-handle {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
    color: var(--text);
    flex-shrink: 0;
}
.ba-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: col-resize;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}
.ba-labels {
    display: flex;
    justify-content: space-between;
    margin-top: .75rem;
}
.ba-label {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ═══════════════════ FEATURES ═══════════════════ */
.features { background: var(--bg); }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}
.feature-item { text-align: center; }
.feature-icon {
    width: 72px; height: 72px;
    margin: 0 auto 1.25rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}
.feature-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .6rem;
}
.feature-body { font-size: .9rem; color: var(--text-muted); line-height: 1.65; }

@media (max-width: 700px) {
    .features-grid { grid-template-columns: 1fr; gap: 2rem; }
    .feature-item { text-align: left; display: flex; gap: 1.25rem; align-items: flex-start; }
    .feature-icon { flex-shrink: 0; margin: 0; }
}

/* ═══════════════════ CONTACT ═══════════════════ */
.contact { background: var(--surface); }
.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
}
.contact-info .section-heading { margin-top: .25rem; }
.contact-details {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-detail {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .95rem;
    color: var(--text-muted);
    transition: color .15s;
}
.contact-detail:hover { color: var(--text); }
.contact-detail svg { flex-shrink: 0; }

/* ── Contact form ── */
.contact-form-wrapper {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-label {
    font-size: .85rem;
    font-weight: 500;
    color: var(--text);
}
.required { color: #e53e3e; margin-left: .15rem; }
.form-input {
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    width: 100%;
}
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}
.form-textarea { resize: vertical; min-height: 130px; }
.form-error { font-size: .8rem; color: #e53e3e; }
.form-note { font-size: .8rem; color: var(--text-muted); text-align: center; margin-top: -.25rem; }
.form-alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: .9rem;
    line-height: 1.5;
}
.form-alert svg { flex-shrink: 0; margin-top: .1rem; }
.form-alert--success { background: #052e16; color: #86efac; border: 1px solid #166534; }
.form-alert--error { background: #2e0505; color: #fca5a5; border: 1px solid #991b1b; }

@media (max-width: 860px) {
    .contact-inner { grid-template-columns: 1fr; gap: 2rem; }
    .contact-form-wrapper { padding: 1.75rem; }
}
@media (max-width: 500px) {
    .form-row { grid-template-columns: 1fr; }
}

/* ═══════════════════ FOOTER ═══════════════════ */
.site-footer {
    background: #0a0a0a;
    color: rgba(255,255,255,.7);
    padding: 3rem 1.5rem;
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}
.footer-logo-img { height: 70px; object-fit: contain; opacity: .85; }
.footer-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-links a {
    font-size: .9rem;
    color: rgba(255,255,255,.65);
    transition: color .15s;
}
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: .8rem; color: rgba(255,255,255,.4); }

/* ═══════════════════ BLAZOR ERROR UI ═══════════════════ */
#blazor-error-ui {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #2e0505;
    color: #fca5a5;
    padding: .75rem 1.25rem;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 9999;
    display: none;
}
#blazor-error-ui a { color: #fecaca; text-decoration: underline; }
#blazor-error-ui .dismiss { cursor: pointer; margin-left: auto; }

/* ═══════════════════ FIXED NAVBAR & SCROLL SHADOW ═══════════════════ */
/* Override sticky → fixed so it always follows the scroll */
.navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    transition: box-shadow .25s, background .25s;
}
.navbar--scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,.10);
}

/* compensate for fixed navbar height */
main {
    padding-top: var(--nav-h);
}

/* ═══════════════════ SCROLL REVEAL ANIMATIONS ═══════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .65s cubic-bezier(.22,1,.36,1),
                transform .65s cubic-bezier(.22,1,.36,1);
}
.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* stagger helpers */
.reveal--d1 { transition-delay: .08s; }
.reveal--d2 { transition-delay: .16s; }
.reveal--d3 { transition-delay: .24s; }
.reveal--d4 { transition-delay: .32s; }
.reveal--d5 { transition-delay: .40s; }
.reveal--d6 { transition-delay: .48s; }

/* ═══════════════════ GALLERY PAGE ═══════════════════ */
.gallery-page { background: var(--surface); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.gallery-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s;
}

.gallery-item:hover .gallery-item-img {
    transform: scale(1.06);
}

@media (max-width: 500px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* ═══════════════════ LIGHTBOX ═══════════════════ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,.94);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}

.lightbox--open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
    user-select: none;
    -webkit-user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255,255,255,.25);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,.25);
}

.lightbox-nav--prev { left: 1.25rem; }
.lightbox-nav--next { right: 1.25rem; }

.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.65);
    font-size: .9rem;
    font-weight: 500;
}

@media (max-width: 500px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }
    .lightbox-nav--prev { left: .75rem; }
    .lightbox-nav--next { right: .75rem; }
}
