/* Publika sidan. Inga byggsteg: redigera filen direkt. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Kalksten, hav, lera, glasyr */
  --kalk: #f4f0e9;
  --papper: #fbf9f5;
  --sten: #e4dccf;
  --linje: #d5ccbd;
  --black: #1d2529;
  --text: #2a3338;
  --dim: #5a656a;
  --hav: #2f4a55;
  --djup: #1b2a31;
  --lera: #9c4f35;
  --glasyr: #b9cabd;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --edge: max(var(--gutter), calc((100vw - 84rem) / 2));
  --space: clamp(4.5rem, 11vw, 10rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--kalk);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  counter-reset: avsnitt;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, dl, dd, figure, address { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--lera); }
:focus-visible { outline: 2px solid var(--lera); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--glasyr); color: var(--black); }

.wrap { padding-inline: var(--edge); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: 0.6rem 1rem; background: var(--black); color: var(--papper); text-decoration: none;
}
.skip:focus { top: 1rem; color: var(--papper); }

h1, h2 {
  font-family: var(--serif);
  font-weight: 320;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  color: var(--black);
  letter-spacing: -0.018em;
  text-wrap: balance;
}
h2 { font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.9rem); line-height: 1.06; }

.label {
  display: flex; align-items: center; gap: 0.9em;
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--lera);
}
.label::before {
  counter-increment: avsnitt;
  content: counter(avsnitt, decimal-leading-zero);
  font-feature-settings: "tnum";
}
.label::after { content: ""; width: 2.75rem; height: 1px; background: currentColor; opacity: 0.6; order: -1; display: none; }

.prose { max-width: 36rem; }
.prose p + p { margin-top: 1.15em; }
.prose .lead {
  font-family: var(--serif); font-weight: 340; font-variation-settings: "SOFT" 100;
  font-size: clamp(1.3rem, 1.05rem + 1vw, 1.65rem); line-height: 1.38; color: var(--black);
  letter-spacing: -0.005em;
}
.prose .lead + p { margin-top: 1.6em; }

.arrow {
  display: inline-flex; align-items: baseline; gap: 0.6em;
  font-weight: 550; font-size: 0.95rem; letter-spacing: 0.02em;
  text-decoration: none; padding-bottom: 0.3em;
  border-bottom: 1px solid currentColor;
}
.arrow::after { content: "→"; transition: transform 0.25s ease; }
.arrow:hover::after { transform: translateX(0.3em); }

/* ---- sidhuvud ---- */

.top {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: clamp(1.1rem, 2.2vw, 1.75rem) var(--edge);
}
.top__name {
  font-family: var(--serif); font-weight: 400; font-variation-settings: "SOFT" 100;
  font-size: 1.3rem; letter-spacing: -0.01em; color: var(--black); text-decoration: none;
}
.top__nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem clamp(1.1rem, 3vw, 2.5rem); }
.top__nav a {
  display: inline-block; padding: 0.45rem 0;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; color: var(--text);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s ease, color 0.2s ease;
}
.top__nav a:hover, .top__nav a:focus-visible { background-size: 100% 1px; }

/* ---- hero ---- */

.hero { display: grid; }
.hero__text { padding: clamp(1.5rem, 6vw, 3rem) var(--edge) clamp(2.5rem, 8vw, 4rem); }
.hero__eyebrow {
  margin-bottom: clamp(1.1rem, 2.4vw, 2rem);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--lera);
}
.hero h1 {
  font-size: clamp(3.1rem, 1.35rem + 8vw, 7.25rem);
  font-weight: 280; line-height: 0.96; letter-spacing: -0.03em;
}
.hero__lead {
  margin-top: clamp(1.4rem, 3vw, 2.25rem); max-width: 27rem;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.22rem); line-height: 1.6;
}
.hero__lead p + p { margin-top: 0.9em; }
.hero__more { margin-top: clamp(1.75rem, 3.5vw, 2.75rem); }
.hero__media { background: var(--sten); aspect-ratio: 4 / 5; max-height: 86svh; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

.hero--plain .hero__text { padding-block: clamp(3rem, 12vw, 9rem); max-width: 70rem; }

@media (min-width: 60em) {
  .hero:not(.hero--plain) {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6.5fr);
    height: calc(100svh - 5.5rem); min-height: 36rem; max-height: 58rem;
  }
  .hero:not(.hero--plain) .hero__text {
    align-self: end;
    padding: 2rem clamp(2rem, 4vw, 4.5rem) clamp(3rem, 7vh, 5.5rem) var(--edge);
  }
  .hero__media { aspect-ratio: auto; max-height: none; height: 100%; min-height: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__text > * { animation: stig 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero__text > :nth-child(2) { animation-delay: 0.08s; }
  .hero__text > :nth-child(3) { animation-delay: 0.16s; }
  .hero__text > :nth-child(4) { animation-delay: 0.24s; }
  .hero__media img { animation: fram 1.4s ease both; }
}
@keyframes stig { from { opacity: 0; transform: translateY(0.9rem); } }
@keyframes fram { from { opacity: 0; transform: scale(1.03); } }

/* ---- avsnitt ---- */

.section { padding-block: var(--space); }

.about__grid { display: grid; gap: clamp(2.25rem, 6vw, 6rem); align-items: center; }
.about__media { background: var(--sten); aspect-ratio: 4 / 5; overflow: hidden; }
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about__body h2 { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); max-width: 14em; }
.about--plain .about__body { max-width: 46rem; }
@media (min-width: 60em) {
  .about__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .about--plain .about__grid { grid-template-columns: minmax(0, 1fr); }
  .about__body { padding-right: clamp(0rem, 4vw, 4rem); }
}

.works { background: var(--papper); }
.works__head { margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.works__head h2 { max-width: 14em; }
.works__intro { margin-top: clamp(1.25rem, 2.5vw, 2rem); }
@media (min-width: 60em) {
  .works__head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: clamp(2rem, 6vw, 6rem); align-items: end; }
  .works__head .label { grid-column: 1 / -1; }
  .works__intro { margin-top: 0; padding-bottom: 0.4rem; }
}

.grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 3vw, 3rem); }
@media (min-width: 36em) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work:nth-child(2n) { margin-top: clamp(2rem, 5vw, 4rem); }
}
@media (min-width: 62em) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .work:nth-child(2n) { margin-top: 0; }
  .work:nth-child(3n + 2) { margin-top: clamp(3rem, 5vw, 5rem); }
}
.work__link { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--sten); cursor: zoom-in; }
.work__link img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .work__link:hover img { transform: scale(1.035); }
}
.work figcaption { display: grid; gap: 0.3rem; margin-top: 1rem; }
.work__title {
  font-family: var(--serif); font-style: italic; font-weight: 380; font-size: 1.3rem; line-height: 1.25; color: var(--black);
}
.work__text { font-size: 0.94rem; line-height: 1.55; color: var(--dim); max-width: 26rem; }

.visit { background: var(--djup); color: #e9e4da; }
.visit h2, .visit h3 { color: #f6f2ea; }
.visit .label { color: #d9a48e; }
.visit a:hover { color: #e8b7a2; }
.visit :focus-visible { outline-color: #e8b7a2; }
.visit ::selection { background: #e8b7a2; }
.visit__grid { display: grid; gap: clamp(2.75rem, 6vw, 6rem); }
.visit__intro h2 { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); max-width: 12em; }
.visit__facts { display: grid; gap: 2.5rem; align-content: start; }
.fact { border-top: 1px solid rgb(233 228 218 / 0.28); padding-top: 1.25rem; }
.fact h3 {
  margin-bottom: 0.9rem;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: #d9a48e;
}
.fact address { font-family: var(--serif); font-weight: 340; font-variation-settings: "SOFT" 100; font-size: 1.35rem; line-height: 1.4; color: #f6f2ea; }
.fact address + p { margin-top: 1.1rem; }
.hours > div { display: flex; justify-content: space-between; gap: 1.5rem; padding: 0.5rem 0; border-bottom: 1px solid rgb(233 228 218 / 0.14); }
.hours > div:first-child { padding-top: 0; }
.hours dt { font-weight: 500; }
.hours dd { text-align: right; font-feature-settings: "tnum"; }
.hours .hours__note { border-bottom: 0; color: #c8cdc9; font-size: 0.94rem; }
.hours .hours__note dd { text-align: left; }
@media (min-width: 60em) {
  .visit__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .visit__facts { padding-top: 3.2rem; }
}

.contact__inner { display: grid; justify-items: center; text-align: center; }
.contact h2 { max-width: 14em; }
.contact .prose { margin-top: clamp(1.25rem, 2.5vw, 2rem); max-width: 32rem; }
.contact__mail {
  margin-top: clamp(2rem, 4.5vw, 3.5rem); max-width: 100%;
  font-family: var(--serif); font-weight: 320; font-variation-settings: "SOFT" 100;
  font-size: clamp(1.45rem, 0.7rem + 3.6vw, 3.1rem); line-height: 1.2; letter-spacing: -0.015em;
}
.contact__mail a { color: var(--black); text-decoration-color: var(--lera); text-underline-offset: 0.18em; overflow-wrap: anywhere; }
.contact__mail a:hover { color: var(--lera); }
.contact__more { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 3rem; margin-top: clamp(1.75rem, 3.5vw, 2.75rem); }
.contact__more span {
  display: block; margin-bottom: 0.15rem;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim);
}

.foot { border-top: 1px solid var(--linje); font-size: 0.88rem; color: var(--dim); }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.75rem; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---- förstoring (byggs av site.js) ---- */

html.lb-open { overflow: hidden; }
.lb {
  width: 100vw; max-width: none; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgb(22 30 34 / 0.97); color: #efeae0; overflow: hidden;
}
.lb::backdrop { background: rgb(22 30 34 / 0.97); }
.lb__stage { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; padding: 3.75rem clamp(0.75rem, 5vw, 5.5rem) 1.25rem; }
.lb__img { place-self: center; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; background: #2a3338; }
.lb__cap { display: grid; gap: 0.2rem; justify-items: center; text-align: center; padding-top: 1rem; min-height: 3.5rem; }
.lb__title { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: #f6f2ea; }
.lb__text { font-size: 0.92rem; color: #c8cdc9; max-width: 40rem; }
.lb__count { position: absolute; left: clamp(1rem, 5vw, 2rem); top: 1.3rem; font-size: 0.8rem; letter-spacing: 0.16em; font-feature-settings: "tnum"; color: #c8cdc9; }
.lb button {
  position: absolute; display: grid; place-items: center; width: 3rem; height: 3rem;
  border: 0; border-radius: 50%; background: rgb(246 242 234 / 0.08); color: #f6f2ea; cursor: pointer;
  font: inherit; -webkit-tap-highlight-color: transparent;
}
.lb button:hover { background: rgb(246 242 234 / 0.2); }
.lb button:focus-visible { outline-color: #e8b7a2; }
.lb button svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lb__close { right: clamp(0.5rem, 3vw, 1.25rem); top: 0.5rem; }
.lb__prev, .lb__next { top: 50%; margin-top: -1.5rem; }
.lb__prev { left: clamp(0.25rem, 1.5vw, 1.25rem); }
.lb__next { right: clamp(0.25rem, 1.5vw, 1.25rem); }
@media (max-width: 40em) {
  .lb__prev, .lb__next { top: auto; bottom: 0.9rem; margin: 0; }
  .lb__cap { padding-inline: 3.25rem; min-height: 4.2rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .lb[open] .lb__img { animation: fram 0.35s ease both; }
}

/* ---- meddelandesida (404 m.m.) ---- */

.message { min-height: 100svh; display: grid; place-items: center; padding: var(--gutter); }
.message main { display: grid; gap: 1.25rem; justify-items: start; max-width: 32rem; }
.message h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); line-height: 1.05; }

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

@media print {
  .top__nav, .hero__more, .foot a, .skip { display: none; }
  .visit { background: none; color: inherit; }
}
