/*
 * About Us component styles.
 *
 * Page-scoped to the About Us template and loaded only on /about-us/ by
 * about-us/about-us.php. Depends on the design tokens in site.css.
 *
 * The hero is the shared `.hero-frame` from site.css (photograph, magenta arc
 * and real heading, all placed from the same 1440 x 503 frame as the Contact
 * Us, Careers and Blogs heroes), so this file adds no hero geometry at all.
 * See docs/HERO_BANNER_METHOD.md.
 *
 * The company introduction itself is not markup here: it is the page's own
 * stored content, rendered by `core/post-content`. These rules only set its
 * measure, rhythm and type.
 */

/* ------------------------------------------------------------------ *
 * Company introduction
 *
 * The copy is six long paragraphs, so the column is narrowed to the theme's
 * existing readable-copy measure (54rem, the same token the homepage
 * philosophy copy uses) instead of the full 1280px container. Without a Figma
 * measurement for this section this is the design-system-derived value; change
 * the single --container override to move it.
 * ------------------------------------------------------------------ */
.about-intro { padding-block: clamp(3rem, 6vw, 6rem); }
.about-intro .container { --container: 54rem; }
.about-intro p { margin: 0 0 1.5rem; font-size: 1rem; line-height: 1.7; }
.about-intro > .container > .wp-block-post-content > :last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ *
 * Core Values
 *
 * Card layout is deliberately not the product-category card: the icon and the
 * title share the top row (icon right, title left) and the description fills
 * the middle. The visual language is shared — white card, 1px pink-to-peach
 * gradient border, 16px radius — through the same padding-box/border-box
 * gradient the homepage's world card and secondary buttons already use.
 *
 * The markup order is icon, title, description so the heading precedes its
 * copy for assistive technology and in the no-CSS fallback. The last grid row
 * is the title's old line box, kept empty so the card height and the
 * description's vertical centre stay exactly as they were.
 * ------------------------------------------------------------------ */
.about-values__intro { max-width: 54rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.about-values__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-value-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr) calc(1.5rem * 1.2);
  gap: clamp(1rem, 1.6vw, 1.5rem);
  column-gap: 0;
  padding: clamp(1.5rem, 2vw, 2rem);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--gradient) border-box;
  transition: box-shadow .3s ease-in-out;
}
/* Subtle lift only: a shadow deepens, nothing moves, so there is no motion to
   suppress under prefers-reduced-motion. */
.about-value-card:hover { box-shadow: var(--shadow); }

/* One square icon box on every card, so a row of cards keeps the description
   and the title on the same lines whatever ratio the artwork has. */
.about-value-card__icon {
  grid-row: 1;
  grid-column: 2;
  justify-self: end;
  width: clamp(3.25rem, 4.2vw, 4.5rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.about-value-card__title {
  grid-row: 1;
  grid-column: 1;
  align-self: start;
  justify-self: start;
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.about-value-card__description {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 0;
  font-size: .95rem;
  line-height: 1.6;
  text-align: left;
}

/* ------------------------------------------------------------------ *
 * Certifications
 * ------------------------------------------------------------------ */
.about-certificates__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: clamp(2rem, 4vw, 3.5rem) 0 0;
  padding: 0;
  list-style: none;
}

.about-certificate { display: flex; }

.about-certificate__link {
  display: grid;
  width: 100%;
  grid-template-rows: auto 1fr auto;
  gap: .85rem;
  padding: clamp(1rem, 1.4vw, 1.25rem);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: inherit;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--gradient) border-box;
  text-decoration: none;
  transition: box-shadow .3s ease-in-out;
}
.about-certificate__link:hover { box-shadow: var(--shadow); }

/* A fixed preview window with `contain`: a certificate is never cropped, and
   every card in the row keeps the same height whatever ratio its scan has.
   The window is capped in height rather than derived from the card width,
   because certificate scans are portrait A4 — a 3:4 box would make every card
   taller than a laptop viewport. (No Figma measurement or reference screenshot
   was supplied for this section; this is the design-system-derived value.) */
.about-certificate__media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(15rem, 22vw, 20rem);
  overflow: hidden;
  border-radius: calc(var(--radius) - 6px);
  background: #fdf7fa;
}
.about-certificate__media img { display: block; width: 100%; height: 100%; object-fit: contain; }

.about-certificate__document { width: 34%; height: auto; color: var(--pink); }

.about-certificate__title { margin: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.about-certificate__description { margin: 0; font-size: .95rem; line-height: 1.55; }
.about-certificate__note { margin: 0; color: var(--muted); font-size: .8rem; }

.about-certificate__action {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  align-self: end;
  color: var(--pink);
  font-size: .95rem;
  font-weight: 700;
}
.about-certificate__arrow { font-size: 1.05rem; line-height: 1; }

.about-certificates__empty {
  max-width: 54rem;
  margin: 0 auto;
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* ------------------------------------------------------------------ *
 * Certificate viewer
 *
 * The enquiry dialog's own card from get-in-touch/style.css, sized for a
 * document instead of a form — the same popup, one modifier. Its close button,
 * heading and backdrop behaviour come from that shared card; Escape is native
 * to <dialog>. about-us.js points the frame at the chosen PDF when a card is
 * activated, so no certificate is fetched until someone opens one.
 * ------------------------------------------------------------------ */
.contact-dialog--pdf {
  width: min(1040px, calc(100% - 2rem));
  max-height: min(92vh, 860px);
  max-height: min(92dvh, 860px);
}
.contact-dialog__pdf { display: block; width: 100%; height: clamp(16rem, 58vh, 620px); border: 0; border-radius: 6px; background: #fdf7fa; }
/* The standfirst rule for a dialog's paragraphs is a bottom margin; this one
   sits under the viewer, so it takes a top margin instead. */
.contact-dialog > .contact-dialog__open { margin: clamp(8px, 1.2vw, 14px) 0 0; font-size: .95rem; font-weight: 700; }
.contact-dialog__open a { color: var(--pink); }

/* ------------------------------------------------------------------ *
 * Responsive. Existing theme breakpoints: 1024 (tablet) and 720 (phone).
 * Cards keep their natural height — descriptions are never truncated to
 * force a row to match.
 * ------------------------------------------------------------------ */
@media (max-width: 1024px) {
  .about-values__grid,
  .about-certificates__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .about-values__grid,
  .about-certificates__grid { grid-template-columns: minmax(0, 1fr); }
  .about-value-card { padding: 1.5rem; grid-template-rows: auto minmax(0, 1fr) calc(1.25rem * 1.2); }
  .about-value-card__title { font-size: 1.25rem; }
  .about-values__intro { text-align: left; }
}
