:root {
  --bg: #f6f4f0;
  --ink: #1c1b19;
  --muted: #8a8680;
  --line: #dcd8d1;
  --gutter: clamp(16px, 3vw, 40px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

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

/* ---------- topp ---------- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--gutter);
}

.logo {
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
}

/* ---------- fyrstikk ---------- */

.match {
  background: none;
  border: 0;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

.match svg { width: 22px; height: 44px; overflow: visible; }

.match .flame {
  transform-origin: 12px 12px;
  transform: scale(0);
  opacity: 0;
  transition: transform .5s cubic-bezier(.2,.9,.3,1.3), opacity .3s;
}

.match .stroke { stroke: currentColor; fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }

.match .head { fill: currentColor; transition: fill .4s; }

.night .match .flame {
  transform: scale(1);
  opacity: 1;
  animation: flicker 2.4s ease-in-out .5s infinite;
}

.night .match .head { fill: #3a2a20; }

@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.04, .96) rotate(-2deg); }
  45% { transform: scale(.97, 1.05) rotate(1.5deg); }
  70% { transform: scale(1.02, .98) rotate(-1deg); }
}

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

/* ---------- dag / kveld ---------- */

.photo {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e9e5df;
}

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1.2s ease;
}

.photo .evening { opacity: 0; }
.night .photo .evening { opacity: 1; }

/* ---------- forside ---------- */

.products {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--gutter) calc(var(--gutter) / 2);
  padding: 8vh var(--gutter) 0;
  list-style: none;
}

.products a { display: block; }

.products .name {
  margin-top: 12px;
  font-size: 14px;
}

.products a:hover .name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

@media (max-width: 900px) {
  .products { grid-template-columns: repeat(2, 1fr); padding-top: 4vh; }
}

@media (max-width: 600px) {
  .products { grid-template-columns: 1fr; }
}

/* ---------- produktside ---------- */

.product {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: calc(var(--gutter) * 1.5);
  padding: 4vh var(--gutter) 0;
  align-items: start;
}

.product .info {
  position: sticky;
  top: 40px;
  max-width: 420px;
}

.product h1 {
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.product .price { margin-top: 6px; }

.product .text { margin-top: 32px; }
.product .text p + p { margin-top: 1em; }

.specs {
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.specs div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.specs dt { color: var(--muted); }

.enquire {
  display: inline-block;
  margin-top: 32px;
  font-size: 14px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

.craft {
  margin-top: var(--gutter);
}

.craft figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.back { font-size: 14px; color: var(--muted); }
.back:hover { color: var(--ink); }

@media (max-width: 800px) {
  .product { grid-template-columns: 1fr; }
  .product .info { position: static; }
}

main { padding-bottom: 12vh; }
