/* ===================================
   VARIABLES & BASE STYLES
=================================== */
:root {
    --bg: #0f0f10;
    --fg: #f7f7f5;
    --muted: #b9b9b1;
    --accent: #c8892b;
    --accent-2: #8b5e1f;

    /* Hörn-banderoll (justera vid behov) */
    --ribbon-offset: 78px; /* hur långt ned från hörnet banderollen ligger */
    --ribbon-width: 18rem; /* banderollens textbredd */
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: Inter, system-ui, Arial, sans-serif;
    overflow-x: hidden; /* Stop the menu from swiping forward */
}

a {
    color: var(--fg);
    text-decoration: none;
}

/* ===================================
   HEADER & NAVIGATION
=================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: rgba(15, 15, 16, .72);
    backdrop-filter: saturate(1.3) blur(8px);
    border-bottom: 1px solid #242424;
    transition: padding 0.25s ease, background 0.25s ease;
}

.header-title {
    font-family: "Playfair Display", serif;
}

/* Shrinked state */
.site-header.shrink {
    padding: 8px 16px;
    background: rgba(15, 15, 16, .9);
}

/* Logo scaling */
.site-header .brand img {
    height: 36px;
    transition: height 0.25s ease;
}

.site-header.shrink .brand img {
    height: 28px;
}

/* Hamburger button */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: padding 0.25s ease, transform 0.25s ease;
}

.site-header.shrink .nav-toggle {
    padding: 6px;
    transform: scale(0.9);
}

.nav-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--fg);
    margin: 4px 0;
    transition: transform .25s, opacity .25s;
}

/* Offset so content is not hidden under fixed header */
body {
    padding-top: 72px;
}

@media (max-width: 600px) {
    body {
        padding-top: 64px;
    }

    .site-header .brand img {
        height: 32px;
    }

    .site-header.shrink .brand img {
        height: 26px;
    }
}


.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img {
    height: 36px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-nav a {
    opacity: .9;
}

.btn {
    background: var(--accent);
    color: #1a1a1a;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    border: 1px solid #0003;
}

/* --- Hamburger-knapp --- */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nav-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--fg);
    margin: 4px 0;
    transition: transform .25s, opacity .25s;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* --- Off-canvas mobilnav --- */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 95;
}

.nav-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 860px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(78vw, 360px);
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        background: #131315;
        border-left: 1px solid #2a2a2a;
        transform: translateX(calc(100% + 4px)); /* outside of scope */
        transition: transform .25s ease;
        z-index: 96;
        will-change: transform;
    }

    .site-nav.open {
        transform: translateX(0);
    }

    .site-nav a {
        padding: 10px 8px;
        border-radius: 10px;
    }

    .site-nav .btn {
        text-align: center;
    }
}

/* --- Stäng-knapp (visa bara på mobil) --- */
.nav-close {
    display: none;
}

@media (max-width: 860px) {
    .nav-close {
        display: inline-flex;
        align-self: flex-end;
        background: #1b1b1d;
        border: 1px solid #2a2a2a;
        color: var(--fg);
        border-radius: 10px;
        padding: 8px 12px;
        cursor: pointer;
        margin-bottom: 8px;
    }

    .nav-close:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }
}

/* --- Lås scroll vid öppen meny --- */
body.no-scroll {
    overflow: hidden;
}

/* ===================================
   LAYOUT & SECTIONS
=================================== */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

section {
    padding: 56px 0;
}

h2 {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: clamp(24px, 4vw, 36px);
    margin: 0 0 12px;
}

.card {
    background: #131315;
    border: 1px solid #2a2a2a;
    border-radius: 18px;
    padding: 20px;
}

.grid {
    display: grid;
    gap: 16px;
}

.two {
    grid-template-columns:repeat(2, minmax(0, 1fr));
}

.three {
    grid-template-columns:repeat(3, minmax(0, 1fr));
}

@media (max-width: 860px) {
    .two, .three {
        grid-template-columns:1fr;
    }
}

/* ===================================
   HERO VIDEO
=================================== */
.hero--video {
    position: relative;
    min-height: 540px;
    display: grid;
    place-items: center;
    padding: 56px 20px;
    overflow: clip;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.05);
}

.hero--video::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .35), rgba(0, 0, 0, .5));
}

.hero-content {
    position: relative;
    max-width: 850px;
    background: rgba(19, 19, 21, .55);
    backdrop-filter: blur(6px) saturate(1.1);
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    padding: 22px;
    text-align:center;
    display: flex;
    flex-direction: column;
    align-items: center;  /* centrerar horisontellt */
    justify-content: center;

}

.hero-title {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: clamp(28px, 5vw, 56px);
    margin: 0 0 6px;
}

.hero-sub {
    color: var(--muted);
    margin: 0 0 14px;
    text-align: center;
}

.hero-logo {
    width: clamp(220px, 40vw, 220px);
    height: auto;
    display: inline-block;
    margin: 0 0 16px;
}


@media (max-width: 1024px) {
    .hero--video {
        min-height: 100dvh;
        padding: 28px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-video {
        display: none;
    }

    .hero--video {
        background: url('assets/hero-poster.jpg') center/cover no-repeat;
    }
}

/* ===================================
   MENYLISTA
=================================== */
.menu-list .item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed #2a2a2a;
}

.menu-list .desc {
    color: var(--muted);
    font-size: 0.95rem;
}

.price {
    color: var(--accent);
    font-weight: 700;
}

/* ===================================
   GALLERI
=================================== */
.grid.three {
    gap: 24px;
}

img.card {
    display: block;
    width: 100%;
    height: auto;
    padding: 0;
    background: transparent;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

@media (min-width: 861px) {
    img.card {
        aspect-ratio: 4/5;
        object-fit: cover;
    }
}

/* ===================================
   FLIP CARDS (valfritt)
=================================== */
.flip-card {
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
    padding: 0;
    width: 100%;
    text-align: inherit;
}

.flip-card[role="button"] {
    cursor: pointer;
}

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform .6s;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-inner {
    transform: rotateY(180deg);
}

.flip-front, .flip-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 18px;
    overflow: clip;
}

.flip-front, .flip-back {
    background: #131315;
    border: 1px solid #2a2a2a;
    padding: 20px;
}

.flip-back {
    background: #1b1b1d;
    transform: rotateY(180deg);
}

.flip-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Center content in flip card backs */
.flip-back.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#meny .grid.two > .card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 380px; /* ensures both cards line up */
}

#meny .cropped-box {
    height: 280px; /* fixed preview height */
    overflow: hidden; /* crop the image */
    border-radius: 12px;
    position: relative;
}

#meny .cropped-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ensures the image fills the box */
    object-position: top;
    display: block;
}

@media (min-width: 861px) {
    #meny .grid.two > .flip-card,
    #onsdagsquiz .grid.two > .flip-card {
        min-height: 420px;
    }
}

/* ===================================
   MENYBILDER (cropped + zoom-ikon)
=================================== */
.cropped-box {
    height: 240px;
    overflow: hidden;
    border-radius: 12px;
    position: relative;
}

.cropped-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.menu-fullscreen {
    cursor: zoom-in;
}

.zoom-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, .6);
    border: 1px solid #2a2a2a;
    color: var(--fg);
    font-size: 12px;
    padding: 6px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.zoom-badge svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* ===================================
   BILDMODAL (fade + zoom, skroll från toppen)
=================================== */
.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Starta från toppen */
    padding: 20px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: background 0.3s ease, opacity 0.3s ease;
    overscroll-behavior: contain;
    touch-action: pan-y;
    overflow-y: auto; /* skrolla om för stor */
}

.image-modal img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    touch-action: pan-y;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.image-modal.show {
    background: rgba(0, 0, 0, 0.85);
    opacity: 1;
    pointer-events: all;
}

.image-modal.show img {
    transform: scale(1);
    opacity: 1;
}

/* --- Stängknapp med X-ikon --- */
.image-modal button.close-modal {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(200, 137, 43, 0.95);
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.image-modal button.close-modal::before,
.image-modal button.close-modal::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background-color: #1a1a1a;
    border-radius: 2px;
}

.image-modal button.close-modal::before {
    transform: rotate(45deg);
}

.image-modal button.close-modal::after {
    transform: rotate(-45deg);
}

.image-modal button.close-modal:hover {
    background: rgba(200, 137, 43, 1);
    transform: scale(1.1);
}

/* Mobilanpassning */
@media (max-width: 600px) {
    .image-modal {
        padding: 0;
        scroll-padding-top: 64px;
    }

    .image-modal img {
        width: 100%;
        max-width: 100%;
        max-height: none;
        border-radius: 0;
    }

    .image-modal button.close-modal {
        top: 10px;
        right: 10px;
        width: 48px;
        height: 48px;
        background: rgba(200, 137, 43, 0.85);
        backdrop-filter: blur(4px);
    }

    .image-modal button.close-modal::before,
    .image-modal button.close-modal::after {
        width: 20px;
    }
}

/* ===================================
   FOOTER
=================================== */
footer {
    border-top: 2px solid #2a2a2a;
    color: var(--muted);
    padding: 48px 20px 32px 20px;
    margin-top: 80px;
    font-size: 1rem;
    text-align: center;
    background: linear-gradient(135deg, #131315 80%, #222024 100%);
    box-shadow: 0 -4px 32px 0 rgba(0, 0, 0, 0.18);
    position: relative;
    overflow: hidden;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

footer p {
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--fg);
    text-shadow: 0 1px 2px #0006;
}

.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    margin-top: 0;
}

.footer-logo {
    display: block;
    margin: 0 auto;
    height: 90px;
    width: auto;
    filter: drop-shadow(0 2px 8px #0004);
}

.footer-social a img {
    width: 36px;
    height: 36px;
    display: block;
    border-radius: 50%;
    background: #232325;
    box-shadow: 0 2px 8px #0002;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 6px;
}

.footer-social a:hover img {
    transform: scale(1.13) rotate(-4deg);
    box-shadow: 0 4px 16px #c8892b44;
    background: var(--accent);
}

@media (max-width: 600px) {
    .footer-inner {
        gap: 14px;
    }

    .footer-social a img {
        width: 32px;
        height: 32px;
        padding: 4px;
    }

    footer {
        padding: 32px 8px 20px 8px;
    }
}

/* ===== Onsdags Quiz kort ===== */
#onsdagsquiz .grid.two {
    align-items: stretch; /* gör att korten blir lika höga */
}

#onsdagsquiz .flip-card {
    height: 100%; /* fyll höjden i grid */
}

#onsdagsquiz .flip-front img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* visa hela bilden utan att beskära */
    background-color: #131315; /* matcha kortets bakgrund */
    border-radius: 12px;
}

/* Anpassning för mobil: gör korten lika höga och hela bilden synlig */
@media (max-width: 860px) {
    #onsdagsquiz .flip-card {
        min-height: 320px; /* höjd så bilden syns tydligt */
    }
}

.quiz-header {
    text-align: center;
    margin-bottom: 32px;
}

.quiz-header h2 {
    margin: 0 0 12px;
}

.quiz-logo {
    height: 72px;
    width: auto;
    margin-bottom: 12px;
}

.quiz-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--muted);
}


@media (max-width: 600px) {
    .quiz-logo {
        height: 48px;
    }
}

/* === HÖRN-BANDEROLL – FIX === */
:root {
    --ribbon-width: 18rem; /* bredden på banderollen */
    --ribbon-offset: 118px; /* hur långt NED från övre vänstra hörnet */
}

.site-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    width: 30rem; /* stor yta så rotationen inte croppas */
    height: 30rem;
    pointer-events: none;
    z-index: 9999;
}

.site-ribbon .btn {
    position: absolute;
    top: var(--ribbon-offset);
    left: 0;
    width: var(--ribbon-width);
    transform-origin: 0 50%; /* pivot i vänsterkant */
    transform: rotate(-42deg) translateX(-18%);
    /* drar ut den lite över vänsterkanten efter rotationen */
    border-radius: 0;
    padding: .45rem 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

/* Mobil – lite smalare och något högre upp + justera textposition */
@media (max-width: 480px) {
    :root {
        --ribbon-width: 14rem;
        --ribbon-offset: 94px;
    }

    .site-ribbon .btn {
        padding-left: 1.5rem; /* flytta texten lite åt höger */
    }
}

/* Mobil: headern alltid svart bakgrund */
@media (max-width: 860px) {
    .site-header {
        background: #000 !important;  /* heltäckande svart */
        backdrop-filter: none !important;
    }
}



/* Klick-pil på flip-cards under Quiz */
#onsdagsquiz .flip-card {
    position: relative; /* behövs för att kunna positionera pilen */
}

/* Själva pilen (chevron) */
#onsdagsquiz .flip-card::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 12px;
    width: 14px;
    height: 14px;
    border-right: 3px solid var(--fg);
    border-bottom: 3px solid var(--fg);
    transform: translateY(-50%) rotate(-45deg);
    opacity: .6;
    pointer-events: none;              /* stör inte klicket */
    transition: transform .25s, opacity .2s;
}

/* Lite “hint” vid hover/focus */
#onsdagsquiz .flip-card:hover::after,
#onsdagsquiz .flip-card:focus-visible::after {
    transform: translate(2px, -50%) rotate(-45deg);
    opacity: 1;
}

/* Dölj pilen när kortet är vänt */
#onsdagsquiz .flip-card.flipped::after {
    opacity: 0;
}

/* Gör pilen aningen större på mobil */
@media (max-width: 600px) {
    #onsdagsquiz .flip-card::after {
        right: 10px;
        width: 16px;
        height: 16px;
        border-width: 3px;
    }
}
