/* ==========================================================================
   Tre Kronor Pizzeria — shared design system
   Tokens, base, header, footer, buttons, home page
   ========================================================================== */

:root {
  --bg: #fff9f3;
  --surface: #ffffff;
  --ink: #2b2118;
  --ink-soft: #6b5d4f;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --accent-soft: #ffedd5;
  --line: #f0e4d7;
  --footer-bg: #241a12;
  --footer-ink: #f5ece2;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(43, 33, 24, 0.06), 0 2px 8px rgba(43, 33, 24, 0.05);
  --shadow-md: 0 8px 24px rgba(43, 33, 24, 0.12);
  --font-head: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-body: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --header-h: 72px;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  font-family: var(--font-head);
  line-height: 1.25;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35);
}

.btn--primary:hover {
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.4);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
  backdrop-filter: blur(4px);
}

.btn--ghost:hover {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 18px rgba(43, 33, 24, 0.1);
}

/* Transparent-over-hero variant (home page) */
.site-header--overlay:not(.is-scrolled) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

.header-inner {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  height: 44px;
  width: auto;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-header--overlay:not(.is-scrolled) .brand {
  color: #fff;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-header--overlay:not(.is-scrolled) .site-nav a {
  color: #fff;
}

.site-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.site-header--overlay:not(.is-scrolled) .site-nav a:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.site-nav a.is-active {
  background: var(--accent);
  color: #fff;
}

.site-header--overlay:not(.is-scrolled) .site-nav a.is-active {
  background: var(--accent);
  color: #fff;
}

/* Hamburger button (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2.5px;
  width: 100%;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease;
}

.site-header--overlay:not(.is-scrolled) .nav-toggle span {
  background: #fff;
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 4rem 0 0;
  margin-top: 5rem;
}

.footer-inner {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

.footer-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  margin-bottom: 2.25rem;
  color: #fff;
}

.footer-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  margin: 0.9rem auto 0;
  border-radius: 2px;
  background: var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.footer-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.footer-card:hover {
  transform: translateY(-3px);
  border-color: rgba(249, 115, 22, 0.45);
}

.footer-card .icon-badge {
  margin: 0 auto 1rem;
}

.footer-card h3 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.6rem;
}

.footer-card p {
  margin: 0.15rem 0;
  color: var(--footer-ink);
  font-size: 0.98rem;
}

.footer-card a {
  color: var(--footer-ink);
  font-weight: 700;
}

.footer-card a:hover {
  color: var(--accent);
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  flex: none;
}

.icon-badge img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.icon-badge svg {
  width: 26px;
  height: 26px;
  color: var(--accent-dark);
}

.footer-map {
  margin-top: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.footer-map #map {
  height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
}

.map-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.map-cta:hover {
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

.footer-bottom {
  margin-top: 3rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(245, 236, 226, 0.65);
}

/* Leaflet custom marker (shared) */
.custom-marker .marker-pin {
  width: 40px;
  height: 40px;
  border-radius: 50% 50% 50% 0;
  background: var(--accent);
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  border: 2px solid #fff;
}

.custom-marker .marker-logo {
  transform: rotate(45deg);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.custom-marker .marker-logo img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.custom-popup {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* ---------- Home: hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #140e08;
}

.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 14, 8, 0.55) 0%,
    rgba(20, 14, 8, 0.35) 45%,
    rgba(20, 14, 8, 0.78) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 6rem 1.25rem 4rem;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.22);
  border: 1px solid rgba(249, 115, 22, 0.55);
  color: #ffd9b3;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.hero-price {
  margin: 0.75rem 0 2rem;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

/* ---------- Home: feature rows ---------- */

.features {
  padding: 5rem 0 1rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  margin-bottom: clamp(3rem, 7vw, 5.5rem);
}

.feature-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}

.feature-body .icon-badge {
  margin-bottom: 1.1rem;
}

.feature-body h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.feature-body p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 52ch;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(43, 33, 24, 0.14);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  }

  .site-header.nav-open .site-nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem 1.25rem 1.25rem;
  }

  .site-nav a {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  /* Overlay header keeps mobile panel readable */
  .site-header--overlay:not(.is-scrolled).nav-open {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
  }

  .site-header--overlay:not(.is-scrolled).nav-open .brand,
  .site-header--overlay:not(.is-scrolled).nav-open .site-nav a {
    color: var(--ink);
  }

  .site-header--overlay:not(.is-scrolled).nav-open .nav-toggle span {
    background: var(--ink);
  }

  .feature-row {
    grid-template-columns: 1fr;
  }

  .feature-row .feature-media {
    order: -1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
