/* Haven Home (Home.dc.html). Values transcribed from the artboard's inline styles. */

.hvn-page-home .page-main,
.hvn-page-home .columns .column.main {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* ---- 1. Hero ---- */
.hvn-hero { position: relative; }
.hvn-hero-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.hvn-hero-track::-webkit-scrollbar { display: none; }
.hvn-hero-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
}
.hvn-hero-media {
  aspect-ratio: 21 / 9;
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
}
/* The artboard sets dark copy on a pale placeholder; over a photograph the same copy needs a pale scrim behind it. */
.hvn-hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(to top, color-mix(in oklab, var(--hvn-bg) 88%, transparent) 0%, color-mix(in oklab, var(--hvn-bg) 55%, transparent) 30%, transparent 58%);
  pointer-events: none;
}
.hvn-hero-copy {
  position: absolute;
  z-index: 1;
  left: 56px;
  bottom: 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 520px;
}
.hvn-hero-copy .hvn-btn { width: fit-content; }
.hvn-hero-title {
  font-family: var(--hvn-font-display);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  font-size: 48px;
  text-wrap: balance;
  color: var(--hvn-text);
}
.hvn-hero-controls {
  position: absolute;
  bottom: 24px;
  right: 56px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.hvn-hero-counter { font-size: 12px; letter-spacing: 0.2em; color: var(--hvn-text-subtle); }
.hvn-hero-arrow {
  width: 40px;
  height: 40px;
  border: 1px solid var(--hvn-border-strong);
  background: var(--hvn-bg);
  color: var(--hvn-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
}

/* ---- headrow (shared: rooms title, rail head) ---- */

/* ---- 2. Begin with the room ---- */
.hvn-home-rooms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.hvn-room-tile { position: relative; display: block; text-decoration: none; color: var(--hvn-text); }
.hvn-room-tile-media {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
}
.hvn-room-tile-label {
  position: absolute;
  left: 26px;
  bottom: 22px;
  background: var(--hvn-bg);
  padding: 10px 22px;
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.hvn-room-tile-name { font-family: var(--hvn-font-display); font-size: 19px; }
.hvn-room-tile-shop {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hvn-accent-strong);
}

/* ---- 4. workshops band ---- */
.hvn-home-workshops {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--hvn-surface);
  border-top: 1px solid var(--hvn-border);
  border-bottom: 1px solid var(--hvn-border);
}
.hvn-home-workshops-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 64px;
}
.hvn-home-workshops-copy h3 {
  font-family: var(--hvn-font-display);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  font-size: 30px;
}
.hvn-home-lede {
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--hvn-text-subtle);
  margin: 0;
  max-width: 48ch;
}
.hvn-home-link {
  color: var(--hvn-text);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--hvn-accent);
  font-size: 14px;
}
.hvn-home-workshops-media { aspect-ratio: 4 / 3; width: 100%; border-radius: 4px; object-fit: cover; }

/* ---- 5. brand statement ---- */
.hvn-home-statement {
  max-width: var(--hvn-container);
  margin-inline: auto;
  padding: 64px 40px 0;
  text-align: center;
}
.hvn-home-statement-text {
  font-family: var(--hvn-font-display);
  font-size: 26px;
  line-height: 1.5;
  font-style: italic;
  max-width: 660px;
  margin: 0 auto;
  color: var(--hvn-text);
}

/* ---- 6. newsletter ---- */
.hvn-home-newsletter {
  max-width: var(--hvn-container);
  margin-inline: auto;
  padding: 72px 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.hvn-home-newsletter h3 {
  font-family: var(--hvn-font-display);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  font-size: 26px;
}
.hvn-home-newsletter .hvn-home-lede { color: var(--hvn-text-subtle); max-width: none; }
.hvn-home-newsletter-form { display: flex; flex-wrap: wrap; margin-top: 6px; }
/* mage/validation inserts <div class="mage-error"> after the input; it must read as a message, not vanish. */
.hvn-home-newsletter-form .mage-error {
  flex-basis: 100%;
  order: 3;
  margin-top: 8px;
  font-size: 13px;
  color: var(--hvn-error);
  text-align: left;
}
.hvn-home-newsletter-form .hvn-home-newsletter-input.mage-error { border-color: var(--hvn-error); }
.hvn-home-newsletter-form .hvn-home-newsletter-input {
  height: auto; /* Blank fixes input[type=email] at 32px; the flex row stretches it to the button */
  border: 1px solid var(--hvn-border-strong);
  border-right: none;
  background: var(--hvn-surface);
  color: var(--hvn-text);
  padding: 13px 15px;
  font-size: 14px;
  font-family: var(--hvn-font-body);
  outline: none;
  border-radius: 4px 0 0 4px;
  box-sizing: border-box;
  width: 300px;
}
.hvn-home-newsletter-form .hvn-btn { border-radius: 0 4px 4px 0; }

@media (max-width: 1023px) {
  .hvn-home-statement,
  .hvn-home-newsletter { padding-left: 24px; padding-right: 24px; }
  .hvn-home-workshops-copy { padding: 48px 32px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hvn-hero-arrow { width: 44px; height: 44px; }
}

@media (max-width: 767px) {
  .hvn-home-statement,
  .hvn-home-newsletter { padding: 40px 16px 0; }
  /* 21:9 at 375 is 160px tall, shorter than the copy; the artboard is desktop-only, so the phone hero goes 4:5 (measured). */
  .hvn-hero-media { aspect-ratio: 4 / 5; }
  .hvn-hero-title { font-size: 30px; }
  .hvn-hero-copy { left: 20px; bottom: 64px; right: 20px; max-width: none; }
  .hvn-hero-controls { right: 20px; bottom: 16px; }
  .hvn-home-rooms { grid-template-columns: 1fr; }
  .hvn-home-workshops { grid-template-columns: 1fr; margin-top: 40px; }
  .hvn-home-workshops-copy { padding: 32px 20px; }
  .hvn-home-newsletter-form { flex-direction: column; width: 100%; }
  .hvn-home-newsletter-form .hvn-home-newsletter-input {
    width: 100%;
    border-right: 1px solid var(--hvn-border-strong);
    border-radius: 4px 4px 0 0;
    min-height: 44px;
  }
  .hvn-home-newsletter-form .hvn-btn { border-radius: 0 0 4px 4px; min-height: 44px; }
  .hvn-home-headrow { flex-direction: column; align-items: flex-start; gap: 8px; }
}
