/* Change order phase 2: the new sections on existing pages (team teaser,
   About record and quote band, footer, quote form). Loaded with the pages
   preview; see althea_pages_on() in inc/pages.php. */
@layer theme {
  /* Team teaser, homepage */
  .team__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 28px; align-items: start; }
  .team__title { grid-column: 1 / span 5; }
  .team__body { grid-column: 7 / span 6; display: grid; gap: 28px; justify-items: start; }
  .team__body .lede { max-width: 52ch; color: var(--fg); }
  .team + .cta { border-top: 0; }

  /* About: proof strip footnote, quote band */
  .stats__note { margin-top: 28px; font-size: var(--t-xs); line-height: 1.5; color: var(--fg-2); }
  .quote__fig { margin-inline: auto; max-width: 980px; }
  .quote__text { margin: 0; }
  .quote__text p { font-family: var(--head); font-size: var(--t-h2); line-height: 1.3; font-weight: 500; letter-spacing: -.01em; text-wrap: balance; }
  .quote__text p::before { content: "\201C"; }
  .quote__text p::after { content: "\201D"; }
  .quote__by { margin-top: 28px; font-size: var(--t-s); color: var(--fg-2); }
  .quote__by b { color: var(--fg); font-weight: 600; }

  /* Quote form */
  .field--file input[type="file"] { padding: 12px 0; font: inherit; font-size: var(--t-s); }
  .field__hint { font-size: var(--t-xs); line-height: 1.5; color: var(--fg-2); max-width: 60ch; }
  .contact__blk a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

  /* Footer */
  .foot--v2 .foot__hire { padding-bottom: clamp(32px, 4vw, 48px); margin-bottom: clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--rule); }
  .foot__hire p { font-size: var(--t-lede); line-height: 1.4; }
  .foot__hire a { font-weight: 600; white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
  .foot__co { display: grid; gap: 10px; align-content: start; font-size: var(--t-s); color: var(--fg-2); }
  .foot__co address { font-style: normal; }
  .foot__motto { font-family: var(--head); font-weight: 600; color: var(--fg); }
  .foot__legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
  .foot__legal a:hover { text-decoration: underline; text-underline-offset: 3px; }

  @media (max-width: 960px) {
    .team__title, .team__body { grid-column: 1 / -1; }
  }
}

/* With the brand: gold accents per AP-MKT-002. */
@layer brand {
  .foot--v2 .foot__hire a, .foot--v2 .foot__motto { color: var(--gold); }
  .foot--v2 .foot__legal a:hover { color: var(--gold); }
  .quote .quote__text p::before, .quote .quote__text p::after { color: var(--gold); }
  .contact__blk a:hover { color: var(--gold-text); }
}

/* Phase 3: the new pages ------------------------------------------------ */
@layer theme {
  /* Editor-only review notes. Never rendered for visitors. */
  .pending { margin: 0 0 28px; padding: 12px 16px; border: 1px dashed color-mix(in srgb, var(--ink) 35%, transparent); background: color-mix(in srgb, var(--gold, #D9A21B) 10%, transparent); font-size: var(--t-s); line-height: 1.5; color: var(--fg); max-width: 80ch; }
  .band--dark .pending { border-color: rgba(255, 255, 255, .35); }

  /* A heading or label on the left, content on the right. */
  .split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 20px; align-items: start; }
  .split > :first-child { grid-column: 1 / span 5; }
  .split__body { grid-column: 7 / span 6; }
  .split--top { margin-top: clamp(40px, 5vw, 72px); padding-top: 24px; border-top: 1px solid var(--rule); }
  .split__label { color: var(--fg-2); }
  .split .checks { margin-top: 0; padding-top: 0; border-top: 0; }
  .pills { display: flex; flex-wrap: wrap; gap: 8px; }
  .pills li { padding: 8px 14px; border: 1px solid var(--rule); font-size: var(--t-s); line-height: 1.3; }
  .inline-cta { margin-top: clamp(40px, 5vw, 64px); font-size: var(--t-lede); }
  .inline-cta a { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; white-space: nowrap; }

  /* Leadership */
  .leaders__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.4vw, 36px); align-items: start; }
  .leader { display: grid; gap: 16px; }
  .leader__photo img, .leader__photo .slot { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
  .leader__head { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: start; }
  .leader__name { font-size: var(--t-h3); line-height: 1.3; }
  .leader__role { grid-column: 1; font-size: var(--t-s); color: var(--fg-2); }
  .leader__in { grid-column: 2; grid-row: 1 / span 2; display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--rule); color: var(--fg); }
  .leader__in:hover { border-color: var(--fg); }
  .leader__bio { border-top: 1px solid var(--rule); padding-top: 12px; }
  .leader__bio summary { cursor: pointer; font-weight: 600; font-size: var(--t-s); list-style: none; display: flex; justify-content: space-between; align-items: center; }
  .leader__bio summary::-webkit-details-marker { display: none; }
  .leader__bio summary::after { content: "+"; font-size: 1.25rem; line-height: 1; }
  .leader__bio[open] summary::after { content: "\2212"; }
  .leader__bio p { margin-top: 12px; font-size: var(--t-s); line-height: 1.6; color: var(--fg-2); }

  /* Safety: five commitments */
  .commit { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 1.4vw, 20px); margin-top: clamp(40px, 5vw, 64px); counter-reset: none; }
  .commit__card { display: grid; align-content: start; gap: 10px; padding: clamp(18px, 2vw, 26px); border: 1px solid var(--rule); background: var(--bg); }
  .commit__n { color: var(--fg-2); }
  .commit__title { font-size: var(--t-h3); line-height: 1.3; }
  .commit__card p { font-size: var(--t-s); line-height: 1.55; color: var(--fg-2); }

  /* Quality: plan-do-check-act */
  .pdca { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 32px; align-items: center; margin-top: clamp(40px, 5vw, 64px); }
  .pdca__wheel { grid-column: 1 / span 5; width: 100%; max-width: 360px; height: auto; }
  .pdca__seg { fill: var(--ink); stroke: var(--surface, #F4F5F7); stroke-width: 3; }
  .pdca__seg--0 { fill: var(--ink); }
  .pdca__seg--1 { fill: color-mix(in srgb, var(--ink) 82%, white); }
  .pdca__seg--2 { fill: color-mix(in srgb, var(--ink) 66%, white); }
  .pdca__seg--3 { fill: color-mix(in srgb, var(--ink) 50%, white); }
  .pdca__wheel text { fill: #FFFFFF; font-family: var(--head, var(--font)); font-size: 13px; font-weight: 600; }
  .pdca__wheel .pdca__core { fill: var(--fg); font-size: 13px; letter-spacing: .12em; }
  .pdca__list { grid-column: 7 / span 6; display: grid; gap: 22px; }
  .pdca__item { border-top: 1px solid var(--rule); padding-top: 14px; }
  .pdca__item dt { font-family: var(--head, var(--font)); font-size: 1.125rem; font-weight: 600; }
  .pdca__item dd { margin-top: 6px; font-size: var(--t-s); line-height: 1.55; color: var(--fg-2); max-width: 54ch; }

  /* Careers */
  .groups__grid--2 { grid-template-columns: 1fr 1fr; }
  .group__note { margin-top: 14px; font-size: var(--t-s); color: var(--fg-2); }

  /* Partners: registration form */
  .register__grid { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(32px, 6vw, 120px); align-items: start; }
  .field--set { border: 0; padding: 0; margin: 0; }
  .ticks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; margin-top: 10px; }
  .tick { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-s); line-height: 1.4; cursor: pointer; }
  .tick input { margin-top: 3px; accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
  .partners__note { margin-top: 18px; color: var(--fg-2); }

  /* Licenses */
  .ltable { width: 100%; max-width: 860px; border-collapse: collapse; font-size: var(--t-s); }
  .ltable th { text-align: left; font-family: var(--mono); font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
  .ltable td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); }

  @media (max-width: 1100px) {
    .commit { grid-template-columns: repeat(3, 1fr); }
  }
  @media (max-width: 960px) {
    .split > :first-child, .split__body, .pdca__wheel, .pdca__list { grid-column: 1 / -1; }
    .leaders__grid { grid-template-columns: 1fr 1fr; }
    .register__grid { grid-template-columns: 1fr; }
  }
  @media (max-width: 640px) {
    .leaders__grid, .commit, .groups__grid--2, .ticks { grid-template-columns: 1fr; }
  }
}

@layer brand {
  .commit__card { border-top: 2px solid var(--gold); }
  .pdca__seg--0 { fill: var(--brand-black); }
  .pdca__seg--1 { fill: var(--charcoal); }
  .pdca__seg--2 { fill: #3A3F47; }
  .pdca__seg--3 { fill: var(--gold-text); }
  .inline-cta a:hover, .leader__in:hover { color: var(--gold-text); }
  .tick input { accent-color: var(--gold-text); }
}

/* Line to Load in photographs (phase 4): one photo per stage, crossfaded,
   with a thin gold rail for progress through the five stages. */
@layer theme {
  .chain__photo { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease); }
  .chain__photo.is-on { opacity: 1; }
  .chain__img { width: 100%; height: 100%; object-fit: cover; }
  .chain__photo .chain__img { transform: scale(1.04); transition: transform 1.6s var(--ease); }
  .chain__photo.is-on .chain__img { transform: none; }
  .chain[data-photos] .chain__grad {
    background:
      linear-gradient(90deg, rgba(11, 11, 11, .88) 0%, rgba(11, 11, 11, .62) 42%, rgba(11, 11, 11, .12) 100%),
      linear-gradient(180deg, rgba(11, 11, 11, .45) 0%, transparent 30%);
  }
  .chain__rail { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .12); }
  .chain__fill { display: block; height: 100%; width: 100%; background: var(--live); transform: scaleX(var(--p, 0)); transform-origin: left; }
  @media (max-width: 960px) {
    .chain[data-photos] .chain__grad {
      background: linear-gradient(180deg, rgba(11, 11, 11, .35) 0%, transparent 25%), linear-gradient(180deg, transparent 28%, rgba(11, 11, 11, .86) 60%, rgba(11, 11, 11, .96) 100%);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .chain__photo, .chain__photo .chain__img { transition: none; transform: none; }
  }
}

/* Employee login (The Line) in the header: quiet, before the quote button. */
@layer brand {
  .nav__portal {
    display: inline-flex; align-items: center; gap: 7px; margin-right: 6px; padding: 8px 6px;
    font-family: var(--head); font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    color: var(--mist); text-decoration: none; white-space: nowrap; transition: color var(--mo-ui) var(--ease);
  }
  .nav__portal:hover, .nav__portal:focus-visible { color: var(--gold); }
  @media (max-width: 960px) { .nav__portal { order: 9; padding: 14px 0; margin: 0; } }
}

/* ISO 9001 wheel from Althea's 11/13 package: its colours are its own. */
@layer theme {
  .pdca__iso { grid-column: 1 / span 5; width: 100%; max-width: 420px; height: auto; }
  @media (max-width: 960px) { .pdca__iso { grid-column: 1 / -1; max-width: 340px; margin-inline: auto; } }
}
