/* Dr. Wiesener – puben i det gamle badehuset.
   Flaskegrønt, krem og messing, badefliser som motiv. Fraunces til overskrifter, Geist til brødtekst. */
:root {
  --gronn: #0f2b23;
  --gronn-2: #163b30;
  --gronn-3: #1f4a3d;
  --krem: #f5eedd;
  --krem-2: #ece2c9;
  --papir: #fbf7ec;
  --messing: #c79a4e;
  --messing-mork: #8f6524;   /* knapper: mørk nok for hvit tekst */
  --vin: #7a2a22;
  --tekst: #1b1f1c;
  --dempet: #5f625b;
  --linje: #dccfaf;
  --flis: #e9efe8;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--krem); color: var(--tekst); font: 400 1.0625rem/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.02; letter-spacing: -.02em; text-wrap: balance; font-optical-sizing: auto; }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--messing); }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgb(199 154 78 / .35); }
:focus-visible { outline: 2px solid var(--messing); outline-offset: 3px; border-radius: 6px; }

.forslag {
  position: relative; z-index: 60; padding: 9px 16px;
  background: #0a1d17; color: #b9b29f; font-size: .8rem; letter-spacing: .02em; text-align: center;
}
.forslag a { color: var(--krem); }

/* ---------- Toppen: svevende pille med uskarp bakgrunn, som på roedsolutions.no ---------- */
.topp { position: sticky; top: 0; z-index: 50; padding: 12px 16px 0; margin-bottom: -76px; pointer-events: none; }
.topp-inner {
  pointer-events: auto; display: flex; align-items: center; gap: 20px;
  max-width: 1180px; margin-inline: auto; padding: 8px 8px 8px 22px;
  border: 1px solid rgb(245 238 221 / .14); border-radius: 999px;
  background: rgb(15 43 35 / .72); color: var(--krem);
  box-shadow: 0 16px 40px -24px rgb(0 0 0 / .6);
  -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
}
.merke { font: italic 500 1.4rem/1 var(--serif); letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.meny { display: flex; gap: 4px; margin-left: auto; }
.meny a { padding: 8px 14px; border-radius: 999px; font-size: .95rem; text-decoration: none; color: rgb(245 238 221 / .8); transition: background-color .2s, color .2s; }
.meny a:hover { background: rgb(245 238 221 / .08); color: var(--krem); }
.topp-slutt { display: flex; align-items: center; gap: 10px; }
.meny + .topp-slutt { margin-left: 4px; }

.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgb(245 238 221 / .08); font-size: .85rem; white-space: nowrap; color: rgb(245 238 221 / .9); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #9aa39c; }
.status.apen i { background: #5fd38d; animation: puls 2s ease-out infinite; }

/* ---------- Knapper ---------- */
.knapp {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 999px; background: var(--messing-mork); color: #fff;
  font: 600 1rem/1 var(--font); text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 12px 28px -14px rgb(0 0 0 / .7);
  transition: transform .25s var(--ease), background-color .2s;
}
.knapp:hover { background: #a47530; }
.knapp:active { transform: translateY(1px); }
.knapp svg { width: 17px; height: 17px; }
.knapp.lys { background: transparent; border-color: rgb(245 238 221 / .3); color: var(--krem); box-shadow: none; }
.knapp.lys:hover { background: rgb(245 238 221 / .08); }
.knapp.morklys { background: transparent; border-color: rgb(15 43 35 / .25); color: var(--gronn); box-shadow: none; }
.knapp.morklys:hover { background: rgb(15 43 35 / .06); }
.knapp.liten { min-height: 42px; padding: 0 18px; font-size: .92rem; box-shadow: none; }
.knapper { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: end; gap: clamp(24px, 4vw, 56px);
  padding: clamp(140px, 16vw, 190px) max(16px, calc((100% - 1180px) / 2)) 0;
  background:
    radial-gradient(70% 60% at 85% 30%, rgb(199 154 78 / .16), transparent 70%),
    radial-gradient(60% 50% at 10% 90%, rgb(31 74 61 / .9), transparent 70%),
    var(--gronn);
  color: var(--krem); overflow: hidden;
}
/* Fint flisemønster i bakgrunnen */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgb(245 238 221 / .05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(245 238 221 / .05) 1px, transparent 1px);
  background-size: 44px 22px;
  -webkit-mask: linear-gradient(180deg, #000, transparent 85%); mask: linear-gradient(180deg, #000, transparent 85%);
}
.hero-tekst { position: relative; padding-bottom: clamp(48px, 6vw, 80px); }

/* Emaljeskiltet over overskriften */
.skilt {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 28px; padding: 8px 8px 8px 16px;
  border: 1px solid rgb(199 154 78 / .55); border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--messing);
  animation: opp 1s var(--ease) both;
}
.skilt b { padding: 5px 10px; border-radius: 999px; background: var(--messing); color: var(--gronn); font-weight: 700; }

.hero h1 { font-size: clamp(2.7rem, 1.4rem + 4.4vw, 5.3rem); font-weight: 400; line-height: 1; letter-spacing: -.02em; animation: opp 1s .08s var(--ease) both; }
.hero h1 em { display: block; }
.hero .ingress { max-width: 34em; margin-top: 26px; font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem); color: rgb(245 238 221 / .78); animation: opp 1s .16s var(--ease) both; }
.hero .knapper { margin-top: 34px; animation: opp 1s .24s var(--ease) both; }
.vurdering { display: flex; align-items: center; gap: 10px; margin-top: 26px; font-size: .92rem; color: rgb(245 238 221 / .7); animation: opp 1s .32s var(--ease) both; }
.vurdering span { color: var(--messing); letter-spacing: .1em; }

.nisje { position: relative; align-self: end; max-width: 470px; justify-self: end; width: 100%; animation: opp 1.2s .2s var(--ease) both; }
.nisje svg { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgb(0 0 0 / .45)); }
.lysstripe { animation: glans 7s 1.5s ease-in-out infinite; }
.straale { stroke-dasharray: 6 4; animation: renn .5s linear infinite; }
.bobler circle { transform-box: fill-box; animation: boble 3.4s linear infinite; opacity: 0; }
.bobler circle:nth-child(2) { animation-delay: .5s; animation-duration: 3s; }
.bobler circle:nth-child(3) { animation-delay: 1.1s; animation-duration: 3.8s; }
.bobler circle:nth-child(4) { animation-delay: 1.6s; }
.bobler circle:nth-child(5) { animation-delay: 2.2s; animation-duration: 3.2s; }
.bobler circle:nth-child(6) { animation-delay: .9s; animation-duration: 4s; }
.bobler circle:nth-child(7) { animation-delay: 2.7s; }
.bobler circle:nth-child(8) { animation-delay: 1.9s; animation-duration: 2.8s; }

/* ---------- Bånd som glir ---------- */
.baand { overflow: hidden; padding: 18px 0; background: var(--messing); color: var(--gronn); }
.baand-spor { display: flex; width: max-content; animation: baand 40s linear infinite; }
.baand span { font: italic 500 1.35rem/1 var(--serif); white-space: nowrap; }
.baand span::after { content: "✦"; margin-inline: 1.1em; font-style: normal; font-size: .8em; opacity: .55; }

/* ---------- Seksjoner ---------- */
.seksjon { width: min(100%, 1180px); margin-inline: auto; padding: clamp(72px, 10vw, 128px) 16px; }
.hode { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--messing-mork); font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
h2 { font-size: clamp(2.3rem, 1.5rem + 3.4vw, 4.2rem); color: var(--gronn); }
h2 em { color: var(--messing-mork); }
.ingress { font-size: 1.15rem; color: var(--dempet); }
.hode .ingress { margin-top: 20px; max-width: 36em; }

/* Velkommen: tre kort */
.info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.infokort { display: grid; align-content: start; gap: 14px; padding: 30px; border: 1px solid var(--linje); border-radius: 26px; background: var(--papir); }
.infokort h3 { font-size: 1.05rem; font-family: var(--font); font-weight: 600; letter-spacing: 0; color: var(--dempet); }
.infokort .stor { font: 500 1.6rem/1.2 var(--serif); letter-spacing: -.015em; color: var(--gronn); }
.infokort .stor a { text-decoration: none; }
.infokort.mork { background: var(--gronn); border-color: var(--gronn); color: rgb(245 238 221 / .8); }
.infokort.mork h3 { color: var(--messing); }
.infokort.mork .stor { color: var(--krem); font-size: 2.2rem; }
.tider div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--linje); }
.tider div:last-child { border-bottom: 0; }
.tider dt { color: var(--dempet); }
.tider dd { font: 500 1.2rem/1.3 var(--serif); font-variant-numeric: tabular-nums; color: var(--gronn); }
.tider .idag dt { color: var(--gronn); font-weight: 600; }
.tider .idag dt::after { content: "i dag"; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--gronn); color: var(--krem); font-size: .72rem; font-weight: 600; vertical-align: 2px; }
.pil { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--gronn); text-underline-offset: 4px; }
.pil::after { content: "→"; transition: translate .25s var(--ease); }
.pil:hover::after { translate: 4px 0; }

/* Meny: som et trykt menykort */
.menykort {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px);
  padding: clamp(32px, 6vw, 72px); border-radius: 28px; background: var(--papir);
  box-shadow: 0 1px 0 rgb(255 255 255 / .8) inset, 0 40px 80px -48px rgb(15 43 35 / .5);
}
.menykort::before { content: ""; position: absolute; inset: 12px; border: 1px solid var(--linje); border-radius: 20px; pointer-events: none; }
.menykort::after { content: ""; position: absolute; top: clamp(32px, 6vw, 72px); bottom: 96px; left: 50%; width: 1px; background: var(--linje); }
.meny-topp { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: -8px; color: var(--messing-mork); font-size: .78rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; }
.meny-topp::before, .meny-topp::after { content: "✦"; font-size: .9em; letter-spacing: 0; }
.menykolonne h3 { margin-bottom: 22px; font-size: 2rem; font-style: italic; font-weight: 400; color: var(--gronn); }
.menykolonne ul { display: grid; gap: 18px; padding: 0; list-style: none; }
.menykolonne li { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 12px; }
.menykolonne li span { font: 500 1.2rem/1.3 var(--serif); color: var(--tekst); }
.menykolonne li i { border-bottom: 2px dotted var(--linje); transform: translateY(-4px); }
.menykolonne li small { grid-column: 1 / -1; margin-top: 2px; color: var(--dempet); font-size: .92rem; }
.merknad { grid-column: 1 / -1; color: var(--dempet); font-size: .85rem; font-style: italic; text-align: center; }

/* Historien: mørk seksjon med fliser */
.historie {
  position: relative; padding: clamp(80px, 11vw, 140px) 16px; overflow: hidden;
  background: var(--gronn); color: var(--krem);
}
.historie::before {
  content: ""; position: absolute; inset: 0; opacity: .6; pointer-events: none;
  background-image:
    linear-gradient(rgb(245 238 221 / .045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(245 238 221 / .045) 1px, transparent 1px);
  background-size: 44px 22px;
}
.historie-inner { position: relative; width: min(100%, 1180px); margin-inline: auto; }
.historie h2 { color: var(--krem); }
.historie h2 em { color: var(--messing); }
.historie .eyebrow { color: var(--messing); }
.historie .ingress { color: rgb(245 238 221 / .72); }
.tidslinje { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 8px; padding: 0; list-style: none; }
.tidslinje li { display: grid; align-content: start; gap: 10px; padding-top: 22px; border-top: 1px solid rgb(199 154 78 / .5); }
.tidslinje b { font: italic 400 clamp(2.4rem, 1.8rem + 2vw, 3.6rem)/1 var(--serif); color: var(--messing); }
.tidslinje span { color: rgb(245 238 221 / .75); }

/* Avslutning */
.slutt { display: grid; justify-items: center; gap: 30px; text-align: center; }
.slutt h2 { font-size: clamp(2.8rem, 1.6rem + 5vw, 6rem); }

/* ---------- Bunn ---------- */
.bunn { overflow: hidden; padding: 56px 16px 0; background: var(--gronn); color: rgb(245 238 221 / .7); font-size: .95rem; }
.bunn-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; width: min(100%, 1180px); margin-inline: auto; padding-bottom: 32px; border-bottom: 1px solid rgb(245 238 221 / .12); }
.bunn .merke { margin-bottom: 10px; color: var(--krem); font-size: 1.6rem; }
.bunn a { color: var(--krem); }
.bunn-lenker { display: grid; align-content: start; justify-items: end; gap: 8px; text-align: right; }
.bunn-ord {
  margin-top: 24px; text-align: center; white-space: nowrap; user-select: none;
  font: italic 400 min(22vw, 300px)/.78 var(--serif); letter-spacing: -.04em;
  background: linear-gradient(180deg, rgb(199 154 78 / .5) 20%, rgb(199 154 78 / 0) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Personvern og andre tekstsider ---------- */
.tekstside { width: min(100%, 760px); margin-inline: auto; padding: 150px 16px 96px; }
.tekstside h1 { margin-bottom: 28px; font-size: clamp(2.4rem, 1.8rem + 2vw, 3.4rem); color: var(--gronn); }
.tekstside h2 { margin: 36px 0 12px; font-size: 1.5rem; }
.tekstside p { color: var(--dempet); }
.tekstside p + p { margin-top: 12px; }
.side-topp { background: var(--gronn); padding-bottom: 1px; }

/* ---------- Bevegelse ---------- */
@keyframes opp { from { opacity: 0; translate: 0 24px; } }
@keyframes puls { from { box-shadow: 0 0 0 0 rgb(95 211 141 / .55); } to { box-shadow: 0 0 0 9px rgb(95 211 141 / 0); } }
@keyframes baand { to { transform: translateX(-50%); } }
@keyframes glans { 0%, 70% { transform: skewX(-18deg) translateX(0); } 100% { transform: skewX(-18deg) translateX(820px); } }
@keyframes boble {
  0% { opacity: 0; transform: translateY(0); }
  15% { opacity: .9; }
  90% { opacity: .8; }
  100% { opacity: 0; transform: translateY(-150px); }
}
@keyframes inn { from { opacity: 0; translate: 0 36px; } }
@keyframes renn { to { stroke-dashoffset: -10; } }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: inn linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  .meny { display: none; }
  .meny + .topp-slutt { margin-left: auto; }
  .hero { grid-template-columns: 1fr; }
  .hero-tekst { padding-bottom: 8px; }
  .nisje { justify-self: center; max-width: 340px; margin-top: 8px; }
  .info { grid-template-columns: 1fr; }
  .tidslinje { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .bunn-inner { grid-template-columns: 1fr; }
  .bunn-lenker { justify-items: start; text-align: left; }
}
@media (max-width: 640px) {
  .topp-inner { padding-left: 16px; gap: 10px; }
  .merke { font-size: 1.2rem; }
  .status { display: none; }
  .menykort { grid-template-columns: 1fr; }
  .menykort::after { display: none; }
  .menykort::before { inset: 8px; }
  .tidslinje { grid-template-columns: 1fr; }
  .knapper .knapp { flex: 1 1 100%; }
}
