/* Matboka.no: samme designsystem som appen, «gulrot og fjord».
   Oransje er hovedfargen og står alltid med mørk sjokoladetekst. Fjord,
   sennep, salvie og fersken er fargene på panelene, som omslagene i boka.
   Skriften er Plus Jakarta Sans, lagt her på siden (ingen kall til Google). */

@font-face { font-family: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans-800.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #FFFFFF;
  --paper: #F7F2ED;
  --line: #EEE5DC;
  --line-strong: #D8CBBF;
  --ink: #26190F;
  --muted: #6E6157;
  --link: #B1531A;
  --hover: rgba(38, 25, 15, 0.07);

  /* Merkefarger. De er like i lys og mørk modus. */
  --gulrot: #EF8A39;
  --gulrot-trykk: #E27A28;
  --sjokolade: #26190F;
  --krem: #FFF8EF;
  --fjord: #17504D;
  --fjord-lys: #1E6A66;
  --sennep: #E5A92E;
  --salvie: #CFE3D3;
  --fersken: #F9CDA8;
  --natt: #140F0B;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --panel-radius: 28px;
  --phone-shadow: 0 44px 70px -34px rgba(38, 25, 15, 0.55), 0 14px 28px -16px rgba(38, 25, 15, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #140F0B;
    --paper: #1E1712;
    --line: #33291F;
    --line-strong: #4A3D31;
    --ink: #F7EFE8;
    --muted: #BDAE9F;
    --link: #F7A865;
    --hover: rgba(247, 239, 232, 0.08);
    --phone-shadow: 0 44px 70px -34px rgba(0, 0, 0, 0.8), 0 14px 28px -16px rgba(0, 0, 0, 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.62 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0 0 1rem; text-wrap: pretty; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.on-gulrot :focus-visible { outline-color: var(--sjokolade); }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: 0.7rem 1rem; border-radius: 999px;
  background: var(--sjokolade); color: var(--krem); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------- Toppen ---------- */
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1.1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  color: inherit; text-decoration: none;
  font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em;
}
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a {
  padding: 0.55rem 0.9rem; border-radius: 999px;
  color: inherit; font-weight: 600; text-decoration: none;
}
.nav a:hover { background: var(--hover); }
.nav a[aria-current='page'] { background: var(--paper); }
.on-gulrot .nav a:hover { background: rgba(38, 25, 15, 0.1); }

/* ---------- Knapper ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 50px; padding: 0.8rem 1.4rem; border: 0; border-radius: 999px;
  font: 600 1rem/1.2 inherit; text-decoration: none; cursor: pointer;
}
.btn--gulrot { background: var(--gulrot); color: var(--sjokolade); }
.btn--gulrot:hover { background: var(--gulrot-trykk); }
.btn--sjokolade { background: var(--sjokolade); color: var(--krem); }
.btn--sjokolade:hover { background: #3A2E24; }

/* Butikklenkene vises når lenkene er fylt inn i js/site.js. */
.stores { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.stores[data-klar='nei'] .store { display: none; }
.stores[data-klar='ja'] .soon { display: none; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-width: 168px; min-height: 58px; padding: 0.55rem 1.3rem 0.6rem;
  border-radius: 16px; background: var(--sjokolade); color: var(--krem);
  text-decoration: none; line-height: 1.15;
}
.store:hover { background: #3A2E24; }
.store small { font-size: 0.78rem; font-weight: 600; opacity: 0.8; }
.store span { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.soon { margin: 0; font-weight: 600; }
.soon::before {
  content: ''; display: inline-block; width: 0.55em; height: 0.55em; margin-right: 0.55em;
  border-radius: 50%; background: currentColor; vertical-align: 0.08em;
}

/* ---------- Telefon ---------- */
.phone {
  --w: 300px;
  position: relative; flex: none;
  width: var(--w); margin: 0; padding: calc(var(--w) * 0.03);
  border-radius: calc(var(--w) * 0.165);
  background: #0B0806;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), var(--phone-shadow);
}
.phone img { width: 100%; border-radius: calc(var(--w) * 0.137); }

/* ---------- Forsiden: toppen ---------- */
.on-gulrot { background: var(--gulrot); color: var(--sjokolade); }
.on-gulrot a:not(.btn):not(.store):not(.brand) { color: var(--sjokolade); }

.hero { overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: clamp(1.5rem, 4vw, 3rem);
}
.hero__text { padding-block: clamp(2rem, 6vw, 5rem) clamp(3rem, 8vw, 7rem); }
.hero h1 {
  font-weight: 800; font-size: clamp(3rem, 1.2rem + 6.4vw, 6.25rem);
  line-height: 0.98; letter-spacing: -0.05em;
}
.hero__lead {
  max-width: 33ch; margin: clamp(1.1rem, 2vw, 1.6rem) 0 clamp(1.6rem, 3vw, 2.3rem);
  font-size: clamp(1.12rem, 1rem + 0.45vw, 1.35rem); line-height: 1.5;
}
.hero__art { position: relative; align-self: stretch; min-height: clamp(470px, 48vw, 620px); }
.hero__art .phone {
  --w: clamp(240px, 23vw, 300px);
  position: absolute; left: 0; right: 0; bottom: calc(var(--w) * -0.55);
  margin-inline: auto; z-index: 2;
}

.plate {
  --d: 200px;
  position: absolute; width: var(--d); height: var(--d);
  border-radius: 50%; object-fit: cover;
  border: calc(var(--d) * 0.06) solid var(--krem);
  box-shadow: 0 26px 44px -24px rgba(38, 25, 15, 0.6);
}
.plate--a { --d: clamp(150px, 17vw, 220px); top: 7%; left: -3%; }
.plate--b { --d: clamp(120px, 12vw, 160px); top: 54%; left: -7%; z-index: 3; }
.plate--c { --d: clamp(170px, 19vw, 250px); top: 34%; right: -9%; }
.plate--d { --d: clamp(100px, 10vw, 136px); top: 2%; right: 9%; }

@media (prefers-reduced-motion: no-preference) {
  .plate { animation: land 0.85s cubic-bezier(0.34, 1.42, 0.64, 1) both; }
  .plate--a { animation-delay: 0.15s; }
  .plate--d { animation-delay: 0.25s; }
  .plate--c { animation-delay: 0.35s; }
  .plate--b { animation-delay: 0.5s; }
  .hero__art .phone { animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
}
@keyframes land {
  from { opacity: 0; transform: translateY(-46px) scale(0.86) rotate(-10deg); }
  60% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(60px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Forsiden: funksjonene ---------- */
.feature { padding-block: clamp(3.5rem, 9vw, 7.5rem); }
.feature .wrap {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center; gap: clamp(2rem, 7vw, 6.5rem);
}
.feature--flip .feature__text { order: 2; }
.feature h2, .pluss h2, .closing h2 {
  font-weight: 800; font-size: clamp(2.2rem, 1.2rem + 3vw, 3.6rem);
  line-height: 1.02; letter-spacing: -0.042em;
}
.feature__text > p { max-width: 44ch; margin-top: 1.2rem; font-size: 1.12rem; }
.feature__text > p + p { margin-top: 0; }
.feature .note { color: var(--muted); font-size: 1rem; }

.ways { margin: 1.9rem 0 0; padding: 0; list-style: none; display: grid; gap: 1.15rem; max-width: 46ch; }
.ways li { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); column-gap: 0.95rem; align-items: start; }
.ways h3 { grid-column: 2; font-size: 1.06rem; font-weight: 700; line-height: 1.45; letter-spacing: -0.01em; }
.ways p { grid-column: 2; margin: 0; color: var(--muted); }
.ways svg {
  grid-row: 1 / span 2; width: 2.75rem; height: 2.75rem; padding: 0.68rem;
  border-radius: 13px; background: var(--paper); color: var(--fjord-lys);
}
@media (prefers-color-scheme: dark) { .ways svg { color: #5CC0B3; } }

.panel {
  --bg: var(--paper);
  position: relative; display: flex; justify-content: center; align-items: flex-start;
  height: clamp(440px, 50vw, 580px); padding-top: clamp(2.4rem, 5vw, 3.6rem);
  border-radius: var(--panel-radius); background: var(--bg); overflow: hidden;
}
.panel .phone { --w: clamp(232px, 25vw, 292px); }
.panel--fjord { --bg: var(--fjord-lys); }
.panel--gulrot { --bg: var(--gulrot); }
.panel--sennep { --bg: var(--sennep); }
.panel--salvie { --bg: var(--salvie); }
.panel--fersken { --bg: var(--fersken); }
.panel--duo .phone { --w: clamp(196px, 20vw, 248px); }
.panel--duo .phone:first-child { margin-top: 2.2rem; margin-right: -2.5rem; transform: rotate(-4deg); }
.panel--duo .phone:last-child { transform: rotate(4deg); }

.band--natt { background: var(--natt); color: #F7EFE8; }
@media (prefers-color-scheme: dark) { .band--natt { background: #0A0705; } }
.band--natt .note { color: #BDAE9F; }
.band--paper { background: var(--paper); }

/* ---------- Pluss ---------- */
.pluss { padding-block: clamp(3.5rem, 9vw, 7rem); }
.pluss__intro { max-width: 52ch; margin-top: 1.1rem; font-size: 1.12rem; }
.compare {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.compare section { padding: clamp(1.5rem, 3vw, 2.2rem); border-radius: var(--panel-radius); background: var(--paper); }
.compare section.compare__pluss { background: var(--fersken); color: var(--sjokolade); }
.compare h3 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.03em; }
.compare .price { margin: 0.5rem 0 0; font-weight: 600; }
.compare ul { margin: 1.2rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.7rem; }
.compare li { position: relative; padding-left: 1.7rem; }
.compare li::before {
  content: ''; position: absolute; left: 0.15rem; top: 0.38em; width: 0.9rem; height: 0.5rem;
  border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg);
}
.compare .small { margin: 1.3rem 0 0; font-size: 0.95rem; }

/* ---------- Avslutning ---------- */
.closing { padding-block: clamp(3.5rem, 8vw, 6rem); text-align: center; }
.closing img { width: 84px; height: 84px; margin: 0 auto 1.4rem; border-radius: 22px; box-shadow: 0 18px 30px -18px rgba(38, 25, 15, 0.7); }
.closing p { margin: 0.9rem auto 1.8rem; font-size: 1.15rem; }
.closing .stores { justify-content: center; }

/* ---------- Bunnen ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: 0.95rem; }
.home .site-footer { border-top: 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; }
.site-footer p { margin: 0.6rem 0 0; color: var(--muted); max-width: 40ch; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; align-content: flex-start; }
.site-footer nav a { color: var(--ink); font-weight: 600; text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.brand--small { font-size: 1.1rem; }
.brand--small img { width: 32px; height: 32px; border-radius: 9px; }

/* ---------- Tekstsider (hjelp, personvern, vilkår) ---------- */
.page { padding-block: clamp(1.5rem, 5vw, 3.5rem) clamp(3.5rem, 9vw, 6rem); }
.prose { max-width: 68ch; }
.prose h1 { font-weight: 800; font-size: clamp(2.4rem, 1.5rem + 3vw, 3.6rem); line-height: 1.04; letter-spacing: -0.042em; }
.prose .updated, .prose .lead { margin-top: 0.8rem; color: var(--muted); }
.prose .lead { font-size: 1.15rem; color: var(--ink); max-width: 56ch; }
.prose h2 { margin: 2.6rem 0 0.8rem; font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
.prose h3 { margin: 1.6rem 0 0.5rem; font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.prose ul, .prose ol { margin: 0 0 1rem; padding: 0; display: grid; gap: 0.6rem; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; padding-left: 1.45rem; }
.prose ul > li::before {
  content: ''; position: absolute; left: 0.2rem; top: 0.66em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gulrot);
}
.prose ol { padding-left: 1.4rem; }
.prose ol > li { padding-left: 0.3rem; }
.prose ol > li::marker { font-weight: 700; color: var(--link); }
.prose .box { margin: 1.4rem 0; padding: 1.2rem 1.4rem; border-radius: 20px; background: var(--paper); }
.prose .box p:last-child { margin-bottom: 0; }

.toc { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.8rem 0 0; padding: 0; list-style: none; }
.toc a {
  display: inline-block; padding: 0.5rem 0.95rem; border-radius: 999px;
  background: var(--paper); color: var(--ink); font-weight: 600; text-decoration: none; font-size: 0.95rem;
}
.toc a:hover { background: var(--line); }

.faq { margin-top: 0.4rem; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  position: relative; padding: 1rem 2.6rem 1rem 0;
  font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 0.5rem; top: 1.45rem;
  width: 0.55rem; height: 0.55rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] > summary::after { transform: translateY(0.25rem) rotate(225deg); }
.faq summary:hover { color: var(--link); }
.faq .answer { padding: 0 0 1.1rem; }
.faq .answer > :last-child { margin-bottom: 0; }

/* ---------- Delt oppskrift ---------- */
.recipe { max-width: 720px; }
.recipe__by { margin: 0 0 0.5rem; color: var(--muted); font-weight: 600; }
.recipe h1 {
  font-weight: 800; font-size: clamp(2.2rem, 1.4rem + 3.2vw, 3.5rem);
  line-height: 1.04; letter-spacing: -0.04em; overflow-wrap: anywhere;
}
.recipe__desc { margin: 1rem 0 0; font-size: 1.15rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.3rem 0 0; padding: 0; list-style: none; }
.facts li { padding: 0.45rem 0.95rem; border-radius: 999px; background: var(--paper); font-weight: 600; font-size: 0.95rem; }
.recipe__source { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.95rem; overflow-wrap: anywhere; }

.save {
  display: grid; gap: 0.9rem; margin: 2rem 0 0.5rem; padding: clamp(1.3rem, 3vw, 1.8rem);
  border-radius: 24px; background: var(--gulrot); color: var(--sjokolade);
}
.save h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.025em; }
.save p { margin: 0; }
.save .btn { justify-self: start; }
.save .stores { gap: 0.6rem; }
.save .store { min-width: 150px; min-height: 52px; }

.recipe h2.section { margin: 2.6rem 0 0.4rem; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.recipe h3.group { margin: 1.4rem 0 0.2rem; font-size: 1.05rem; font-weight: 700; color: var(--muted); }
.ingredients { margin: 0; padding: 0; list-style: none; }
.ingredients li { border-bottom: 1px solid var(--line); }
.ingredients label { display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.7rem 0; cursor: pointer; }
.ingredients input {
  appearance: none; flex: none; width: 1.3rem; height: 1.3rem; margin: 0.15rem 0 0;
  border: 2px solid var(--line-strong); border-radius: 50%; cursor: pointer;
}
.ingredients input:checked { border-color: var(--gulrot); background: var(--gulrot) url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20 20%22%3E%3Cpath d=%22M5 10.5l3.2 3.2L15 7%22 fill=%22none%22 stroke=%22%2326190F%22 stroke-width=%222.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E') center / 100% no-repeat; }
.ingredients input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: steg; }
.steps li {
  counter-increment: steg;
  display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 0.6rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line);
  font-size: 1.08rem; line-height: 1.6;
}
.steps li::before { content: counter(steg); font-weight: 800; font-size: 1.5rem; line-height: 1.15; color: var(--link); letter-spacing: -0.03em; }
.recipe__notes { white-space: pre-line; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.tags li { padding: 0.3rem 0.75rem; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.9rem; color: var(--muted); }
.privacy-note { margin: 2.4rem 0 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Små skjermer ---------- */
@media (max-width: 860px) {
  .hero .wrap, .feature .wrap, .compare { grid-template-columns: minmax(0, 1fr); }
  .hero__text { padding-bottom: 0.5rem; }
  .hero__art { min-height: clamp(400px, 105vw, 520px); }
  .hero__art .phone { --w: clamp(228px, 62vw, 280px); }
  .plate--a { --d: clamp(118px, 34vw, 190px); top: 4%; left: -6%; }
  .plate--b { --d: clamp(96px, 26vw, 140px); top: 50%; left: -9%; }
  .plate--c { --d: clamp(130px, 38vw, 210px); top: 30%; right: -10%; }
  .plate--d { --d: clamp(80px, 22vw, 120px); top: 0; right: 4%; }
  .feature--flip .feature__text { order: 0; }
  .feature__text { order: 0; }
  .panel { height: clamp(420px, 112vw, 560px); }
  .panel .phone { --w: clamp(220px, 64vw, 280px); }
  .panel--duo .phone { --w: clamp(170px, 46vw, 230px); }
  .nav a.hide-small { display: none; }
}
@media (max-width: 420px) {
  .brand { font-size: 1.2rem; }
  .nav a { padding: 0.5rem 0.7rem; }
  .store { min-width: 0; flex: 1 1 140px; }
}
@media print {
  .site-header .nav, .site-footer nav, .save, .skip { display: none; }
  body { font-size: 11pt; }
}
