/* Brödboden, Visby – demosajt (Valo-Tech). Se DESIGN.md. */

@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/bricolage-700.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-style: normal; font-display: swap; src: url("/fonts/bricolage-800.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/source-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/source-sans-600.woff2") format("woff2"); }

:root {
  --kalksten: #ECEAE5;
  --yta: #F7F6F3;
  --rag: #2A1E16;
  --rag-2: #5E4B3C;
  --gul: #FDD501;
  --gul-hover: #E9C400;
  --gul-text: #7A6400;
  --kant: #D3CEC4;
  --ljus-text: #F2EEE8;
  --rubrik: "Bricolage Grotesque", "Arial", sans-serif;
  --brod: "Source Sans 3", "Arial", sans-serif;
  --ut: cubic-bezier(0.23, 1, 0.32, 1);
  --sida: 24px;
  --luft: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--kalksten);
  color: var(--rag);
  font-family: var(--brod);
  font-size: 18px;
  line-height: 1.5;
  font-size-adjust: from-font;
  overflow-wrap: break-word;
}
img, video { display: block; max-width: 100%; }
h1, h2 { font-family: var(--rubrik); font-weight: 800; margin: 0; text-wrap: balance; }
h2 { font-size: 30px; line-height: 1; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--rag); text-underline-offset: 3px; }
::selection { background: var(--gul); color: var(--rag); }
:focus-visible { outline: 3px solid var(--rag); outline-offset: 3px; }
table { border-collapse: collapse; font-variant-numeric: tabular-nums; width: 100%; }
th { font-weight: 400; text-align: left; }
td { text-align: right; white-space: nowrap; padding-left: 16px; }
.stark { font-weight: 600; }
.sekundar { color: var(--rag-2); }
.visuellt-dold { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.etikett { font-size: 15px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gul-text); }
.inre { max-width: 1200px; margin: 0 auto; padding: var(--luft) var(--sida); }

.hoppa { position: absolute; left: 8px; top: -100px; z-index: 30; background: var(--gul); padding: 12px 16px; font-weight: 600; }
.hoppa:focus { top: 8px; }

/* Knappar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 2px;
  font-weight: 600; text-decoration: none; color: var(--rag);
  transition: transform 160ms var(--ut), background-color 160ms var(--ut), color 160ms var(--ut);
}
.btn:active { transform: scale(0.97); transition-duration: 100ms; }
.btn-p { background: var(--gul); }
.btn-s { border: 2px solid var(--rag); }
.btn-stor { min-height: 52px; padding: 16px 28px; }
.btn svg, .menyknapp svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (hover: hover) and (pointer: fine) {
  a:hover { color: var(--gul-text); }
  .btn-p:hover { background: var(--gul-hover); color: var(--rag); }
  .btn-s:hover { background: var(--rag); color: var(--yta); }
}

/* Demoband och sidhuvud */
.demoband { background: var(--rag); color: var(--yta); font-size: 15px; text-align: center; padding: 8px 16px; }
.sidhuvud {
  max-width: 1200px; margin: 0 auto; padding: 16px var(--sida);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logga { display: inline-flex; align-items: center; min-height: 44px; }
.logga img { width: 162px; height: 64px; }
.huvudnav { display: none; align-items: center; gap: 28px; font-weight: 600; }
.huvudnav a:not(.btn) { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.menyknapp {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 16px;
  font: inherit; font-weight: 600; color: var(--rag); background: transparent;
  border: 2px solid var(--rag); border-radius: 2px; cursor: pointer;
}

/* Helskärmsmeny */
.meny {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; inset: 0;
  border: 0; padding: 16px var(--sida) 32px; background: var(--kalksten); color: var(--rag);
  opacity: 0; transform: translateY(-8px);
  transition: opacity 180ms var(--ut), transform 180ms var(--ut), overlay 180ms allow-discrete, display 180ms allow-discrete;
}
.meny[open] { opacity: 1; transform: none; transition-duration: 250ms; }
@starting-style { .meny[open] { opacity: 0; transform: translateY(-8px); } }
.meny::backdrop { background: var(--kalksten); }
.meny-topp { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.meny-topp img { width: 162px; height: 64px; }
.meny nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 40px; }
.meny nav a:not(.btn) {
  font-family: var(--rubrik); font-weight: 800; font-size: 34px; line-height: 1.1; letter-spacing: -0.015em;
  text-decoration: none; min-height: 48px; display: inline-flex; align-items: center;
}
.meny nav .btn { margin-top: 24px; width: 100%; min-height: 56px; font-size: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .meny[open] nav > * { animation: in-upp 300ms var(--ut) backwards; }
  .meny[open] nav > :nth-child(2) { animation-delay: 35ms; }
  .meny[open] nav > :nth-child(3) { animation-delay: 70ms; }
  .meny[open] nav > :nth-child(4) { animation-delay: 105ms; }
  .meny[open] nav > :nth-child(5) { animation-delay: 140ms; }
}
@media (prefers-reduced-motion: reduce) { .meny, .meny[open] { transform: none; } }

/* Hero */
.hero {
  position: relative; min-height: 560px; display: flex; justify-content: center;
  overflow: hidden; background: #3A2C20;
}
.hero-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-lager {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(28, 20, 14, 0.8) 0%, rgba(28, 20, 14, 0.62) 60%, rgba(28, 20, 14, 0.3) 100%);
}
.hero-inre { position: relative; width: 100%; max-width: 1200px; padding: 48px var(--sida) 72px; color: var(--yta); }
.hero-text { max-width: 560px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hero-etikett { color: var(--gul); }
.hero h1 { font-size: 40px; line-height: 0.98; letter-spacing: -0.025em; color: var(--yta); }
.hero-under { font-size: 21px; color: var(--ljus-text); max-width: 34ch; }
.hero-not { font-size: 16px; color: var(--ljus-text); }
.hero a:focus-visible { outline-color: var(--yta); }
@media (prefers-reduced-motion: no-preference) {
  .hero-text > * { animation: in-upp 420ms var(--ut) backwards; }
  .hero-text > h1 { animation-delay: 0ms; }
  .hero-text > .hero-under { animation-delay: 60ms; }
  .hero-text > .btn { animation-delay: 120ms; }
  .hero-text > .hero-not { animation-delay: 180ms; }
}
@keyframes in-upp { from { opacity: 0; transform: translateY(10px); } }

/* Hitta hit */
.hitta { background: var(--yta); border-block: 1px solid var(--kant); }
.hitta .inre { display: flex; flex-direction: column; gap: 40px; }
.hitta-huvud { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; }
.hitta-huvud p { max-width: 46ch; }
.platser { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 24px; }
.plats { display: flex; flex-direction: column; gap: 20px; background: var(--kalksten); padding: 20px; border-radius: 16px; }
.plats img, .foto-saknas { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.foto-saknas { background: var(--kant); color: var(--rag-2); font-size: 15px; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; }
.plats-gul { background: var(--gul); }
.plats-gul .etikett { color: var(--rag); }
.plats address {
  font-style: normal; font-family: var(--rubrik); font-weight: 700;
  font-size: clamp(28px, 8vw, 34px); line-height: 1.05; letter-spacing: -0.015em;
}
.tider th, .tider td { padding: 6px 0; border-top: 1px solid var(--kant); }
.tider tr:last-child > * { border-bottom: 1px solid var(--kant); }
.plats-gul .tider th, .plats-gul .tider td { border-color: var(--rag); }
.plats > a, .ring-rad a { display: inline-flex; align-items: center; min-height: 44px; align-self: flex-start; }
.ring-rad { font-size: 21px; }

/* Bröd och bullar */
.brod { max-width: 1200px; margin: 0 auto; padding: var(--luft) var(--sida); display: flex; flex-direction: column; gap: 48px; }
.trio { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.trio img { min-width: 0; width: 100%; height: auto; object-fit: cover; border-radius: 2px; }
.trio img:nth-child(1) { flex: 3 1 340px; aspect-ratio: 1; }
.trio img:nth-child(2) { flex: 3 1 300px; aspect-ratio: 3 / 2; }
.trio img:nth-child(3) { flex: 2 1 200px; aspect-ratio: 4 / 5; }
.brod-text { display: flex; flex-wrap: wrap; gap: 32px 48px; justify-content: space-between; }
.brod-intro { flex: 1 1 360px; display: flex; flex-direction: column; gap: 16px; }
.brod-intro p { max-width: 40ch; }
.priser { flex: 1 1 480px; width: auto; font-size: 20px; }
.priser th, .priser td { padding: 14px 0; border-top: 1px solid var(--kant); }
.priser td { padding-left: 16px; }
.priser tr:last-child > * { border-bottom: 1px solid var(--kant); }

/* Lunch */
.lunch { max-width: 1200px; margin: 0 auto; padding: 0 var(--sida) var(--luft); display: flex; flex-wrap: wrap; gap: 24px; }
.lunch img { flex: 1 1 420px; min-width: 0; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.lunch-text { flex: 1 1 340px; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; }

/* Beställ och Bageriet */
.bestall { background: var(--yta); border-top: 1px solid var(--kant); }
.bestall-inre { display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; }
.bestall-inre > div { flex: 1 1 420px; display: flex; flex-direction: column; gap: 16px; }
.smal { max-width: 46ch; }
.knappar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Sidfot */
.sidfot { background: var(--rag); color: var(--yta); font-size: 16px; }
.sidfot a { color: var(--yta); display: inline-flex; align-items: center; min-height: 44px; }
.sidfot-inre { padding-block: 48px; display: flex; flex-wrap: wrap; gap: 24px 32px; justify-content: space-between; }
.kol { display: flex; flex-direction: column; gap: 2px; }
.kol span { padding-block: 4px; }
.kol-dov { max-width: 40ch; color: var(--kant); }
.sidfot-namn { font-family: var(--rubrik); font-weight: 800; font-size: 24px; }
@media (hover: hover) and (pointer: fine) { .sidfot a:hover { color: var(--gul); } }

/* Mobilens åtgärdsrad */
.atgardsrad {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 8px var(--sida) calc(8px + env(safe-area-inset-bottom));
  background: var(--yta); border-top: 1px solid var(--kant);
  transition: transform 250ms var(--ut), visibility 250ms;
}
.atgardsrad .btn { min-height: 48px; background-color: var(--yta); }
.atgardsrad .btn-p { background-color: var(--gul); }
.js .atgardsrad:not(.visa) { transform: translateY(110%); visibility: hidden; transition-duration: 180ms; }
@media (max-width: 959px) { body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); } }

/* Mobil: hela bredden för knappar i en kolumn */
@media (max-width: 599px) {
  :root { --sida: 20px; }
  .knappar .btn { width: 100%; }
  .menyknapp { padding-inline: 12px; }
}

/* Dator */
@media (min-width: 960px) {
  :root { --luft: 120px; }
  .huvudnav { display: flex; }
  .menyknapp { display: none; }
  .atgardsrad { display: none; }
  .hero { min-height: 680px; }
  .hero-inre { padding: 56px var(--sida) 96px; }
  .hero-lager { background: linear-gradient(90deg, rgba(28, 20, 14, 0.78) 0%, rgba(28, 20, 14, 0.6) 38%, rgba(28, 20, 14, 0) 70%); }
  .hero h1 { font-size: 76px; }
  h2 { font-size: 52px; }
  .hitta .inre { padding-block: 96px; gap: 48px; }
  .platser { gap: 40px 24px; }
  .bestall .inre { padding-block: 96px; }
}
@media (min-width: 600px) and (max-width: 959px) {
  .hero h1 { font-size: 56px; }
  h2 { font-size: 40px; }
}

/* Scroll: sektionernas innehåll tonar in en gång (dekorativt, ingen fallback) */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes tona-in { from { opacity: 0; transform: translateY(12px); } }
    .tona {
      animation: tona-in var(--ut) backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
    .trio .tona:nth-child(2) { animation-range: entry 8% entry 68%; }
    .trio .tona:nth-child(3) { animation-range: entry 16% entry 76%; }
  }
}
