/* =========================================================================
   Floriss Paleet – florisspaleet.no
   Statisk nettside. Én stilfil, ingen rammeverk.

   Innhold:
   1.  Variabler
   2.  Reset og grunntypografi
   3.  Layout-hjelpere
   4.  Topptekst og navigasjon
   5.  Hero
   6.  Innholdsseksjoner
   7.  Kort og lenkeruter
   8.  Kontaktkort (butikkene)
   9.  Prisliste
   10. Galleri og lysboks
   11. Instagram-rad
   12. Bunntekst
   13. Diverse (knapper, skip-link, 404)
   ========================================================================= */

/* -------------------------------------------------- 1. Variabler */
:root {
  --sort: #14110f;
  --sort-mykt: #211c19;
  --gull: #c8973d;
  --gull-lys: #e2ba71;
  --krem: #faf6f0;
  --krem-dyp: #f2e9dd;
  --tekst: #2a2522;
  --tekst-dempet: #6b625b;
  --linje: #e4d9cb;
  --hvit: #ffffff;

  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;

  --bredde: 1180px;
  --bredde-tekst: 68ch;
  --radius: 2px;
  --luft: clamp(3.5rem, 8vw, 7rem);
}

/* -------------------------------------------------- 2. Reset og grunntypografi */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--krem);
  color: var(--tekst);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 3.9rem);
}
h2 {
  font-size: clamp(1.85rem, 4vw, 2.7rem);
}
h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
}
h4 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gull);
}

p {
  margin: 0 0 1.15em;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-color: var(--gull);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-color: currentColor;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

hr {
  border: 0;
  border-top: 1px solid var(--linje);
  margin: var(--luft) 0;
}

:focus-visible {
  outline: 2px solid var(--gull);
  outline-offset: 3px;
}

/* -------------------------------------------------- 3. Layout-hjelpere */
.wrap {
  width: 100%;
  max-width: var(--bredde);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.wrap--smal {
  max-width: 780px;
}

.seksjon {
  padding-block: var(--luft);
}

.seksjon--tett {
  padding-block: calc(var(--luft) * 0.6);
}

.seksjon--mork {
  background: var(--sort);
  color: var(--krem);
}

.seksjon--dyp {
  background: var(--krem-dyp);
}

.prosa {
  max-width: var(--bredde-tekst);
}

.prosa > h2,
.prosa > h3 {
  margin-top: 1.8em;
}

.prosa > h2:first-child,
.prosa > h3:first-child {
  margin-top: 0;
}

.ingress {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  line-height: 1.6;
  color: var(--tekst-dempet);
}

.seksjon--mork .ingress {
  color: #cdc2b5;
}

.stikktittel {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gull);
  margin: 0 0 1rem;
}

.senter {
  text-align: center;
}

.senter .prosa {
  margin-inline: auto;
}

/* -------------------------------------------------- 4. Topptekst og navigasjon */
.topp {
  background: var(--sort);
  color: var(--krem);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topp__rad {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

.topp__logo {
  display: block;
  flex: 0 0 auto;
  text-decoration: none;
  padding-block: 0.9rem;
}

.topp__logo img {
  width: 152px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.6vw, 2.1rem);
}

.nav a {
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ddd3c7;
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav a:hover {
  color: var(--hvit);
  border-bottom-color: var(--gull);
}

.nav a[aria-current='page'] {
  color: var(--hvit);
  border-bottom-color: var(--gull);
}

.nav__bryter {
  display: none;
  background: none;
  border: 1px solid #4a423b;
  border-radius: var(--radius);
  color: var(--krem);
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

/* Sammenslått mobilmeny krever JS. Uten JS (html mangler .js) vises lenkene
   som en vanlig stablet liste, slik at siden fortsatt kan navigeres. */
@media (max-width: 860px) {
  html.js .nav__bryter {
    display: block;
  }

  .nav {
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    padding-bottom: 0.75rem;
  }

  html.js .nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--sort-mykt);
    border-top: 1px solid #332c26;
    padding: 0.5rem clamp(1.25rem, 5vw, 2.5rem) 1.25rem;
  }

  html.js .nav[data-apen='true'] {
    display: flex;
  }

  html.js .nav a {
    padding-block: 0.85rem;
    border-bottom: 1px solid #332c26;
  }

  html.js .nav a:last-child {
    border-bottom: 0;
  }

  html.js .nav a:hover,
  html.js .nav a[aria-current='page'] {
    border-bottom-color: #332c26;
    color: var(--gull-lys);
  }
}

/* -------------------------------------------------- 5. Hero */
.hero {
  background: var(--sort);
  color: var(--krem);
  overflow: hidden;
}

.hero__rutenett {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
}

@media (min-width: 900px) {
  .hero__rutenett {
    grid-template-columns: 1fr 1fr;
    min-height: min(78vh, 720px);
  }
}

.hero__tekst {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.75rem, 7vw, 5rem) clamp(1.25rem, 5vw, 3.5rem);
}

@media (min-width: 900px) {
  .hero__tekst {
    padding-inline-start: max(1.25rem, calc((100vw - var(--bredde)) / 2 + 1.25rem));
  }
}

.hero__tekst h1 {
  margin-bottom: 0.35em;
}

.hero__tekst p {
  color: #cdc2b5;
  max-width: 46ch;
}

.hero__bilde {
  position: relative;
  /* På mobil ligger bildet under teksten og trenger egen høyde. Fra 900px
     strekker rutenettet det uansett til full kolonnehøyde. */
  min-height: clamp(320px, 62vw, 520px);
}

.hero__bilde img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Enklere hero for undersidene: bare tittel på mørk bunn. */
.sidetopp {
  background: var(--sort);
  color: var(--krem);
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.sidetopp h1 {
  margin-bottom: 0.3em;
}

.sidetopp p {
  color: #cdc2b5;
  max-width: 56ch;
  margin-bottom: 0;
}

/* -------------------------------------------------- 6. Innholdsseksjoner */
.varsel {
  background: var(--krem-dyp);
  border-inline-start: 3px solid var(--gull);
  padding: 1.4rem 1.6rem;
  margin: 0 0 2rem;
  border-radius: var(--radius);
}

.varsel p:last-child {
  margin-bottom: 0;
}

.delt {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 880px) {
  .delt {
    grid-template-columns: 1fr 1fr;
  }
  .delt--omvendt > :first-child {
    order: 2;
  }
}

.delt img {
  border-radius: var(--radius);
  width: 100%;
}

/* -------------------------------------------------- 7. Kort og lenkeruter */
.kort-rutenett {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.kort {
  display: flex;
  flex-direction: column;
  background: var(--hvit);
  border: 1px solid var(--linje);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.kort:hover {
  border-color: var(--gull);
  transform: translateY(-3px);
}

.kort__bilde {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--krem-dyp);
}

.kort__bilde img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.kort:hover .kort__bilde img {
  transform: scale(1.04);
}

.kort__innhold {
  padding: 1.4rem 1.5rem 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.kort__innhold h3 {
  margin-bottom: 0.35em;
}

.kort__innhold p {
  color: var(--tekst-dempet);
  font-size: 0.97rem;
  margin-bottom: 1rem;
}

.kort__mer {
  margin-top: auto;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gull);
}

/* Punktliste med hake, brukt på bedriftsavtale */
.tjenesteliste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 780px) {
  .tjenesteliste {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 3rem;
  }
}

.tjenesteliste h3 {
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 0.4em;
}

.tjenesteliste p {
  margin-bottom: 0;
  color: var(--tekst-dempet);
  font-size: 0.99rem;
}

/* -------------------------------------------------- 8. Kontaktkort (butikkene) */
.butikker {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.butikk {
  background: var(--hvit);
  border: 1px solid var(--linje);
  border-radius: var(--radius);
  padding: 1.9rem 1.75rem;
}

.seksjon--mork .butikk {
  background: var(--sort-mykt);
  border-color: #3a322c;
}

.butikk h3 {
  margin-bottom: 0.6rem;
}

.butikk__adresse {
  font-style: normal;
  color: var(--tekst-dempet);
  margin-bottom: 1.1rem;
}

.seksjon--mork .butikk__adresse {
  color: #b6aa9c;
}

.butikk__kontakt {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.butikk__kontakt a {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--gull);
  padding-bottom: 1px;
}

.butikk__kontakt a:hover {
  border-bottom-color: currentColor;
}

.apningstider {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--linje);
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--tekst-dempet);
}

.seksjon--mork .apningstider {
  border-top-color: #3a322c;
  color: #b6aa9c;
}

.apningstider li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* -------------------------------------------------- 9. Prisliste */
.priser {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 34rem;
  border-top: 1px solid var(--linje);
}

.priser li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--linje);
}

.priser__navn {
  flex: 0 1 auto;
}

.priser__strek {
  flex: 1 1 auto;
  border-bottom: 1px dotted var(--linje);
  transform: translateY(-0.25em);
}

.priser__pris {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

/* ------------------------------------------------- 10. Galleri og lysboks */
.galleri {
  columns: 4 220px;
  column-gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.galleri li {
  break-inside: avoid;
  margin-bottom: 0.85rem;
}

.galleri button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--krem-dyp);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  line-height: 0;
}

.galleri img {
  width: 100%;
  transition: opacity 0.25s ease, transform 0.5s ease;
}

.galleri button:hover img {
  opacity: 0.88;
  transform: scale(1.02);
}

.lysboks {
  border: 0;
  margin: 0;
  padding: 0;
  inset: 0;
  max-width: 100vw;
  max-height: 100dvh;
  width: 100vw;
  height: 100dvh;
  background: transparent;
  overflow: hidden;
}

.lysboks::backdrop {
  background: rgb(12 10 9 / 0.94);
}

.lysboks__innhold {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 4vw, 3rem);
}

.lysboks img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
}

.lysboks__knapp {
  position: absolute;
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.25);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.18s ease;
}

.lysboks__knapp:hover {
  background: rgb(255 255 255 / 0.22);
}

.lysboks__lukk {
  top: clamp(0.75rem, 3vw, 1.5rem);
  right: clamp(0.75rem, 3vw, 1.5rem);
}

.lysboks__forrige {
  left: clamp(0.5rem, 2vw, 1.5rem);
  top: 50%;
  transform: translateY(-50%);
}

.lysboks__neste {
  right: clamp(0.5rem, 2vw, 1.5rem);
  top: 50%;
  transform: translateY(-50%);
}

.lysboks__teller {
  position: absolute;
  bottom: clamp(0.5rem, 2.5vw, 1.25rem);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  /* Telleren ligger oppå bildet, så den trenger egen bunn for å være lesbar
     også mot lyse buketter. */
  background: rgb(12 10 9 / 0.72);
  border: 1px solid rgb(255 255 255 / 0.15);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  color: #ede5da;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ------------------------------------------------- 11. Instagram-rad */
.instagram {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.instagram a {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--krem-dyp);
}

.instagram img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.25s ease;
}

.instagram a:hover img {
  transform: scale(1.05);
  opacity: 0.9;
}

/* ------------------------------------------------- 12. Bunntekst */
.bunn {
  background: var(--sort);
  color: #b6aa9c;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  font-size: 0.95rem;
}

.bunn__rutenett {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  padding-bottom: 2.5rem;
}

.bunn h2,
.bunn h3 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gull);
  margin-bottom: 1rem;
}

.bunn a {
  color: #ddd3c7;
  text-decoration: none;
}

.bunn a:hover {
  color: var(--hvit);
  text-decoration: underline;
  text-decoration-color: var(--gull);
}

.bunn ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.bunn address {
  font-style: normal;
}

.bunn__logo {
  width: 140px;
  margin-bottom: 1.1rem;
}

.bunn__bunnlinje {
  border-top: 1px solid #332c26;
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
}

.bunn__bunnlinje p {
  margin: 0;
}

/* ------------------------------------------------- 13. Diverse */
.knapp {
  display: inline-block;
  background: var(--gull);
  color: var(--sort);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--gull);
  transition: background 0.18s ease, color 0.18s ease;
}

.knapp:hover {
  background: var(--gull-lys);
  border-color: var(--gull-lys);
}

.knapp--linje {
  background: transparent;
  color: var(--gull);
}

.knapp--linje:hover {
  background: var(--gull);
  color: var(--sort);
}

.knapperad {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.hopp-til {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gull);
  color: var(--sort);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  font-weight: 600;
}

.hopp-til:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.feilside {
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: clamp(4rem, 14vw, 9rem);
}

/* Små hjelpeklasser. Brukes i stedet for style="..." i HTML-en, slik at
   Content-Security-Policy kan holdes på style-src 'self' uten unsafe-inline. */
.marg-under {
  margin-bottom: 2.5rem;
}

.marg-over {
  margin-top: 2.5rem;
}

.ingen-marg-under {
  margin-bottom: 0;
}

.knapperad--senter {
  justify-content: center;
}

.avrundet {
  border-radius: var(--radius);
}
