/* ============================================================
   Sidrabkoks.lv — styles
   Design tokens per design handoff README (recreated pixel-close
   from reference/Sidrabkoks.dc.html)
   ============================================================ */

:root {
  --bg: #f7f2ea;          /* warm white */
  --band: #efe6d8;        /* panel / band */
  --card: #fdfaf4;        /* card background */
  --ink: #2b2118;         /* primary text */
  --text2: #5a4c3c;       /* secondary text */
  --muted: #8a7a63;       /* muted text */
  --accent: #8a5a2b;      /* wood brown */
  --accent-hover: #6e4620;
  --accent-deep: #5f3d1c;
  --tint: #ead9c2;
  --border-1: #e3d7c3;
  --border-2: #d8c9ae;
  --border-3: #c9b899;
  --dark: #2b2118;
  --gold: #c99e64;
  --dark-body: #cbbda6;
  --font-head: 'Lora', serif;
  --font-body: 'Source Sans 3', sans-serif;
  --maxw: 1200px;
  --placeholder-stripes: repeating-linear-gradient(45deg, #efe6d8, #efe6d8 10px, #e6dac6 10px, #e6dac6 20px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

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

img { max-width: 100%; }

button { font-family: inherit; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Shared striped placeholder behind every photo (shows if the image fails) */
.img-placeholder {
  background: var(--placeholder-stripes);
  position: relative;
}

/* Kickers & section headings */
.kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.kicker-gold { color: var(--gold); margin-bottom: 14px; }

h2 {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-size: 38px;
  font-weight: 600;
}
.section-sub {
  margin: 0;
  font-size: 17px;
  color: var(--text2);
}

/* ============================== NAV ============================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 234, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-1);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo {
  display: flex;
  align-items: center;
  height: 72px;
  flex: none;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
  font-size: 15px;
}
.nav-links a { color: var(--ink); }
.nav-links a:hover { color: var(--accent); }

/* Language pill toggle */
.lang-toggle {
  display: flex;
  gap: 4px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 700;
  font-size: 13px;
  background: transparent;
  color: var(--muted);
}
.lang-btn.active {
  background: var(--accent);
  color: var(--bg);
}

/* Hamburger (mobile only) */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================== ANIMATED LOGO ============================== */
/* Masked divs + bird sprites are created by app.js; sizes set inline (px). */
.logo {
  position: relative;
  display: block;
  width: 150px;
  height: 63.33px;
  flex: none;
}
.logo-fallback {
  display: block;
  width: 150px;
  height: auto;
}
.logo-layer, .logo-bird {
  position: absolute;
  pointer-events: none;
}

/* ============================== HERO ============================== */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 24px 72px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero-copy .kicker { margin-bottom: 0; }
.hero h1 {
  margin: 0;
  font-family: var(--font-head);
  font-size: 54px;
  line-height: 1.1;
  font-weight: 600;
  text-wrap: balance;
}
.hero p {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--text2);
  max-width: 52ch;
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  min-height: 44px;
}
.btn-solid {
  background: var(--accent);
  color: var(--bg);
  padding: 13px 26px;
}
.btn-solid:hover { background: var(--accent-hover); color: var(--bg); }
.btn-outline {
  border: 1.5px solid var(--border-3);
  color: var(--ink);
  padding: 12px 26px;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.hero-photo {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px -20px rgba(60, 40, 15, 0.4);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================== GALLERY ============================== */
.gallery-band {
  background: var(--band);
  border-top: 1px solid var(--border-1);
  border-bottom: 1px solid var(--border-1);
}
.gallery-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Group tabs */
.group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 2px solid #ddcfb6;
}
.group-tab {
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  margin-bottom: -2px;
  min-height: 44px;
}
.group-tab.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

/* Category filter chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--card);
  color: var(--ink);
}
.chip:hover { border-color: var(--accent); }
.chip.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* Photo grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border-1);
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  animation: fadeIn 0.35s ease;
}
.card-img {
  aspect-ratio: 4 / 3;
  background: var(--placeholder-stripes);
  position: relative;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}
.card figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
}
.card-name { font-weight: 600; font-size: 15px; }
.card-price {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  white-space: nowrap;
}

/* ============================== LIGHTBOX ============================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30, 22, 12, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  animation: fadeIn 0.2s ease;
}
.lightbox[hidden] { display: none; }
.lb-panel {
  max-width: 1080px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0;
  background: var(--bg);
  border-radius: 16px;
  overflow: hidden;
  max-height: 86vh;
}
.lb-img-side {
  background: #1e160c;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.lb-img-side img {
  max-width: 100%;
  max-height: 86vh;
  object-fit: contain;
  display: block;
}
.lb-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
}
.lb-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.lb-head h3 {
  margin: 0;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 600;
}
.lb-close {
  border: none;
  background: var(--band);
  color: var(--ink);
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}
.lb-close:hover { background: var(--tint); }
.lb-variants {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lb-variant {
  border: 1px solid var(--border-1);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--card);
}
.lb-variant-label { font-weight: 600; font-size: 15px; }
.lb-variant-meta { font-size: 13.5px; color: var(--text2); }
.lb-variant-price {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
  white-space: nowrap;
}
.lb-nav {
  margin-top: auto;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}
.lb-btn {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  border: 1.5px solid var(--border-3);
  background: transparent;
  color: var(--ink);
  padding: 9px 18px;
  border-radius: 8px;
  min-height: 44px;
}
.lb-btn:hover { border-color: var(--accent); color: var(--accent); }
.lb-count { font-size: 13px; color: var(--muted); }

/* ============================== MARKET CALENDAR ============================== */
.markets {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px;
}
.markets-sub { margin-bottom: 32px; max-width: 60ch; }
.markets-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.cal-card {
  background: var(--card);
  border: 1px solid var(--border-1);
  border-radius: 16px;
  padding: 24px;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cal-arrow {
  cursor: pointer;
  border: 1px solid var(--border-2);
  background: transparent;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  font-size: 16px;
  color: var(--ink);
}
.cal-arrow:hover { border-color: var(--accent); color: var(--accent); }
.cal-month {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 600;
}
.cal-wdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}
.cal-wday {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
  padding: 4px 0;
}
.cal-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
}
.cal-day.has-event {
  background: var(--tint);
  color: var(--accent-deep);
  font-weight: 700;
}
.cal-day.is-today {
  box-shadow: inset 0 0 0 2px var(--accent);
  font-weight: 700;
}
.cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  display: block;
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.event-row {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border-1);
  border-radius: 12px;
  padding: 16px 20px;
}
.event-date {
  min-width: 118px;
  font-weight: 700;
  color: var(--accent);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.event-title { font-size: 16px; font-weight: 600; }
.event-empty {
  border: 1.5px dashed var(--border-3);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* ============================== ABOUT / ORDER / DELIVERY ============================== */
.dark-band {
  background: var(--dark);
  color: var(--band);
}
.dark-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 48px;
}
.dark-h2 {
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 600;
  color: var(--bg);
}
.dark-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--dark-body);
  text-wrap: pretty;
}
.dark-lead { font-size: 16.5px; }
.order-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--dark-body);
}

/* ============================== CONTACTS ============================== */
.contacts {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px;
}
.contacts-title { margin-bottom: 32px; }
.people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.person-card {
  background: var(--card);
  border: 1px solid var(--border-1);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.person-photo {
  width: 110px;
  height: 110px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.person-name {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 600;
}
.person-role {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
}
.person-tel { font-size: 16px; font-weight: 600; margin-top: 6px; }
.person-mail { font-size: 15px; }

/* Requisites */
.req-card {
  background: var(--band);
  border: 1px solid var(--border-1);
  border-radius: 16px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 40px;
  align-items: start;
}
.req-title {
  grid-column: 1 / -1;
  margin-bottom: 6px;
}
.req-col {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text2);
}
.req-col strong { color: var(--ink); }

/* ============================== FOOTER ============================== */
.footer {
  border-top: 1px solid var(--border-1);
  background: var(--band);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}

/* ============================== RESPONSIVE ============================== */

/* Tablet */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 48px 24px 56px;
  }
  .hero h1 { font-size: 44px; }
  .dark-inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .dark-inner > div:first-child { grid-column: 1 / -1; }
  .people { grid-template-columns: repeat(2, 1fr); }
  .markets-cols {
    grid-template-columns: 1fr;
  }
}

/* Lightbox stacks earlier so the info column keeps room */
@media (max-width: 860px) {
  .lightbox { padding: 16px; }
  .lb-panel {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow: auto;
  }
  .lb-img-side { min-height: 0; }
  .lb-img-side img { max-height: 48vh; }
  .lb-info { padding: 20px; }
}

/* Mobile */
@media (max-width: 720px) {
  .nav-burger { display: flex; }
  .nav-right { gap: 12px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(247, 242, 234, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-1);
    padding: 8px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 24px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  h2 { font-size: 30px; }
  .hero h1 { font-size: 38px; }
  .hero p { font-size: 17px; }
  .btn { width: 100%; text-align: center; }
  .hero-actions { flex-direction: column; }

  .group-tab { font-size: 16px; padding: 10px 12px; }
  .chip { padding: 11px 16px; min-height: 44px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

  .dark-inner { grid-template-columns: 1fr; }
  .people { grid-template-columns: 1fr; }
  .req-card { grid-template-columns: 1fr; padding: 24px; }

  .cal-card { padding: 16px; }
  .event-row { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Reduced motion: freeze all animation (app.js keeps the static logo image) */
@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;
  }
}
