/* Aurenqo homepage hero refresh — 2026-10-07
   Compact navigation banner: uploaded artwork + small Japan warehouse entry +
   existing AI search directly underneath. No business/search logic changed. */

body[data-page="home"] .hero-section {
  background: #ffffff;
}

body[data-page="home"] .hero-grid {
  display: block;
  min-height: 0;
  padding-block: 8px 12px;
}

body[data-page="home"] .hero-commerce {
  display: none !important;
}

body[data-page="home"] .hero-visual {
  position: relative;
  width: 100%;
  min-width: 0;
}

body[data-page="home"] .hero-image {
  width: 100%;
  min-height: 0;
  aspect-ratio: 2.55 / 1 !important;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #eef6ff;
  box-shadow: none !important;
}

body[data-page="home"] .hero-image::after {
  display: none !important;
}

body[data-page="home"] .hero-image-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Preserve the former square proportion, but at roughly half the linear size.
   It remains a real link to the Japan warehouse section. */
body[data-page="home"] .hero-visual .partner-cta-hero {
  display: flex !important;
  position: absolute !important;
  inset-inline-end: 3.2% !important;
  inset-block-start: 8% !important;
  z-index: 7;
  width: 150px !important;
  max-width: 19% !important;
  aspect-ratio: 1 / 1 !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 10px !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(37, 99, 235, .28) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .88) !important;
  color: #111111 !important;
  box-shadow: 0 7px 20px rgba(37, 99, 235, .12) !important;
  backdrop-filter: blur(5px);
  text-align: center;
}

body[data-page="home"] .partner-cta-hero .partner-cta-hero-badge {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin: 0;
  border-radius: 8px;
  background: #eef5ff;
  color: #2563eb;
  font-size: .72rem;
}

body[data-page="home"] .partner-cta-hero .partner-cta-hero-line {
  display: block;
  width: 100%;
  color: #111111;
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

/* The search is a separate navigation control directly under the image. */
body[data-page="home"] .hero-visual .hero-search-slot {
  position: static !important;
  inset: auto !important;
  z-index: 5;
  margin-top: 7px !important;
  order: initial;
}

body[data-page="home"] .hero-search {
  margin: 0;
}

/* Old duplicate full-width warehouse CTA is retired on the homepage. */
body[data-page="home"] .partner-cta-wrap {
  display: none !important;
}

@media (max-width: 900px) {
  body[data-page="home"] .hero-visual {
    display: block !important;
  }

  body[data-page="home"] .hero-grid {
    display: block;
    padding-block: 6px 10px;
  }

  body[data-page="home"] .hero-image {
    aspect-ratio: 2.55 / 1 !important;
    border-radius: 12px;
  }

  body[data-page="home"] .hero-visual .partner-cta-hero {
    width: 24% !important;
    max-width: 108px !important;
    inset-inline-end: 3% !important;
    inset-block-start: 7% !important;
    padding: 7px !important;
    gap: 5px;
    border-radius: 11px !important;
  }

  body[data-page="home"] .partner-cta-hero .partner-cta-hero-badge {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    font-size: .58rem;
  }

  body[data-page="home"] .partner-cta-hero .partner-cta-hero-line {
    font-size: clamp(.68rem, 2.8vw, .82rem);
  }

  body[data-page="home"] .hero-visual .hero-search-slot {
    margin-top: 6px !important;
  }
}

@media (max-width: 390px) {
  body[data-page="home"] .hero-visual .partner-cta-hero {
    width: 24% !important;
    max-width: 94px !important;
    padding: 6px !important;
  }

  body[data-page="home"] .partner-cta-hero .partner-cta-hero-line {
    font-size: .66rem;
  }
}


/* V3 mobile placement: preserve the old square CTA ratio at about half size,
   and pin it physically inside the hero's upper-right corner. */
@media (max-width: 430px) {
  body[data-page="home"] .hero-visual .partner-cta-hero {
    left: auto !important;
    right: 10px !important;
    inset-inline-end: auto !important;
    inset-block-start: 9px !important;
    width: 92px !important;
    max-width: 92px !important;
    height: 92px !important;
    max-height: 92px !important;
    aspect-ratio: 1 / 1 !important;
    padding: 7px !important;
  }

  body[data-page="home"] .partner-cta-hero .partner-cta-hero-badge {
    width: 19px;
    height: 19px;
    margin: 0;
  }

  body[data-page="home"] .partner-cta-hero .partner-cta-hero-line {
    font-size: .68rem;
    line-height: 1.16;
    white-space: nowrap;
  }
}

@media (max-width: 390px) {
  body[data-page="home"] .hero-visual .partner-cta-hero {
    right: 9px !important;
    width: 84px !important;
    max-width: 84px !important;
    height: 84px !important;
    max-height: 84px !important;
    padding: 6px !important;
  }

  body[data-page="home"] .partner-cta-hero .partner-cta-hero-line {
    font-size: .62rem;
  }
}


/* V4: contain the compact homepage hero to the actual phone viewport.
   Legacy site-container/grid widths elsewhere must not push the Japan card
   beyond the right edge. */
@media (max-width: 900px) {
  body[data-page="home"] .hero-section {
    overflow-x: clip;
  }

  body[data-page="home"] .hero-section > .site-container.hero-grid {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
    box-sizing: border-box;
  }

  body[data-page="home"] .hero-visual,
  body[data-page="home"] .hero-image,
  body[data-page="home"] .hero-search-slot,
  body[data-page="home"] .hero-search {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
}


/* V5 final homepage hero: compact background navigation banner.
   The Japan warehouse entry keeps a horizontal rectangle proportion,
   is reduced to a secondary overlay, and contains title only. */
body[data-page="home"] .hero-image {
  aspect-ratio: 2.75 / 1 !important;
}

body[data-page="home"] .hero-visual .partner-cta-hero {
  display: flex !important;
  position: absolute !important;
  inset-inline-end: 3.2% !important;
  inset-block-start: 10% !important;
  width: 180px !important;
  max-width: 24% !important;
  height: 72px !important;
  max-height: 72px !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  padding: 8px 12px !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border: 1px solid rgba(37,99,235,.24) !important;
  border-radius: 13px !important;
  background: rgba(255,255,255,.90) !important;
  color: #111111 !important;
  box-shadow: 0 6px 18px rgba(37,99,235,.10) !important;
  backdrop-filter: blur(5px);
  text-align: center;
}

body[data-page="home"] .partner-cta-hero .partner-cta-hero-badge {
  flex: 0 0 auto;
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  border-radius: 7px !important;
  background: #eef5ff !important;
  color: #2563eb !important;
  font-size: .62rem !important;
}

body[data-page="home"] .partner-cta-hero .partner-cta-hero-line {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  color: #111111 !important;
  font-size: .88rem !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

body[data-page="home"] .partner-cta-hero .partner-cta-hero-line > span {
  display: inline !important;
}

/* No secondary copy in this CTA. */
body[data-page="home"] .partner-cta-hero .partner-cta-hero-sub {
  display: none !important;
}

/* AI search is deliberately outside and directly below the banner. */
body[data-page="home"] .hero-visual .hero-search-slot {
  position: static !important;
  margin-top: 6px !important;
}

@media (max-width: 900px) {
  body[data-page="home"] .hero-image {
    aspect-ratio: 2.75 / 1 !important;
  }

  body[data-page="home"] .hero-visual .partner-cta-hero {
    right: 10px !important;
    left: auto !important;
    inset-inline-end: auto !important;
    inset-block-start: 9px !important;
    width: 136px !important;
    max-width: 34% !important;
    height: 58px !important;
    max-height: 58px !important;
    padding: 6px 9px !important;
    border-radius: 11px !important;
    gap: 6px !important;
  }

  body[data-page="home"] .partner-cta-hero .partner-cta-hero-badge {
    width: 19px !important;
    height: 19px !important;
    border-radius: 6px !important;
    font-size: .54rem !important;
  }

  body[data-page="home"] .partner-cta-hero .partner-cta-hero-line {
    font-size: .72rem !important;
  }
}

@media (max-width: 390px) {
  body[data-page="home"] .hero-visual .partner-cta-hero {
    right: 9px !important;
    width: 124px !important;
    max-width: 35% !important;
    height: 54px !important;
    max-height: 54px !important;
    padding: 6px 8px !important;
  }

  body[data-page="home"] .partner-cta-hero .partner-cta-hero-line {
    font-size: .68rem !important;
  }
}


/* V5.1 physical placement guard: legacy logical-inset rules must never move
   the compact Japan warehouse CTA over the left-side hero headline. */
@media (max-width: 900px) {
  body[data-page="home"] .hero-visual .partner-cta-hero {
    inset-inline-start: auto !important;
    inset-inline-end: auto !important;
    left: calc(100% - 146px) !important;
    right: auto !important;
    top: 9px !important;
  }
}

@media (max-width: 390px) {
  body[data-page="home"] .hero-visual .partner-cta-hero {
    left: calc(100% - 133px) !important;
    right: auto !important;
    top: 9px !important;
  }
}


/* Homepage search layout is owned by the shared Light Commerce component rules. */

/* One lightweight, unified entry for all local warehouse markets. */
body[data-page="home"] .country-warehouse-mosaic {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 2.55 / 1;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(214, 165, 70, .48);
  border-radius: 20px;
  background: #0e2747;
  box-shadow: 0 16px 38px rgba(14, 39, 71, .15);
  color: #fff;
  text-decoration: none;
  transform: none !important;
}
body[data-page="home"] .country-warehouse-mosaic:hover,
body[data-page="home"] .country-warehouse-mosaic:focus-visible {
  border-color: #d6a546;
  color: #fff;
  box-shadow: 0 18px 42px rgba(14, 39, 71, .24), 0 0 0 3px rgba(214, 165, 70, .24);
}
body[data-page="home"] .country-mosaic-tiles {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
  background: #d6a546;
}
body[data-page="home"] .country-mosaic-tiles > span {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, .8vw, 11px);
  overflow: hidden;
  background: linear-gradient(145deg, #17385d, #0e2747);
  color: #f8f7f3;
  font-size: clamp(1.05rem, 2.4vw, 2.2rem);
  line-height: 1;
}
body[data-page="home"] .country-mosaic-tiles > span:nth-child(4n + 2) { background: linear-gradient(145deg, #24476d, #153354); }
body[data-page="home"] .country-mosaic-tiles > span:nth-child(5n + 3) { background: linear-gradient(145deg, #d6a546, #9a7432); }
body[data-page="home"] .country-mosaic-tiles .country-flag {
  display: block;
  width: clamp(22px, 3.1vw, 34px);
  height: auto;
  flex: 0 0 auto;
  aspect-ratio: 40 / 28;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,.28);
}
body[data-page="home"] .country-mosaic-tiles b {
  color: rgba(255,255,255,.93);
  font-size: .36em;
  font-weight: 800;
  letter-spacing: .1em;
}
body[data-page="home"] .country-mosaic-overlay {
  position: absolute;
  z-index: 1;
  inset: 50% auto auto 50%;
  display: grid;
  width: min(72%, 480px);
  min-height: 56%;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: clamp(12px, 2vw, 24px);
  border: 1px solid rgba(214, 165, 70, .72);
  border-radius: 18px;
  background: rgba(8, 25, 47, .88);
  box-shadow: 0 12px 34px rgba(4, 16, 33, .28);
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(5px);
}
body[data-page="home"] .country-mosaic-overlay strong { color: #fff; font-size: clamp(1rem, 2.25vw, 1.8rem); line-height: 1.25; }
body[data-page="home"] .country-mosaic-overlay > span { color: #f0e7d5; font-size: clamp(.72rem, 1.15vw, .96rem); line-height: 1.4; }
body[data-page="home"] .country-mosaic-overlay em { color: #e8c879; font-size: .72rem; font-style: normal; font-weight: 750; letter-spacing: .03em; }
@media (max-width: 900px) {
  body[data-page="home"] .country-warehouse-mosaic { aspect-ratio: 2.2 / 1; border-radius: 17px; }
  body[data-page="home"] .country-mosaic-overlay { width: min(78%, 430px); min-height: 62%; }
}
@media (max-width: 767px) {
  body[data-page="home"] .country-warehouse-mosaic { aspect-ratio: 2.25 / 1; border-radius: 15px; }
  body[data-page="home"] .country-mosaic-tiles { grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 1px; padding: 1px; }
  body[data-page="home"] .country-mosaic-tiles > span { gap: 3px; font-size: clamp(1rem, 5vw, 1.55rem); }
  body[data-page="home"] .country-mosaic-tiles .country-flag { width: clamp(20px, 6vw, 27px); }
  body[data-page="home"] .country-mosaic-overlay { width: 82%; min-height: 64%; gap: 4px; padding: 8px 10px; border-radius: 13px; }
  body[data-page="home"] .country-mosaic-overlay strong { font-size: clamp(.9rem, 4vw, 1.22rem); }
  body[data-page="home"] .country-mosaic-overlay > span { font-size: clamp(.62rem, 2.6vw, .78rem); }
  body[data-page="home"] .country-mosaic-overlay em { font-size: .62rem; }
}
@media (max-width: 360px) {
  body[data-page="home"] .country-warehouse-mosaic { aspect-ratio: 2.05 / 1; }
  body[data-page="home"] .country-mosaic-overlay { width: 86%; min-height: 68%; }
  body[data-page="home"] .country-mosaic-overlay > span { max-width: 24ch; }
}

/* Approved V1 welcome poster: full image, no separate greeting layers. */
body[data-page="home"] .brand-transition[hidden] { display: none !important; }
body[data-page="home"] .brand-transition {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  background: #00051d;
  opacity: 1;
  transition: opacity 220ms ease-out;
}
body[data-page="home"] .brand-transition.is-leaving { opacity: 0; }
body[data-page="home"] .brand-transition-poster {
  display: block;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  object-fit: contain;
  object-position: center;
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .brand-transition { transition: none; }
}
