/* ==========================================================================
   GLOG Artisan — main stylesheet
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f6f3ee;        /* warm off-white */
  --color-bg-dark: #2b2420;       /* near-black walnut */
  --color-text: #2b2420;
  --color-text-muted: #6b6259;
  --color-accent: #8a6a3b;        /* walnut/gold */
  --color-accent-dark: #6a4f29;
  --color-border: #e6dfd5;

  --font-display: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-body: "Merriweather", Georgia, "Times New Roman", serif;

  --container-max: 1200px;
  --section-pad-y: clamp(3rem, 7vw, 6rem);
  --letter-spacing-display: 0.2em;   /* the brief's "spacing 200" */
  --nav-height: 72px;
}

/* -------- Reset / base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent-dark); text-decoration: none; }
a:hover, a:focus { color: var(--color-accent); text-decoration: underline; }

/* -------- Layout helpers ------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.section { padding: var(--section-pad-y) 0; }
.section--alt { background: var(--color-bg-alt); }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.2vw, 1.875rem);
  letter-spacing: var(--letter-spacing-display);
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 3rem;
  color: var(--color-text);
}
.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: var(--color-accent);
  margin: 1rem auto 0;
}

/* -------- Navbar --------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--color-border); }

.nav__inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}
.nav__brand img { height: 44px; width: auto; display: block; }

/* ----- Mobile-first: hidden dropdown menu, hamburger visible ----- */
.nav__menu {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  display: none;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.nav.is-open .nav__menu { display: flex; }

.nav__menu a {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  display: block;
  padding: 0.875rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav__menu a:hover,
.nav__menu a:focus {
  color: var(--color-accent);
  text-decoration: none;
}

.nav__toggle {
  display: block;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  order: 2;
}
.nav__inner > nav {
  /* The <nav> wrapper holds an absolutely-positioned menu on mobile,
     so it shouldn't take up flex space and push the hamburger inward. */
  order: 3;
  flex: 0 0 0;
  width: 0;
  min-width: 0;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----- Desktop: hamburger hidden, menu absolutely centered in bar ----- */
@media (min-width: 769px) {
  .nav__toggle { display: none; }
  .nav__inner > nav {
    flex: initial;
    width: auto;
    min-width: 0;
    order: initial;
  }
  .nav__menu {
    display: flex !important;
    flex-direction: row;
    gap: 2.5rem;
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    background: transparent;
    border: 0;
    padding: 0;
  }
  .nav__menu a {
    display: inline-block;
    padding: 0.5rem 0;
    text-align: left;
    border-bottom: 1px solid transparent;
  }
  .nav__menu a:hover,
  .nav__menu a:focus {
    border-bottom-color: var(--color-accent);
  }
}

/* -------- Hero ----------------------------------------------------------- */
.hero {
  position: relative;
  margin-top: var(--nav-height);
  background: var(--color-bg-alt);
  overflow: hidden;
}
.hero__slides { position: relative; height: clamp(360px, 70vh, 720px); }
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero__slide.is-active { opacity: 1; z-index: 1; }
.hero__slide img,
.hero__slide picture,
.hero__slide picture img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__caption {
  position: absolute;
  left: 50%;
  bottom: clamp(2rem, 8vh, 5rem);
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.45);
  padding: 0 1rem;
  max-width: 900px;
}
.hero__caption h1 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: var(--letter-spacing-display);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  margin: 0 0 0.5rem;
}
.hero__caption p {
  font-family: var(--font-body);
  font-style: italic;
  margin: 0;
  font-size: clamp(0.95rem, 1.4vw, 1.125rem);
}
.hero__dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}
.hero__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.hero__dot.is-active { background: #fff; }

/* -------- Products grid -------------------------------------------------- */
.products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 600px) {
  .products { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .products { grid-template-columns: repeat(3, 1fr); }
}
.product-card {
  background: #fff;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex; flex-direction: column;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
}
.product-card:hover,
.product-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -20px rgba(43, 36, 32, 0.4);
  outline: none;
}
.product-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-bg-alt);
}
.product-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card__media img { transform: scale(1.04); }
.product-card__body { padding: 1.25rem 1.5rem 1.5rem; }
.product-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: var(--letter-spacing-display);
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.product-card__hint {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
  font-style: italic;
}

/* -------- Modal (product gallery) ---------------------------------------- */
.modal {
  position: fixed; inset: 0;
  z-index: 2000;
  display: none;
  background: rgba(20, 16, 14, 0.85);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.is-open { display: flex; }
.modal__dialog {
  background: #fff;
  width: min(1400px, 96vw);
  max-height: 95vh;
  overflow-y: auto;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
}
.modal__close {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  z-index: 3;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.9);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}
.modal__gallery {
  position: relative;
  background: #000;
  min-height: 280px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.modal__gallery-img {
  width: 100%; height: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  -webkit-user-drag: none;
  pointer-events: none;
}
@media (min-width: 800px) {
  .modal__gallery { min-height: 480px; }
  .modal__gallery-img { max-height: 78vh; }
}
.modal__gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
}
.modal__gallery-nav--prev { left: 0.5rem; }
.modal__gallery-nav--next { right: 0.5rem; }
@media (max-width: 799px) {
  .modal__gallery-nav { display: none; }
}
.modal__gallery-dots {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 0.5rem;
  z-index: 2;
}
.modal__gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.modal__gallery-dot.is-active {
  background: #fff;
  transform: scale(1.2);
}
@media (max-width: 799px) {
  .modal__gallery-dots { display: flex; }
  .modal__gallery-counter { display: none; }
}
.modal__gallery-counter {
  position: absolute;
  bottom: 0.75rem; left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  background: rgba(0,0,0,0.4);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.modal__body { padding: 1.25rem 1.5rem; }
.modal__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: var(--letter-spacing-display);
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}
.modal__desc {
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}
.modal__readmore {
  display: inline;
  background: none;
  border: 0;
  padding: 0;
  margin: 0 0 0 0.25rem;
  cursor: pointer;
  font: inherit;
  color: var(--color-accent, var(--color-text));
  text-decoration: underline;
  text-underline-offset: 2px;
}
.modal__readmore:hover { opacity: 0.75; }
.modal__readmore[hidden] { display: none; }
.modal__details[hidden] { display: none; }
.modal__specs {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  border-top: 1px solid var(--color-border);
}
.modal__specs li {
  font-family: var(--font-body);
  font-size: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 0.5rem;
}
.modal__specs strong {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.65rem;
  color: var(--color-text-muted);
  min-width: 100px;
}
.modal__note {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

/* -------- About / Values / Partners -------------------------------------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 800px) {
  .two-col { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .two-col--reverse > :first-child { order: 2; }
}

/* About: text on left, image + team stacked on right */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}
@media (min-width: 800px) {
  .about-grid { grid-template-columns: 1.5fr 1fr; gap: 4rem; }
}
.about-grid__side {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.about-grid__figure {
  margin: 0;
}
.about-grid__figure img {
  width: 100%;
  height: auto;
  display: block;
}
.team__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: var(--letter-spacing-display);
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  color: var(--color-text);
}
.team__info {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.75;
  margin: 0;
  color: var(--color-text);
}
.team__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.team__member { margin: 0; }
.team__name {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  color: var(--color-text);
  font-weight: 600;
}
.team__role {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0.25rem 0 0;
}
.values-prose {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.values-prose p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  margin: 0 0 1.25rem;
}
.prose p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  margin: 0 0 1.25rem;
}
.partners {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem 3rem;
  justify-content: center;
  align-items: center;
}
.partners__item {
  display: flex;
  align-items: center;
  justify-content: center;
}
.partners__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.partners__logo {
  display: block;
  max-height: 80px;
  max-width: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.75;
  transition: filter 0.25s ease, opacity 0.25s ease;
}
.partners__logo:hover {
  filter: grayscale(0);
  opacity: 1;
}
.partners__placeholder {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--color-text-muted);
  text-align: center;
  width: 100%;
}

/* -------- Footer --------------------------------------------------------- */
.footer {
  background: var(--color-bg-dark);
  color: #d8d2c8;
  padding: 4rem 0 2rem;
}
.footer a { color: #f1ead9; }
.footer a:hover { color: #fff; }
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 700px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { justify-self: end; text-align: right; }
}
.footer__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: var(--letter-spacing-display);
  text-transform: uppercase;
  margin: 0 0 1.25rem;
  color: #fff;
}
.footer p { margin: 0 0 0.5rem; font-family: var(--font-body); }
.footer__brand img {
  width: 160px;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}
.footer__copy {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(255,255,255,0.55);
}

/* -------- Utility -------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.no-scroll { overflow: hidden; }
