/* =====================================================================
   TEXRON — Beranda & Halaman Statis
   Dimuat setelah style.css dan layout.css
   ===================================================================== */

/* ---------------------------------------------------------------------
   HERO
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: clamp(420px, 62vh, 620px);
  display: flex;
  align-items: center;
  background: var(--brand-blue-900);
  overflow: hidden;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .7s var(--ease);
}
.hero__slide.is-active { opacity: 1; visibility: visible; }

.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg,
    rgba(1, 26, 77, .94) 0%,
    rgba(2, 47, 127, .82) 42%,
    rgba(2, 47, 127, .28) 100%);
}

/* Motif kotak miring dari logo, sebagai ornamen latar */
.hero__pattern {
  position: absolute;
  inset: 0;
  opacity: .14;
  background-image:
    linear-gradient(115deg, transparent 46%, var(--brand-red) 46%, var(--brand-red) 50%, transparent 50%),
    linear-gradient(115deg, transparent 64%, var(--brand-yellow) 64%, var(--brand-yellow) 68%, transparent 68%);
  background-size: 260px 100%;
}

.hero__inner { position: relative; z-index: 2; width: 100%; padding-block: var(--sp-8); }
.hero__content { max-width: 680px; }

.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand-yellow);
  margin-bottom: var(--sp-3);
}

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  color: #fff;
  margin-bottom: var(--sp-4);
  text-wrap: balance;
}

.hero__text {
  font-size: var(--fs-lg);
  color: rgba(255, 255, 255, .84);
  margin-bottom: var(--sp-6);
  max-width: 56ch;
}

.hero__actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* Titik navigasi slider */
.hero__dots {
  position: absolute;
  left: 0; right: 0; bottom: var(--sp-5);
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
}
.hero__dots button {
  width: 34px; height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .35);
  transition: background-color .2s var(--ease);
}
.hero__dots button.is-active { background: var(--brand-yellow); }
.hero__dots button:hover { background: rgba(255, 255, 255, .7); }

/* ---------------------------------------------------------------------
   BARIS ANGKA / KEUNGGULAN
   --------------------------------------------------------------------- */
.value-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.value-item {
  background: var(--surface);
  padding: var(--sp-5);
  text-align: center;
}
.value-item__icon {
  width: 42px; height: 42px;
  margin: 0 auto var(--sp-3);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-blue);
}
.value-item__icon svg { width: 100%; height: 100%; }
.value-item__title {
  font-family: var(--font-head);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--sp-1);
}
.value-item__text { font-size: var(--fs-sm); color: var(--ink-muted); margin: 0; }

/* ---------------------------------------------------------------------
   KARTU KATEGORI
   --------------------------------------------------------------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}

.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .2s var(--ease);
}
.cat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--brand-blue);
  transition: background-color .2s var(--ease);
}
.cat-card:hover {
  border-color: var(--brand-blue-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.cat-card:hover::before { background: var(--brand-red); }

.cat-card__name {
  font-family: var(--font-head);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.cat-card__count { font-size: var(--fs-sm); color: var(--ink-muted); }
.cat-card__arrow {
  margin-top: auto;
  padding-top: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--brand-blue);
}

/* ---------------------------------------------------------------------
   KARTU INDUSTRI
   --------------------------------------------------------------------- */
.ind-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}

.ind-card {
  position: relative;
  display: block;
  min-height: 210px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--brand-blue);
  color: #fff;
}
.ind-card img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.ind-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(1, 26, 77, .92) 12%, rgba(2, 47, 127, .35) 70%, transparent 100%);
}
.ind-card:hover img { transform: scale(1.06); }

.ind-card__body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: var(--sp-4);
}
.ind-card__name {
  font-family: var(--font-head);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 2px;
}
.ind-card__text {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, .78);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}
.ind-card:hover .ind-card__name { color: var(--brand-yellow); }

/* ---------------------------------------------------------------------
   PITA AJAKAN
   --------------------------------------------------------------------- */
.cta-band {
  position: relative;
  background: var(--brand-blue);
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(115deg, transparent 48%, var(--brand-red) 48%, var(--brand-red) 52%, transparent 52%),
    linear-gradient(115deg, transparent 66%, var(--brand-yellow) 66%, var(--brand-yellow) 70%, transparent 70%);
  background-size: 240px 100%;
}
.cta-band__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
  padding-block: var(--sp-7);
}
.cta-band h2 { color: #fff; margin-bottom: var(--sp-2); }
.cta-band p { color: rgba(255, 255, 255, .8); margin: 0; max-width: 58ch; }
.cta-band__actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; flex: none; }

/* ---------------------------------------------------------------------
   LINIMASA (halaman Tentang Kami)
   --------------------------------------------------------------------- */
.timeline { position: relative; padding-left: var(--sp-6); }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--brand-red), var(--brand-yellow), var(--brand-blue));
}

.timeline__item { position: relative; padding-bottom: var(--sp-6); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: '';
  position: absolute;
  left: calc(var(--sp-6) * -1 + 1px);
  top: 7px;
  width: 14px; height: 14px;
  background: var(--surface);
  border: 3px solid var(--brand-blue);
  border-radius: 50%;
}
.timeline__item:hover::before { border-color: var(--brand-red); }

.timeline__year {
  display: inline-block;
  font-family: var(--font-head);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--brand-red);
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.timeline__title {
  font-family: var(--font-head);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--sp-1);
}
.timeline__text { font-size: var(--fs-sm); color: var(--ink-muted); margin: 0; }

/* ---------------------------------------------------------------------
   SERTIFIKAT
   --------------------------------------------------------------------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--sp-4);
}
.cert-card {
  display: flex;
  flex-direction: column;
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
}
.cert-card__img {
  height: 150px;
  margin-bottom: var(--sp-3);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-alt);
  border-radius: var(--radius);
  overflow: hidden;
}
.cert-card__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cert-card__name { font-weight: 600; color: var(--ink); }
.cert-card__meta { font-size: var(--fs-sm); color: var(--ink-muted); }

/* ---------------------------------------------------------------------
   PUSAT UNDUHAN
   --------------------------------------------------------------------- */
.dl-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-4);
  border-bottom: 1px solid var(--line-soft);
}
.dl-row:last-child { border-bottom: 0; }
.dl-row:hover { background: var(--surface-alt); }

.dl-row__media {
  aspect-ratio: 1 / 1;
  background: var(--surface-alt);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.dl-row__media img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.dl-row__name { font-weight: 600; color: var(--ink); }
.dl-row__meta { font-size: var(--fs-sm); color: var(--ink-muted); }
.dl-row__links { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ---------------------------------------------------------------------
   RESPONSIF
   --------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .cat-grid, .ind-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .value-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .cat-grid, .ind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { min-height: 440px; }
  .hero__text { font-size: var(--fs-base); }
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------------
   DUA KOLOM DI LAYAR KECIL

   Satu kolom membuat halaman sangat panjang untuk disusuri. Dua kolom
   menampung lebih banyak dalam sekali pandang, dengan jarak dan ukuran
   teks yang dirapatkan supaya tidak terasa sesak.
   --------------------------------------------------------------------- */
@media (max-width: 560px) {
  .cat-grid, .ind-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-3);
  }
  .value-row { grid-template-columns: repeat(2, 1fr); }

  /* Keunggulan */
  .value-item { padding: var(--sp-4) var(--sp-3); }
  .value-item__icon { width: 34px; height: 34px; margin-bottom: var(--sp-2); }
  .value-item__title { font-size: var(--fs-base); }
  .value-item__text { font-size: var(--fs-xs); line-height: 1.5; }

  /* Kategori */
  .cat-card { padding: var(--sp-4) var(--sp-3); gap: 2px; }
  .cat-card__name { font-size: var(--fs-base); }
  .cat-card__count { font-size: var(--fs-xs); }
  .cat-card__arrow { padding-top: var(--sp-2); font-size: var(--fs-xs); }

  /* Industri */
  .ind-card { min-height: 150px; }
  .ind-card__body { padding: var(--sp-3); }
  .ind-card__name { font-size: var(--fs-base); }
  .ind-card__text { font-size: var(--fs-xs); -webkit-line-clamp: 2; line-clamp: 2; }

  .hero__actions .btn, .cta-band__actions .btn { width: 100%; }
  .dl-row { grid-template-columns: 48px minmax(0, 1fr); }
  .dl-row__links { grid-column: 1 / -1; }
  .timeline { padding-left: var(--sp-5); }
  .timeline__item::before { left: calc(var(--sp-5) * -1 + 1px); }
}

/* Layar paling sempit: kartu industri dan sertifikat kembali satu kolom
   karena gambarnya butuh lebar agar masih bermakna. */
@media (max-width: 380px) {
  .ind-grid { grid-template-columns: 1fr; }
}
