/*
 * Site-wide accessibility and UX polish, loaded after style.css /
 * mobile-responsive.css so these rules can safely refine (not fight) them.
 */

/* ---------- Keyboard focus states ---------- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.page-link:focus-visible,
.gallery-arrow:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.navbar-toggler:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring, 0 0 0 3px rgba(107, 68, 35, .35));
  border-radius: 4px;
}

.btn:focus-visible {
  border-radius: 30px;
}

/* ---------- Form validation feedback ---------- */
.form-control.is-invalid,
.form-control:user-invalid {
  border-color: #d64545;
  box-shadow: 0 1px 4px 0 rgba(214, 69, 69, .18);
}

.form-control.is-valid,
.form-control:user-valid {
  border-color: var(--brand, #6b4423);
}

.invalid-feedback {
  display: none;
  margin-top: .35rem;
  font-size: .85rem;
  color: #d64545;
}

.form-control.is-invalid ~ .invalid-feedback,
.form-control:user-invalid ~ .invalid-feedback,
.was-validated .form-control:invalid ~ .invalid-feedback {
  display: block;
}

/* ---------- Breadcrumb (shared component) ---------- */
.breadcrumb-lite {
  font-size: .9rem;
  margin-bottom: 1rem;
  opacity: .9;
}

.breadcrumb-lite a {
  color: inherit;
  opacity: .88;
  text-decoration: none;
}

.breadcrumb-lite a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ---------- Nav dropdown (shared, was previously redeclared per-page and
   missing entirely on contact.html, leaving its "Shop" dropdown unstyled) ---------- */
.dropdown-menu {
  background: #2b2018;
  border: none;
  border-radius: 12px;
  padding: 10px 0;
  box-shadow: 0 14px 35px rgba(0, 0, 0, .18);
}

.dropdown-item {
  color: #fff;
  padding: 8px 20px;
  transition: background .2s ease;
}

.dropdown-item:hover {
  background: #6b4423;
  color: #fff;
}

.dropdown-divider {
  border-color: #444;
}

/* ---------- Desktop nav dropdown: reveal on hover, positioned cleanly below
   the "Shop" item. The caret uses data-bs-display="static" so Bootstrap skips
   Popper and the menu relies on this CSS instead (Popper mis-placed it when
   shown via hover, floating it up over the navbar). ---------- */
@media (min-width: 992px) {
  .custom-navbar .custom-navbar-nav li.dropdown {
    position: relative;
  }

  .custom-navbar .custom-navbar-nav li.dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    bottom: auto;
    margin-top: .35rem;
    min-width: 200px;
    transform: none !important;
  }

  /* Reveal on hover of the "Shop" item, and when Bootstrap adds .show on click. */
  .custom-navbar .custom-navbar-nav li.dropdown:hover .dropdown-menu,
  .custom-navbar .custom-navbar-nav li.dropdown .dropdown-menu.show {
    display: block;
  }
}

/* ---------- Shared hero (consistent wood-tone cover on every page) ---------- */
.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(192, 138, 46, .16), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(192, 138, 46, .10), transparent 40%),
    linear-gradient(135deg, #3a2513 0%, #4a2f18 45%, #2b1c0e 100%);
}

.hero .container,
.page-hero .container,
.hero .row,
.page-hero .row {
  position: relative;
  z-index: 1;
}

/* Large furniture visual with a slow, looping "zoom in" — the site's signature motion. */
.hero-visual {
  position: relative;
  overflow: hidden;
  border-radius: 1.6rem;
}

.hero-visual img,
.hero-visual video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 25px 45px rgba(0, 0, 0, .35));
}

/* Static images get a CSS-driven zoom loop; real video footage already
   supplies its own motion, so it plays at rest. */
.hero-visual img {
  animation: heroZoom 16s ease-in-out infinite alternate;
  transform-origin: center 65%;
}

/* Applied to the hero-art images on inner pages so every page shares the
   same slow "zoom in on the furniture" motion as the homepage. */
.hero-zoom {
  animation: heroZoom 16s ease-in-out infinite alternate;
  transform-origin: center;
}

@keyframes heroZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.14); }
}

/* Full-viewport treatment reserved for the homepage hero only. */
.hero--home {
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.hero--home .hero-visual {
  position: absolute;
  inset: 0;
  border-radius: 0;
  z-index: -1;
}

.hero--home .hero-visual img,
.hero--home .hero-visual video {
  object-fit: cover;
  object-position: center 55%;
  opacity: .7;
  filter: saturate(1.05) contrast(1.03);
}

.hero--home .hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(43, 28, 14, .92) 0%, rgba(43, 28, 14, .68) 45%, rgba(43, 28, 14, .35) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual img,
  .hero-zoom {
    animation: none;
  }
}

/* ---------- Scroll reveal (see js/custom.js scrollReveal) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal-in {
  opacity: 1;
  transform: translateY(0);
}
