/* ==========================================================================
   Tech4TIME — pages/about.css
   Styles for /pages/about/. Mirrors the NextJS about route's structure:
   a hero banner, five alternating image/text sections, the specialties grid,
   the "Why Us?" grid and a closing CTA.
   ========================================================================== */

/* The `.page-hero` banner this page opens with is shared by every inner page,
   so it lives in layout.css rather than here. */

/* --------------------------------------------------------------------------
   1. Section header with the silver rule
   The NextJS source sets an 80x4px accent bar under each heading; here it is
   the silver gradient rather than a flat colour.
   -------------------------------------------------------------------------- */

.about-section__header {
  margin-block-end: var(--space-lg);
}

.about-section__title {
  margin-block-end: var(--space-xs);
  font-size: var(--text-2xl);
}

.about-section__rule {
  width: 5rem;
  height: 4px;
  background-image: var(--silver-gradient-fill);
  border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------------
   2. Image + text sections
   -------------------------------------------------------------------------- */

.about-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 56.25em) {
  .about-split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  /* Alternate which side the artwork sits on. The NextJS source names two
     classes for this but applies its `order` rule to a non-grid child, so the
     alternation never takes effect there; it is implemented properly here. */
  .about-split--reverse .about-split__media {
    order: 2;
  }
}

.about-split__media {
  overflow: hidden;
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* The live site's illustrations are square black-and-white line art. They are
   contained rather than cropped — cover would slice the top and bottom off a
   square drawing — inside a 4:3 box so the rows do not become excessively tall.
   The plate stays white in both modes, since the art is dark line work. */
.about-split__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
  padding: var(--space-sm);
  background-color: var(--artwork-plate);
}

/* The Company section shows the wordmark rather than an illustration, so it
   sits on the themed surface instead of a white plate. */
.about-split__image--contain {
  padding: var(--space-xl);
  background-color: var(--bg-surface);
}

.about-split__text {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

.about-split__text > * + * {
  margin-block-start: var(--space-sm);
}

/* --------------------------------------------------------------------------
   3. Specialties
   -------------------------------------------------------------------------- */

/* The no-JavaScript fallback layout for the slideshow: the grid this section
   used to be. slider.js switches the track to a sliding row once it is ready;
   see section 11 of components.css. */
.specialties__slider {
  --slider-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
}

/* One specialty now has the whole width, which is more width than a paragraph
   should be given: past about 62 characters a line is hard to track back from.
   So the card is two columns — what it is on the left, what it means on the
   right — rather than one column of text with half the card left empty.

   min-height: 100% because every slide is as tall as the tallest, and a card
   that does not fill its slide leaves a gap under it. */
.specialties__slider .specialty-card {
  min-height: 100%;
  padding: var(--space-xl);
}

@media (min-width: 52em) {
  .specialties__slider .specialty-card {
    display: grid;
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: var(--space-2xl);
    align-items: start;
  }

  .specialties__slider .specialty-card__icon {
    grid-column: 1;
    grid-row: 1;
  }

  .specialties__slider .specialty-card__title {
    grid-column: 1;
    grid-row: 2;
  }

  .specialties__slider .specialty-card__text {
    grid-column: 2;
    grid-row: 1 / -1;
    max-width: 62ch;
  }
}

.specialty-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-lg);
  background-color: var(--bg-elevated);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition:
    transform var(--duration) var(--ease-out),
    border-color var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out);
}

.specialty-card:hover {
  transform: translateY(-4px);
  border-color: var(--silver-accent-mid);
  box-shadow: var(--shadow);
}

.specialty-card__icon {
  display: grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  margin-block-end: var(--space-2xs);
  font-size: 1.5rem;
  color: var(--accent-text);
  background-color: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius);
  transition:
    color var(--duration) var(--ease-out),
    background-color var(--duration) var(--ease-out);
}

.specialty-card:hover .specialty-card__icon {
  color: var(--on-accent);
  background-image: var(--silver-gradient-fill);
  border-color: transparent;
}

.specialty-card__title {
  font-size: var(--text-lg);
}

.specialty-card__text {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   4. Why Us
   -------------------------------------------------------------------------- */

.why-us__grid {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
}

.why-us-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  background-color: var(--bg-elevated);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius);
  transition:
    transform var(--duration) var(--ease-out),
    border-color var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out);
}

.why-us-card:hover {
  transform: translateY(-3px);
  border-color: var(--silver-accent-mid);
  box-shadow: var(--shadow-sm);
}

.why-us-card__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.125rem;
  color: var(--accent-text);
  background-color: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.why-us-card__title {
  margin-block-end: var(--space-3xs);
  font-size: var(--text-base);
  font-weight: 650;
}

.why-us-card__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* The closing CTA band is the shared `.cta-band` component. */
