/* ==========================================================================
   LAYOUT — header, meny, logga, hero, lunchkortet och sidfot.
   ========================================================================== */

/* ---- Framstegslinjen ----------------------------------------------------- */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-lo), var(--accent), var(--accent-hi)); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }

/* ---- Meddelanderaden ----------------------------------------------------- */
.announce { position: relative; z-index: 41; background: var(--text); color: var(--bg); }
.announce__inner { display: flex; align-items: center; justify-content: center; gap: .7em; max-width: var(--container); margin-inline: auto; padding: .6em var(--gutter); font-size: .86rem; font-weight: 700; text-decoration: none; }
.announce__inner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce__icon { color: var(--accent-hi); }
.announce .icon { width: 1em; height: 1em; flex: none; }

/* ---- Logga (SVG-ordmärket) ------------------------------------------------ */
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); flex: none; }
.brand-svg { height: 50px; width: auto; overflow: visible; }
.brand-svg text { fill: currentColor; }
.brand-svg__name { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.brand-svg__name2 { fill: var(--accent-text); }
.brand-svg__tag { font-family: var(--font-display); font-style: italic; fill: var(--text-muted) !important; }
.brand-svg__cottage { transition: transform var(--dur) var(--ease-out); transform-origin: 40px 60px; }
.brand:hover .brand-svg__cottage { transform: translateY(-2px) rotate(-3deg); }
.brand-svg--footer, .brand-svg--login { height: auto; width: min(300px, 76vw); }
.logo-img { height: 44px; width: auto; }
.logo-img--light { display: none; }
:root[data-theme="light"] .logo-img--dark { display: none; }
:root[data-theme="light"] .logo-img--light { display: block; }
.brand--footer .logo-img { height: auto; width: min(220px, 100%); }

/* ---- Header -------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--header-bg); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid transparent; transition: border-color var(--dur), box-shadow var(--dur); }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 30px -24px rgb(0 0 0 / .4); }
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.nav { margin-inline: auto; }
.nav ul { display: flex; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  position: relative; display: block;
  padding: .55em .9em; border-radius: 999px;
  font-size: .95rem; font-weight: 700; text-decoration: none;
  color: var(--text-muted);
  transition: color var(--dur-fast), background-color var(--dur-fast);
}
.nav a:hover { color: var(--text); background: var(--accent-soft); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: .9em; right: .9em; bottom: .25em; height: 2px; border-radius: 2px; background: var(--accent); }

.site-header__cta { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.open-dot { display: inline-flex; align-items: center; gap: .45em; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.open-dot i { width: 9px; height: 9px; border-radius: 50%; background: var(--text-dim); }
.open-dot.is-open { color: var(--green); }
.open-dot.is-open i { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 6px transparent; } }
.header-phone { gap: .5em; }
.lang-switch { display: flex; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.lang-switch a { padding: .35em .6em; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-decoration: none; color: var(--text-muted); }
.lang-switch a[aria-current="true"] { background: var(--accent); color: var(--on-accent); }
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--text);
  transition: box-shadow var(--dur-fast), transform var(--dur) var(--ease-out);
}
.theme-toggle:hover { box-shadow: inset 0 0 0 1.5px var(--accent); transform: rotate(20deg); }
.theme-toggle .icon { width: 18px; height: 18px; grid-area: 1 / 1; transition: opacity var(--dur), transform var(--dur) var(--ease-out); }
.theme-toggle__sun { opacity: 0; transform: scale(.5) rotate(-90deg); }
:root[data-theme="dark"] .theme-toggle__sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle__moon { opacity: 0; transform: scale(.5) rotate(90deg); }

.menu-toggle { display: none; width: 46px; height: 46px; border: 0; border-radius: 50%; cursor: pointer; background: var(--accent); color: var(--on-accent); place-items: center; }
.menu-toggle__bars { display: grid; gap: 6px; width: 18px; }
.menu-toggle__bars i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform var(--dur) var(--ease-out); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---- Mobilmeny ---------------------------------------------------------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 35;
  display: flex; flex-direction: column;
  padding: calc(var(--header-h) + 1.5rem) var(--gutter) max(1.5rem, env(safe-area-inset-bottom));
  background: var(--bg);
  overflow-y: auto;
  animation: menu-in .35s var(--ease-out);
}
.mobile-menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; } }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li { opacity: 0; transform: translateY(14px); animation: menu-item .6s var(--ease-out) forwards; animation-delay: calc(.05s + var(--i) * .05s); }
@keyframes menu-item { to { opacity: 1; transform: none; } }
.mobile-menu a:not(.btn) {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 0;
  font: 600 clamp(1.5rem, 7vw, 2.2rem)/1.15 var(--font-display);
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a .icon { color: var(--accent); width: 1em; height: 1em; }
.mobile-menu a[aria-current="page"] { color: var(--accent-text); }
.mobile-menu__foot { margin-top: auto; padding-top: 1.5rem; display: grid; gap: 1rem; }
.mobile-menu__hours li, .hours-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.hours-list li span { color: var(--text-muted); }
.hours-list li b { font-weight: 700; text-align: right; }
.hours-exception { display: flex; gap: .4em; align-items: flex-start; margin: .6rem 0 0; font-size: .86rem; color: var(--accent-text); }
.hours-exception .icon { width: 1.1em; height: 1.1em; margin-top: .2em; }

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__img, .hero__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__img { inset: -12% 0; height: 124%; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(20 12 6 / .25), rgb(20 12 6 / .55) 70%, rgb(20 12 6 / .7)); }
.hero__content { position: relative; z-index: 1; }

/* Startsidan: kort text + lunchkortet, båda ovanpå en bild — kompakt så att
   dagens rätt syns utan att scrolla, även på mobil. */
.hero--home { padding-block: clamp(1.4rem, 4vw, 3.5rem) clamp(1.6rem, 4vw, 3.5rem); color: #fff8ea; }
.hero--home .hero__content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero--home:not(:has(.hero__media)) { color: var(--text); }
.hero__title { font-size: var(--fs-hero); font-weight: 600; margin-bottom: .4em; text-shadow: 0 2px 30px rgb(0 0 0 / .25); }
.hero__line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero__line > span { display: inline-block; }
.hero--home .hero__eyebrow { color: var(--accent-hi); }
.hero--home .hero__eyebrow::before { background: var(--accent-hi); }
.hero--home .hero__lead { color: rgb(255 248 234 / .86); }
.hero--home:not(:has(.hero__media)) .hero__eyebrow { color: var(--accent-text); }
.hero--home:not(:has(.hero__media)) .hero__lead { color: var(--text-muted); }

/* Övriga sidor: bild med rubrik */
.hero--page { display: flex; align-items: flex-end; min-height: min(46svh, 440px); padding-block: clamp(2rem, 6vw, 4rem) clamp(1.8rem, 5vw, 3.2rem); color: #fff8ea; }
.hero--page .hero__title { font-size: var(--fs-h1); }
.hero--page .hero__eyebrow { color: var(--accent-hi); }
.hero--page .hero__eyebrow::before { background: var(--accent-hi); }
.hero--page .hero__lead { color: rgb(255 248 234 / .86); }
.hero--page .hero__text { max-width: 760px; }
.hero--plain { min-height: 0; color: var(--text); padding-top: clamp(2rem, 5vw, 3.5rem); }
.hero--plain .hero__eyebrow { color: var(--accent-text); }
.hero--plain .hero__eyebrow::before { background: var(--accent); }
.hero--plain .hero__lead { color: var(--text-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.hero--message { min-height: 70svh; align-items: center; }
.hero--message .hero__text { padding: clamp(1.6rem, 4vw, 3rem); }

/* ---- Lunchkortet ---------------------------------------------------------- */
.lunch-card {
  position: relative;
  padding: clamp(1.3rem, 3vw, 2rem) clamp(1.3rem, 3vw, 2.2rem);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  color: var(--text);
  box-shadow: var(--shadow), 0 0 0 1px var(--card-border);
  display: grid; gap: .9rem;
}
.lunch-card::before { content: ""; position: absolute; left: 0; top: 10%; bottom: 10%; width: 5px; border-radius: 0 5px 5px 0; background: linear-gradient(var(--accent-hi), var(--accent)); }
.lunch-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .3rem 1rem; }
.lunch-card__label { display: inline-flex; align-items: center; gap: .5em; font: 800 .76rem/1 var(--font-body); letter-spacing: .22em; text-transform: uppercase; color: var(--accent-text); }
.lunch-card__label .icon { width: 1.3em; height: 1.3em; }
.lunch-card__date { font-size: .86rem; color: var(--text-muted); }
.lunch-card__dish { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.25; }
.lunch-card__alt { margin: -.4rem 0 0; color: var(--text-muted); }
.lunch-card__note { display: flex; align-items: center; gap: .45em; margin: 0; font-size: .9rem; font-weight: 700; color: var(--accent-text); }
.lunch-card__note .icon { width: 1.1em; height: 1.1em; }
.lunch-card__closed { display: flex; gap: .5em; align-items: flex-start; margin: 0; padding: .7rem .9rem; border-radius: var(--radius-sm); background: var(--accent-soft); font-weight: 700; font-size: .92rem; }
.lunch-card__closed .icon { width: 1.2em; height: 1.2em; flex: none; margin-top: .15em; color: var(--accent-text); }
.lunch-card__sides { margin: 0; display: grid; gap: .5rem; padding-top: .8rem; border-top: 1px dashed var(--line-strong); }
.lunch-card__sides div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: .5rem; align-items: baseline; }
.lunch-card__sides dt { font: 800 .7rem/1.4 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.lunch-card__sides dd { margin: 0; font-size: .95rem; }
.lunch-card__foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1.2rem; padding-top: .8rem; border-top: 1px dashed var(--line-strong); }
.lunch-card__includes { margin: 0; font-size: .86rem; color: var(--text-muted); flex: 1 1 220px; }
.lunch-card__includes b { color: var(--text); font-weight: 700; }
.lunch-card__empty { margin: 0; font-size: 1.05rem; color: var(--text-muted); }
.lunch-card__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .3rem; }
.lunch-card__actions .btn { flex: 1 1 auto; }

/* ---- Sidfot -------------------------------------------------------------- */
.site-footer { margin-top: var(--section-y); padding: var(--section-y) 0 max(1.5rem, env(safe-area-inset-bottom)); background: var(--bg-raised); border-top: 1px solid var(--line); }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .6fr); gap: clamp(1.5rem, 4vw, 3rem); }
.site-footer__lead { color: var(--text-muted); max-width: 42ch; margin-top: 1rem; }
.site-footer a { text-decoration: none; }
.site-footer a:not(.btn):not(.brand):hover { color: var(--accent-text); }
.site-footer .plain li { color: var(--text); }
.site-footer .link-arrow { margin-top: .6rem; }
.socials { display: flex; gap: .5rem; margin-top: 1rem; }
.socials a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: box-shadow var(--dur-fast), color var(--dur-fast); }
.socials a:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-text); }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: .84rem; color: var(--text-dim); }

/* ---- Producent (samma block i saac, hk och future) ---------------------------- */
.site-credit { margin: 1.1rem 0 0; text-align: center; font-size: .72rem; letter-spacing: .06em; color: var(--text-dim); }
.site-credit a { color: var(--text-muted); border-bottom: 1px solid transparent; transition: color .25s, border-color .25s; }
.site-credit a:hover, .site-credit a:focus-visible { color: var(--accent-text, var(--accent)); border-bottom-color: currentColor; }

/* ---- Ljuslåda ------------------------------------------------------------ */
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(94vw, 1100px); max-height: 92svh; }
.lightbox::backdrop { background: rgb(20 12 6 / .8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox img { max-height: 90svh; width: auto; margin: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.lightbox__close { position: fixed; top: 1rem; right: 1rem; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .15); color: #fff; display: grid; place-items: center; cursor: pointer; }

/* ---- Brytpunkter ----------------------------------------------------------- */
@media (max-width: 1060px) {
  .nav { display: none; }
  .menu-toggle { display: grid; }
  .header-phone span { display: none; }
  .header-phone { width: 42px; padding: 0; border-radius: 50%; }
}
@media (max-width: 900px) {
  .hero--home .hero__content { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .hero--home .hero__title { font-size: clamp(1.9rem, 7vw, 2.8rem); }
  .hero--home .hero__lead { display: none; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand-svg { height: 40px; }
  .logo-img { height: 36px; }
  .open-dot span { display: none; }
  .theme-toggle { width: 38px; height: 38px; }
  .hero--home { padding-top: 1rem; }
  .hero--home .hero__text { display: none; }   /* på mobil: loggan i headern räcker — dagens lunch först */
  .hero--home .hero__media { display: none; }
  .hero--home { color: var(--text); }
  .lunch-card { border-radius: var(--radius); }
  .lunch-card__sides div { grid-template-columns: 1fr; gap: .1rem; }
  :root { --fs-h2: clamp(1.55rem, 7vw, 2rem); }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__bottom { flex-direction: column; }
}
