/* Bageri Solgläntan — exempelsida av WebbEna
   Mobile-first: grundstilarna gäller mobil, media queries bygger på uppåt. */

:root {
  --bg: #fbf8f2;
  --paper: #fffcf6;
  --text: #1d1d1b;
  --muted: #55504a;
  --line: #e4ddd2;
  --field: #857b6f;
  --blue: #1f3a5f;
  --blue-dark: #162b47;
  --butter: #e2b25a;
  --butter-soft: #f4ead7;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(31, 58, 95, 0.08);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 1rem; line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 7vw, 3rem); }
h2 { font-size: clamp(1.7rem, 5vw, 2.3rem); margin-bottom: 1.2rem; }
h3 { font-size: 1.2rem; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
section { padding: 56px 0; }

/* Tillgänglighet */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--blue); color: #fff; padding: 10px 18px; font-weight: 600; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }
main:focus { outline: none; }
abbr[title] { text-decoration: none; font-weight: 600; }

/* Knappar */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: 999px; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; border: 2px solid var(--blue); transition: background 0.15s ease, color 0.15s ease; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--blue); }
.btn-secondary:hover { background: var(--blue); color: #fff; }

/* Infoband och header */
.notice { background: var(--butter); color: var(--text); text-align: center; font-size: 0.9rem; font-weight: 500; padding: 8px 16px; }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); box-shadow: 0 1px 12px rgba(31, 58, 95, 0.06); }
.header-inner { display: flex; align-items: center; flex-wrap: wrap; min-height: 64px; }
.logo { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--blue); text-decoration: none; }
.logo span { font-weight: 400; font-style: italic; }
.logo:hover { color: var(--blue); }
.menu-toggle { margin-left: auto; min-height: 44px; padding: 8px 18px; background: none; border: 2px solid var(--blue); border-radius: 999px; font: 600 0.95rem var(--sans); color: var(--blue); cursor: pointer; }
.menu-toggle[aria-expanded="true"] { background: var(--blue); color: #fff; }
.site-nav { display: none; width: 100%; flex-direction: column; padding: 8px 0 12px; }
.site-nav.is-open { display: flex; }
.site-nav a { padding: 12px 0; color: var(--text); text-decoration: none; font-weight: 500; border-top: 1px solid var(--line); }
.site-nav a:first-child { border-top: 0; }
.site-nav a:hover { color: var(--blue); text-decoration: underline; }

/* Hero: foto överst på mobil, ruta som överlappar fotot på större skärmar */
.hero { padding: 0 0 48px; background: var(--paper); }
.hero-img { width: 100%; height: 280px; object-fit: cover; }
.hero-box { background: var(--paper); padding: 28px 0 0; }
.hero-box h1 { color: var(--blue); }
.hero-box > p { color: var(--muted); font-size: 1.1rem; margin-top: 0.8rem; }
.hero-box .hero-open { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-top: 1rem; }
.hero-open::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #2f7a3e; margin-right: 8px; vertical-align: 1px; }
.hero-open.is-closed::before { background: #b23b2e; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4rem; }

/* I disken */
.disken { background: var(--paper); }
.product-grid { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.product img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: var(--radius); }
.product-body { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; padding-top: 10px; }
.product h3 { font-size: 1.05rem; }
.price { font-weight: 600; color: var(--muted); font-size: 0.95rem; }

/* Meny som ett tryckt menykort */
.menu-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 20px; max-width: 900px; margin: 0 auto; }
.menu-card h2 { text-align: center; color: var(--blue); }
.menu-intro { text-align: center; color: var(--muted); font-size: 0.92rem; max-width: 520px; margin: -0.4rem auto 2rem; }
.menu-cols { display: grid; gap: 32px; }
.menu-group h3 { color: var(--blue); border-bottom: 2px solid var(--butter-soft); padding-bottom: 6px; margin-bottom: 8px; }
.menu-note { font-family: var(--sans); font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.menu-group dl div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid #f0ebe3; }
.menu-group dd { font-weight: 600; white-space: nowrap; }
.menu-small { font-size: 0.88rem; color: var(--muted); margin-top: 8px; }

/* Om oss */
.om-oss { background: var(--butter-soft); }
.om-inner { display: grid; gap: 28px; }
.om-inner img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); }
.om-text p { margin-bottom: 1rem; max-width: 560px; }

/* Beställ */
.bestall-inner { display: grid; gap: 28px; }
.bestall-text p { margin-bottom: 0.8rem; color: var(--muted); max-width: 420px; }
.order-form { background: var(--paper); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 20px; display: grid; gap: 16px; }
.form-info, .field-hint { font-size: 0.85rem; color: var(--muted); }
.field { display: grid; gap: 6px; }
.field-row { display: grid; gap: 16px; }
.field label { font-weight: 600; font-size: 0.92rem; }
.req { color: #b23b2e; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--field); background: #fff; font: 1rem var(--sans); color: var(--text); border-radius: var(--radius-sm); }
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field [aria-invalid="true"] { border-color: #b23b2e; border-width: 2px; }
.field-error { font-size: 0.88rem; color: #a3332a; font-weight: 600; }
.field-error:empty { display: none; }
.form-status { font-weight: 600; color: #2f6b3a; }
.form-status:empty { display: none; }

/* Hitta hit */
.hitta { background: var(--paper); }
.hitta-inner { display: grid; gap: 28px; }
.hitta-img { width: 100%; border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; }
address { font-style: normal; line-height: 1.9; }
.hitta-note { margin: 1rem 0 1.8rem; color: var(--muted); max-width: 440px; }
.hitta-info h3 { margin-bottom: 0.4rem; }
.hours { width: 100%; max-width: 360px; border-collapse: collapse; }
.hours th, .hours td { padding: 7px 0; border-bottom: 1px solid #f0ebe3; text-align: left; font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; }
.hours tr.is-today th::after { content: " (i dag)"; font-weight: 500; color: var(--muted); }

/* Footer */
.site-footer { background: var(--blue); color: #e6ebf2; padding: 32px 0; }
.footer-inner { display: grid; gap: 10px; }
.site-footer .logo { color: #fff; }
.demo-note { font-size: 0.88rem; }
.demo-note a { color: var(--butter); }
.demo-note a:hover { color: #fff; }

/* Surfplatta */
@media (min-width: 640px) {
  .wrap { padding: 0 32px; }
  .hero-img { height: 380px; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .order-form { padding: 32px; }
  .menu-card { padding: 40px; }
  .menu-cols { grid-template-columns: 1fr 1fr; gap: 36px 48px; }
}

/* Dator */
@media (min-width: 960px) {
  section { padding: 88px 0; }
  .menu-toggle { display: none; }
  .site-nav { display: flex; flex-direction: row; width: auto; padding: 0; gap: 28px; margin-left: auto; }
  .site-nav a { border: 0; padding: 6px 0; font-size: 0.95rem; }
  .header-inner { flex-wrap: nowrap; min-height: 72px; }

  .hero { position: relative; padding: 0; }
  .hero-img { height: 600px; }
  .hero .wrap { position: absolute; inset: auto 0 48px 0; }
  .hero-box { max-width: 520px; padding: 36px 40px; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16); }

  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }

  .om-inner { grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
  .om-inner img { max-height: none; }

  .bestall-inner { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
  .hitta-inner { grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
  .footer-inner { grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
  .demo-note { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
