/* ============================================================
   Pizzeria Järnvägens Grill — v3
   Dark, photographic, premium (house standard).
   Deep enamel-green world · gold · ember · grain
   Bodoni Moda (display, gold italic accents) + Hanken Grotesk (body)
   ============================================================ */

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

:root {
  /* dark enamel-green world */
  --bg:       oklch(0.190 0.028 162);
  --bg-2:     oklch(0.235 0.032 162);
  --bg-3:     oklch(0.285 0.036 162);
  --surface:  oklch(1 0 0 / 0.04);
  --surface-2:oklch(1 0 0 / 0.07);

  --cream:    oklch(0.945 0.018 88);
  --muted:    oklch(0.760 0.022 92);
  --faint:    oklch(0.640 0.020 100);

  --gold:      oklch(0.805 0.105 83);
  --gold-deep: oklch(0.680 0.100 80);
  --ember:     oklch(0.620 0.175 34);
  --ember-deep:oklch(0.535 0.160 33);

  --line:    oklch(0.805 0.105 83 / 0.20);
  --line-soft: oklch(0.945 0.018 88 / 0.10);

  --display: 'Bodoni Moda', Georgia, 'Times New Roman', serif;
  --body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  --fs-hero: clamp(3.4rem, 1.2rem + 9vw, 9rem);
  --fs-h2:   clamp(2.2rem, 1.4rem + 3vw, 4rem);
  --fs-h3:   clamp(1.4rem, 1.15rem + 1vw, 2rem);
  --fs-lead: clamp(1.1rem, 1rem + 0.5vw, 1.4rem);
  --fs-body: 1.0625rem;
  --fs-sm:   0.9375rem;
  --fs-xs:   0.8125rem;

  --space-2xs:4px; --space-xs:8px; --space-sm:12px; --space-md:16px;
  --space-lg:24px; --space-xl:32px; --space-2xl:48px; --space-3xl:64px;
  --space-4xl:96px; --space-5xl:144px;

  --max: 1240px; --max-narrow: 720px;
  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 78px;
  --r: 4px; --r-lg: 8px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 600ms;
}
@media (max-width: 640px) { :root { --nav-h: 62px; } }

html { scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--body); font-size: var(--fs-body); line-height: 1.62;
  color: var(--cream); background: var(--bg); overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

/* global grain */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
::selection { background: var(--ember); color: var(--cream); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.0; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.1; }
.it { font-style: italic; font-weight: 700; color: var(--gold); }
p { max-width: 64ch; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(var(--space-4xl), 11vw, var(--space-5xl)); }
.section--tight { padding-block: clamp(var(--space-3xl), 8vw, var(--space-4xl)); }
.bg-2 { background: var(--bg-2); }

/* eyebrow / platform tag */
.tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-weight: 700; font-size: var(--fs-xs);
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
}
.tag::before { content: ""; width: 26px; height: 2px; background: var(--gold); }

/* section heading block */
.head { max-width: 760px; margin-bottom: clamp(var(--space-2xl), 5vw, var(--space-4xl)); display: flex; flex-direction: column; gap: var(--space-md); }
.head h2 { font-size: var(--fs-h2); }
.head p { color: var(--muted); font-size: var(--fs-lead); }
.head--center { margin-inline: auto; align-items: center; text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-weight: 700; font-size: var(--fs-sm); letter-spacing: 0.04em; text-transform: uppercase;
  padding: 14px 26px; border-radius: var(--r); border: 1.5px solid transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform 140ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn__a { transition: transform var(--dur) var(--ease); }
.btn:hover .btn__a { transform: translateX(4px); }
.btn--primary { background: var(--ember); color: var(--cream); }
.btn--primary:hover { background: var(--ember-deep); }
.btn--ghost { color: var(--cream); border-color: var(--line); }
.btn--ghost:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.btn--lg { padding: 17px 32px; font-size: var(--fs-body); }
.btn[data-tip]{ position: relative; }
.btn[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); background: var(--cream); color: var(--bg); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: var(--fs-xs); white-space: nowrap; padding: 7px 13px; border-radius: var(--r); pointer-events: none; }

.link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--gold); width: fit-content; letter-spacing: 0.02em; }
.link span { transition: transform var(--dur) var(--ease); }
.link:hover span { transform: translateX(4px); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h); display: flex; align-items: center; transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.01em; color: var(--cream); white-space: nowrap; }
.brand svg { width: 24px; height: 24px; stroke: var(--gold); fill: none; stroke-width: 1.8; flex: none; }
.brand i { font-style: italic; color: var(--gold); }
.nav__links { display: flex; align-items: center; gap: var(--space-xl); }
.nav__links a { font-weight: 600; font-size: var(--fs-sm); letter-spacing: 0.02em; color: var(--cream); opacity: 0.82; transition: opacity var(--dur) var(--ease), color var(--dur) var(--ease); }
.nav__links a:hover, .nav__links a[aria-current="page"] { opacity: 1; color: var(--gold); }
.nav__cta { flex: none; }
.nav.scrolled { background: oklch(0.17 0.026 162 / 0.86); backdrop-filter: blur(12px) saturate(140%); box-shadow: 0 1px 0 var(--line-soft); }
.burger { display: none; width: 44px; height: 44px; margin-right: -8px; position: relative; }
.burger span, .burger span::before, .burger span::after { content: ""; position: absolute; left: 11px; width: 22px; height: 2px; background: var(--cream); border-radius: 2px; transition: transform var(--dur) var(--ease); }
.burger span { top: 21px; } .burger span::before { top: -7px; } .burger span::after { top: 7px; }
@media (max-width: 900px) { .nav__links, .nav__cta { display: none; } .burger { display: block; } }

/* mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 120; background: var(--bg-2); display: flex; flex-direction: column; padding-block: var(--space-lg) var(--space-2xl); transform: translateY(-100%); visibility: hidden; transition: transform var(--dur) var(--ease), visibility var(--dur); }
.drawer.open { transform: translateY(0); visibility: visible; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; }
.drawer__x { font-size: 2.2rem; line-height: 1; width: 44px; height: 44px; color: var(--cream); }
.drawer__links { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: clamp(16px, 4vh, 40px); }
.drawer__links a { font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 11vw, 3.4rem); color: var(--cream); }
.drawer__links a:hover { color: var(--gold); }

/* ---------- HERO (full-bleed photo) ---------- */
.hero { position: relative; min-height: 94svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transform-origin: 60% 40%; animation: heroZoom 20s var(--ease) forwards; }
@keyframes heroZoom { from { transform: scale(1.005); } to { transform: scale(1.09); } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, oklch(0.17 0.026 162 / 0.55) 0%, transparent 28%),
    linear-gradient(15deg, oklch(0.15 0.024 162 / 0.95) 12%, oklch(0.17 0.026 162 / 0.45) 52%, transparent 78%); }
.hero__in { position: relative; z-index: 2; width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); padding-block: clamp(var(--space-3xl), 8vw, var(--space-5xl)); }
.hero__tag { margin-bottom: var(--space-lg); }
.hero h1 { font-size: var(--fs-hero); line-height: 0.92; color: var(--cream); max-width: 14ch; }
.hero__sub { margin-top: var(--space-lg); font-size: var(--fs-lead); color: var(--cream); opacity: 0.9; max-width: 44ch; }
.hero__cta { margin-top: var(--space-xl); display: flex; flex-wrap: wrap; gap: var(--space-md); }
.hero__note { margin-top: var(--space-lg); font-size: var(--fs-sm); color: var(--muted); display: flex; align-items: center; gap: 10px; }
.hero__note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

/* track divider */
.rail { height: 14px; background:
  repeating-linear-gradient(90deg, var(--gold) 0 3px, transparent 3px 18px) center / auto 14px no-repeat,
  linear-gradient(var(--gold),var(--gold)) top/100% 2px no-repeat,
  linear-gradient(var(--gold),var(--gold)) bottom/100% 2px no-repeat;
  opacity: 0.35; }

/* ---------- INTRO (statement + featured split) ---------- */
.split { display: grid; gap: clamp(var(--space-xl), 5vw, var(--space-4xl)); align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } .split--rev .split__media { order: 2; } }
.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r-lg); }
.split__media::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.split__body { display: flex; flex-direction: column; gap: var(--space-md); align-items: flex-start; }
.split__body h2 { font-size: var(--fs-h2); }
.split__body p { color: var(--muted); }
.split__body .lead { color: var(--cream); font-size: var(--fs-lead); }
.checks { display: flex; flex-direction: column; gap: var(--space-sm); margin-top: var(--space-xs); }
.checks li { display: flex; gap: 12px; align-items: baseline; color: var(--cream); }
.checks li::before { content: "—"; color: var(--gold); font-weight: 700; }

/* ---------- DISH CARDS (photo-forward) ---------- */
.dishes { display: grid; gap: clamp(var(--space-md), 2vw, var(--space-lg)); grid-template-columns: 1fr; }
@media (min-width: 560px) { .dishes { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .dishes { grid-template-columns: repeat(4, 1fr); } }
.dish { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.dish:hover { transform: translateY(-5px); border-color: var(--line); }
.dish__media { aspect-ratio: 1/1; overflow: hidden; }
.dish__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.dish:hover .dish__media img { transform: scale(1.06); }
.dish__b { padding: var(--space-md) var(--space-md) var(--space-lg); display: flex; flex-direction: column; gap: 6px; }
.dish__r { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dish__r h3 { font-family: var(--body); font-weight: 700; font-size: 1.15rem; letter-spacing: 0; }
.dish__price { font-family: var(--display); font-weight: 700; color: var(--gold); white-space: nowrap; font-size: 1.1rem; }
.dish__b p { font-size: var(--fs-sm); color: var(--muted); }

/* ---------- TESTIMONIALS ---------- */
.quotes { display: grid; gap: var(--space-lg); grid-template-columns: 1fr; }
@media (min-width: 760px) { .quotes { grid-template-columns: repeat(3, 1fr); } }
.quote { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-md); }
.quote__stars { color: var(--gold); letter-spacing: 3px; font-size: 0.95rem; }
.quote p { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.15rem; line-height: 1.45; color: var(--cream); }
.quote__by { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }

/* ---------- ORDER ---------- */
.order { background: var(--bg-2); }
.order__in { display: grid; gap: clamp(var(--space-2xl), 5vw, var(--space-4xl)); align-items: center; }
@media (min-width: 860px) { .order__in { grid-template-columns: 1.1fr 0.9fr; } }
.order__c { display: flex; flex-direction: column; gap: var(--space-md); align-items: flex-start; }
.order__c h2 { font-size: var(--fs-h2); }
.order__c p { color: var(--muted); }
.order__note { font-size: var(--fs-sm); color: var(--faint); }
.steps { display: flex; flex-direction: column; gap: var(--space-md); }
.step { display: flex; gap: var(--space-md); align-items: center; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: var(--space-md) var(--space-lg); }
.step b { font-family: var(--display); font-weight: 800; font-size: 1.8rem; color: var(--gold); width: 2ch; flex: none; }
.step strong { display: block; font-weight: 700; color: var(--cream); }
.step p { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }

/* ---------- VISIT ---------- */
.visit { display: grid; gap: clamp(var(--space-xl), 5vw, var(--space-3xl)); align-items: stretch; }
@media (min-width: 860px) { .visit { grid-template-columns: 1fr 1fr; } }
.visit__c { display: flex; flex-direction: column; gap: var(--space-lg); align-items: flex-start; }
.visit__rows { display: grid; gap: var(--space-lg); width: 100%; }
@media (min-width: 520px) { .visit__rows { grid-template-columns: 1fr 1fr; } }
.visit__row h4 { font-family: var(--body); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); margin-bottom: 6px; }
.visit__row, .visit__row a { color: var(--muted); }
.visit__row a:hover { color: var(--gold); }
.hours { border-collapse: collapse; font-size: var(--fs-sm); }
.hours th { text-align: left; font-weight: 500; color: var(--muted); padding-right: var(--space-lg); }
.hours td { color: var(--cream); } .hours th, .hours td { padding-block: 2px; }
.visit__act { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.map { border-radius: var(--r-lg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); min-height: 320px; }
.map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; filter: grayscale(0.3) brightness(0.9); }

/* ---------- FOOTER ---------- */
.footer { background: oklch(0.155 0.024 162); padding-block: var(--space-4xl) var(--space-xl); }
.footer__in { display: grid; gap: var(--space-2xl); grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer__in { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .footer__in { grid-template-columns: 1.8fr 1fr 1fr 1fr; } }
.footer__tag { color: var(--muted); margin-top: var(--space-sm); max-width: 34ch; font-size: var(--fs-sm); }
.footer__col h5 { font-family: var(--body); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); margin-bottom: var(--space-md); }
.footer__col li { margin-bottom: var(--space-xs); color: var(--muted); font-size: var(--fs-sm); }
.footer__col a:hover { color: var(--cream); }
.footer__bottom { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-lg); justify-content: space-between; margin-top: var(--space-3xl); padding-top: var(--space-lg); border-top: 1px solid var(--line-soft); font-size: var(--fs-xs); color: var(--faint); }
.footer__bottom a { color: var(--gold); }

/* ---------- MENU PAGE ---------- */
.mhero { padding-top: calc(var(--nav-h) + clamp(var(--space-3xl), 7vw, var(--space-4xl))); padding-bottom: clamp(var(--space-xl), 4vw, var(--space-3xl)); }
.mhero h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 5rem); color: var(--cream); }
.mhero .lead { color: var(--muted); font-size: var(--fs-lead); margin-top: var(--space-sm); }
.jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--space-lg); }
.jump a { font-weight: 600; font-size: var(--fs-sm); color: var(--cream); padding: 8px 15px; border: 1px solid var(--line); border-radius: var(--r); transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.jump a:hover { background: var(--gold); color: var(--bg); }
.cat { padding-block: clamp(var(--space-2xl), 6vw, var(--space-4xl)); }
.cat__h { display: flex; align-items: baseline; gap: var(--space-md); margin-bottom: var(--space-2xl); }
.cat__no { font-family: var(--display); font-weight: 800; color: var(--gold-deep); font-size: clamp(1.6rem,1.2rem+1.6vw,2.6rem); }
.cat__h h2 { font-size: var(--fs-h2); }
.cat__note { color: var(--muted); font-size: var(--fs-sm); margin-top: 4px; }
.mgrid { display: grid; gap: clamp(var(--space-xl), 5vw, var(--space-4xl)); max-width: 980px; }
@media (min-width: 760px) { .mgrid { grid-template-columns: 1fr 1fr; } }
.mi { display: flex; align-items: baseline; gap: 12px; margin-top: var(--space-md); }
.mcol > .mi:first-child { margin-top: 0; }
.mi__n { font-family: var(--body); font-weight: 700; font-size: 1.08rem; white-space: nowrap; }
.mi__d { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); }
.mi__p { font-family: var(--display); font-weight: 700; color: var(--gold); white-space: nowrap; }
.mdesc { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; max-width: 52ch; }

/* ---------- reveals (JS-gated; no-JS shows all) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); }
.js [data-reveal].in { opacity: 1; transform: none; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.js [data-reveal].d1.in { transition-delay: 80ms; }
.js [data-reveal].d2.in { transition-delay: 160ms; }
.js [data-reveal].d3.in { transition-delay: 240ms; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1 !important; transform: none !important; } .hero__img { animation: none !important; } }

/* ===========================================================
   KATEGORIGALLERI (kundönskemål 2026-07-03): alla 17 kategorier
   som bildkort i stället för text-pillerna. Behåller .jump-stilen
   som fallback för ev. andra sidor.
   =========================================================== */
.katgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: var(--space-lg);
}
.kat {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.kat:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.7);
}
.kat__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.kat__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}
.kat:hover .kat__media img { transform: scale(1.06); }
.kat__b { display: block; padding: 10px 12px 12px; }
.kat__b strong { display: block; color: var(--cream); font-size: var(--fs-sm); line-height: 1.3; }
.kat__b small { color: var(--muted, #9a8f80); font-size: 11.5px; }
@media (max-width: 560px) {
  .katgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
