/* ==========================================================================
   JALON THAILAND — OUR STORY (About us)
   Page-specific only; load after jalon-shell.css.

   1. Company intro       4. Factory composition
   2. Global industries   5. China headquarters
   3. Certification       6. News + partners     7. Responsive

   Geometry is transcribed from the .fig at 1440 with the 1280 content
   column, so every offset below is a real design value.
   ========================================================================== */

/* Shared: the tinted gold eyebrow pill (.fig: 41px tall, radius 10) */
.story-eyebrow {
  display: inline-flex; align-items: center; height: 41px; padding: 0 25px;
  border-radius: 10px; background: rgba(238,179,13,.1);
  font-size: var(--fs-body); line-height: 1; text-transform: uppercase; color: var(--gold);
}
.story-eyebrow--light { background: rgba(255,255,255,.15); color: #FFFFFF; }

/* 1. Company intro -------------------------------------------------------
   .fig: content column 80→702 (622 wide), scientist 741→1336 (595 × 769).
   The portrait bleeds past the container, so the section clips instead of
   the image being boxed. */
.company-intro { position: relative; padding: 100px 0 0; overflow: hidden; background: #EEEEEE; }
.company-intro__content { padding-bottom: 39px; }
.company-intro__grid {
  display: grid; grid-template-columns: 622px minmax(0, 1fr); gap: 39px; align-items: start;
}
.company-intro__title { margin-top: 26px; font-size: var(--fs-h2); font-weight: 700; line-height: 1.1; }
.company-intro__copy { margin-top: var(--sp-24); color: var(--ink-soft); line-height: 26px; text-wrap: pretty; }
.company-intro__copy b { font-weight: 700; }

/* Two info cards, 306 × 301, radius 10, hairline #D9D9D9 */
.fact-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 44px; }
.fact-card {
  padding: 32px 30px; border-radius: 10px;
  background: var(--surface); box-shadow: inset 0 0 0 1px #D9D9D9;
}
/* Left card: three hex-badge rows separated by #F3EFE9 hairlines */
.fact-list { display: grid; }
.fact-list li { display: grid; grid-template-columns: 71px 1fr; gap: 20px; align-items: center; padding: 7px 0; }
.fact-list li + li { border-top: 1px solid var(--hairline); }
.fact-list__badge {
  display: grid; place-items: center; width: 71px; height: 71px;
  background: var(--muted); color: #FFFFFF;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
/* height auto: the .fig's factory glyph is 27.965 × 23.629, not square */
.fact-list__badge img { width: 34px; height: auto; }
.fact-list__label {
  font-family: Rubik, "DM Sans", sans-serif; font-size: var(--fs-body); font-weight: 700; line-height: 24px;
}
.fact-list__label span { display: block; font-weight: 400; }

.fact-card__heading { font-size: 20px; font-weight: 700; line-height: 25px; }
.fact-card__rule { width: 57px; height: 3px; margin: 27px 0 0; background: var(--gold); }
.fact-card__copy { margin-top: 27px; line-height: 26px; }
.fact-card .btn {
  margin-top: 21px; height: 65px; width: 100%;
  padding: 0 14px 0 22px; gap: 10px; justify-content: space-between;
  font-size: 15px; white-space: nowrap;
}

/* Scientist + the white name plate hexagon (273 × 273, gold glow) */
.company-intro__portrait { position: relative; align-self: end; margin: 0; pointer-events: none; }
.company-intro__portrait img { width: 100%; max-width: none; height: auto; }
/* Every placed artwork on this page scales by width; without height:auto the
   width/height attributes win and the image stretches. */
.global__map, .factory__composition, .company-intro__portrait img { height: auto; }
.company-intro__plate {
  position: absolute; left: 2.857%; top: 57.35%;
  display: grid; place-content: center; width: 45.882%; aspect-ratio: 1; height: auto;
  text-align: center; background: var(--surface);
  filter: drop-shadow(0 0 10px rgba(238,179,13,.5));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.company-intro__plate p { font-size: 20px; font-weight: 700; line-height: 25px; }

/* 2. Global industries ---------------------------------------------------
   Dark band; the supplied map artwork carries its own markers. */
.global {
  position: relative; overflow: hidden;
  padding: 62px 0 68px; background: var(--grey-panel); color: #FFFFFF;
}
.global::before {
  content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background: url(./figma/assets/about-map-texture.png) center / cover no-repeat;
}
.global .container { position: relative; z-index: 1; }
.global__head { display: grid; grid-template-columns: 480px minmax(0, 1fr); gap: 80px; align-items: start; }
.global__title { margin-top: 22px; font-size: var(--fs-h2); font-weight: 700; line-height: 1.15; }
.global__copy { margin-top: 60px; line-height: 26px; color: rgba(255,255,255,.92); }
.global__copy p + p { margin-top: var(--sp-24); }
/* .fig: 1274.9 × 708.4 at 40% opacity, bled 2.5px outside the container */
.global__map {
  display: block; width: 100%; height: auto; margin: 18px 0 0; opacity: .4;
}
.global__stats { display: flex; gap: 44px; margin-top: -84px; }
.global__stat { min-width: 202px; }
.global__stat-eyebrow { font-size: var(--fs-small); text-transform: uppercase; color: rgba(255,255,255,.8); }
.global__stat-figure { font-size: 120px; font-weight: 700; line-height: 1; }
.global__stat-label { font-size: 20px; line-height: 1.2; }

/* 3. Certification -------------------------------------------------------
   Gold band, vertical label, one horizontal row of certificate cards.
   The row is a grid, so adding a certificate needs no other change. */
.certification { position: relative; padding: 60px 0; background: var(--gold-grad); }
.certification__inner { display: grid; grid-template-columns: 49px minmax(0, 1fr); gap: 32px; align-items: center; }
.certification__label {
  writing-mode: vertical-rl; transform: rotate(180deg);
  justify-self: start; align-self: center;
  font-size: 49px; font-weight: 700; line-height: 1; color: #FFFFFF;
}
/* The .fig's explicit tracks: four 216px portraits then the 289px landscape
   D-U-N-S card, all on one row. auto-fit collapsed the fifth track to 0 and
   pushed the wide card onto a second row. */
.certification__row {
  display: grid; grid-template-columns: repeat(4, 216px) 289px;
  gap: 8px; align-items: center; justify-content: space-between;
}
/* contain, not cover: a cropped certificate is unreadable, and the .fig's own
   105% crop only worked because its cards matched the artwork's aspect. */
.certificate {
  display: block; height: 295px; border-radius: 10px;
  background: #FFFFFF center / contain no-repeat;
}
/* The DUNS registration is landscape, so it keeps its own aspect */
.certificate--wide { height: 214px; }

/* 4. Factory composition -------------------------------------------------
   The .fig delivers this collage as one art-directed 1277 × 1021 artwork —
   it is placed, not rebuilt, so the composition can never drift. */
.factory { padding: var(--sp-96) 0; }
.factory__title { font-size: var(--fs-h2); font-weight: 700; text-align: center; }
.factory__composition { display: block; width: 100%; height: auto; margin-top: 44px; }

/* 5. China headquarters --------------------------------------------------
   .fig: gold panel with a hexagonal right edge behind a 1151 × 690 photo
   that sits to its right, the two overlapping across the seam. */
.headquarters { position: relative; padding: 96px 0 108px; overflow: hidden; }
/* .fig geometry: the gold body ends at x=540 in the 1440 frame and the point
   tips at x=740 — a 200px point, not a half-section triangle. The container's
   content starts at 50% - 640px, so the tip is 20px right of centre. */
.headquarters__panel {
  position: absolute; left: 0; top: 0; bottom: 0; width: calc(50% + 20px); z-index: 1;
  background: var(--gold);
  clip-path: polygon(0 0, calc(100% - 200px) 0, 100% 50%, calc(100% - 200px) 100%, 0 100%);
}
/* .fig: the photo starts at x=531, i.e. 451px into the 1280 content column */
.headquarters__grid {
  position: relative;
  display: grid; grid-template-columns: 451px minmax(0, 1fr); align-items: center; gap: 0;
}
.headquarters__content { position: relative; z-index: 2; padding: 40px 36px 40px 0; text-align: center; color: #FFFFFF; }
.headquarters__title { font-size: var(--fs-h2); font-weight: 700; line-height: 1.05; }
.headquarters__copy { margin-top: var(--sp-32); font-size: var(--fs-small); line-height: 24px; }
.headquarters__copy p + p { margin-top: var(--sp-24); }
/* The .fig's white dividing line under the copy, above the CTA */
.headquarters__rule { width: 100%; height: 1px; margin: var(--sp-32) 0; background: rgba(255,255,255,.6); }
.headquarters .btn--light { height: 65px; padding: 0 25px; color: var(--gold); }
/* Sits UNDER the gold point, as the .fig layers it, and bleeds to the
   viewport edge (the .fig crops it at 1682 in a 1440 frame). */
.headquarters__media {
  position: relative; z-index: 0;
  height: 690px; border-radius: 10px;
  /* Full bleed right: cancel the container's padding plus whatever margin the
     capped container leaves against the viewport, so the photo always runs to
     the window's edge however wide the screen is. */
  width: auto;
  margin-right: calc(-1 * var(--sp-24) - max(0px, (100vw - (var(--container) + 2 * var(--sp-24))) / 2));
  border-radius: 10px 0 0 10px;
  background: url(./figma/assets/about-hq.png) 83% 100% / cover no-repeat;
}

/* 6. News + partners ----------------------------------------------------- */
.news { padding: 0 0 var(--sp-96); }
.news__title { font-size: var(--fs-h2); font-weight: 700; text-align: center; }
.news .article-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 44px; }
.news .article-card__category { color: var(--gold); text-decoration: underline; }
.news .article-card__meta-sep { margin: 0 6px; color: #C9C9C9; }
.news .article-card__title a { color: inherit; }
.news .article-card__title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}

.partners { padding: 0 0 var(--sp-96); }
.partners__head { display: grid; grid-template-columns: 486px minmax(0, 1fr); gap: 185px; align-items: start; }
.partners__title { font-size: var(--fs-h2); font-weight: 900; line-height: 1.1; }
.partners__intro { color: var(--body); line-height: 26px; text-wrap: pretty; }
.partners__rule { height: 1px; margin: 45px 0 var(--sp-32); background: var(--hairline); }
/* .fig: 237 × 138 cards with a #F3EFE9 hairline, five to a row (5 × 237 + 4 ×
   23.75 = 1280, the content column exactly). Flex rather than grid so the last row
   centres — a grid would left-align it. Fewer per row as the column narrows,
   with no breakpoint of its own. */
.partner-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 23.75px; }
/* flex, not grid: in a grid card the auto row is sized BY the logo, so a
   percentage cap on the image resolves against itself and never clamps. The
   card's height is definite, so in flex the cap resolves against the card. */
.partner-grid li {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; width: 237px; max-width: 100%; height: 138px; padding: 18px; overflow: hidden;
  border-radius: 10px; box-shadow: inset 0 0 0 1px var(--hairline); background: var(--surface);
}
.partner-grid img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

/* 7. Responsive ---------------------------------------------------------- */
@media (max-width: 1279px) {
  .company-intro__grid { grid-template-columns: minmax(0, 1fr) 420px; gap: var(--sp-32); }
  .company-intro__plate p { font-size: 17px; line-height: 22px; }
  .global__head { grid-template-columns: 380px minmax(0, 1fr); gap: var(--sp-48); }
  .global__stats { margin-top: -48px; }
  .global__stat-figure { font-size: 92px; }
  .headquarters__panel { width: calc(50% + 20px); clip-path: polygon(0 0, calc(100% - 150px) 0, 100% 50%, calc(100% - 150px) 100%, 0 100%); }
  .headquarters__grid { grid-template-columns: 380px minmax(0, 1fr); }
  .headquarters__media { height: 560px; }
  .partners__head { grid-template-columns: 420px minmax(0, 1fr); gap: var(--sp-64); }
}

@media (max-width: 1024px) {
  .company-intro { padding-top: 72px; padding-bottom: 0; }
  .company-intro__content { padding-bottom: 0; }
  /* Portrait moves under the copy and keeps its name plate */
  .company-intro__grid { grid-template-columns: minmax(0, 1fr); }
  /* "Full width" means the column, not the viewport — once stacked, the
     portrait needs its own cap or it dwarfs the copy above it. */
  /* Feet on the section's bottom edge here too — no trailing padding */
  .company-intro__portrait { align-self: auto; max-width: 440px; margin: var(--sp-32) 0 0; justify-self: center; }
  .company-intro__grid { row-gap: 0; }

  .global__head { grid-template-columns: minmax(0, 1fr); gap: var(--sp-24); }
  .global__copy { margin-top: 0; }
  .global__map { opacity: .5; }
  .global__stats { margin-top: var(--sp-24); }
  .global__stat-figure { font-size: 72px; }

  .certification__inner { grid-template-columns: minmax(0, 1fr); gap: var(--sp-24); }
  /* Label turns horizontal once the row wraps */
  .certification__label { writing-mode: horizontal-tb; transform: none; font-size: 34px; }
  .certification__row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); justify-content: start; }
  .certificate--wide { grid-column: span 2; }
  .certificate { height: 240px; }
  .certificate--wide { height: 240px; }

  /* The gold panel becomes a full-width band with the point at the bottom */
  .headquarters { padding: 0 0 var(--sp-64); }
  .headquarters__panel {
    left: 0; right: 0; width: auto; bottom: auto; height: 620px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 60px), 50% 100%, 0 calc(100% - 60px));
  }
  .headquarters__grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-32); padding-top: 64px; }
  /* The right padding is there to clear the desktop point; centred text in a
     full-width panel must not carry it. */
  .headquarters__content { padding: 40px 0; }
  /* One-sided bleed reads as a mistake next to a centred panel */
  .headquarters__media { width: 100%; margin-right: 0; height: 380px; border-radius: 10px; }

  .news .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partners__head { grid-template-columns: minmax(0, 1fr); gap: var(--sp-24); }
  .partner-grid { gap: var(--sp-16); }
  .partner-grid li { width: 200px; height: 112px; }
  @media (max-width: 560px) {
    /* Two up rather than one — a single column of logo cards is a long scroll */
    .partner-grid li { width: calc((100% - var(--sp-16)) / 2); height: 96px; padding: 12px; }
  }
}

@media (max-width: 768px) {
  .fact-cards { grid-template-columns: minmax(0, 1fr); }
  .company-intro__portrait { max-width: 340px; }
  .company-intro__plate { left: 2.857%; top: 57.35%; width: 52%; }
  .company-intro__plate p { font-size: 15px; line-height: 20px; }
  .global__stats { flex-direction: column; gap: var(--sp-24); }
  .global__stat-figure { font-size: 60px; }
  .certificate, .certificate--wide { height: 200px; }
  .headquarters__panel { height: 560px; }
  .news .article-grid { grid-template-columns: minmax(0, 1fr); max-width: 460px; margin-inline: auto; }
}

@media (max-width: 480px) {
  .story-eyebrow { height: 34px; padding: 0 16px; font-size: var(--fs-small); }
  .fact-list li { grid-template-columns: 56px 1fr; gap: 14px; }
  .fact-list__badge { width: 56px; height: 56px; }
  .fact-list__badge img { width: 26px; height: 26px; }
  .certificate, .certificate--wide { height: 168px; }
  .certification__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .headquarters__media { height: 260px; }
}
