@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@400;600;700&display=swap');

/* Meirbruk Bok – hovudfarge + oker frå Meirbruk-logoen (ikkje grøn: den høyrer til Marknad) */
body.bok {
  --bg: #F2F2EE;             /* kjøleg papir – bannaret gjer resten */
  --ink: #26221E;
  --muted: #625A52;
  --line: rgba(38, 34, 30, 0.16);
  --ochre: #C8862A;          /* «bruk» i hovudlogoen */
  --ochre-hover: #B5761F;
  --ochre-text: #9E6516;     /* mørkare oker for liten tekst på lys bakgrunn */

  /* Blekkblå */
  --primary: #1F3550;
  --primary-dark: #172A40;
  --foot: #101D2C;

  font-family: 'Source Sans 3', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
/* Burgunder */
body.bok[data-farge="burgunder"] {
  --primary: #5E2530;
  --primary-dark: #481B24;
  --foot: #2E1217;
}

/* BANNER: hovudfarge, logo i krem og ei rad med bokryggar nedst */
.bok-banner {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--primary) 70%, #fff 8%) 0%, transparent 60%),
    var(--primary);
  color: #F6F2EA;
  overflow: hidden;
}
.bok-top {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: 18px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.bok-top-logo img { height: 27px; width: auto; display: block; }
.bok-top-addr {
  font-size: 13px;
  letter-spacing: 0.3px;
  color: rgba(246, 242, 234, 0.75);
  text-decoration: none;
}
.bok-top-addr:hover { color: var(--ochre); text-decoration: underline; text-underline-offset: 3px; }

.bok-banner-inner {
  position: relative;
  text-align: center;
  padding: 20px 24px 26px;
}
.bok-title { margin: 0; line-height: 0; }
.bok-logo {
  display: inline-block;
  width: clamp(120px, 13vw, 150px);
  aspect-ratio: 801 / 780;
  background-color: #F6F2EA;
  -webkit-mask: url('../assets/logo-bok-mask.png') center / contain no-repeat;
          mask: url('../assets/logo-bok-mask.png') center / contain no-repeat;
  animation: rise 0.8s ease both;
}
.bok-tagline {
  margin: 14px 0 0;
  font-family: 'Libre Baskerville', Georgia, serif;
  font-style: italic;
  font-size: 16px;
  color: rgba(246, 242, 234, 0.85);
}

/* Bokhylla */
.bok-shelf {
  display: block;
  width: 100%;
  height: 62px;
  position: relative;
}
.bok-shelf .s1 { fill: var(--ochre); }
.bok-shelf .s2 { fill: #F6F2EA; }
.bok-shelf .s3 { fill: var(--primary-dark); }
.bok-shelf .s4 { fill: color-mix(in srgb, var(--primary) 60%, #fff 40%); }
.bok-shelf .s5 { fill: color-mix(in srgb, var(--ochre) 55%, #fff 45%); }
.bok-shelf .band { fill: rgba(0, 0, 0, 0.18); }
.bok-banner::after {           /* hyllebord */
  content: "";
  display: block;
  height: 8px;
  background: var(--primary-dark);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.06);
}

/* HERO (innhald under banneret) */
.bok-hero {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 24px 48px;
  text-align: center;
}

/* TRE SPALTER */
.bok-strip {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);
  gap: 0 36px;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--line);
}
.bok-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ochre-text);
}
.bok-badge::before, .bok-badge::after {
  content: ""; width: 14px; height: 1px; background: currentColor; opacity: .55;
}
.bok-item h2 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--primary);
  margin: 10px 0 8px;
  line-height: 1.25;
}
.bok-item p {
  margin: 0 auto;
  max-width: 26em;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
.bok-divider { width: 1px; align-self: stretch; margin: 6px 0; background: var(--line); }

/* SATSINGSOMRÅDE */
.bok-genres { margin-top: 24px; }
.bok-genres-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.bok-genres ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.bok-genres li {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 14.5px;
  color: var(--primary);
  padding: 7px 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  border-radius: 999px;
}

/* FRÅ HYLLA – bokomslag, fem i breidda */
.bok-shelfgrid {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.bok-shelfgrid-head { text-align: center; margin-bottom: 28px; }
.bok-shelfgrid-head h2 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 26px;
  color: var(--primary);
  margin: 10px 0 8px;
}
.bok-shelfgrid-head p { margin: 0; color: var(--muted); font-size: 15px; }
.bok-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (min-width: 600px) {
  .bok-covers { grid-template-columns: repeat(5, 1fr); gap: 24px; }
}
.bok-cover { margin: 0; }
.bok-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  border-radius: 2px 4px 4px 2px;
  box-shadow:
    inset 4px 0 6px -3px rgba(0,0,0,.25),
    0 1px 2px rgba(0,0,0,.12),
    0 10px 22px -8px rgba(38,34,30,.35);
  transition: transform .25s ease, box-shadow .25s ease;
}
.bok-cover:hover img {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 18px 30px -10px rgba(38,34,30,.4);
}

/* CTA */
.bok-cta {
  background: var(--primary);
  color: #F6F2EA;
  padding: 64px 24px;
  text-align: center;
}
.bok-cta .inner { max-width: 600px; margin: 0 auto; }
.bok-cta h2 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 26px;
  margin: 0 0 12px;
  color: #fff;
}
.bok-cta p { margin: 0 0 24px; color: rgba(246,242,234,.8); }
.bok-btn {
  display: inline-block;
  background: var(--ochre);
  color: #1E1A16;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 6px;
  transition: background-color .2s;
}
.bok-btn:hover { background: var(--ochre-hover); }
.bok-cta .bok-cta-note {
  margin: 36px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(246,242,234,.18);
  font-size: 14px;
  color: rgba(246,242,234,.7);
}
.bok-cta-note a { color: var(--ochre); font-weight: 700; text-decoration: none; }
.bok-cta-note a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* FOOTER */
body.bok .site-foot {
  background: var(--foot);
  color: rgba(246,242,234,.62);
  font-size: 13px;
  padding: 44px 24px 24px;
  opacity: 1;
}
body.bok .site-foot .inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
}
body.bok .site-foot strong { color: #fff; display: block; margin-bottom: 6px; }
body.bok .site-foot p { margin: 3px 0; }
body.bok .site-foot .cross {
  margin-top: 36px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center; opacity: 1;
}
body.bok .site-foot a { color: var(--ochre); text-decoration: none; }
body.bok .site-foot a:hover { color: #fff; }
.foot-logo { height: 27px; width: auto; margin-bottom: 1.1rem; display: block; }

@media (max-width: 640px) {
  .bok-hero { padding-bottom: 40px; }
  .bok-strip { grid-template-columns: 1fr; padding: 8px 0; }
  .bok-item { padding: 20px 0; }
  .bok-divider { width: 48px; height: 1px; margin: 0 auto; }
  .bok-top-logo img { height: 23px; }
  .bok-shelf { height: 46px; }
  .bok-banner-inner { padding: 16px 20px 20px; }
  .bok-logo { width: 116px; }
  .bok-hero { padding-top: 28px; }
  .bok-top-addr { font-size: 12px; }
}
