/* Allora home page. Loads after shop.css and reuses its tokens, header,
   footer, buttons, product cards and cart. */

/* ---------- bike loading screen ---------- */

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow: hidden;
  background: var(--light-orange);
  transition: opacity 420ms ease, visibility 420ms ease;
}
body.is-loaded .page-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
body.is-loading {
  overflow: hidden;
}
.bike-loader {
  position: absolute;
  top: 50%;
  left: 0;
  width: clamp(10rem, 42vw, 18rem);
  animation: home-ride 2s linear forwards;
}
.bike-loader__gif {
  width: 100%;
}
@keyframes home-ride {
  from {
    transform: translate(-100%, -50%);
  }
  to {
    transform: translate(100vw, -50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bike-loader {
    left: 50%;
    animation: none;
    transform: translate(-50%, -50%);
  }
  .page-loader {
    transition: none;
  }
}

/* ---------- shared section layout ---------- */

.home main {
  flex: 1;
}

.home-section,
.home-config,
.home-signup {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.home-section {
  padding-top: clamp(3rem, 7vw, 5rem);
}
.home-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.home-section__head h2,
.home-config h2,
.home-signup h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.home-link {
  flex: none;
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.home-link:hover {
  color: var(--crimson-deep);
}

/* ---------- hero ---------- */
/* Full-bleed photo with a bold headline over it. The scrim darkens the
   lower-left so white type stays readable on any photo. */

.home-hero {
  /* Keeps the riders (lower-middle of hero-wide.webp) in frame as the hero crops. */
  --hero-focus: 50% 95%;
  --hero-focus-mobile: 50% 25%;
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(560px, 86vh, 860px);
  max-width: none;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--light-orange);
  color: var(--white);
}
.home-hero__media,
.home-hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.home-hero__media {
  z-index: -2;
}
.home-hero__media img {
  object-fit: cover;
  object-position: var(--hero-focus);
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(31, 27, 29, 0.72) 0%, rgba(31, 27, 29, 0.35) 38%, rgba(31, 27, 29, 0) 65%),
    linear-gradient(to right, rgba(31, 27, 29, 0.6) 0%, rgba(31, 27, 29, 0.3) 40%, rgba(31, 27, 29, 0) 62%);
}
.home-hero__content {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(2.5rem, 7vw, 5rem);
}
.home-hero__eyebrow {
  /* The display face draws above its line box, so give the eyebrow room. */
  margin: 0 0 clamp(1rem, 2.4vw, 1.75rem);
  font: 400 clamp(0.85rem, 1.4vw, 1rem) var(--sub);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.home-hero h1 {
  max-width: 12ch;
  margin: 0 0 1rem;
  font-size: clamp(3rem, 5vw, 4.4rem);
  /* TAN ASHFORD's ascenders run tall; below ~1.25 the lines collide. */
  line-height: 1.28;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}
.home-hero__lead {
  max-width: 32rem;
  margin: 0 0 1.75rem;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}
.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.home-hero__primary {
  background: var(--white);
  color: var(--ink);
}
.home-hero__primary:hover {
  background: var(--lemon);
}
.home-hero__ghost {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
}
.home-hero__ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}
@media (max-width: 700px) {
  .home-hero {
    min-height: min(88svh, 720px);
  }
  .home-hero__media img {
    object-position: var(--hero-focus-mobile);
  }
  .home-hero::after {
    background: linear-gradient(to top, rgba(31, 27, 29, 0.8) 0%, rgba(31, 27, 29, 0.45) 40%, rgba(31, 27, 29, 0) 70%);
  }
}

/* Perks strip under the hero. */
.home-strip {
  background: var(--crimson);
  color: var(--white);
}
.home-strip ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 2rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem var(--gutter);
  list-style: none;
  font-size: 0.9rem;
  font-weight: 700;
}
.home-strip li::before {
  content: "\2605";
  margin-right: 0.5rem;
  color: var(--lemon);
}
@media (max-width: 560px) {
  .home-strip ul {
    justify-content: flex-start;
    gap: 0.25rem 1.25rem;
    font-size: 0.85rem;
  }
}

/* ---------- categories ---------- */

.home-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.home-category a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 4 / 4.6;
  padding: 1.1rem;
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--lemon), var(--light-orange));
  overflow: hidden;
  text-decoration: none;
}
.home-category:nth-child(2) a {
  background: linear-gradient(165deg, #ffe3ec, var(--light-crimson));
}
.home-category:nth-child(3) a {
  background: linear-gradient(165deg, #fff3d6, #ffd18a);
}
.home-category:nth-child(4) a {
  background: linear-gradient(165deg, #ffeee4, var(--light-orange));
}
@media (max-width: 1000px) {
  .home-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.home-category__images {
  position: absolute;
  inset: 0.75rem 0.75rem 6.75rem;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.25rem;
}
.home-category__images img {
  flex: 1 1 0;
  min-width: 0;
  max-height: 100%;
  object-fit: contain;
  transition: transform 400ms ease;
}
.home-category a:hover .home-category__images img {
  transform: translateY(-4px);
}
.home-category__label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: var(--white);
  font-weight: 700;
}
.home-category__label::after {
  content: "\2192";
  transition: transform 200ms ease;
}
.home-category a:hover .home-category__label::after {
  transform: translateX(3px);
}
.home-category__blurb {
  position: relative;
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--ink);
}
@media (max-width: 760px) {
  /* One card per row: text and button on the left, the product photos filling
     the right half. */
  .home-categories {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-category a {
    aspect-ratio: auto;
    min-height: 12.5rem;
    padding: 1rem;
  }
  .home-category__images {
    inset: 0.75rem 0.75rem 0.75rem 52%;
    align-items: center;
  }
  .home-category__blurb,
  .home-category__label {
    width: 50%;
  }
  .home-category__blurb {
    text-wrap: balance;
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-category__images img,
  .home-category__label::after {
    transition: none;
  }
}

/* ---------- configurator feature ---------- */

.home-config {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-radius: calc(var(--radius) + 10px);
  background: #ffe1ea;
  color: var(--ink);
  max-width: calc(var(--max) - 2 * var(--gutter));
  width: calc(100% - 2 * var(--gutter));
}
.home-config .shop-eyebrow {
  color: var(--crimson-deep);
}
.home-config__copy > p {
  margin: 1rem 0 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.home-config__media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.home-config__media figure {
  margin: 0;
  padding: 0.5rem 0.5rem 0.65rem;
  border-radius: 16px;
  background: linear-gradient(165deg, var(--lemon), var(--light-orange));
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(31, 27, 29, 0.1);
}
.home-config__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
}
.home-config__media figcaption {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}
.home-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.25rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}
.home-choices li {
  display: grid;
  gap: 0.1rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--crimson);
}
.home-choices span {
  color: var(--muted);
  font-size: 0.9rem;
}
@media (max-width: 820px) {
  .home-config {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-config__copy {
    order: -1;
  }
}
@media (max-width: 420px) {
  .home-choices {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- mission ---------- */

.home-mission {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter);
  background: var(--crimson);
  color: var(--white);
  text-align: center;
}
.home-mission__script {
  margin: 0 0 0.75rem;
  font-family: "Chillink", cursive;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  color: var(--lemon);
}
.home-mission blockquote {
  max-width: 46rem;
  margin: 0 auto;
  font-family: var(--sub);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.5;
}

.home-mission__link {
  margin-top: 1.5rem;
  background: var(--white);
  color: var(--crimson-deep);
}

/* ---------- ambassadors ---------- */

.home-ambassadors__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius);
  background: var(--lemon);
}
.home-ambassadors__card h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.home-ambassadors__card p:last-child {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
}
.home-ambassadors__card .shop-button {
  flex: none;
}
@media (max-width: 700px) {
  .home-ambassadors__card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- signup ---------- */

.home-signup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  padding-top: clamp(3rem, 7vw, 5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.home-signup__copy p:last-child {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}
.home-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
}
.home-form .shop-buy__error {
  grid-column: 1 / -1;
}
.home-form__field {
  display: grid;
  gap: 0.3rem;
}
.home-form__field label {
  font-size: 0.9rem;
  font-weight: 700;
}
.home-form__field input {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
.home-form__field input:focus {
  border-color: var(--ink);
  outline: none;
}
.home-form__field input:focus-visible {
  outline: 3px solid rgba(255, 67, 117, 0.45);
  outline-offset: 1px;
}
.home-signup__note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.home-signup__success {
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  background: #eaf6ef;
  color: var(--success);
}
.home-signup__success p {
  margin: 0;
}
@media (max-width: 820px) {
  .home-signup {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .home-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- polaroid scroller ---------- */
/* Horizontal scroll-snap strip of tilted instant-photo frames. Photos keep
   their own aspect ratio (fixed height, auto width), so nothing is cropped. */

.home-polaroids {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(1rem, 3vw, 2rem);
  background: var(--tile);
  overflow: hidden;
}
.home-polaroids .home-section__head {
  max-width: var(--max);
  margin: 0 auto 0.5rem;
  padding: 0 var(--gutter);
  align-items: flex-end;
}
.home-polaroids__script {
  margin: 0 0 0.25rem;
  font-family: "Chillink", cursive;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  color: var(--crimson);
}
.home-polaroids__nav {
  display: flex;
  gap: 0.5rem;
}
.home-polaroids__btn {
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}
.home-polaroids__btn:hover {
  background: var(--lemon);
}
.home-polaroids__btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.home-polaroids__track {
  --photo-h: clamp(15rem, 34vw, 23rem);
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  margin: 0;
  padding: 2.5rem var(--gutter) 3rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.home-polaroids__track::-webkit-scrollbar {
  display: none;
}
.home-polaroids__track:focus-visible {
  outline: 3px solid var(--crimson);
  outline-offset: -3px;
}
.polaroid {
  flex: none;
  scroll-snap-align: center;
  transform: rotate(var(--tilt));
  transition: transform 200ms ease;
}
.polaroid:hover {
  transform: rotate(0deg) scale(1.03);
}
.polaroid figure {
  margin: 0;
  /* Thicker bottom edge, like an instant photo. */
  padding: 0.75rem 0.75rem 2.75rem;
  background: var(--white);
  box-shadow: 0 6px 18px rgba(31, 27, 29, 0.18);
}
.polaroid img {
  display: block;
  width: auto;
  height: var(--photo-h);
  max-width: none;
  background: var(--light-orange);
}
@media (prefers-reduced-motion: reduce) {
  .polaroid,
  .polaroid:hover {
    transition: none;
  }
}
