/* Approved homepage HERO from 360-property-hero-optimized.
   Cascade matches page.tsx import order, last wins: messenger-cta.css. */

.hero.hero-anim {
  /* Desktop: first screen minus header (~72px) and benefits-head peek (~180px). */
  min-height: calc(100svh - 72px - 180px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas: "left visual";
  column-gap: 48px;
  row-gap: 18px;
  align-items: start;
  align-content: center;
  padding: 40px 0 24px;
}

/* Homepage only: pull benefits head into the first viewport peek. */
@media (min-width: 901px) {
  #benefits.stage {
    padding-top: 36px;
  }

  .hero-anim .hero-plan {
    height: 440px;
  }
}

.hero-anim .hero-left {
  grid-area: left;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-self: start;
  min-width: 0;
}

.hero-anim .hero-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding-top: 0;
  height: auto;
}

.hero-anim .hero-kicker {
  align-self: flex-start;
  margin-bottom: 0;
  padding: 7px 12px;
  border-width: 1px;
  font-size: 12px;
  letter-spacing: 0.14em;
}

.hero-anim h1 {
  max-width: none;
  margin: 28px 0 24px;
  font-size: clamp(40px, 3.6vw, 56px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
  padding-inline-end: 0.08em;
}

.hero-anim .lede {
  max-width: 480px;
  margin-top: 0;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  color: #555;
}

.hero-pack {
  display: flex;
  align-items: stretch;
  width: min(100%, 420px);
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.hero-pack-head {
  display: flex;
  width: 150px;
  flex-direction: column;
  justify-content: center;
  border-right: 0;
}

.hero-pack-head small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-pack-head strong {
  margin-top: 5px;
  color: var(--accent);
  font-size: 56px;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.hero-pack-details {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  padding-left: 0;
  margin-left: 0;
  gap: 0;
  text-align: left;
}

.hero-pack-details span,
.hero-pack-details p {
  box-sizing: border-box;
  width: 100%;
  margin-left: 0;
  padding-left: 0;
  text-align: left;
}

.hero-pack-details span {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.hero-pack-details span + span {
  border-top: 0;
}

.hero-pack-details p {
  margin: 5px 0 0;
  color: #666;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
}

.hero-contact-cta {
  display: flex;
  width: min(100%, 520px);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 0;
  padding-top: 0;
}

.hero-contact-cta > p {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #111;
  font-size: clamp(20px, 1.7vw, 26px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.hero-messengers {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 10px;
}

.hero-messengers a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  background: transparent;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.hero-messengers a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.hero-messengers a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero-messengers svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.hero-visual {
  grid-area: visual;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 680px;
}

.hero-plan {
  height: 470px;
  overflow: hidden;
  background: #fff;
  border: 0;
  /* Match 360-property-hero-optimized mini-plan padding */
  padding: 12px 18px;
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-plan-canvas {
  position: relative;
  width: 100%;
  height: auto;
  max-height: 100%;
  max-width: 100%;
  margin-inline: auto;
  aspect-ratio: 1412 / 1114;
  /* Exact scale from messenger-cta.css (last in optimized cascade) */
  transform: scale(1.15);
  transform-origin: center;
}

.hero-plan-canvas > img {
  position: absolute;
  left: 10.5%;
  top: -13.25%;
  width: 79%;
  height: 126.5%;
  object-fit: fill;
  transform: rotate(90deg);
  filter: grayscale(1) contrast(2.4) brightness(1.06);
}

.hero-point {
  position: absolute;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid #778187;
  border-radius: 50%;
  background: #fff;
  color: #394247;
  font-size: 6px;
  font-weight: 700;
  box-shadow: 0 1px 3px #0002;
  pointer-events: none;
}

.hero-point.visited {
  background: #333c40;
  color: #fff;
}

.hero-point.active {
  opacity: 0.2;
}

.hero-mover {
  position: absolute;
  z-index: 4;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  transition:
    left 1.05s cubic-bezier(0.45, 0, 0.2, 1),
    top 1.05s cubic-bezier(0.45, 0, 0.2, 1);
  pointer-events: none;
}

.hero-mover img {
  position: absolute;
  inset: 3px;
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 3px #0004);
}

.hero-mover i {
  position: absolute;
  top: 0;
  right: 1px;
  width: 14px;
  height: 12px;
  background: #f4f4f2;
  border-radius: 50%;
}

.hero-mover b {
  position: absolute;
  top: 0;
  left: 19px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 10px solid var(--accent);
  transform-origin: 0 19px;
  animation: hero-anim-turn 1s ease 1.05s both;
}

.hero-live {
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  border: 0;
  background: #fff;
  color: #555;
  font-size: 14px;
  text-decoration: none;
}

.hero-live-room {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-left: 64px;
  animation: hero-live-in 0.45s ease;
}

.hero-live-room small {
  color: #777;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
}

.hero-live-room b {
  color: #111;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-live > strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.hero-live svg {
  width: 14px;
  height: 14px;
}

@keyframes hero-anim-turn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes hero-live-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .hero.hero-anim {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
    padding: 18px 0 48px;
    min-height: 0;
  }

  .hero-anim .hero-left {
    order: 1;
    gap: 22px;
  }

  .hero-anim h1 {
    max-width: none;
    font-size: clamp(2.1rem, 8vw, 3.2rem);
    overflow-wrap: break-word;
  }

  .hero-pack {
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .hero-pack-head {
    width: auto;
  }

  .hero-pack-details {
    width: 100%;
    max-width: 26rem;
  }

  .hero-pack-details span {
    white-space: normal;
  }

  .hero-contact-cta {
    width: 100%;
    margin-top: 0;
  }

  .hero-contact-cta > p {
    font-size: 20px;
  }

  .hero-visual {
    order: 2;
    max-width: none;
    width: 100%;
  }

  .hero-plan {
    height: min(68vw, 520px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
  }

  .hero-plan-canvas {
    transform: scale(1.11);
    transform-origin: center;
  }
}

@media (max-width: 600px) {
  .hero.hero-anim {
    gap: 30px;
    padding: 12px 0 40px;
  }

  .hero-anim h1 {
    /* Keep "from anywhere." on one line without clipping the period. */
    font-size: clamp(2rem, 11.2vw, 2.85rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    padding-inline-end: 0.08em;
    overflow-wrap: break-word;
  }

  .hero-anim .lede {
    font-size: 17px;
  }

  .hero-anim .hero-kicker {
    font-size: 11px;
  }

  .hero-pack {
    width: 100%;
    max-width: none;
    margin: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .hero-pack-head {
    width: auto;
  }

  .hero-pack-head strong {
    font-size: 48px;
  }

  .hero-pack-details {
    width: 100%;
    max-width: 22rem;
  }

  .hero-pack-details span {
    font-size: 13px;
    white-space: normal;
  }

  .hero-pack-details p {
    font-size: 12px;
    max-width: none;
  }

  .hero-plan {
    height: 72vw;
    min-height: 310px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
  }

  .hero-plan-canvas {
    transform: scale(1.07);
    transform-origin: center;
  }

  .hero-contact-cta {
    margin-top: 0;
  }

  .hero-contact-cta > p {
    font-size: 18px;
  }

  .hero-messengers a {
    width: 36px;
    height: 36px;
  }

  .hero-live {
    height: auto;
    min-height: 64px;
    padding: 14px;
    gap: 15px;
  }

  .hero-live > strong {
    white-space: nowrap;
  }

  .hero-live-room {
    margin-left: 28px;
    gap: 7px;
  }

  .hero-live-room small {
    font-size: 8px;
  }

  .hero-live-room b {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mover,
  .hero-point {
    transition: none;
  }

  .hero-mover b,
  .hero-live-room {
    animation: none;
  }
}

/* Closing CTA: same hero composition, no first-viewport height lock */
.hero-anim.book-hero {
  min-height: 0;
  padding: clamp(48px, 8vw, 96px) 0;
}

.hero-anim.book-hero h2 {
  max-width: none;
  margin: 28px 0 24px;
  font-size: clamp(40px, 3.6vw, 56px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
  padding-inline-end: 0.08em;
}

@media (min-width: 901px) {
  .hero-anim.book-hero .hero-plan {
    height: 440px;
  }
}

@media (max-width: 900px) {
  .hero-anim.book-hero {
    padding: 36px 0 56px;
  }

  .hero-anim.book-hero h2 {
    max-width: none;
    font-size: clamp(2.1rem, 8vw, 3.2rem);
    overflow-wrap: break-word;
  }
}
