/* ============================================================
   O's Streetfood – stilar
   Mobile first. Två teman via body[data-theme]:
   "os"    – mörkt tema för Utby & Landala
   "tacos" – orange på krämvitt för TacO's
   ============================================================ */

:root {
  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --veggie: #6bbf4f;
  --radius: 22px;
  --maxw: 1080px;
}

body[data-theme="os"] {
  --bg: #131313;
  --bg-2: #1c1c1c;
  --ink: #ffffff;
  --muted: #b3ada4;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #ff9725;
  --accent-ink: #171310;
  --chip-bg: rgba(255, 151, 37, 0.14);
}

body[data-theme="tacos"] {
  --bg: #faf1e2;
  --bg-2: #ffffff;
  --ink: #33200f;
  --muted: #8c6f52;
  --line: rgba(51, 32, 15, 0.16);
  --accent: #ec6a1f;
  --accent-ink: #ffffff;
  --chip-bg: rgba(236, 106, 31, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-anchor: none; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  transition: background-color 0.5s ease, color 0.5s ease;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

[hidden] { display: none !important; }

h1, h2, h3, h4 { margin: 0; line-height: 1; }

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

/* Bevarar gement "s" i O's / TacO's även under text-transform: uppercase */
.nocaps { text-transform: none; }

.h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* ---------- knappar ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85em 1.9em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -12px var(--accent);
}
.btn-outline {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-big { font-size: 1.15rem; }

/* ---------- startsida ---------- */

.landing {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 2.5rem 1.25rem;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(255, 151, 37, 0.22), transparent 60%),
    radial-gradient(50rem 36rem at -10% 110%, rgba(236, 106, 31, 0.16), transparent 60%),
    #131313;
  color: #fff;
}

.landing-inner { width: 100%; max-width: var(--maxw); text-align: center; }

.landing-logo {
  width: clamp(96px, 16vw, 140px);
  height: auto;
  margin: 0 auto 1.4rem;
  animation: pop-in 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.2) both;
}

.landing-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 5.2rem);
  text-transform: uppercase;
  animation: rise-in 0.5s ease 0.05s both;
}

.landing-sub {
  color: #b3ada4;
  margin: 0.8rem 0 2.2rem;
  font-size: 1.05rem;
  animation: rise-in 0.5s ease 0.12s both;
}

.landing-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.landing-card {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  min-height: 180px;
  cursor: pointer;
  background: #1c1c1c;
  text-align: left;
  animation: rise-in 0.55s ease calc(0.16s + var(--i) * 0.1s) both;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.landing-card:hover,
.landing-card:focus-visible {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 24px 50px -22px rgba(255, 151, 37, 0.55);
}
.landing-card img:not(.card-logo) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.landing-card:hover img:not(.card-logo) { transform: scale(1.05); }

.card-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.78) 90%);
}

.card-text {
  position: absolute;
  left: 1.2rem;
  bottom: 1.1rem;
  right: 1.2rem;
  display: grid;
  gap: 0.15rem;
  color: #fff;
}
.card-logo { width: 54px; height: auto; margin-bottom: 0.35rem; }
.card-logo--round { border-radius: 50%; }
.card-name {
  font-family: var(--font-display);
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.card-desc { color: #d8d3ca; font-size: 0.95rem; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- toppnavigering ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.65rem clamp(1rem, 4vw, 2.2rem);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.nav-logo { height: 44px; width: auto; }
.nav-logo--round { border-radius: 50%; }
.nav-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.switcher {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-2) 70%, transparent);
}
.switch-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0.45em 0.9em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.switch-btn:hover { color: var(--ink); }
.switch-btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 88svh;
  display: flex;
  align-items: flex-end;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 35%),
    linear-gradient(6deg, rgba(0, 0, 0, 0.82) 8%, rgba(0, 0, 0, 0.12) 55%);
}
.hero-content {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.2rem) clamp(2.2rem, 6vh, 4rem);
  color: #fff;
}
.hero-kicker {
  display: inline-block;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.45em 1em;
  margin: 0 0 1.1rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 8rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 1.6rem;
}
/* Varje rad hålls ihop – "AT O's"/"AT TacO's" bryts aldrig isär */
.hero-title > span { display: block; white-space: nowrap; }
.hero-title .nocaps { display: inline; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}
/* Outline-knapp ovanpå hero-fotot: alltid vit oavsett tema */
.btn-onphoto { border-color: #fff; color: #fff; }
.btn-onphoto:hover { background: #fff; color: #161616; }
.hero-title .accent { -webkit-text-stroke: 0; }

/* ---------- marquee ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.7rem 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee-seq {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding-right: 1.6rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.marquee .dot { font-size: 0.85rem; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* TacO's: rutigt schackmönster som kantband runt marquee */
body[data-theme="tacos"] .marquee { padding: 1.15rem 0; }
body[data-theme="tacos"] .marquee::before,
body[data-theme="tacos"] .marquee::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background: repeating-conic-gradient(var(--bg) 0% 25%, var(--accent) 0% 50%) 0 0 / 24px 24px;
}
body[data-theme="tacos"] .marquee::before { top: 0; }
body[data-theme="tacos"] .marquee::after { bottom: 0; }
body[data-theme="tacos"] .marquee-seq { color: #fff; }

/* ---------- meny ---------- */

main { display: block; }

.menu {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 4vw, 2.2rem) 2rem;
}

.menu-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.chip {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--chip-bg);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  padding: 0.45em 1em;
  border-radius: 999px;
}

.lunch-banner {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1rem;
}
.lunch-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
}
.lunch-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  text-transform: uppercase;
}
.lunch-sub { font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.9rem; }
.lunch-detail { margin: 0.5rem 0 0.2rem; font-weight: 500; }
.lunch-extras { margin: 0.35rem 0 0; font-size: 0.92rem; opacity: 0.9; }
.lunch-extras span { display: block; }
body[data-theme="tacos"] .lunch-banner { color: #fff; }

.menu-section { margin-top: clamp(2.8rem, 7vw, 4.2rem); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--accent);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.9rem;
}
.section-tag {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.section-intro {
  margin: -0.4rem 0 1.3rem;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.menu-items {
  display: grid;
  gap: 1.3rem 2.6rem;
  grid-template-columns: 1fr;
}
.menu-items--grid { gap: 0.55rem 2.6rem; }

.item-row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}
.item-name {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.25;
}
.item-meta {
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-left: 0.6em;
  vertical-align: middle;
}
.leader {
  flex: 1;
  min-width: 24px;
  border-bottom: 2px dotted var(--line);
  transform: translateY(-4px);
}
.price {
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--accent);
  white-space: nowrap;
}
.item-desc { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.95rem; max-width: 46ch; }
.item-note {
  margin: 0.45rem 0 0;
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 0.35em 0.9em;
}

.section-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.veggie-icon { width: 24px; height: 24px; }

.allergy-note {
  margin: 3rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Framhävd notis, t.ex. "Extra taco – 49 kr" */
.section-note--em {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- beställ / hitta hit / galleri ---------- */

.menu, .order, .find, .gallery { scroll-margin-top: 72px; }

.order, .find, .gallery {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 4vw, 2.2rem);
  text-align: center;
}
.order { border-top: 1px solid var(--line); margin-top: 3rem; }
.find { border-top: 1px solid var(--line); }
.gallery { border-top: 1px solid var(--line); }

.order-sub, .find-hours {
  color: var(--muted);
  max-width: 52ch;
  margin: 1rem auto 2rem;
}

.order-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

/* ---------- bildspel ---------- */

.slideshow {
  position: relative;
  margin: 2rem auto;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-height: 74vh;
  width: 100%;
  background: var(--bg-2);
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.slide.is-active { opacity: 1; }
.slide-img { width: 100%; height: 100%; object-fit: cover; }

/* Klickzoner: vänster halva = föregående, höger halva = nästa */
.slide-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 1;
}
.slide-edge--prev { left: 0; }
.slide-edge--next { right: 0; }

.slide-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  z-index: 2;
}
.slide-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.slide-dot.is-active { background: #fff; transform: scale(1.25); }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 3rem 1.25rem 2.5rem;
  text-align: center;
}
.footer-logo { height: 62px; width: auto; margin: 0 auto 1rem; }
.footer-logo--round { border-radius: 50%; }
.footer-name { font-weight: 600; margin: 0 0 1rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4rem;
  margin-bottom: 1.4rem;
}
.footer-links a, .footer-switch {
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.footer-links a:hover, .footer-switch:hover { text-decoration: underline; }
.footer-fine { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* ---------- vy-animationer ---------- */

.view-enter { animation: view-fade 0.45s ease both; }
@keyframes view-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- större skärmar ---------- */

@media (min-width: 640px) {
  .landing-cards { grid-template-columns: repeat(3, 1fr); }
  .landing-card { min-height: 0; aspect-ratio: 3 / 4.1; }
  .card-name { font-size: 2.3rem; }
}

@media (min-width: 760px) {
  /* Kolumnflöde som i en tryckt meny: läsordningen går uppifrån
     och ner i vänsterspalten, sedan högerspalten. Varje kolumn
     packas tätt så inga hål uppstår mellan olika höga rätter. */
  .menu-items:not(.menu-items--grid) {
    display: block;
    columns: 2;
    column-gap: 2.6rem;
  }
  /* Avståndet läggs som padding INUTI objektet: padding följer med
     vid kolumnbrytning, medan en bottenmarginal spiller över och
     trycker ner första objektet i nästa kolumn ur linje. */
  .menu-items:not(.menu-items--grid) .menu-item {
    break-inside: avoid;
    padding-bottom: 1.35rem;
  }
  .menu-items--grid {
    display: block;
    columns: 230px;
    column-gap: 2.6rem;
  }
  .menu-items--grid .menu-item {
    break-inside: avoid;
    padding-bottom: 0.55rem;
  }
  .slideshow { aspect-ratio: 16 / 9; max-height: 620px; }
  .nav-logo { height: 50px; }
  .switch-btn { font-size: 0.88rem; padding: 0.5em 1.15em; }
}

/* ---------- små skärmar: kompakt navigering ---------- */

@media (max-width: 560px) {
  .nav-name { display: none; }
  .nav-logo { height: 38px; }
  .topnav { padding-left: 0.9rem; padding-right: 0.9rem; }
  .switch-btn { font-size: 0.72rem; padding: 0.42em 0.72em; letter-spacing: 0.02em; }
}

/* ---------- rörelsekänslighet ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .landing-logo, .landing-title, .landing-sub, .landing-card { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .view-enter { animation: none; }
  .slide { transition: none; }
}
