/* The Pickled Herring: public site. See DESIGN.md. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-var-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #E2DACD;       /* the banner artwork's paper, so the illustrations have no edge */
  --surface: #F3EEE5;
  --text: #1E1C1A;
  --muted: #5E5850;
  --rule: #C2B7A3;
  --accent: #333B39;   /* the banner's bar green */
  --accent-2: #7A2E2A;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --measure: 720px;
  --wide: 1100px;
  --gutter: 1.25rem;
  --space: clamp(2.5rem, 7vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
@media (min-width: 768px) {
  body { font-size: 1.125rem; }
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.1rem, 6vw, 3rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

address { font-style: normal; margin-bottom: 1em; }

.muted { color: var(--muted); }

.lead {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3.4vw, 1.45rem);
  line-height: 1.5;
  font-weight: 400;
}

/* Letter-spaced small caps labels: "ON TAP", "ÖPPETTIDER". This is the bar feel. */
.label {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--surface);
  padding: 0.5rem 1rem;
}
.skip-link:focus { left: 0.5rem; }

/* Read by screen readers, not shown. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Buttons */
.button {
  display: inline-block;
  min-height: 44px;
  padding: 0.6rem 1.4rem;
  background: var(--accent);
  color: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.button:hover { background: #24392D; }
.button--quiet { background: transparent; color: var(--accent); }
.button--quiet:hover { background: rgba(47, 74, 58, 0.07); }

/* Frame: on desktop the page sits between two decorative tile panels (10% each).
   Below 1024px the panels are hidden and their image is never downloaded. */
.frame__side { display: none; }
@media (min-width: 1024px) {
  .frame { display: grid; grid-template-columns: 10% minmax(0, 1fr) 10%; }
  .frame__side {
    display: block;
    position: sticky;
    top: 0;
    height: 100vh;
    background: #333B39 url("../img/herringbone.svg") center top / 48px 48px repeat;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25);
  }
  .frame__side:last-child { box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.25); }
}

/* The sign: full-width green band with the wordmark, then the horizontal nav */
.sign {
  background: var(--accent);
  padding: clamp(0.85rem, 2.4vw, 1.15rem) var(--gutter);
}
.sign__link { display: block; max-width: 600px; margin: 0 auto; }
.sign__link img { display: block; width: 100%; height: auto; }
.sign__link:focus-visible { outline-color: var(--bg); outline-offset: 6px; }

/* Big enough for older eyes: 16px on phones, ~18px on desktop. */
.site-nav { --nav-size: 1rem; }
@media (min-width: 768px) { .site-nav { --nav-size: 1.125rem; } }
.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 clamp(0.9rem, 4vw, 2.5rem);
  max-width: var(--measure);
  margin: 0.75rem auto 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  color: var(--text);
  text-decoration: none;
  font-size: var(--nav-size);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* Meny ▾: tap/click opens Mat / Dryck under it (<details>, closed by js/nav.js) */
.site-nav__group { position: relative; }
.site-nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 52px;
  cursor: pointer;
  list-style: none;
  font-size: var(--nav-size);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
}
.site-nav__toggle::-webkit-details-marker { display: none; }
.site-nav__toggle::after {
  content: "";
  width: 0.38em;
  height: 0.38em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.15em) rotate(45deg);
}
.site-nav__group[open] .site-nav__toggle::after { transform: translateY(0.1em) rotate(-135deg); }
.site-nav__toggle:hover, .site-nav__toggle--current { border-bottom-color: var(--accent); }
.site-nav__sub {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  min-width: 12rem;
  padding: 0.35rem 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: 0 8px 20px rgba(30, 28, 26, 0.12);
  text-align: left;
}
.site-nav .site-nav__sub a {
  display: flex;
  padding: 0 1.25rem;
  border-bottom: 0;
}
.site-nav .site-nav__sub a:hover { background: var(--bg); }
.site-nav .site-nav__sub a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
.site-nav__lang {
  color: var(--muted) !important;
  font-weight: 500 !important;
  padding-left: clamp(0.9rem, 4vw, 2.5rem);
  border-left: 1px solid var(--rule);
}

/* Page layout */
main { display: block; }
.page, .split {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.page { padding-top: var(--space); padding-bottom: var(--space); }
.page--center { text-align: center; }
.page > section + section { margin-top: var(--space); }

/* Home: the bar scene, today's status, one button. */
.home { text-align: center; padding-bottom: var(--space); }
.home__art { display: block; margin: 1.5rem 0 0; }
.home__art img { display: block; width: 100%; height: auto; }
.home__swipe { display: none; }
/* Phones: one panorama you swipe along. Tied to the screen height so Boka stays in view. */
@media (max-width: 639px) {
  .home__art { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .home__art::-webkit-scrollbar { display: none; }
  .home__art img { width: auto; max-width: none; height: 320px; height: clamp(300px, 50svh, 460px); }
  .home__swipe {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    margin: 0.4rem 0 0;
  }
  .home__swipe + .status { margin-top: 0.6rem; }
}
.status {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 1.25rem var(--gutter) 0;
}
.status__dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--rule);
  margin-right: 0.35rem;
  vertical-align: 0.05em;
}
.status__dot--open { background: var(--accent); }
.home__cta { margin: 1.25rem 0 0; }

.split {
  display: grid;
  gap: 2rem;
  padding-top: 2rem;
  padding-bottom: var(--space);
  border-top: 1px solid var(--rule);
}
.page .split { padding-left: 0; padding-right: 0; border-top: 0; }
@media (min-width: 640px) {
  .split { grid-template-columns: 1fr 1fr; }
}

/* Menu */
.menu-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}
.menu-tabs a {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0;
}
.menu-tabs a:hover { color: var(--accent); }
.menu-tabs a[aria-current="page"] { border-bottom: 2px solid var(--accent); margin-bottom: -1px; }

.menu { margin-top: 2.25rem; }
.menu-section { margin-bottom: 2.75rem; }
.menu-section__title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.menu-section__title::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--rule);
}
.menu-section__desc { color: var(--muted); font-style: italic; margin-top: -0.5rem; }

.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-item { margin-bottom: 1.35rem; }
.menu-item__head { display: flex; align-items: baseline; gap: 0.5rem; }
.menu-item__name {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 500;
}
.menu-item__note { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.menu-item__leader {
  flex: 1;
  min-width: 1.5rem;
  border-bottom: 2px dotted var(--rule);
  transform: translateY(-0.3em);
}
.menu-item__price {
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 600;
  white-space: nowrap;
}
.menu-item__desc {
  color: var(--muted);
  font-size: 0.97rem;
  margin: 0.15rem 0 0;
  max-width: 52ch;
}
.menu-item__meta { color: var(--muted); font-size: 0.82rem; margin: 0.15rem 0 0; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 0.5rem;
}

/* Opening hours */
.hours { margin: 0; max-width: 28rem; }
.hours__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}
.hours__row dt { margin: 0; }
.hours__row dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.hours__row--today { font-weight: 600; }
.hours__row--today dt::before { content: "› "; color: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3rem;
}
.site-footer__name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text);
}
.site-footer a { color: var(--muted); }
.site-footer__credit { font-size: 0.8rem; margin: 1.5rem 0 0; }
