@layer tmh.tokens, tmh.base, tmh.layout, tmh.components, tmh.utilities;
@layer tmh.layout {
  .tmh-skip { position: absolute; left: var(--tmh-space-4); top: -4rem; z-index: var(--tmh-z-skip); padding: var(--tmh-space-3) var(--tmh-space-4); background: var(--tmh-navy-700); color: var(--tmh-paper-50); }
  .tmh-skip:focus { top: var(--tmh-space-3); }

  .tmh-header { --tmh-hdr-fg: var(--tmh-navy-700); --tmh-hdr-cta-bg: var(--tmh-navy-700); --tmh-hdr-cta-fg: var(--tmh-paper-50); position: fixed; top: 0; left: 0; right: 0; color: var(--tmh-hdr-fg); transition: background-color var(--tmh-dur-base), color var(--tmh-dur-base); z-index: var(--tmh-z-header); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--tmh-space-5); padding: var(--tmh-space-3) var(--tmh-gutter); background: color-mix(in srgb, var(--tmh-paper-50) 97%, transparent); backdrop-filter: blur(8px); }
  /* No border: a soft fade below the bar appears only once the page has scrolled under it */
  .tmh-header::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 1.75rem; background: linear-gradient(to bottom, rgb(20 25 46 / 0.07), rgb(20 25 46 / 0.025) 45%, rgb(20 25 46 / 0)); pointer-events: none; opacity: 0; transition: opacity var(--tmh-dur-base) var(--tmh-ease-out); }
  .tmh-header[data-tmh-scrolled]::before { opacity: 1; }
  .tmh-header__nav { justify-self: center; }
  .tmh-header__cta { justify-self: end; }

  .tmh-section { padding: var(--tmh-section-y) var(--tmh-gutter); background: var(--tmh-bg); color: var(--tmh-fg); }
  .tmh-surface--navy { background: var(--tmh-navy-700); color: var(--tmh-paper-50); --tmh-bg: var(--tmh-navy-700); --tmh-fg: var(--tmh-paper-50); --tmh-fg-muted: var(--tmh-line-300); --tmh-accent: var(--tmh-gold-500); --tmh-surface: var(--tmh-navy-500); --tmh-hair: var(--tmh-navy-400); --tmh-focus: var(--tmh-paper-50); }

  /* Hero: text on the left, a small photograph on the right; the rest is open paper */
  /* Hero: full-bleed photograph, content left, header floats over it */
  .tmh-hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: 100svh; padding: 9rem var(--tmh-gutter) 8rem; background: var(--tmh-navy-700); color: var(--tmh-paper-50); overflow: hidden; }
  .tmh-hero__bg, .tmh-hero__scrim { position: absolute; inset: 0; z-index: -1; }
  .tmh-hero__body { position: relative; display: grid; gap: var(--tmh-space-6); max-width: 46rem; justify-items: start; }

  /* Globe (vision): text, then the map. With the live script the section becomes a tall track and the map pins (both columns pin on wide screens) */
  .tmh-globe { --tmh-globe-top: 5.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--tmh-space-7); }
  .tmh-globe__text { display: grid; gap: var(--tmh-space-5); align-content: start; max-width: 38rem; }
  .tmh-globe__map { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: var(--tmh-space-5); min-width: 0; }
  .tmh-globe__still, .tmh-globe__canvas { grid-area: 1 / 1; display: block; width: 100%; min-height: 0; }
  .tmh-globe__still { aspect-ratio: 1; }
  .tmh-globe[data-tmh-globe-live] { grid-template-rows: auto minmax(220svh, auto); }
  .tmh-globe[data-tmh-globe-live] .tmh-globe__map { position: sticky; top: var(--tmh-globe-top); align-self: start; height: calc(100svh - var(--tmh-globe-top) - var(--tmh-space-4)); }
  .tmh-globe[data-tmh-globe-live] .tmh-globe__still, .tmh-globe__canvas { height: 100%; aspect-ratio: auto; }
  @media (min-width: 60rem) {
    .tmh-globe { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--tmh-space-8); align-items: center; }
    .tmh-globe__still { aspect-ratio: 4 / 3; }
    .tmh-globe[data-tmh-globe-live] { grid-template-rows: minmax(300svh, auto); }
    .tmh-globe[data-tmh-globe-live] .tmh-globe__text { position: sticky; top: var(--tmh-globe-top); align-self: start; height: calc(100svh - var(--tmh-globe-top) - var(--tmh-space-4)); align-content: center; }
  }

  .tmh-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tmh-areas__top { display: grid; grid-template-columns: minmax(0, 28rem) minmax(0, 1fr); gap: var(--tmh-space-5) var(--tmh-space-8); align-items: end; margin-bottom: var(--tmh-section-y); }

  /* Column count steps up with the screen; each photo is as wide as its column (capped), so photos grow and shrink with the viewport */
  .tmh-team__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--tmh-space-8) var(--tmh-space-7); }
  @media (min-width: 40rem) { .tmh-team__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 56rem) { .tmh-team__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (min-width: 80rem) { .tmh-team__list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
  @media (min-width: 112rem) { .tmh-team__list { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
  @media (min-width: 144rem) { .tmh-team__list { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

  .tmh-training { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--tmh-space-7) var(--tmh-space-8); align-items: stretch; }
  .tmh-footer { display: grid; grid-template-columns: minmax(12rem, 1.1fr) minmax(0, 2fr) minmax(8rem, 0.8fr) minmax(0, 1.2fr); gap: var(--tmh-space-7) var(--tmh-space-8); padding: var(--tmh-space-9, 6rem) var(--tmh-gutter) var(--tmh-space-6); }
  .tmh-footer__legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--tmh-space-3) var(--tmh-space-6); padding-top: var(--tmh-space-5); border-top: var(--tmh-hairline) solid var(--tmh-hair); }

  @media (max-width: 60rem) {
    .tmh-training, .tmh-areas__top { grid-template-columns: minmax(0, 1fr); }
    .tmh-footer { grid-template-columns: minmax(0, 1fr); }
    .tmh-testimonials { grid-template-columns: minmax(0, 1fr); }
    .tmh-pillars { grid-template-columns: minmax(0, 1fr); }
    .tmh-header { grid-template-columns: auto 1fr; }
    .tmh-header__cta { display: none; }
    .tmh-header { max-height: 100dvh; overflow-y: auto; }
  }
}
