:root {
  --ivory: #faf9f6;
  --linen: #f4f1ea;
  --charcoal: #333333;
  --rust: #a04729;
  --indigo: #2b3a4c;
  --mustard: #d4af37;
  --hairline: rgba(51, 51, 51, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
}

::selection {
  background: var(--mustard);
  color: var(--charcoal);
}

/* Frosted panel behind the hero copy. Square edges and a hairline rule, same
   language as the catalog cards and forms; the blur carries readability. */
.hero-glass {
  border-radius: 0;
  background: rgba(43, 58, 76, 0.18);
  border: 1px solid rgba(250, 249, 246, 0.12);
  box-shadow: none;
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  backdrop-filter: blur(10px) saturate(1.05);
}

/* Without a blur the fill is all that separates the text from the photograph,
   so it has to carry more weight. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero-glass {
    background: rgba(31, 43, 57, 0.58);
  }
}

/* Scroll reveal. Only hidden when JavaScript is available, so the page stays
   readable if GSAP fails to load. */
.js [data-reveal],
.js [data-reveal-item] {
  opacity: 0;
  transform: translateY(24px);
}

.reveal-done {
  opacity: 1 !important;
  transform: none !important;
}

/* Square, archival-looking checkboxes for the shop filters. */
.filter-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border: 1px solid rgba(51, 51, 51, 0.35);
  background: #ffffff;
  display: inline-block;
  position: relative;
  flex: none;
  transition: border-color 300ms ease-in-out, background-color 300ms ease-in-out;
  cursor: pointer;
}

.filter-checkbox:hover {
  border-color: var(--rust);
}

.filter-checkbox:checked {
  background: var(--rust);
  border-color: var(--rust);
}

.filter-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.filter-checkbox:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}

/* Underlined text actions described in the design system. */
.link-rule {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color 300ms ease-in-out;
}

.link-rule:hover {
  color: var(--rust);
}

/* Header link with a rule that grows in on hover. */
.nav-link {
  position: relative;
  transition: color 300ms ease-in-out;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 1px;
  width: 0;
  background: var(--rust);
  transition: width 300ms ease-in-out;
}

.nav-link:hover::after,
.nav-link[aria-current='page']::after {
  width: 100%;
}

.product-card:hover .product-card-image {
  transform: scale(1.06);
}

.product-card-image {
  transition: transform 600ms ease-in-out;
}

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='password'],
input[type='number'],
input[type='search'],
select,
textarea {
  border-radius: 0;
}

/* Long-form policy copy. */
.policy-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  line-height: 2rem;
  margin-top: 3rem;
}

.policy-body h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.125rem;
  margin-top: 1.75rem;
}

.policy-body p,
.policy-body li {
  margin-top: 0.75rem;
  color: rgba(51, 51, 51, 0.78);
  line-height: 1.75;
}

.policy-body ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.policy-body address {
  font-style: normal;
  margin-top: 0.75rem;
  color: rgba(51, 51, 51, 0.78);
  line-height: 1.75;
}

/* Toast used for add-to-cart and form feedback. */
#toast {
  transition: opacity 300ms ease-in-out, transform 300ms ease-in-out;
}

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

  .js [data-reveal],
  .js [data-reveal-item] {
    opacity: 1;
    transform: none;
  }

  .product-card-image,
  #toast {
    transition: none;
  }
}
