/* ==========================================================================
   Home page (/)

   Loaded after industries.css (home/index.blade.php), which supplies the
   shared visual language: the navy hero, .ind-card, .ind-btn, section heads,
   chips and the Japanese line-breaking rules. This file only adds what the
   home page has and the other pages do not: the Japan-Vietnam visual and
   stats strip in the hero, case lists on the industry cards, the navy
   takeover block, the service and article cards, and the partner logos.
   Plain CSS with a filemtime() query string - nothing may need building
   on the live box.

   Everything is scoped under .hp-page.
   ========================================================================== */

/* Japanese line breaking for the elements industries.css does not cover. */
.hp-page h3 a, .hp-page time { text-wrap: balance; }
.hp-page:lang(ja) span, .hp-page:lang(ja) a { word-break: auto-phrase; }

.hp-page a:focus-visible { outline: 3px solid var(--ind-blue); outline-offset: 3px; }
.hp-page .ind-hero a:focus-visible,
.hp-page .hp-takeover a:focus-visible { outline-color: var(--ind-cyan); }

/* --- Hero ---------------------------------------------------------------- */
/* The header sits above the hero in the normal flow (layouts/header), as on
   every other page; it used to float over it, transparent, and the hero
   carried 150px of top padding to clear it. */
.hp-page .hp-hero { padding: 64px 0 56px; }
.hp-page .hp-hero h1 { max-width: 19em; }
/* `.ind-page p { margin: 0 }` outranks .ind-eyebrow's own margin. */
.hp-page .hp-hero .ind-eyebrow { margin-bottom: 18px; }
.hp-page .hp-hero .ind-hero-lead { max-width: 40em; }

.hp-bridge {
  position: relative;
  display: grid;
  gap: 0;
  max-width: 400px;
  margin-left: auto;
  padding: 26px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 0 0 14px rgba(255, 255, 255, .03);
}
.hp-bridge-node {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .1);
}
.hp-bridge-icon {
  grid-row: span 2;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--ind-navy);
  background: linear-gradient(135deg, #fff, #c9f7ff);
}
.hp-bridge-place { font-weight: 800; font-size: 1.05rem; color: #fff; line-height: 1.4; }
.hp-bridge-role { font-size: .88rem; color: rgba(255, 255, 255, .78); line-height: 1.5; }
.hp-bridge-link {
  position: relative;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hp-bridge-link::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 2px dashed rgba(92, 244, 255, .6);
}
.hp-bridge-link span {
  position: relative;
  padding: 3px 14px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--ind-navy);
  background: var(--ind-cyan);
}

.hp-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 52px 0 0 !important;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
}
.hp-hero-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, .12);
}
.hp-hero-stats li:last-child { border-right: 0; }
.hp-hero-stat-value { font-size: clamp(1.35rem, 1rem + 1.3vw, 2rem); font-weight: 800; line-height: 1.2; color: #fff; }
.hp-hero-stat-label { font-size: .85rem; color: rgba(255, 255, 255, .78); }

/* --- Industry cards ------------------------------------------------------ */
.hp-industry > p:not(.hp-industry-cases-label) { margin-bottom: 18px; }
.hp-industry-cases-label {
  padding-top: 16px;
  border-top: 1px dashed var(--ind-line);
  font-size: .76rem !important;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--ind-accent) !important;
}
.hp-industry .hp-industry-cases { display: grid; gap: 6px; margin: 8px 0 0 !important; }
.hp-industry-cases li {
  display: grid;
  grid-template-columns: 1em minmax(0, 1fr);
  gap: 8px;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--ind-ink);
}
.hp-industry-cases .fa { color: var(--ind-accent); margin-top: .3em; }
.hp-industry .ind-more { margin-top: auto; padding-top: 18px; }

/* --- System takeover (navy band) ----------------------------------------- */
.hp-takeover {
  position: relative;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(700px 380px at 100% 0%, rgba(92, 244, 255, .16), transparent 60%),
    radial-gradient(600px 360px at 0% 100%, rgba(17, 165, 222, .2), transparent 60%),
    linear-gradient(135deg, var(--ind-navy-2) 0%, var(--ind-navy) 60%, #123d8a 100%);
}
.hp-takeover > .container-xl { position: relative; z-index: 1; }
.hp-takeover .hp-takeover-kicker { display: block; color: var(--ind-cyan); }
.hp-badge-new {
  display: inline-block;
  padding: 4px 14px;
  margin-bottom: 14px !important;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  color: #78350f;
  background: #fde68a;
}
.hp-takeover h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.15rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 16px;
}
.hp-takeover-lead { color: rgba(255, 255, 255, .88); margin-bottom: 22px !important; }
.hp-nodoc {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 20px;
  margin-bottom: 26px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
}
.hp-nodoc-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: var(--ind-navy);
  background: var(--ind-cyan);
}
.hp-nodoc-title { font-weight: 800; color: #fff; margin-bottom: 4px !important; line-height: 1.5; }
.hp-nodoc p:not(.hp-nodoc-title) { font-size: .9rem; color: rgba(255, 255, 255, .78); }

.hp-takeover .hp-takeover-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.hp-takeover-step {
  padding: 22px 22px 24px;
  border-radius: 16px;
  background: #fff;
  color: var(--ind-ink);
}
.hp-takeover-step h3 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ind-navy);
  margin: 0 0 8px;
}
.hp-takeover-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: var(--ind-blue);
  background: var(--ind-accent-soft);
}
.hp-takeover-step p { font-size: .92rem; color: var(--ind-muted); }
.hp-takeover-step-warranty { box-shadow: inset 0 0 0 2px #f59e0b; background: #fffbeb; }
.hp-takeover-step-warranty .hp-takeover-step-icon { color: #b45309; background: #fde68a; }
.hp-takeover-warranty { margin-top: 16px !important; font-size: .88rem; color: rgba(255, 255, 255, .8); }
.hp-takeover-warranty .fa { color: #fde68a; margin-right: 4px; }

.hp-takeover-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  margin-top: 40px;
}
.hp-takeover-panel {
  padding: 26px 28px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .18);
}
.hp-takeover-panel h3 { font-size: 1.1rem; font-weight: 800; color: #fff; margin: 0 0 14px; }
.hp-takeover-panel h3 .fa { color: var(--ind-cyan); margin-right: 6px; }
.hp-takeover-panel > p { font-size: .92rem; color: rgba(255, 255, 255, .82); }
.hp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px !important; }
.hp-chips li {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--ind-navy);
  background: #e7f6fc;
}
.hp-terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 14px; }
.hp-terms > div { padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .1); }
.hp-terms dt { font-size: 1.1rem; font-weight: 800; color: var(--ind-cyan); line-height: 1.3; margin-bottom: 4px; }
.hp-terms dd { margin: 0; font-size: .86rem; line-height: 1.6; color: rgba(255, 255, 255, .85); }
.hp-takeover-panel .hp-takeover-note { font-size: .82rem; color: rgba(255, 255, 255, .66); }
.hp-takeover-panel { display: flex; flex-direction: column; }
.hp-takeover-ask { margin-top: auto; padding-top: 18px; font-weight: 800; color: var(--ind-cyan); text-decoration: none; }
.hp-takeover-ask:hover { color: #fff; text-decoration: none; }

/* --- Card grids whose length the CMS decides ----------------------------- */
/* Services and partners come from the admin, so their count can be
   anything. A flex grid with a centred last row keeps a short row balanced
   instead of leaving one card hanging on the left. */
.hp-flex-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.hp-flex-grid > li { display: flex; }
.hp-cols-4 > li { width: calc((100% - 72px) / 4); }
.hp-cols-3 > li { width: calc((100% - 48px) / 3); }

/* --- Service cards ------------------------------------------------------- */
.hp-service {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}
.hp-service:hover { color: inherit; text-decoration: none; box-shadow: 0 14px 34px rgba(26, 42, 108, .1); transform: translateY(-2px); }
.hp-service img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--ind-bg); }
.hp-service-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.hp-service h3 { font-size: 1.06rem; margin-bottom: 8px; }
.hp-service-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--ind-muted);
}
.hp-service .ind-more,
.hp-article .ind-more { margin-top: auto; padding-top: 14px; font-weight: 800; font-size: .92rem; color: var(--ind-blue); }

/* --- Article cards ------------------------------------------------------- */
.hp-articles { margin: 0; padding: 0; }
.hp-articles > li { display: flex; }
.hp-article {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}
.hp-article:hover { color: inherit; text-decoration: none; box-shadow: 0 14px 34px rgba(26, 42, 108, .1); transform: translateY(-2px); }
.hp-article img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--ind-bg); }
.hp-article-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 18px 22px 22px; }
.hp-article time { font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--ind-muted); }
.hp-article h3 { font-size: 1.04rem; line-height: 1.55; margin: 0; }
.hp-article p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: .88rem;
  line-height: 1.7;
}

/* --- Products ------------------------------------------------------------ */
.hp-product h3 a { color: inherit; text-decoration: none; }
.hp-product h3 a:hover { color: var(--ind-accent); }
.hp-product .ind-product-logo { text-decoration: none; }

/* --- Partner logos ------------------------------------------------------- */
.hp-partner-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 0; padding: 0; list-style: none; }
.hp-partner-logos li { width: calc((100% - 80px) / 6); }
.hp-partner-logos a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--ind-line);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.hp-partner-logos a:hover { border-color: var(--ind-blue); box-shadow: 0 8px 22px rgba(26, 42, 108, .08); }
.hp-partner-logos img { max-width: 100%; max-height: 56px; width: auto; height: auto; object-fit: contain; }

/* --- Wide screens -------------------------------------------------------- */
@media (min-width: 1800px) {
  .hp-page .hp-hero { padding-top: 80px; }
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .hp-cols-4 > li { width: calc((100% - 48px) / 3); }
}
@media (max-width: 991.98px) {
  .hp-page .hp-hero { padding: 48px 0 48px; }
  .hp-cols-4 > li, .hp-cols-3 > li { width: calc((100% - 24px) / 2); }
  .hp-takeover-panels { grid-template-columns: 1fr; }
  .hp-partner-logos li { width: calc((100% - 48px) / 4); }
}
/* Tablets: three industry cards side by side leave the case titles a few
   characters wide, so each card takes the full row instead, with its value
   line on the left and the case studies on the right. */
@media (min-width: 576px) and (max-width: 991.98px) {
  #industries .ind-grid-trio { grid-template-columns: 1fr; }
  .hp-industry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 32px;
    align-content: start;
  }
  .hp-industry > .ind-icon { grid-column: 1; grid-row: 1; }
  .hp-industry > h3 { grid-column: 1; grid-row: 2; }
  .hp-industry > p:not(.hp-industry-cases-label) { grid-column: 1; grid-row: 3; margin-bottom: 0; }
  .hp-industry > .ind-more { grid-column: 1; grid-row: 4; }
  .hp-industry .hp-industry-cases-label { grid-column: 2; grid-row: 1; align-self: end; padding: 0 0 4px 20px; border-top: 0; border-left: 1px dashed var(--ind-line); }
  .hp-industry .hp-industry-cases { grid-column: 2; grid-row: 2 / span 3; align-self: start; margin: 0 !important; padding: 4px 0 0 20px; border-left: 1px dashed var(--ind-line); height: 100%; }
}
@media (max-width: 767.98px) {
  .hp-page .hp-hero { padding: 40px 0 40px; }
  .hp-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 36px !important; }
  .hp-hero-stats li:nth-child(2) { border-right: 0; }
  .hp-hero-stats li:nth-child(-n+2) { border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .hp-takeover .hp-takeover-steps { grid-template-columns: 1fr; gap: 14px; }
  .hp-takeover-panel { padding: 22px 20px; }
  .hp-terms { grid-template-columns: 1fr; }
  .hp-flex-grid { gap: 16px; }
  .hp-cols-4 > li, .hp-cols-3 > li { width: 100%; }
  .hp-partner-logos { gap: 12px; }
  .hp-partner-logos li { width: calc((100% - 24px) / 3); }
  .hp-partner-logos a { height: 76px; padding: 10px 12px; }
  .hp-partner-logos img { max-height: 44px; }
}

/* --- Print --------------------------------------------------------------- */
@media print {
  .hp-bridge, .hp-takeover .ind-hero-actions { display: none !important; }
  .hp-page .hp-hero { padding: 0 0 12pt; }
  .hp-hero-stats, .hp-takeover { background: none !important; color: #000; border: 1px solid #bbb; }
  .hp-hero-stat-value, .hp-hero-stat-label, .hp-takeover h2, .hp-takeover p, .hp-takeover h3, .hp-terms dt, .hp-terms dd { color: #000 !important; }
}
