/* ============================================================
   ØYSTEIN, Häljeboda
   Vitt · off-white · svart · ljusgrått.
   Epilogue (rubriker) + Poppins (text).
   ============================================================ */

:root {
  --paper:     #f4f3f1;
  --white:     #ffffff;
  --ink:       #262626;
  --ink-soft:  #5f6368;
  --dark:      #232323;
  --hair:      rgba(38, 38, 38, 0.14);

  --display: "Epilogue", "Helvetica Neue", sans-serif;
  --sans: "Poppins", "Helvetica Neue", sans-serif;

  --nav-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Bas ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

.shell {
  width: min(1240px, 100% - clamp(2.5rem, 6vw, 5rem));
  margin-inline: auto;
}

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; }

.star { color: inherit; }

/* ---------- Knappar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.9rem;
  border: 1px solid var(--ink);
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn--dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn--dark:hover { background: #3c3c3c; border-color: #3c3c3c; }
.btn--light { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn--light:hover { background: transparent; color: var(--white); }
.btn--nav { padding: 0.7rem 1.3rem; font-size: 0.8rem; }

/* ---------- Kodlås ---------- */
.gate[hidden] { display: none; }
.gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: #202020;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.gate.gate--open { opacity: 0; visibility: hidden; pointer-events: none; }
.gate__inner { text-align: center; padding: 2rem; }
.gate__brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: var(--white);
}
.gate__label {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}
.gate__form {
  margin-top: 2.25rem;
  display: inline-flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
.gate__input {
  background: none;
  border: 0;
  padding: 0.8rem 0.5rem;
  width: min(240px, 58vw);
  color: var(--white);
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-align: center;
}
.gate__input::placeholder { color: rgba(255, 255, 255, 0.3); }
.gate__input:focus { outline: none; }
.gate__form:focus-within { border-color: var(--white); }
.gate__btn {
  color: var(--white);
  font-size: 1.3rem;
  padding: 0 0.75rem;
  transition: transform 0.25s var(--ease);
}
.gate__btn:hover { transform: translateX(4px); }
.gate__error { margin-top: 1.25rem; color: #cf9a9a; font-size: 0.85rem; }
.gate--shake .gate__form { animation: shake 0.4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

/* ---------- Nav, alltid vit ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--hair);
}
.nav__inner {
  width: min(1240px, 100% - clamp(2.5rem, 6vw, 5rem));
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: var(--ink);
}
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__link {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.25s;
}
.nav__link:hover { color: var(--ink); }

main { padding-top: var(--nav-h); }
main:focus { outline: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: flex-end;
  color: var(--white);
  isolation: isolate;
  background: var(--dark);
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.15) 0%, rgba(20, 20, 20, 0.2) 55%, rgba(20, 20, 20, 0.75) 100%),
    linear-gradient(80deg, rgba(20, 20, 20, 0.4) 0%, rgba(20, 20, 20, 0) 55%);
}
.hero__content {
  width: min(1240px, 100% - clamp(2.5rem, 6vw, 5rem));
  margin-inline: auto;
  padding-block: clamp(4rem, 10vh, 7rem);
}
.hero__place {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}
.hero__title {
  font-weight: 600;
  font-size: clamp(2.6rem, 6.8vw, 5.2rem);
  line-height: 1.05;
  margin-top: 1rem;
  text-wrap: balance;
}
.hero__sub {
  margin-top: 1.5rem;
  max-width: 42ch;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
}
.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.9rem;
  margin-top: 2.4rem;
}
.hero__link {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  padding-bottom: 3px;
  transition: border-color 0.25s;
}
.hero__link:hover { border-color: var(--white); }

/* ---------- Stugorna ---------- */
.cabins {
  background: var(--white);
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
}
.cabins__head { max-width: 560px; }
.cabins__head h2 {
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}
.cabins__head p { margin-top: 1rem; color: var(--ink-soft); }

.cabin {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
  margin-top: clamp(4rem, 8vw, 6.5rem);
}
.cabin--flip .cabin__media { order: 2; }
.cabin--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

.cabin__img { display: block; width: 100%; overflow: hidden; padding: 0; }
.cabin__img img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.cabin__img:hover img { transform: scale(1.03); }
.cabin__thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.cabin__thumbs button { padding: 0; overflow: hidden; display: block; }
.cabin__thumbs img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.cabin__thumbs button:hover img { transform: scale(1.04); }

.cabin__info h3 {
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}
.cabin__facts {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.cabin__desc {
  margin-top: 1.1rem;
  color: var(--ink-soft);
  max-width: 44ch;
}
.cabin__info .btn { margin-top: 1.9rem; }

/* ---------- Bildband ---------- */
.band, .coda {
  position: relative;
  isolation: isolate;
  color: var(--white);
  text-align: center;
}
.band { padding: clamp(7rem, 15vw, 11rem) clamp(1.5rem, 5vw, 4rem); }
.coda { padding: clamp(7rem, 16vw, 12rem) clamp(1.5rem, 5vw, 4rem); }
.band__img, .coda__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
}
.band__scrim, .coda__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(20, 20, 20, 0.5);
}
.band__title {
  font-weight: 600;
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  line-height: 1.08;
}
.band__text {
  max-width: 46ch;
  margin: 1.25rem auto 0;
  color: rgba(255, 255, 255, 0.88);
}
.coda__title {
  font-weight: 600;
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  line-height: 1.04;
}
.coda .btn { margin-top: 2.25rem; }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: rgba(255, 255, 255, 0.7); }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3rem;
  align-items: start;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
}
.footer__logo {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.3em;
  color: var(--white);
}
.footer__tag { margin-top: 0.8rem; font-size: 0.92rem; }
.footer__contact { font-size: 0.92rem; line-height: 1.8; text-align: right; }
.footer__link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--display);
  font-weight: 500;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 2px;
  transition: border-color 0.25s;
}
.footer__link:hover { border-color: var(--white); }
.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-block: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  background: rgba(18, 18, 18, 0.93);
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox[hidden] { display: none; }
.lightbox__img {
  max-width: 100%;
  max-height: 88vh;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lightbox__close {
  position: absolute;
  top: 1.1rem; right: 1.6rem;
  font-size: 2.3rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.25s;
}
.lightbox__close:hover { color: var(--white); }

/* ---------- Reveal (endast med JS) ---------- */
.js .reveal, .js .reveal-img {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js .reveal.in-view, .js .reveal-img.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal-img { opacity: 1; transform: none; transition: none; }
  .cabin__img img, .cabin__thumbs img { transition: none; }
}

/* ---------- Responsivt ---------- */
@media (max-width: 880px) {
  .cabin, .cabin--flip { grid-template-columns: 1fr; gap: 1.75rem; }
  .cabin--flip .cabin__media { order: 0; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__contact { text-align: left; }
}

@media (max-width: 560px) {
  :root { --nav-h: 4rem; }
  .nav__link { display: none; }
  .hero__actions { gap: 1.4rem; }
  .footer__base { flex-direction: column; }
}
