/* Shared site styles */
:root {
  --color-ink: #292a27;
  --color-muted: #625f58;
  --color-brand: #18372d;
  --color-accent: #d9b777;
  --color-paper: #fbfaf5;
  --color-line: #e5e1d8;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Serif", Georgia, serif;
  --font-ui: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-ui);
  line-height: 1.5;
}

p {
  font-family: var(--font-body);
  line-height: 1.75;
}

p + p {
  margin-top: 1rem;
}

.page-title,
.section-title,
.card h2,
.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.page-title {
  line-height: 1.04;
}

.section-title {
  line-height: 1.12;
}

.card h2,
.card h3 {
  line-height: 1.2;
}

.readable-copy {
  max-width: 72ch;
}

.hero-copy h1,
.hero-copy > p {
  text-shadow: 0 2px 18px rgba(12, 34, 27, 0.28);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.72rem;
  border: 1px solid #d9dfd5;
  border-radius: 9999px;
  background: #f1f4ee;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1;
  color: #315b48;
}

.eyebrow::before {
  width: 0.38rem;
  height: 0.38rem;
  flex: none;
  border-radius: 9999px;
  background: var(--color-accent);
  content: "";
}

.paper {
  background-image: radial-gradient(#d8d2c4 0.6px, transparent 0.6px);
  background-size: 18px 18px;
}

.card {
  border: 1px solid var(--color-line);
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 8px 24px rgba(56, 48, 35, 0.045);
}

a.card {
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input,
select,
textarea {
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #8f7148;
  box-shadow: 0 0 0 3px rgba(217, 183, 119, 0.22);
}

a[class*="rounded-full"],
button:not(.product-slider-button):not(.product-slider-dot):not(.back-to-top) {
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

@media (hover: hover) {
  a.card:hover {
    border-color: #d8c8aa;
    box-shadow: 0 12px 28px rgba(56, 48, 35, 0.09);
  }

  a[class*="rounded-full"]:hover,
  button:not(.product-slider-button):not(.product-slider-dot):not(.back-to-top):hover {
    transform: translateY(-1px);
  }
}

@keyframes contentEnter {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html.has-motion .hero-copy {
  animation: contentEnter 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.has-motion .reveal {
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 420ms ease-out, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.has-motion .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.team-whatsapp-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.team-whatsapp-link svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  color: #166534;
}

.product-copy > p {
  max-width: 68ch;
}

.product-copy section {
  padding: 1.25rem 0 0 1.25rem;
  border-left: 3px solid #d8c8aa;
}

.product-copy section h3 {
  letter-spacing: -0.01em;
}

.product-copy section p,
.product-copy section ul,
.product-copy section .space-y-3 {
  max-width: 70ch;
}

.product-copy section + section {
  margin-top: 0.5rem;
}

.product-slider {
  max-width: 62rem;
  margin-right: auto;
  margin-left: auto;
}

.product-slider .product-slide {
  display: none;
  animation: clientSlideIn 300ms ease;
}

.product-slider .product-slide.is-active {
  display: grid;
}

.product-slider-button {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  transform: translateY(-50%);
  border: 1px solid #d8c8aa;
  border-radius: 9999px;
  background: #fff;
  color: #18372d;
  box-shadow: 0 5px 16px rgba(56, 48, 35, 0.12);
}

.product-slider-prev { left: -1.35rem; }
.product-slider-next { right: -1.35rem; }

.product-slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.product-slider-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #cec8bd;
  transition: width 180ms ease, background 180ms ease;
}

.product-slider-dot.is-active {
  width: 1.5rem;
  background: #b18a56;
}

.image-lightbox-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.image-lightbox-trigger img {
  transition: transform 180ms ease;
}

@media (hover: hover) {
  .image-lightbox-trigger:hover img {
    transform: scale(1.025);
  }
}

.image-lightbox {
  width: min(92vw, 76rem);
  max-width: none;
  height: min(90vh, 52rem);
  margin: auto;
  padding: 1rem;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.image-lightbox::backdrop {
  background: rgba(16, 24, 20, 0.78);
}

.image-lightbox__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: rgba(24, 55, 45, 0.92);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
}

@media (max-width: 767px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  header,
  main,
  footer,
  header > *,
  main > *,
  footer > * {
    min-width: 0;
  }

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

  .image-lightbox {
    box-sizing: border-box;
  }

  .page-title {
    letter-spacing: -0.02em;
  }

  .product-copy section {
    padding-left: 1rem;
  }

  .product-slider-button {
    top: 9rem;
  }

  .product-slider-prev { left: 0.75rem; }
  .product-slider-next { right: 0.75rem; }
}

@media (max-width: 639px) {
  .client-list {
    row-gap: 0;
  }

  .client-list > div {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}

@media (max-width: 1023px) {
  html.has-motion #mobileNav.mobile-nav--collapsed,
  html.has-motion #mobileNav.mobile-nav--open {
    display: block;
    overflow: hidden;
    transform: translateY(-0.25rem);
    transform-origin: top;
    transition: max-height 180ms ease, opacity 180ms ease, transform 180ms ease;
  }

  html.has-motion #mobileNav.mobile-nav--collapsed {
    max-height: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
  }

  html.has-motion #mobileNav.mobile-nav--open {
    max-height: 28rem;
    opacity: 1;
    transform: translateY(0);
  }
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: max(1.25rem, calc(1rem + env(safe-area-inset-bottom)));
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  background: #18372d;
  color: #fff;
  box-shadow: 0 10px 24px rgba(24, 55, 45, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.75rem);
  transition:
    opacity 180ms ease,
    visibility 180ms ease,
    transform 180ms ease,
    background-color 180ms ease;
}

.back-to-top:hover {
  background: #214b3b;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .eyebrow {
    font-size: 0.6875rem;
  }

  .back-to-top {
    right: max(1rem, calc(1rem + env(safe-area-inset-right)));
    bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

@media (min-width: 1440px) {
  body {
    background: #eeece4;
  }

  body > header,
  body > main,
  body > footer,
  #footer > footer {
    width: min(100%, 1440px);
    margin-right: auto;
    margin-left: auto;
  }

  body > header,
  body > main {
    border-right: 1px solid rgba(76, 68, 53, 0.08);
    border-left: 1px solid rgba(76, 68, 53, 0.08);
  }

  body > main {
    background: var(--color-paper);
    box-shadow: 0 18px 48px rgba(56, 48, 35, 0.06);
  }
}

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

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