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

html,
body,
h1,
h2,
h3,
p,
blockquote,
figure {
  margin: 0;
}

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

a {
  color: inherit;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------- Design tokens ---------- */
:root {
  --color-bg: #fdf6ec;
  --color-surface: #ffffff;
  --color-text: #241608;
  --color-text-muted: #6b5644;
  --color-accent: #d1350c;
  --color-accent-dark: #8f3009;
  --color-gold: #e3a521;
  --color-border: #ecdfc9;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;

  --content-max-width: 1200px;

  --header-height: 4rem;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

/* ---------- Section heading accent ---------- */
.section-inner > h2 {
  position: relative;
  padding-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.75rem;
}

.section-inner > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3rem;
  height: 4px;
  border-radius: 2px;
  background-color: var(--color-gold);
}

/* ---------- Badge ---------- */
.badge {
  display: inline-block;
  background-color: var(--color-gold);
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

/* ---------- Shared layout helpers ---------- */
.section-inner {
  max-width: var(--content-max-width);
  margin-inline: auto;
  padding: var(--space-5) var(--space-3);
}

section,
footer#contact {
  scroll-margin-top: var(--header-height);
}

/* Below 768px the header wraps to two rows (see .site-header-inner), so it is taller
   than --header-height; give anchor-jumped sections more top clearance to match. */
@media (max-width: 767px) {
  section,
  footer#contact {
    scroll-margin-top: 6.5rem;
  }
}

/* ---------- Focus visibility (accessibility) ---------- */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- Responsive breakpoints (mobile-first) ---------- */
/* Base styles above target ~375px (small mobile) */

@media (min-width: 768px) {
  .section-inner {
    padding-inline: var(--space-4);
  }
}

@media (min-width: 1440px) {
  .section-inner {
    padding-inline: var(--space-5);
  }
}

/* ---------- Hero ---------- */
#hero {
  position: relative;
  width: 100%;
  min-height: 70vh;
  overflow: hidden;
}

.hero-slide {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 420px;
}

/* Default (no-JS) behavior: only the first slide is visible. */
.hero-slide:not(:first-of-type) {
  display: none;
}

/* Once js/hero-carousel.js runs, it toggles this class instead of relying on :first-of-type. */
.hero-slide.is-active {
  display: block;
}

.hero-slide.is-hidden {
  display: none;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* main_image.jpg is a tall portrait poster (logo + product photo), not a wide landscape
   photo like the other slides — cropping it with object-fit: cover hides most of it, so it
   gets its own fit mode plus a matching backdrop to fill the letterboxed space. */
.hero-slide--poster {
  background-color: #123842;
}

.hero-slide--poster img {
  object-fit: contain;
}

.hero-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-4) var(--space-3);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  color: #fff;
}

.hero-caption h1 {
  color: #fff;
  font-size: 2.5rem;
}

.hero-caption .tagline {
  margin-top: var(--space-1);
  font-size: 1.125rem;
  max-width: 40ch;
}

@media (min-width: 768px) {
  .hero-caption h1 {
    font-size: 3.5rem;
  }
}

/* ---------- About ---------- */
#about .section-inner {
  max-width: 70ch;
}

#about h2 {
  margin-bottom: var(--space-2);
}

#about p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ---------- Products ---------- */
#products {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

#products h2 {
  margin-bottom: var(--space-4);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1440px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: var(--space-3);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(36, 22, 8, 0.08);
}

.product-card img {
  width: 140px;
  height: 140px;
  margin-inline: auto;
  border-radius: 50%;
  border: 4px solid var(--color-gold);
  object-fit: cover;
}

.product-card .badge {
  margin-top: var(--space-2);
}

.product-card h3 {
  font-size: 1.1rem;
  margin: var(--space-2) 0 0;
}

.product-card p {
  margin: var(--space-1) 0 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ---------- Events ---------- */
#events h2 {
  margin-bottom: var(--space-4);
}

.event-list {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .event-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.event-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: var(--space-3);
}

.event-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-1);
  color: var(--color-accent-dark);
}

.event-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header-inner {
  max-width: var(--content-max-width);
  margin-inline: auto;
  padding: var(--space-1) var(--space-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  row-gap: var(--space-1);
  column-gap: var(--space-3);
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--color-accent-dark);
}

a.brand img {
  display: block;
  height: 48px;
  width: auto;
}

/* Nav always renders (never JS-gated) so it stays reachable at every viewport width;
   it wraps to its own full-width row on narrow screens instead of hiding. */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  order: 3;
  flex-basis: 100%;
  justify-content: center;
}

.nav-link {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.9rem;
}

.nav-link:hover {
  color: var(--color-accent);
}

.header-cta {
  display: flex;
  gap: var(--space-2);
}

.header-cta span {
  display: none;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--color-text);
}

@media (min-width: 768px) {
  .site-header-inner {
    padding-block: 0;
    height: var(--header-height);
    flex-wrap: nowrap;
  }

  .site-nav {
    order: initial;
    flex-basis: auto;
    justify-content: flex-start;
  }

  .nav-link {
    font-size: 0.95rem;
  }

  .header-cta span {
    display: inline;
  }
}

/* ---------- Footer / Contact ---------- */
#contact {
  background-color: var(--color-text);
  color: #fff;
}

.footer-inner {
  display: grid;
  gap: var(--space-3);
}

#contact .brand {
  color: #fff;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}

#contact .nav-link {
  color: #f2e8dc;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

#contact .contact-link {
  color: #f2e8dc;
}

.footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-1);
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--color-border);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-2);
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
  }

  .footer-copyright {
    grid-column: 1 / -1;
  }
}
