/* Homepage typography (from 智晶半导体_specs.json) */

body[data-page="home"] {
  --container-width: var(--container-width-narrow);
}

:root {
  --about-margin-top: 5.625rem;
  --about-header-spacing: 2.1875rem;
  --about-header-border-width: 2px;
  --about-inner-gap: 5rem;
  --about-main-gap: 3rem;
  --about-more-margin-top: 2.75rem;
  --about-features-margin-top: 4.125rem;

  --features-padding-x: 2rem;
  --features-item-gap: 1rem;
  --features-item-padding-x: 1.25rem;
  --features-label-size: 1.25rem;

  --products-header-margin-bottom: 3rem;
}

/* ============================================================
   Hero Banner
   ============================================================ */

.hero {
  position: relative;
  height: var(--banner-height);
  overflow: hidden;
  background: #08244c;
}

.hero__viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero__track {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
}

.hero__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.hero__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__scroll {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.hero__scroll:hover,
.hero__scroll:focus-visible {
  opacity: 1;
}

.hero__scroll-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.3125rem;
  height: 3.3125rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

.hero__scroll img {
  width: 1.4375rem;
  height: 0.9375rem;
  object-fit: contain;
}

.hero__controls {
  position: absolute;
  bottom: 3rem;
  right: 9.75rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.hero__arrow img {
  width: 1.0625rem;
  height: 1.25rem;
  object-fit: contain;
}

.hero__arrow--prev img {
  transform: rotate(180deg);
}

.hero__arrow:hover,
.hero__arrow:focus-visible {
  opacity: 1;
}

.hero__dots {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero__dot {
  font-family: var(--font-family-roboto);
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  padding: 0.25rem 0.125rem;
  line-height: 1;
  transition: color 0.2s ease, font-size 0.2s ease;
}

.hero__dot:hover,
.hero__dot:focus-visible {
  color: rgba(255, 255, 255, 0.85);
}

.hero__dot--active {
  color: var(--color-text-inverse);
  font-weight: 500;
  font-size: 2.5625rem;
}

/* ============================================================
   Section Header
   ============================================================ */

.section-header {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.5rem;
  row-gap: 1rem;
}

.section-header__body {
  display: contents;
}

.section-header__icon {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  flex-shrink: 0;
  margin-right: 0.9375rem;
  width: 1.9375rem;
  height: 2rem;
  object-fit: contain;
}

.section-header__title {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-family: var(--font-family-base);
  font-size: 1.875rem;
  font-weight: 400;
  color: var(--color-brand-primary);
  line-height: 1.4;
}

.section-header__subtitle {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-family: var(--font-family-base);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.4;
}

/* ============================================================
   About
   ============================================================ */

.about {
  scroll-margin-top: var(--header-height);
  margin-top: var(--about-margin-top);
  padding-bottom: var(--spacing-section-y);
  background-color: var(--color-bg-page);
  background-image: url("../img/home/about/about-bg.png");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% auto;
}

.about__header {
  padding-bottom: var(--about-header-spacing);
  margin-bottom: var(--about-header-spacing);
  border-bottom: var(--about-header-border-width) solid #f3f3f3;
}

.about__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: var(--about-inner-gap);
  width: 100%;
}

.about__main.container {
  flex: 0 1 auto;
  width: var(--container-width);
  max-width: calc(100% - var(--about-building-width) - var(--about-inner-gap));
  margin-left: 0;
  margin-right: 0;
  display: flex;
  flex-direction: column;
  /* gap: var(--about-main-gap); */
}

.about__content {
  width: fit-content;
  max-width: 100%;
}

.about__text {
  margin-top: 0;
}

.about__text p {
  font-family: var(--font-family-base);
  font-size: 1.125rem;
  color: var(--color-text-primary);
  line-height: 1.722;
  text-align: justify;
}

.about__text p+p {
  margin-top: 1rem;
}

.about__more {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 13.125rem;
  height: 3.3125rem;
  margin-top: var(--about-more-margin-top);
  padding: 0 1rem;
  border: 0;
  border-radius: 1.65625rem;
  background: var(--color-brand-accent);
  font-family: var(--font-family-base);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-inverse);
  text-decoration: none;
  transition: background 0.2s ease;
}

.about__more:hover,
.about__more:focus-visible {
  background: var(--color-brand-accent-hover);
}

.about__more-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 1.125rem;
  object-fit: contain;
}

.about__media {
  flex: 0 0 var(--about-building-width);
  width: var(--about-building-width);
  min-width: 0;
  margin-left: auto;
  margin-right: 0;
}

.about__building {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 970 / 547;
  border-radius: var(--about-building-radius) 0 0 0;
  object-fit: cover;
}

/* Features bar (inside about section) */
.about__features {
  margin-top: var(--about-features-margin-top);
}

.features__inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  height: var(--features-height);
  padding: 0 var(--features-padding-x);
  background: var(--color-bg-feature);
  border-radius: 0.75rem;
}

.features__item {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--features-item-gap);
  width: 100%;
  min-width: 0;
  padding: 0 var(--features-item-padding-x);
  box-sizing: border-box;
}

.features__item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 1px;
  height: var(--features-divider-height);
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%);
}

.features__icon {
  flex-shrink: 0;
  width: var(--features-icon-width);
  height: var(--features-icon-height);
  object-fit: contain;
  object-position: center;
}

.features__label {
  font-family: var(--font-family-base);
  font-size: var(--features-label-size);
  font-weight: 500;
  color: var(--color-text-inverse);
  white-space: nowrap;
}

/* ============================================================
   Products
   ============================================================ */

.products {
  scroll-margin-top: var(--header-height);
  margin-top: var(--spacing-section-y);
  padding-bottom: var(--spacing-section-y);
  background: var(--color-bg-page);
}

.products__header {
  margin-bottom: var(--products-header-margin-bottom);
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(3, 30.5rem);
  justify-content: space-between;
  row-gap: 2.5rem;
  column-gap: var(--spacing-grid-gap);
}

.product-card {
  position: relative;
  width: 30.5rem;
  height: 26.75rem;
  border-radius: 0.75rem;
  overflow: hidden;
}

.product-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2.375rem 2.1875rem;
  pointer-events: none;
}

.product-card__arrow-wrap {
  position: relative;
  flex-shrink: 0;
  display: block;
  width: 2.625rem;
  height: 2.625rem;
  margin-top: 2.1875rem;
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.product-card__arrow-wrap:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 2px;
  border-radius: 50%;
}

.product-card__arrow {
  display: block;
  width: 2.625rem;
  height: 2.625rem;
  object-fit: contain;
}

.product-card__arrow--hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.product-card__arrow--default {
  transition: opacity 0.25s ease;
}

.product-card:hover .product-card__arrow--default,
.product-card__arrow-wrap:hover .product-card__arrow--default,
.product-card__arrow-wrap:focus-visible .product-card__arrow--default {
  opacity: 0;
}

.product-card:hover .product-card__arrow--hover,
.product-card__arrow-wrap:hover .product-card__arrow--hover,
.product-card__arrow-wrap:focus-visible .product-card__arrow--hover {
  opacity: 1;
}

.product-card__title {
  margin-top: 0;
  font-family: var(--font-family-base);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-inverse);
  line-height: 1.4;
}

.product-card__desc {
  margin-top: 0.9375rem;
  font-family: var(--font-family-base);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-inverse);
  line-height: 1.6;
  text-align: justify;
}

/* Footer & back-top styles: see common.css */

