/* =============================
   Theme (lys, inspirert av bildene)
============================= */

:root{
  --bg: #f6f4ef;            /* varm, lys bakgrunn */
  --surface: rgba(255,255,255,0.78);
  --border: rgba(0,0,0,0.06);

  --text: #1f2937;
  --muted: rgba(31,41,55,0.72);

  /* Aksent hentet fra eskene */
  --accent: #d9c7ae;
  --accent-2: #cbb79c;

  --bg-base: -180px; /* juster: -120 til -260 er typisk */

  /* Knapper */
  --btn-text: #1f2937;

  /* Parallax variabler */
  --fg-shift: 0px;
  --bg-shift: 0px;
}

/* =============================
   Smooth Scroll
============================= */

html { scroll-behavior: auto; } /* viktig når vi bruker JS */

  scroll-padding-top: 80px; /* så det ikke havner under sticky header */
}




/* =============================
   Base / Reset
============================= */



*{ box-sizing: border-box; }

html, body{ height: 100%; }

body{
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }

/* Små, ryddige standarder */
p{ line-height: 1.65; color: var(--muted); margin: 0 0 1rem; }
ul{ padding-left: 1.2rem; margin: 0; }
li{ margin: 0.35rem 0; color: var(--muted); }

h1, h2, h3{
  margin: 0 0 0.75rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1{
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
}

h2{
  font-size: 28px;
  line-height: 1.2;
}

h3{
  font-size: 18px;
  line-height: 1.2;
}

body{ overflow-x: hidden; }

/* Layout helper */
.container{
  max-width: 900px;
  margin: 0 auto;
  padding: 0 18px;
}

/* =============================
   Header / Navigation (lys)
   (matcher base.html-klasser jeg ga)
============================= */

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,244,239,0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.site-nav{
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(203,183,156,0.28);
}

.brand-name{
  font-weight: 650;
  letter-spacing: 0.2px;
}

.nav-links{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link{
  padding: 8px 10px;
  border-radius: 10px;
  color: rgba(31,41,55,0.78);
}

.nav-link:hover{
  background: rgba(255,255,255,0.55);
  color: rgba(31,41,55,1);
}

.nav-link.active{
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.25rem;
}

/* =============================
   Main / Page layout
   (ingen "ramme" – hero må være full bredde)
============================= */

.site-main{
  margin: 0;
  padding: 0;
  min-height: 60vh;
}

.section-order{
  border-top: none;
  border-bottom: none;
  padding-top: 32px;   /* valgfritt */
}


/* =============================
   Parallax Hero (bakgrunn + forgrunn)
============================= */

.hero-parallax{
  /* Full bleed: går ut av evt. containere */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 100vh;                 /* scrollrom for parallax */
  background: var(--bg);

  /* Slå av evt. gamle section-stiler */
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.hero-sticky{
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);

  /* KRITISK: absolute barn posisjoneres inni hero */
  position: sticky;
}
.hero-sticky{ position: relative; } /* viktigst */

/* Bakgrunn */
.hero-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom; /* cropp vekk toppen */

  /* Base-crop + scroll-shift */
  transform: translateY(calc(var(--bg-base, 0px) + var(--bg-shift, 0px))) scale(1.06);
  transform-origin: center;
  will-change: transform;
}


/* Forgrunn */
.hero-fg{
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100vw;

  transform: translateX(-50%); /* fullbleed sentrert */
}

.hero-fg img{
  width: 100%;
  height: auto;
  display: block;
}




/* Myk overlay for lesbarhet (uten å mørkne) */
.hero-overlay{
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 35% 20%, rgba(255,255,255,0.75), rgba(255,255,255,0.10));
  pointer-events: none;
}

/* Tekst */
.hero-content{
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;

  /* Flytt ned – responsivt */
  padding: clamp(90px, 12vh, 190px) 18px 0 18px;
}

.hero-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.70);
  border: 1px solid var(--border);
  color: rgba(31,41,55,0.78);
  font-size: 14px;
}

.hero-actions{
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* =============================
   Buttons
============================= */

.btn,
button,
input[type="submit"]{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.65);
  font-weight: 650;
  color: var(--btn-text);
  cursor: pointer;
}

.btn-primary{
  background: linear-gradient(180deg, rgba(217,199,174,0.92), rgba(203,183,156,0.92));
  border-color: rgba(0,0,0,0.10);
}

.btn-ghost{
  background: rgba(255,255,255,0.60);
}

button:hover,
input[type="submit"]:hover,
.btn:hover{
  filter: brightness(0.98);
}

/* =============================
   Sections / Cards
============================= */

.section{
  padding: 54px 0;
  border-bottom: 0px solid var(--border);
}

.section:last-child{ border-bottom: none; }

.cards{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card{
  background: rgba(255,255,255,0.76);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

.card p{ margin: 0; }

/* CTA */
.section-cta{
  padding-top: 0;
}

.cta{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
}

/* =============================
   Forms
============================= */

form{
  max-width: 600px;
}

form p{ margin-bottom: 1rem; }

form label{
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  color: rgba(31,41,55,0.88);
}

input,
textarea{
  width: 90%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.90);
  margin-top: 0.2rem;
  font-size: 0.95rem;
  font-family: inherit;
}

textarea{
  resize: vertical;
  min-height: 120px;
}

input,
textarea,
select{
  width: 95%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.90);
  margin-top: 0.2rem;
  font-size: 0.95rem;
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus{
  outline: none;
  border-color: rgba(203,183,156,0.95);
  box-shadow: 0 0 0 3px rgba(217,199,174,0.30);
}


/* =============================
   Footer
============================= */

.site-footer,
footer{
  margin-top: 0;
  padding: 22px 18px;
  background: rgba(255,255,255,0.65);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.95rem;
  color: rgba(31,41,55,0.70);
}

.site-footer a,
footer a{
  color: rgba(31,41,55,0.85);
  text-decoration: underline;
  text-decoration-color: rgba(203,183,156,0.9);
  text-underline-offset: 3px;
}

.site-footer a:hover,
footer a:hover{
  text-decoration-color: rgba(203,183,156,1);
}

/* =============================
   Responsive
============================= */

@media (max-width: 900px){
  .cards{ grid-template-columns: 1fr; }
  .cta{ flex-direction: column; align-items: flex-start; }
  .hero-content{ padding-top: 72px; }
}

@media (max-width: 600px){
  .site-nav{ flex-direction: column; align-items: flex-start; }
  .nav-links{ width: 100%; justify-content: flex-start; }
  .hero-actions .btn,
  button,
  input[type="submit"]{
    width: 100%;
  }
}
/* =============================
   Bestilling – scene som bakgrunn
============================= */

/* Justeringer (enkelt å tweake) */
:root{
  --order-bg-y: -140px;     /* mer negativ = mer nedre del / fjell opp (typisk -90 til -220) */
  --order-bg-scale: 1.08;   /* litt zoom for å unngå “kanter” */
  --order-fg-bottom: -2px;  /* flytt forgrunn litt opp/ned */
}

/* Scene bak alt (kun bestilling-siden bruker disse klassene) */
.order-scene{
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}

.order-scene-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  transform: translateY(var(--order-bg-y)) scale(var(--order-bg-scale));
  transform-origin: center;
}

.order-scene-overlay{
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 40% 10%, rgba(255,255,255,0.85), rgba(255,255,255,0.18));
}

/* Forgrunn (pakker på sider) */
.order-scene-fg{
  position: absolute;
  left: 50%;
  bottom: var(--order-fg-bottom);
  width: 100vw;
  transform: translateX(-50%);
}

.order-scene-fg img{
  width: 100%;
  height: auto;
  display: block;
}

/* Fyll under forgrunn så det aldri blir “glipp” nederst */
.order-scene-fg::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 200px;
  background: var(--bg);
}

/* Innholdet over scenen */
.order-page{
  position: relative;
  z-index: 1;
  padding: 48px 0 90px;
}

/* Løfter kortet litt ned for å ikke kollidere med header */
.order-card{
  max-width: 640px;
  margin: clamp(30px, 10vh, 120px) auto 0;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
}

.order-title{
  margin: 0 0 10px;
  font-size: clamp(28px, 3.2vw, 42px);
}

/* Skjema-layout (samme som før) */
.order-form{ margin-top: 10px; }

.order-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.order-grid-2{ margin-top: 12px; }

.order-block{ margin-top: 12px; }

.order-checks{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.order-check{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: rgba(31,41,55,0.82);
  font-weight: 550;
}

.order-check input{
  width: auto;
  margin: 0;
}

.order-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.order-note{
  margin-top: 12px;
  font-size: 0.95rem;
  color: rgba(31,41,55,0.65);
}

.hp{ display: none; }

@media (max-width: 900px){
  .order-grid{ grid-template-columns: 1fr; }
}

/* Luft mellom knapp og samtykke-tekst */
.order-actions{
  margin-top: 24px;
  margin-bottom: 16px;  /* <-- dette gir “luft under knappen” */
}

.order-note{
  margin-top: 0;        /* fordi vi bruker margin-bottom over */
}
.addr-wrap{
  position: relative;
}

/* Adresseforslag: alltid venstrejustert */
.addr-suggestions button{
  display: block;          /* viktig: bryter flex-arv */
  text-align: left;
  width: 100%;
  padding: 10px 12px;
}

/* Hvis global knappstil tvinger flex/center, overstyr hardt */
.addr-suggestions button{
  justify-content: flex-start !important;
  align-items: flex-start !important;
}
.site-footer,
footer{
  position: relative;
  z-index: 2;
}

/* === FIX: content over global parallax === */

.site-main{
  position: relative;
  z-index: 2;
}

.card{
  position: relative;
  z-index: 3;
}

/* ===== Fold-ut bestilling på forsiden ===== */
.order-toggle-card{
  margin-top: 14px;
  padding: 18px;
}

.order-toggle-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.order-toggle-head h3{ margin: 0 0 6px; }
.order-toggle-head p{ margin: 0; }

.order-toggle-chevron{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.60);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Selve fold-ut området */
.order-collapse{
  margin-top: 14px;

  /* animasjons-trikset */
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  overflow: hidden;

  transition:
    max-height 420ms ease,
    opacity 280ms ease,
    transform 280ms ease;
}

/* Når åpen */
.order-toggle-card.is-open .order-collapse{
  max-height: 2000px; /* stor nok til skjema */
  opacity: 1;
  transform: translateY(0);
}

/* Roter pil */
.order-toggle-card.is-open .order-toggle-chevron{
  transform: rotate(180deg);
}

/* =============================
   Modal / Popup (Bestilling)
============================= */

body.modal-open{
  overflow: hidden;
}

.modal-backdrop{
  position: fixed;
  inset: 0;
  z-index: 200; /* over header */
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(6px);

  display: flex;
  align-items: center;       /* SENTRERT */
  justify-content: center;

  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.modal-backdrop.is-open{
  opacity: 1;
  pointer-events: auto;
}

.modal{
  width: min(760px, calc(100vw - 36px)); /* smalere */
  max-height: min(88vh, 900px);
  overflow: auto;

  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 70px rgba(0,0,0,0.18);

  transform: translateY(6px) scale(0.98);
  transition: transform 180ms ease;
}

.modal-backdrop.is-open .modal{
  transform: translateY(0) scale(1);
}

.modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 12px 18px 10px;
  border-bottom: 1px solid var(--border);
}

.modal-head h3{
  margin: 0;
  font-size: 20px;
}

.modal-close{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.70);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.modal-body{
  padding: 14px 18px 18px;
}

/* VIKTIG: fjern global form max-width inni modalen (ellers får du “luft” på høyre side) */
.modal form,
.modal .order-form{
  max-width: none;
  width: 100%;
}

/* Hvis du bruker .container inni include – fjern max-width/padding der også */
.modal .container{
  max-width: none;
  padding: 0;
}

/* Mindre textarea = mindre scrolling */
.modal textarea{
  min-height: 92px;
}

@media (max-width: 600px){
  .modal{ max-height: 90vh; }
  .modal-body{ padding: 12px 14px 14px; }
}


.contact-card{
  max-width: 860px;
  margin: 0 auto;
}

.contact-success{
  margin: 12px 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(203,183,156,0.22);
  border: 1px solid rgba(0,0,0,0.06);
  color: rgba(31,41,55,0.9);
  font-weight: 600;
}
/* Hindrer at grid-kolonner overlapper når innholdet ikke får krympe */
.order-grid > div{
  min-width: 0;
}

.order-grid input,
.order-grid textarea,
.order-grid select{
  min-width: 0;
  width: 100%;
}

/* (Valgfritt) litt tydeligere spacing i modal */
.modal{
  width: min(860px, calc(100vw - 36px));
}

.modal-body{
  padding: 16px 18px 18px;
}
/* Speilvendt forgrunn nederst på forsiden */
.bottom-foreground{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.bottom-foreground img{
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.95; /* juster 0.85–1.0 */
}
.bottom-foreground{
  margin-top: -40px;   /* juster -20 til -80 */
}
.bottom-foreground{
  position: relative;
  z-index: 0;
}
.section:last-of-type{
  position: relative;
  z-index: 1;
}

/* Kontakt-skjema på forsiden: fyll hele contact-card (ikke 600px) */
.contact-card form,
.contact-card .order-form{
  max-width: none;
  width: 100%;
}

/* Grid: sørg for at kolonner kan krympe (hindrer “overlapp/press”) */
.order-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Ekstra sikkerhet (har du allerede, men ok å ha som “hard override”) */
.order-grid > div{ min-width: 0; }
.order-grid input,
.order-grid textarea,
.order-grid select{
  min-width: 0;
  width: 90%;
}
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

/* Selve logoen */
.brand-logo{
  height: 43px;     /* juster etter smak */
  width: auto;
  display: block;
}

/* Litt større på større skjermer */
@media (min-width: 640px){
  .brand-logo{ height: 53px; }
}

/* Valgfritt: skjul tekst på mobil hvis du vil ha “ren” logo */
@media (max-width: 420px){
  .brand-name{ display:none; }
}
@media (max-width: 600px){

  /* Sørg for at bakgrunn ikke “lekker” bak seksjoner på mobil */
  .section{
    background: var(--bg) !important;
  }

  /* Kompakt hero uten “død sone” */
  .hero-parallax{ height: 62svh; }
  .hero-sticky{ height: 100%; }

  /* Flytt innhold/overskrift OPP (mindre padding-top) */
  .hero-content{
    padding: 24px 14px 0 14px !important;  /* <-- senk dette tallet for enda mer opp */
    background: transparent !important;
    border: 0 !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    width: auto !important;
    margin: 0 auto !important;
  }

  /* Litt strammere mobil-typografi */
  .hero-content h1{
    font-size: 26px;
    line-height: 1.08;
    margin: 8px 0 8px;
  }

  .hero-content p{
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 10px;
  }

  .hero-actions{
    margin-top: 10px;
    gap: 10px;
  }
  .hero-actions .btn{
    padding: 11px 14px;
  }

  /* Utsnitt: kutt mer av “himmel” (juster til smak) */
  :root{ --bg-base: -170px; }  /* prøv -140 / -170 / -210 */

  /* Unngå zoom-følelse */
  .hero-bg{
    transform: translateY(calc(var(--bg-base, 0px) + var(--bg-shift, 0px))) scale(1.50);
  }

  /* Litt dybde i forgrunn */
  .hero-fg img{
    filter: drop-shadow(0 14px 54px rgba(0,0,0,0.10));
  }
}
@media (max-width: 600px){

  /* 1) Riktig lagrekkefølge */
  .parallax-world .hero-bg{ z-index: 0; }
  .parallax-world .hero-fg{ z-index: 1; }
  .parallax-world .hero-overlay{ z-index: 2; }
  .parallax-world .hero-content{ z-index: 3; }

  /* 2) Headroom: bg må være høyere enn 100% så den aldri “går tom” når den flyttes */
  .parallax-world .hero-bg{
    inset: auto;
    left: 0;
    right: 0;
    top: -28%;
    height: 156%;
    width: 100%;
    object-fit: cover;
    object-position: center bottom;

    /* behold din transform */
    transform: translateY(calc(var(--bg-base, 0px) + var(--bg-shift, 0px))) scale(1.00);
  }

  /* 3) Forgrunn: trekk den 1px ned så den treffer kanten + fyll under så det aldri blir lys stripe */
  .parallax-world .hero-fg{
    left: 50%;
    bottom: -1px;
    width: 100vw;
    transform: translateX(-50%) translateY(var(--fg-shift, 0px));
  }

  .parallax-world .hero-fg::after{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 160px;
    background: var(--bg);
  }
}


.flash-messages {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

.flash-message {
  background: #1f7a4d;
  color: white;
  padding: 14px 20px;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.hero-flash {
  margin-bottom: 24px;
}

.flash-message {
  background: #1f7a4d;
  color: #fff;
  padding: 14px 18px;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}