/* Darkroom palette: earthy, no blue anywhere (including focus rings and links). */
:root {
  --espresso: #1F1813;
  --bark: #2E241C;
  --cream: #EFE6D6;
  --muted: #B8A68E;
  --ochre: #D9A33A;
  --terracotta: #E0925E;
  --olive: #5E6B3A;
  --brick: #963A2A;
  --saddle: #7A5236;

  --pad: clamp(16px, 4vw, 48px);
  --gap: 8px;
  --max: 1600px;
  --header-h: 76px;

  color-scheme: dark;
  accent-color: var(--ochre);
}

* { box-sizing: border-box; }

/* Language toggle: every text exists as lang="sv" and lang="en"; show one. */
html[lang="sv"] body [lang="en"],
html[lang="en"] body [lang="sv"] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  scrollbar-color: var(--saddle) var(--espresso);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery img { transition: none !important; }
}

body {
  margin: 0;
  background: var(--espresso);
  color: var(--cream);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body:has(dialog[open]) { overflow: hidden; }

::selection { background: var(--ochre); color: var(--espresso); }

a { color: var(--terracotta); }
a:hover { color: var(--ochre); }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ochre); color: var(--espresso); padding: 8px 12px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 10px var(--pad);
  background: rgba(31, 24, 19, 0.94);
  border-bottom: 1px solid var(--bark);
}

.brand img { display: block; height: 62px; width: auto; }

.header-right { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.site-header nav { display: flex; gap: clamp(14px, 3vw, 36px); }

.lang-switch { display: flex; border: 1px solid var(--saddle); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  padding: 5px 11px;
  background: transparent;
  color: var(--muted);
  border: 0;
  cursor: pointer;
}
.lang-switch button:hover { color: var(--cream); }
.lang-switch button[aria-pressed="true"] { background: var(--ochre); color: var(--espresso); }

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 13px;
}
.site-header nav a:hover { color: var(--cream); }

/* Sections */
main > section {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.intro { padding-block: clamp(32px, 6vw, 72px) 28px; }
.intro .button { margin-top: 24px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h3 { margin: 0; font-size: 18px; font-weight: 600; }

h1 {
  margin: 0;
  max-width: 22ch;
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.15;
}

h2 {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }

.filters button {
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--saddle);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
}
.filters button:hover { color: var(--cream); border-color: var(--muted); }
.filters button[aria-pressed="true"] { background: var(--ochre); border-color: var(--ochre); color: var(--espresso); }

/* Gallery: main.js deals photos into columns left to right (shortest column
   first), so the CSV order reads across rows and photos keep their own shape. */
.gallery { display: flex; align-items: flex-start; gap: var(--gap); }
.gallery .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }

.gallery a {
  display: block;
  overflow: hidden;
  background: var(--bark);
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.5s ease;
}
.gallery img.loaded { opacity: 1; }
.gallery a:hover img { transform: scale(1.025); }

/* Phones: logo and language on top, menu below. Not sticky, to keep the screen for photos. */
@media (max-width: 700px) {
  :root { --gap: 6px; --header-h: 0px; }
  .site-header { position: static; flex-wrap: wrap; row-gap: 8px; }
  .header-right { display: contents; }
  .lang-switch { order: 2; }
  .site-header nav { order: 3; flex-basis: 100%; justify-content: space-between; gap: 8px; }
  .brand img { height: 44px; }
  .site-header nav a { letter-spacing: 0.12em; font-size: 12px; }
}

/* About and contact */
.about {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 40px;
  align-items: center;
  padding-block: 96px 32px;
}
.about { align-items: start; }
.about-mark { width: 150px; height: auto; opacity: 0.9; }
.about p { max-width: 65ch; margin: 0 0 14px; }
.about .lead { font-size: 20px; line-height: 1.4; }

/* Prices */
.prices { padding-block: 72px 24px; }
.prices-note { color: var(--muted); max-width: 70ch; margin: 0 0 24px; }

.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }

.price-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--bark);
  border-top: 3px solid var(--ochre);
}
.price-card:nth-child(2) { border-top-color: var(--terracotta); }
.price-card:nth-child(3) { border-top-color: var(--olive); }
.price-card p { margin: 0; }
.price { margin-top: 8px !important; font-size: 32px; line-height: 1.1; }
.price-sub { color: var(--muted); font-size: 14px; margin-bottom: 8px !important; }
.price-card ul { margin: 4px 0 16px; padding-left: 18px; color: var(--muted); }
.price-card .button { margin-top: auto; align-self: flex-start; }

.extras { margin-top: 32px; }
.extras p { color: var(--muted); max-width: 70ch; margin: 6px 0 0; }

.terms { margin-top: 28px; border-block: 1px solid var(--bark); }
.terms summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
}
.terms summary::-webkit-details-marker { display: none; }
.terms summary::after { content: "+"; float: right; color: var(--ochre); font-size: 20px; line-height: 1; }
.terms[open] summary::after { content: "\2212"; }
.terms > div { padding-bottom: 16px; }
.terms h4 { margin: 16px 0 4px; font-size: 15px; }
.terms p { margin: 0; color: var(--muted); max-width: 70ch; }

.contact { padding-block: 64px 96px; }
.contact p { margin: 0 0 16px; }

.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 4px;
  background: var(--ochre);
  color: var(--espresso);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--cream); color: var(--espresso); }

.contact-list { list-style: none; margin: 8px 0 0; padding: 0; color: var(--muted); }
.contact-list li { padding: 4px 0; }

@media (max-width: 700px) {
  .about { grid-template-columns: 1fr; gap: 20px; padding-block: 64px 24px; }
  .about-mark { width: 110px; }
}

/* Draft text that still needs replacing: impossible to miss on purpose. */
.placeholder { outline: 1px dashed var(--ochre); outline-offset: 4px; }
p.placeholder, li.placeholder { color: var(--ochre); }

.site-footer {
  border-top: 1px solid var(--bark);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 24px var(--pad);
}
.site-footer p { margin: 0; }

/* Lightbox */
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 15, 11, 0.97);
  color: var(--cream);
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.6); }

.lightbox figure {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 72px 16px;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; text-align: center; }

.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: var(--cream);
  font-size: 44px;
  line-height: 1;
  padding: 12px 18px;
  cursor: pointer;
  opacity: 0.75;
}
.lightbox button:hover { opacity: 1; color: var(--ochre); }
.lb-close { top: 6px; right: 6px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

@media (max-width: 700px) {
  .lightbox figure { padding: 52px 8px 64px; }
  .lb-prev, .lb-next { top: auto; bottom: 4px; transform: none; }
}
