/* Sydän Pizza Design Tokens & Custom Styles */

:root {
  --color-bg: #FAF7F2;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F4EFE6;
  --color-text: #0E0E0E;
  --color-text-muted: #5A5A5A;
  --color-text-inverse: #FFFFFF;
  --color-red: #C8102E;
  --color-red-dark: #9A0C24;
  --color-red-light: #F8D7DD;
  --color-success: #0F7B3F;
  --color-success-bg: #E1F4E8;
  --color-warning: #E89A0E;
  --color-error: #B0212B;
  --color-border: #E8E2D8;
  --color-border-strong: #0E0E0E;
  --shadow-cta: 0 8px 20px rgba(200, 16, 46, 0.25);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-feature-settings: 'kern', 'liga';
}

.font-display {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.font-mono-price {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-weight: 500;
}

/* CTA button */
.btn-primary {
  background-color: var(--color-red);
  color: var(--color-text-inverse);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
}

.btn-primary:hover {
  background-color: var(--color-red-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border-strong);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  transition: background-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--color-surface-alt);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-text);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  transition: background-color 0.15s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-ghost:hover {
  background-color: var(--color-surface-alt);
}

/* Badges */
.badge-bestseller {
  background-color: var(--color-red);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.badge-new {
  background-color: var(--color-success);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.badge-save {
  background-color: var(--color-warning);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* Cards */
.card-menu-item {
  background-color: var(--color-surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card-menu-item:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.card-menu-item .card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background-color: var(--color-surface-alt);
}

.card-menu-item .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card-menu-item:hover .card-image img {
  transform: scale(1.04);
}

/* Hero */
.hero-section {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: white;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.45) 50%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

@media (max-width: 768px) {
  .hero-section {
    min-height: 520px;
  }
  .hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.4) 0%,
      rgba(0, 0, 0, 0.75) 100%
    );
  }
}

/* Sticky mobile CTA */
.mobile-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-red);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 8px;
  gap: 4px;
  z-index: 40;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
}

.mobile-sticky-cta a {
  color: white;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 8px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: background-color 0.15s ease;
}

.mobile-sticky-cta a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

@media (min-width: 768px) {
  .mobile-sticky-cta {
    display: none;
  }
}

/* Stamp card */
.stamp-card {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
}

.stamp {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--color-text-muted);
  transition: all 0.3s ease;
}

.stamp.filled {
  background-color: var(--color-red);
  border-color: var(--color-red);
  color: white;
}

@media (max-width: 480px) {
  .stamp-card {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Free delivery progress */
.delivery-progress {
  height: 8px;
  background-color: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.delivery-progress-fill {
  height: 100%;
  background-color: var(--color-warning);
  border-radius: 4px;
  transition: width 0.4s ease, background-color 0.3s ease;
}

.delivery-progress-fill.complete {
  background-color: var(--color-success);
}

/* Trust strip */
.trust-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.trust-strip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

/* Section spacing */
.section {
  padding: 64px 0;
}

@media (min-width: 768px) {
  .section {
    padding: 96px 0;
  }
}

/* Container */
.container-narrow {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container-narrow {
    padding: 0 32px;
  }
}

@media (min-width: 1024px) {
  .container-narrow {
    padding: 0 64px;
  }
}

/* Sticky cart */
.sticky-cart-drawer {
  position: fixed;
  right: 0;
  top: 80px;
  width: 360px;
  max-height: calc(100vh - 100px);
  background-color: var(--color-surface);
  border-radius: 12px 0 0 12px;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  overflow-y: auto;
  z-index: 30;
}

@media (max-width: 1024px) {
  .sticky-cart-drawer {
    display: none;
  }
}

/* Mobile sticky cart bar */
.mobile-cart-bar {
  position: fixed;
  bottom: 76px;
  left: 16px;
  right: 16px;
  background-color: var(--color-text);
  color: white;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 35;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 1024px) {
  .mobile-cart-bar {
    display: none;
  }
}

/* Category tile hover */
.category-tile {
  background-color: var(--color-surface-alt);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.category-tile:hover {
  background-color: var(--color-red-light);
  transform: translateY(-2px);
}

.category-tile .icon {
  font-size: 36px;
}

/* Review card */
.review-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 24px;
}

.review-stars {
  color: var(--color-red);
  font-size: 18px;
  margin-bottom: 12px;
}

/* Deal banner */
.deal-banner {
  background: linear-gradient(135deg, var(--color-text) 0%, #2A2A2A 100%);
  color: white;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

/* Animations */
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(200, 16, 46, 0); }
}

.pulse-on-load {
  animation: pulse-red 2s ease-in-out 1s 2;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.5s ease-out;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background-color: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 50;
}

.top-banner {
  background-color: var(--color-text);
  color: white;
  text-align: center;
  font-size: 14px;
  padding: 6px 16px;
}

/* Form fields */
.form-field {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--color-border);
  background-color: var(--color-surface);
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.15s ease;
}

.form-field:focus {
  outline: none;
  border-color: var(--color-border-strong);
  box-shadow: 0 0 0 3px rgba(14, 14, 14, 0.08);
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text);
}

/* Payment chooser */
.payment-option {
  background-color: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.payment-option:hover {
  border-color: var(--color-text);
}

.payment-option.selected {
  border-color: var(--color-red);
  background-color: var(--color-red-light);
}

/* Add to cart pulse */
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.bounce {
  animation: bounce 0.4s ease;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-text);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

/* Scroll snap for horizontal scrollers */
.scroll-snap-x {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.scroll-snap-x > * {
  scroll-snap-align: start;
}

.scroll-snap-x::-webkit-scrollbar {
  height: 6px;
}

.scroll-snap-x::-webkit-scrollbar-thumb {
  background-color: var(--color-border);
  border-radius: 3px;
}

/* Inline language switcher  three pills always visible */
.lang-switch-inline {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}
.lang-switch-inline a {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 6px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  line-height: 1;
  min-width: 28px;
  text-align: center;
}
.lang-switch-inline a:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}
.lang-switch-inline a.active {
  background: var(--color-text);
  color: white;
}
.lang-switch-inline a:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}

/* Legacy dropdown styles kept inert in case any page still references them */
.lang-switch { display: inline-block; }
.lang-switch summary { display: none; }
.lang-menu { display: none; }

/* Skip-to-content link (accessibility) */
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 100;
  background: var(--color-text);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 8px;
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}

/* Mobile navigation (hamburger) */
.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
@media (min-width: 1024px) {
  .mobile-menu-btn { display: none; }
}
.mobile-menu-wrap {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 60;
  display: flex;
  justify-content: flex-end;
}
.mobile-menu-wrap.hidden { display: none; }
@media (min-width: 1024px) {
  .mobile-menu-wrap { display: none !important; }
}
.mobile-menu-panel {
  width: 82%;
  max-width: 320px;
  height: 100%;
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.mobile-nav-link {
  display: block;
  padding: 14px 8px;
  font-weight: 600;
  font-size: 16px;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}
.mobile-nav-link:hover { color: var(--color-red); }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Self-hosted fonts (GDPR: no Google CDN). Generated by _fonts.cjs ---- */
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/jetbrains-mono-400-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/jetbrains-mono-400-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/jetbrains-mono-500-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/jetbrains-mono-500-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/plus-jakarta-sans-400-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/plus-jakarta-sans-400-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/plus-jakarta-sans-500-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/plus-jakarta-sans-500-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/plus-jakarta-sans-600-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/plus-jakarta-sans-600-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/plus-jakarta-sans-700-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/plus-jakarta-sans-700-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
