/*
 * Outdoor October. Loaded only inside the sale window (HH_Outdoor_October).
 *
 * Autumn here is a palette, not clip-art: oxblood, ember and amber laid
 * against the store's black and yellow. Red #c62828 stays the sale color.
 */

:root {
  --oo-oxblood: #5c1712;
  --oo-ember: #b4441b;
  --oo-amber: #e0901f;
  --oo-bark: #1c120d;
  --oo-sale: #c62828;
}

/* ---------- Ribbon ----------
 * Fixed above the store bar. Its height goes into --hh-abar, the offset every
 * fixed top element already reads (store bar, header, drawer, search), and
 * into the body's top padding. Once the page scrolls past it, it tucks away:
 * the fixed stack slides up, the padding stays, nothing in the page moves.
 */
body.hh-oo-bar {
  --hh-oo-pad: 36px;
  --hh-oo-h: var(--hh-oo-pad);
  --hh-abar: var(--hh-oo-h);
  padding-top: var(--hh-oo-pad);
}
body.admin-bar.hh-oo-bar {
  --hh-abar: calc(var(--wp-admin--admin-bar--height, 32px) + var(--hh-oo-h));
}
body.hh-oo-bar.hh-has-store-bar {
  padding-top: calc(var(--hh-ns-height, 38px) + var(--hh-oo-pad));
}
body.hh-oo-bar.hh-ns-dismissed {
  padding-top: var(--hh-oo-pad);
}
body.hh-oo-bar.hh-oo-tucked {
  --hh-oo-h: 0px;
}
body.hh-oo-bar #hh-nearest-store {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), top var(--transition);
}

.hh-oo-ribbon {
  display: none;
}

body.hh-oo-bar .hh-oo-ribbon {
  display: block;
  position: fixed;
  top: var(--wp-admin--admin-bar--height, 0px);
  left: 0;
  right: 0;
  z-index: 10000;
  height: var(--hh-oo-pad);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(224, 144, 31, 0) 0%, rgba(224, 144, 31, 0.9) 50%, rgba(224, 144, 31, 0) 100%) top / 100% 1px no-repeat,
    linear-gradient(100deg, var(--oo-bark) 0%, var(--oo-oxblood) 38%, var(--oo-ember) 100%);
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.25;
  transition: transform var(--transition);
}

body.hh-oo-bar.hh-oo-tucked .hh-oo-ribbon {
  transform: translateY(-100%);
}

body:not(.admin-bar) .hh-oo-ribbon { top: 0; }

.hh-oo-ribbon__inner {
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 44px 0 clamp(1rem, 3vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  white-space: nowrap;
}

.hh-oo-ribbon a {
  color: inherit;
  text-decoration: none;
}

.hh-oo-ribbon__mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--hh-yellow) !important;
}

.hh-oo-ribbon__leaf {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--hh-yellow);
  transform: rotate(-14deg);
}

.hh-oo-ribbon__offers {
  display: inline-flex;
  gap: 4px;
}

.hh-oo-ribbon__offers a {
  padding: 3px 9px;
  border-radius: 999px;
  transition: background var(--transition-fast);
}

.hh-oo-ribbon__offers a:hover,
.hh-oo-ribbon__offers a:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.hh-oo-ribbon__offers strong,
.hh-oo-ribbon__short {
  font-weight: 700;
  color: #fff;
}

.hh-oo-ribbon__offers strong {
  color: #ffd9a0;
}

.hh-oo-ribbon__short {
  display: none;
}

.hh-oo-ribbon__short:hover { text-decoration: underline !important; }

.hh-oo-ribbon__fine {
  color: rgba(255, 236, 220, 0.82);
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hh-oo-ribbon__what-m { display: none; }

.hh-oo-ribbon__ends {
  color: #fff;
  font-weight: 600;
}

.hh-oo-ribbon__close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
}

.hh-oo-ribbon__close:hover,
.hh-oo-ribbon__close:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.hh-oo-ribbon a:focus-visible,
.hh-oo-ribbon__close:focus-visible {
  outline: 2px solid var(--hh-yellow);
  outline-offset: 1px;
}

@media (max-width: 1239px) {
  .hh-oo-ribbon__offers { display: none; }
  .hh-oo-ribbon__short { display: inline; }
}

@media (max-width: 899px) {
  body.hh-oo-bar { --hh-oo-pad: 58px; }
  .hh-oo-ribbon__inner {
    flex-wrap: wrap;
    align-content: center;
    justify-content: flex-start;
    gap: 2px 12px;
    padding: 0 42px 0 16px;
  }
  .hh-oo-ribbon__fine {
    flex-basis: 100%;
    white-space: normal;
    font-size: 0.72rem;
    line-height: 1.3;
  }
}

@media (max-width: 599px) {
  body.hh-oo-bar { --hh-oo-pad: 64px; }
  .hh-oo-ribbon__what { display: none; }
  .hh-oo-ribbon__what-m { display: inline; }
  .hh-oo-ribbon__mark { font-size: 0.9rem; }
}

/* ---------- Offer band on the sale pages ---------- */
.hh-oo-band {
  display: none;
}

body.hh-oo .hh-oo-band {
  display: block;
  position: relative;
  overflow: hidden;
  margin-top: 83px;
  color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(180, 68, 27, 0.55) 0%, rgba(92, 23, 18, 0.35) 38%, rgba(13, 13, 13, 0) 70%),
    var(--hh-black-deep);
  border-bottom: 3px solid var(--hh-yellow);
}

body.hh-oo .hh-oo-band--flush { margin-top: 0; }

/* The band clears the header, so the page drops the room it kept for it. */
body.hh-oo-headroom .hh2-page { padding-top: 0; }

.hh-oo-band__leaf {
  position: absolute;
  right: clamp(-60px, 2vw, 40px);
  top: 50%;
  width: clamp(180px, 22vw, 300px);
  height: auto;
  transform: translateY(-50%) rotate(-18deg);
  color: var(--oo-ember);
  opacity: 0.35;
  pointer-events: none;
}

.hh-oo-band__inner {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(1.4rem, 3vw, 2.2rem) clamp(1.25rem, 3vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name ctas"
    "title ctas"
    "text ctas";
  column-gap: 2.5rem;
  align-items: center;
}

.hh-oo-band__name {
  grid-area: name;
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffc785;
}

.hh-oo-band__title {
  grid-area: title;
  margin: 0;
  color: #fff;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  line-height: 1.02;
}

.hh-oo-band__pct {
  color: var(--hh-yellow);
}

.hh-oo-band__text {
  grid-area: text;
  margin: 0.6rem 0 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
}

.hh-oo-band__fine {
  color: #ffc785;
  font-weight: 600;
}

.hh-oo-band__ctas {
  grid-area: ctas;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

@media (max-width: 860px) {
  .hh-oo-band__inner {
    grid-template-columns: 1fr;
    grid-template-areas: "name" "title" "text" "ctas";
  }
  .hh-oo-band__ctas {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 1rem;
  }
  .hh-oo-band__ctas .btn { padding: 0.8rem 1.3rem; font-size: 0.85rem; }
  .hh-oo-band__leaf { opacity: 0.22; }
}

@media (max-width: 782px) {
  body.hh-oo .hh-oo-band:not(.hh-oo-band--flush) { margin-top: 83px; }
}

/* ---------- Home: backyard tiles ---------- */
.hh-oo-tag { display: none; }

body.hh-oo .hh2-cat-media { position: relative; }

body.hh-oo .hh-oo-tag {
  display: block;
  position: absolute;
  top: 12px;
  left: 0;
  z-index: 1;
  padding: 6px 12px 6px 10px;
  background: var(--oo-sale);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%);
  padding-right: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.hh-oo-note { display: none; }

body.hh-oo .hh-oo-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 78ch;
  margin: -0.5rem 0 1.6rem;
  color: var(--hh-gray-900);
  font-size: 0.95rem;
  line-height: 1.45;
}

.hh-oo-note__leaf {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  color: var(--oo-ember);
  transform: rotate(-14deg);
}

.hh-oo-note strong { color: var(--hh-black); }

/* ---------- Season accents ---------- */
/* The eyebrow's yellow bar turns, like a leaf, from yellow into ember. */
body.hh-oo .eyebrow::before {
  background: linear-gradient(90deg, var(--hh-yellow) 0%, var(--oo-amber) 55%, var(--oo-ember) 100%);
}

body.hh-oo .site-footer {
  box-shadow: inset 0 3px 0 0 var(--oo-ember);
}

/* ---------- Falling leaves on the home hero ---------- */
.hh-oo-leaves {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  --fall: 560px;
}

@supports (height: 1cqh) {
  .hh-oo-leaves { container-type: size; }
  .hh-oo-leaves svg { --fall: 112cqh; }
}

.hh-oo-leaves svg {
  position: absolute;
  top: -40px;
  width: var(--s, 18px);
  height: var(--s, 18px);
  color: var(--c, var(--oo-amber));
  opacity: 0;
  will-change: transform, opacity;
  animation: hh-oo-fall var(--d, 14s) linear var(--delay, 0s) infinite;
}

.hh-oo-leaves.is-paused svg { animation-play-state: paused; }

@keyframes hh-oo-fall {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: var(--o, 0.85); }
  25%  { transform: translate3d(var(--sway, 30px), calc(var(--fall) * 0.25), 0) rotate(70deg); }
  50%  { transform: translate3d(calc(var(--sway, 30px) * -0.4), calc(var(--fall) * 0.5), 0) rotate(160deg); }
  75%  { transform: translate3d(var(--sway, 30px), calc(var(--fall) * 0.75), 0) rotate(250deg); }
  92%  { opacity: var(--o, 0.85); }
  100% { transform: translate3d(calc(var(--sway, 30px) * 0.2), var(--fall), 0) rotate(340deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hh-oo-leaves { display: none; }
  body.hh-oo-bar .hh-oo-ribbon,
  body.hh-oo-bar #hh-nearest-store { transition: none; }
}

/* The ribbon links here; land below the fixed header, not under it. */
body.hh-oo #outdoor { scroll-margin-top: 130px; }
