/*
 * Jump Education — style.css
 *
 *  1. Tokens          8. Training (course index, photo band)   15. Contacts
 *  2. Base            9. Coaching                              16. Footer
 *  3. Utilities      10. HR Management                         17. Dialogs and course pages
 *  4. Buttons        11. Slogan                                18. Motion
 *  5. Header         12. About
 *  6. Menu           13. Gallery and lightbox
 *  7. Hero, doors    14. Books and articles
 *
 * Colours, type sizes and spacing are tokens in :root: change them there.
 */

/* 1. Tokens */
:root {
  color-scheme: light;

  --bg: #fff;
  --ink: #1d1d1f;
  --muted: #626266;
  --line: #e6e6e8;
  --brand: #0b2747; /* logo navy: titles, buttons, dark bands */
  --brand-ink: #061a33; /* button hover */
  --brand-soft: #eaf0f6; /* tinted backgrounds */
  --accent: #3894c5; /* logo sky blue: accents only, too light for small text on white */
  --on-brand: #fff;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;

  --t-title: clamp(36px, 4.4vw, 56px); /* section titles, slogan, page titles */
  --t-index: clamp(26px, 3vw, 40px); /* photo band quote */
  --t-sub: clamp(21px, 1.9vw, 24px); /* card and list titles, quotes, phone numbers */
  --t-body: clamp(18px, calc(12px + 0.45vw), 19px); /* running text */
  --t-small: 16px; /* captions, meta, chips */
  --t-label: 12.5px; /* uppercase labels */

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-gap: clamp(16px, 2.2vw, 32px); /* between cards in a grid */
  --sp-gutter: clamp(24px, 4vw, 64px); /* between columns */
  --sp-block: clamp(40px, 5vw, 64px); /* between blocks inside a section */
  --sp-section: clamp(48px, 5.5vw, 76px); /* top and bottom of a section */

  --wrap: 1680px; /* content width */
  --gut: clamp(16px, 4.5vw, 80px); /* side margins */
  --r: 14px; /* card radius */
}

/* 2. Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--t-body) / 1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
p {
  margin: 0;
  text-wrap: pretty;
}
li {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
strong {
  font-weight: 650;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 3. Utilities */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.nw {
  white-space: nowrap;
}
.br-m {
  display: none;
}
.skip {
  position: absolute;
  top: 8px;
  left: -999px;
  z-index: 100;
  padding: var(--sp-2) var(--sp-4);
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
}
.skip:focus {
  left: 12px;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.ico {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  color: var(--brand);
}
@media (max-width: 900px) {
  .br-m {
    display: inline;
  }
}

/* 4. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 0 var(--sp-5);
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 var(--t-body) / 1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.btn-solid {
  background: var(--brand);
  color: var(--on-brand);
}
.btn-white {
  background: var(--on-brand);
  color: var(--brand-ink);
}
@media (hover: hover) {
  .btn-solid:hover {
    background: var(--brand-ink);
  }
}

/* 5. Header: transparent over the hero, white once the page scrolls past it */
.site-head {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  transition:
    background-color 0.35s ease,
    box-shadow 0.35s ease;
}
.site-head.solid {
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.head-in {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  max-width: var(--wrap);
  min-height: 84px;
  margin-inline: auto;
  padding-inline: var(--gut);
}
.brand {
  display: flex;
  flex: none;
  align-items: center;
  text-decoration: none;
}
.brand svg {
  --lt: var(--brand); /* lettering colour of the logo symbol */
  display: block;
  width: auto;
  height: 70px;
}
.site-head:not(.solid) .brand svg {
  --lt: #fff;
}

/* The menu is lowered to line up with the "ump" lettering, not with the whole logo box.
   The menu button stays in the middle of the bar. */
.nav {
  position: relative;
  top: 11px;
  display: flex;
  align-items: center;
  gap: clamp(18px, 1.7vw, 30px);
  margin-left: auto;
}
.nav a {
  padding: var(--sp-2) 0;
  border-bottom: 1.5px solid transparent;
  color: var(--brand);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    color 0.35s ease,
    fill 0.35s ease;
}
.nav a[aria-current] {
  border-bottom-color: var(--brand);
}
@media (hover: hover) {
  .nav a:hover {
    border-bottom-color: var(--brand);
  }
}
.site-head:not(.solid) .nav a {
  border-bottom-color: transparent;
  color: #fff;
}
.site-head:not(.solid) .nav a:not(.nav-cta) {
  text-shadow: 0 1px 3px rgba(6, 26, 51, 0.45);
}
.nav a.nav-cta {
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  transition:
    background-color 0.35s ease,
    color 0.35s ease;
}
@media (hover: hover) {
  .nav a.nav-cta:hover {
    background: var(--brand-ink);
  }
}
.site-head:not(.solid) .nav a.nav-cta {
  background: #fff;
  color: var(--brand);
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-left: auto;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition:
    color 0.35s ease,
    fill 0.35s ease;
}
.menu-btn svg {
  width: 26px;
  height: 26px;
}
.site-head:not(.solid) .menu-btn {
  color: #fff;
}

/* the full menu needs 1400px; below that, the menu button */
@media (max-width: 1399px) {
  .nav {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
  }
}
@media (min-width: 1081px) {
  .head-in {
    min-height: 100px;
  }
  .brand svg {
    height: 84px;
  }
}
@media (max-width: 600px) {
  .head-in {
    min-height: 72px;
  }
  .brand svg {
    height: 60px;
  }
}

/* 6. Menu (full screen, below 1400px) */
.mnav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: 100%;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  visibility: hidden;
  transition:
    transform 0.42s cubic-bezier(0.22, 0.8, 0.24, 1),
    visibility 0s linear 0.42s;
}
.mnav.open {
  transform: none;
  visibility: visible;
  transition:
    transform 0.42s cubic-bezier(0.22, 0.8, 0.24, 1),
    visibility 0s;
}
.mnav-scrim {
  position: fixed;
  inset: 0;
  z-index: 59;
  background: rgba(20, 16, 12, 0.38);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.42s ease,
    visibility 0s linear 0.42s;
}
.mnav.open + .mnav-scrim {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.42s ease,
    visibility 0s;
}
.mnav-top {
  justify-content: space-between;
}
.mnav-in {
  display: flex;
  flex-direction: column;
  padding-block: var(--sp-3);
}
.mnav-in a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--line);
  color: var(--brand);
  font: 600 var(--t-sub) / 1.2 var(--serif);
  text-decoration: none;
}
.mnav-in a span {
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.mnav-in svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
}
.mnav-in a .ico {
  width: 1.45em;
  height: 1.45em;
}
.mnav-foot {
  display: grid;
  gap: var(--sp-5);
  padding-block: var(--sp-6) var(--sp-7);
}
.mnav-slogan {
  color: var(--muted);
  font: italic 400 var(--t-sub) / 1.35 var(--serif);
}
.mnav-slogan .accent {
  color: var(--brand);
}
@media (min-width: 1400px) {
  .mnav,
  .mnav-scrim {
    display: none;
  }
}
@media (min-width: 901px) {
  .mnav-in {
    padding-block: var(--sp-6) 0;
  }
  .mnav-in a {
    padding: var(--sp-5) 0;
    font-size: clamp(28px, 3vw, 40px);
  }
  .mnav-in a .ico {
    width: 1.2em;
    height: 1.2em;
  }
  .mnav-in svg:not(.ico) {
    width: 28px;
    height: 28px;
  }
  .mnav-foot {
    grid-template-columns: 1fr auto;
    align-items: end;
    padding-block: var(--sp-block);
  }
  .mnav-slogan {
    font-size: clamp(22px, 2vw, 28px);
  }
}
@media (min-width: 901px) and (max-height: 820px) {
  .mnav-in {
    padding-block: var(--sp-3) 0;
  }
  .mnav-in a {
    padding: var(--sp-3) 0;
    font-size: clamp(24px, 2.6vw, 32px);
  }
  .mnav-foot {
    padding-block: var(--sp-6);
  }
}

/* 7. Hero: the painting fills the first screen, the words sit on a navy veil.
   On wide screens js/main.js places the headline and the three areas; on phones the layout is plain CSS. */
.hero {
  position: relative;
  min-height: max(100svh, 620px);
  margin-bottom: var(--sp-block);
  overflow: hidden;
  background: var(--brand);
  color: #fff;
}
.hero-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 34% at 27% 40%, rgba(11, 39, 71, 0.8), rgba(11, 39, 71, 0.5) 55%, rgba(11, 39, 71, 0)),
    linear-gradient(
      90deg,
      rgba(11, 39, 71, 0.86) 0%,
      rgba(11, 39, 71, 0.68) 24%,
      rgba(11, 39, 71, 0.28) 42%,
      rgba(11, 39, 71, 0) 56%
    ),
    linear-gradient(180deg, rgba(11, 39, 71, 0.65) 0%, rgba(11, 39, 71, 0) 20%);
}
.hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
}
.hero-copy {
  position: absolute;
  left: var(--gut);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero h1 {
  color: #fff;
  font-size: clamp(42px, 5.2vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-shadow:
    0 1px 3px rgba(11, 39, 71, 0.55),
    0 2px 28px rgba(11, 39, 71, 0.85);
}
.hero h1 .ln {
  display: block;
  white-space: nowrap;
}
.hero h1 i {
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 400;
}
.hero-svc {
  position: absolute;
  left: var(--gut);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.1vw, 16px);
  margin: 0;
  padding: 0;
  list-style: none;
  font: 600 clamp(18px, 1.6vw, 25px) / 1.15 var(--sans);
  transition:
    opacity 0.7s ease 0.25s,
    transform 0.7s ease 0.25s; /* entrance, see Motion */
}
.hero-svc a {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: #fff;
  text-decoration: none;
  text-shadow:
    0 1px 3px rgba(11, 39, 71, 0.6),
    0 1px 16px rgba(11, 39, 71, 0.95);
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s;
}
.hero-svc a:active {
  color: var(--accent);
}
@media (hover: hover) {
  .hero-svc a:hover {
    color: var(--accent);
  }
}
.hero-svc .ico {
  width: 1.55em;
  height: 1.55em;
  color: #fff;
}
@media (max-width: 900px) {
  .hero {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    padding-top: 72px;
  }
  .hero-art img {
    object-position: 46% 50%;
  }
  .hero-art::after {
    background: radial-gradient(
        95% 36% at 30% 24%,
        rgba(11, 39, 71, 0.82),
        rgba(11, 39, 71, 0.5) 55%,
        rgba(11, 39, 71, 0)
      ),
      linear-gradient(
        180deg,
        rgba(11, 39, 71, 0.65) 0%,
        rgba(11, 39, 71, 0) 22%,
        rgba(11, 39, 71, 0) 76%,
        rgba(11, 39, 71, 0.65) 100%
      );
  }
  .hero-grid {
    padding-top: var(--sp-5);
  }
  .hero-copy {
    position: static;
  }
  .hero h1 {
    font-size: clamp(40px, 10.5vw, 60px);
  }
  .hero h1 .ln {
    white-space: normal;
  }
  .hero-svc {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: auto var(--gut) var(--sp-6);
    font-size: clamp(13.5px, 3.7vw, 17px);
    line-height: 1.2;
    text-align: center;
  }
  .hero-svc li {
    display: flex;
    justify-content: center;
  }
  .hero-svc a {
    flex-direction: column;
    gap: 8px;
    padding: 2px 4px;
    text-shadow:
      0 1px 3px rgba(11, 39, 71, 0.6),
      0 1px 12px rgba(11, 39, 71, 0.95);
  }
  .hero-svc .ico {
    width: 2.3em;
    height: 2.3em;
  }
}
/* phone on its side: little height, the words need a full veil */
@media (max-width: 900px) and (orientation: landscape) {
  .hero-art::after {
    background: rgba(11, 39, 71, 0.74);
  }
}

/* The three doors under the hero */
.doors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-gap);
  padding-block: var(--sp-2) var(--sp-5);
}
.door {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  gap: var(--sp-2) var(--sp-4);
  color: inherit;
  text-decoration: none;
}
.door-media {
  grid-column: 1 / -1;
  margin-bottom: var(--sp-2);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r);
}
.door-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.door h2 {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  color: var(--brand);
  font-size: var(--t-sub);
}
.door-more {
  display: flex;
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  color: var(--brand);
}
.door-more svg {
  width: 24px;
  height: 24px;
  transition: transform 0.2s;
}
.door p {
  grid-column: 1 / -1;
  grid-row: 3;
  max-width: 34ch;
  color: var(--muted);
}
@media (hover: hover) {
  .door:hover .door-media img {
    transform: scale(1.04);
  }
  .door:hover .door-more svg {
    transform: translateX(4px);
  }
}
@media (max-width: 820px) {
  .doors {
    grid-template-columns: 1fr;
    row-gap: var(--sp-7);
  }
  .door-media {
    aspect-ratio: 16 / 10;
  }
}

/* Section frame, shared by every section */
.sec {
  padding-block: var(--sp-section);
}
.sec + .sec {
  padding-top: calc(var(--sp-section) * 0.5); /* two white sections in a row share the space */
}
#libri,
#reels {
  padding-bottom: calc(var(--sp-section) * 0.75);
}
.sec-head {
  display: grid;
  gap: var(--sp-3);
  margin-bottom: var(--sp-block);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.sec-title {
  margin: 0;
  color: var(--brand);
  font: 600 var(--t-title) / 1.04 var(--serif);
  letter-spacing: -0.02em;
}
.sec-title .ico {
  width: 1.1em;
  height: 1.1em;
  margin: -0.12em 0.3em 0 0;
}
.sec-sub {
  color: var(--muted);
  font: 500 var(--t-body) / 1.45 var(--sans);
  text-wrap: balance;
}
.kicker {
  margin: 0 0 var(--sp-4);
  color: var(--muted);
  font: 650 var(--t-label) / 1 var(--sans);
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

/* 8. Training: the four areas as an index, the picture beside each row */
.index {
  margin-top: calc(-1 * var(--sp-5));
}
.row {
  all: unset;
  position: relative;
  display: grid;
  grid-template-columns: clamp(96px, 14vw, 168px) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-gutter);
  box-sizing: border-box;
  width: 100%;
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.row:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 4px;
  border-radius: 6px;
}
.row-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: var(--line);
}
.row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.35);
  transition:
    filter 0.45s,
    transform 0.6s;
}
.row-body {
  display: grid;
  gap: var(--sp-2);
  min-width: 0;
}
.row-title {
  color: var(--brand);
  font: 600 var(--t-sub) / 1.12 var(--serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
  transition: color 0.3s;
}
.row-courses {
  color: var(--muted);
  font-size: var(--t-small);
  line-height: 1.5;
}
.row-courses span + span::before {
  content: "·";
  padding: 0 0.55em;
  color: var(--brand);
}
.row-end {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  white-space: nowrap;
}
.row-meta {
  color: var(--muted);
  font-size: var(--t-small);
  font-variant-numeric: tabular-nums;
}
.row .arr {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--brand);
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s,
    transform 0.3s;
}
.row .arr svg {
  width: 20px;
  height: 20px;
}
@media (hover: hover) {
  .row:hover .row-title {
    color: var(--accent);
  }
  .row:hover .row-media img {
    filter: none;
    transform: scale(1.05);
  }
  .row:hover .arr {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
    transform: translateX(4px);
  }
}
@media (max-width: 760px) {
  .row {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    grid-template-areas: "img title arr" "img meta arr";
    gap: var(--sp-1) var(--sp-4);
    padding-block: var(--sp-4);
  }
  .row-media {
    grid-area: img;
  }
  .row-media img {
    filter: none;
  }
  .row-body {
    grid-area: title;
    align-self: end;
  }
  .row-courses {
    display: none;
  }
  .row-end {
    display: contents;
  }
  .row-meta {
    grid-area: meta;
    align-self: start;
  }
  .row .arr {
    grid-area: arr;
    width: 40px;
    height: 40px;
  }
}

/* Photo band between Training and Coaching */
.photo-band {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(300px, 34vw, 440px);
  padding-block: var(--sp-section);
  overflow: hidden;
  color: #fff;
}
.photo-band-bg {
  position: absolute;
  inset: 0;
  margin: 0;
}
.photo-band-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 30%;
}
.photo-band-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 22, 0.62);
}
.photo-band .wrap {
  position: relative;
  z-index: 1;
  width: 100%;
}
.photo-band p {
  max-width: 28ch;
  padding-left: var(--sp-5);
  border-left: 2px solid var(--brand);
  font: 400 var(--t-index) / 1.25 var(--serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
@media (max-width: 760px) {
  .photo-band-bg img {
    object-position: 68% 40%;
  }
}

/* 9. Coaching */
.coach-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--sp-gutter);
}
.coach-text > p + p {
  margin-top: var(--sp-4);
}

/* The figures: on wide screens floated beside the text, whose lines follow their outline (shape-outside);
   below 900px under the area cards. Each layout shows its own copy of the picture. */
.coach-fig {
  position: relative;
  isolation: isolate;
  float: right;
  margin: 0 0 var(--sp-3) var(--sp-3);
  shape-outside: polygon(
    23.2% 0.6%,
    17.7% 1.2%,
    11.7% 2.9%,
    7.2% 5.9%,
    6.2% 8.3%,
    6.9% 11.6%,
    9.8% 14.8%,
    14.6% 17.4%,
    21.7% 19.2%,
    18.9% 21.1%,
    17.9% 23.1%,
    17.4% 27.6%,
    15.8% 31.3%,
    16.7% 36.2%,
    13.8% 37.7%,
    12.4% 39.9%,
    6.2% 42.7%,
    4.1% 45.3%,
    4.3% 48.3%,
    7.4% 51.8%,
    12.6% 54.3%,
    18.4% 55.6%,
    9.5% 58.6%,
    2.9% 62.3%,
    1% 64.3%,
    1.9% 66%,
    5.3% 67.1%,
    14.8% 66.1%,
    15% 72.1%,
    16.7% 74.8%,
    16% 76.3%,
    5% 84.6%,
    5% 87.6%,
    10.7% 93.2%,
    4.5% 94.6%,
    2.6% 96.2%,
    2.4% 97.9%,
    4.3% 98.8%,
    11% 99%,
    18.1% 98.6%,
    27.2% 97.1%,
    27.7% 94.6%,
    23.2% 88.6%,
    20.3% 86.8%,
    27.4% 83.4%,
    31.3% 82.4%,
    32% 87.1%,
    42.2% 94.4%,
    39.4% 96.6%,
    39.4% 98.7%,
    42.2% 99.3%,
    51.1% 99.3%,
    57.8% 98.2%,
    58.9% 97.6%,
    59.2% 95.9%,
    47.7% 85.1%,
    47.7% 83.9%,
    52% 77.7%,
    52.3% 75.4%,
    50.6% 72.7%,
    44.6% 67.1%,
    52.3% 65.6%,
    54.2% 63.6%,
    51.1% 60.7%,
    40.6% 55.2%,
    47% 46.7%,
    48.7% 38.6%,
    53% 37.2%,
    58.5% 37.4%,
    77.6% 48.4%,
    82.1% 52.1%,
    85% 53%,
    89% 52.7%,
    93.3% 51.1%,
    97.6% 48.1%,
    98.8% 45.8%,
    97.4% 43.7%,
    95% 42.6%,
    90.7% 42.1%,
    86.6% 43.1%,
    69.9% 30.6%,
    55.4% 22.6%,
    53.7% 19%,
    64.4% 15.6%,
    67.1% 13.7%,
    70.9% 12.4%,
    70.9% 10.3%,
    68% 9.2%,
    64.2% 8.8%,
    56.8% 9.6%,
    54.2% 10.8%,
    55.8% 12.2%,
    43.7% 15.1%,
    44.9% 10.4%,
    43.7% 7.4%,
    40.8% 4.4%,
    37.5% 2.6%,
    32.7% 1.1%,
    28.6% 0.6%
  );
  shape-margin: 14px;
}
.coach-fig img {
  width: auto;
  height: clamp(300px, 30vw, 440px);
}
.side-fig {
  display: none;
}
/* soft ground shadow under the feet */
.coach-fig::after,
.side-fig::after {
  content: "";
  position: absolute;
  bottom: -2.09%;
  left: -6%;
  z-index: -1;
  width: 74%;
  height: 5.3%;
  background: radial-gradient(19% 42% at 28.6% 50%, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0)),
    radial-gradient(16% 42% at 74.6% 50%, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0)),
    radial-gradient(closest-side, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0));
}

.cards {
  display: grid;
  gap: var(--sp-4);
}
.card {
  all: unset;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-1) var(--sp-4);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.card:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 3px;
}
@media (hover: hover) {
  .card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
  }
}
.card-ico {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 64px;
  height: 64px;
}
.card-title {
  grid-column: 2;
  color: var(--brand);
  font: 600 var(--t-sub) / 1.12 var(--serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.card-text {
  grid-column: 2;
  color: var(--muted);
  font-size: var(--t-small);
  text-wrap: pretty;
}
.card .arr {
  display: grid;
  grid-column: 3;
  grid-row: 1 / span 2;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}
.card .arr svg {
  width: 18px;
  height: 18px;
}
@media (min-width: 901px) {
  /* the label sits above the cards, so the first card lines up with the first line of text */
  .coach-side {
    position: relative;
  }
  .coach-side .kicker {
    position: absolute;
    bottom: 100%;
    left: 0;
  }
}
@media (max-width: 900px) {
  .coach-grid {
    grid-template-columns: 1fr;
  }
  .coach-fig {
    display: none;
  }
  .side-fig {
    position: relative;
    isolation: isolate;
    display: block;
    width: max-content;
    margin-top: var(--sp-5);
  }
  .side-fig img {
    width: auto;
    height: 300px;
  }
}
@media (min-width: 601px) and (max-width: 900px) {
  .side-fig img {
    height: 340px;
  }
}
@media (max-width: 600px) {
  .card {
    column-gap: var(--sp-3);
  }
  .card-ico {
    grid-row: 1;
    width: 46px;
    height: 46px;
  }
  .card-text {
    grid-column: 1 / 3;
  }
}

/* 10. HR Management */
.hr-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--sp-gutter);
}
.hr-words {
  display: grid;
  gap: var(--sp-4);
}
.hr-quote {
  margin: var(--sp-2) 0;
  padding-left: var(--sp-5);
  border-left: 2px solid var(--brand);
  color: var(--brand);
  font: italic 400 var(--t-sub) / 1.4 var(--serif);
}
.hr-photo {
  position: relative;
  min-height: 280px;
  margin: 0;
  overflow: hidden;
  border-radius: var(--r);
}
.hr-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
}
.hr-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0 var(--sp-gutter);
  margin-top: var(--sp-block);
}
.hr-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: var(--sp-1) var(--sp-4);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--line);
}
/* the dot is centred on the cap height of the first line of the title */
.hr-dot {
  --s: 0.34em;
  display: inline-block;
  width: var(--s);
  height: var(--s);
  margin-top: calc(0.8906em - 0.335em - var(--s) / 2);
  border-radius: 50%;
  background: var(--brand);
  font-size: var(--t-sub);
}
.hr-item h3 {
  color: var(--brand);
  font-size: var(--t-sub);
}
.hr-en {
  grid-column: 2;
  color: var(--muted);
  font-size: var(--t-small);
  font-style: italic;
}
.hr-item p {
  grid-column: 2;
  margin-top: var(--sp-1);
}
@media (max-width: 900px) {
  .hr-top,
  .hr-list {
    grid-template-columns: 1fr;
  }
  /* the photo joins the flow, with its own size */
  .hr-photo {
    max-width: 520px;
    min-height: 0;
  }
  .hr-photo img {
    position: static;
    height: auto;
    aspect-ratio: 16 / 11;
  }
}

/* 11. Slogan */
.slogan {
  padding-block: var(--sp-block) 0;
  overflow: hidden;
  background: var(--brand);
  color: #fff;
}
.slogan-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: center;
  gap: var(--sp-gutter);
}
.slogan p {
  font: 400 var(--t-title) / 1.15 var(--serif);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.slogan i {
  color: var(--accent);
}
.slogan-illu {
  align-self: end;
  margin: 0;
}
.slogan-illu img {
  width: 100%;
  max-width: 440px;
  height: auto;
  margin-left: auto;
}
@media (max-width: 760px) {
  .slogan-in {
    grid-template-columns: 1fr;
  }
  .slogan-illu img {
    max-width: 300px;
  }
}

/* 12. About */
.manifesto {
  column-gap: var(--sp-gutter);
  columns: 2;
}
.manifesto p {
  margin-bottom: var(--sp-4);
  break-inside: avoid;
}
.people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-gutter);
  margin-top: var(--sp-block);
}
.person {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: start;
  gap: var(--sp-5);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.person figure {
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
}
.person figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.person h3 {
  margin-bottom: var(--sp-3);
  color: var(--brand);
  font-size: var(--t-sub);
}
.person ul {
  display: grid;
  gap: var(--sp-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.person li {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  text-wrap: balance;
}
.person li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  transform: translateY(-3px);
}
@media (max-width: 900px) {
  .people {
    grid-template-columns: 1fr;
  }
}
/* where the list column would be narrow (phones, and two cards side by side on tablets):
   photo and name in a row, the list below at full width */
@media (max-width: 600px), (min-width: 901px) and (max-width: 1199px) {
  .person {
    grid-template-columns: 96px minmax(0, 1fr);
    row-gap: var(--sp-4);
  }
  .person > div {
    display: contents;
  }
  .person figure {
    grid-row: 1;
  }
  .person h3 {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0;
  }
  .person ul {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
@media (max-width: 760px) {
  .manifesto {
    columns: 1;
  }
}
@media (max-width: 460px) {
  .person {
    grid-template-columns: 84px minmax(0, 1fr);
    column-gap: var(--sp-4);
    padding: var(--sp-4);
  }
}

/* 13. Gallery and lightbox */
.g-item {
  all: unset;
  position: relative;
  display: block;
  box-sizing: border-box;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--brand-soft);
}
button.g-item {
  cursor: zoom-in;
}
button.g-item:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 3px;
}
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
@media (hover: hover) {
  button.g-item:hover img {
    transform: scale(1.04);
  }
}
/* gallery at the end of Training, Coaching, HR and Books and articles: one row that scrolls sideways,
   three photos at a time with arrows on computers and tablets, a strip to swipe on phones */
.gallery-strip {
  display: flex;
  gap: var(--sp-gap);
  /* 6px of padding all round, taken back by the margins: room for the focus ring, which the scrolling strip would cut */
  margin: calc(var(--sp-block) - 6px) -6px -6px;
  padding: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 6px;
  scrollbar-width: none;
}
.gallery-strip::-webkit-scrollbar {
  display: none;
}
.gallery-strip .g-item {
  flex: 0 0 calc((100% - 2 * var(--sp-gap)) / 3);
  scroll-snap-align: start;
}
.strip-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.strip-count {
  margin-right: var(--sp-2);
  color: var(--muted);
  font-size: var(--t-small);
  font-variant-numeric: tabular-nums;
}
.strip-nav button {
  all: unset;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--brand);
  cursor: pointer;
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s,
    opacity 0.3s;
}
.strip-nav button:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 3px;
}
.strip-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}
.strip-nav svg {
  width: 20px;
  height: 20px;
}
.strip-nav button:first-of-type svg {
  transform: scaleX(-1);
}
@media (hover: hover) {
  .strip-nav button:not(:disabled):hover {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
  }
}
@media (max-width: 600px) {
  .gallery-strip {
    gap: var(--sp-3);
    margin-inline: calc(-1 * var(--gut));
    padding-inline: var(--gut);
    scroll-padding-inline: var(--gut);
  }
  .gallery-strip:focus-visible {
    outline-offset: -3px;
  }
  .gallery-strip .g-item {
    flex-basis: 78%;
  }
  .strip-nav {
    margin-top: var(--sp-3);
  }
  .strip-nav button {
    display: none;
  }
}

.lb {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overscroll-behavior: none;
  background: rgba(6, 16, 30, 0.94);
  color: #fff;
}
.lb::backdrop {
  background: rgba(6, 16, 30, 0.94);
}
.lb-fig {
  position: absolute;
  inset: 64px 72px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--sp-3);
  margin: 0;
}
.lb-fig img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.lb-fig figcaption {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--t-small);
  text-align: center;
}
.lb button {
  all: unset;
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}
.lb button:focus-visible {
  outline: 2.5px solid #fff;
  outline-offset: 2px;
}
@media (hover: hover) {
  .lb button:hover {
    background: rgba(255, 255, 255, 0.24);
  }
}
.lb button svg {
  width: 22px;
  height: 22px;
}
.lb .lb-x {
  top: calc(env(safe-area-inset-top, 0px) + var(--sp-3));
  right: calc(env(safe-area-inset-right, 0px) + var(--sp-3));
}
.lb .lb-prev,
.lb .lb-next {
  top: 50%;
  transform: translateY(-50%);
}
.lb .lb-prev {
  left: var(--sp-3);
}
.lb .lb-next {
  right: var(--sp-3);
}
.lb .lb-prev svg {
  transform: scaleX(-1);
}
@media (max-width: 760px) {
  .lb-fig {
    inset: 64px var(--sp-3) 88px;
  }
  .lb .lb-prev,
  .lb .lb-next {
    top: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--sp-4));
    transform: none;
  }
  .lb .lb-prev {
    left: calc(50% - 60px);
  }
  .lb .lb-next {
    right: calc(50% - 60px);
  }
}
/* Reels: the covers of the videos on YouTube, each one a link that opens its video there in a new tab.
   Wide covers for the videos, upright ones for the Shorts, in the same strips as the photo galleries */
.reels-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.reels {
  margin-top: -6px;
}
.strip-nav + .kicker {
  margin-top: var(--sp-block);
}
.reel {
  position: relative; /* keeps the hidden "opens on YouTube" text inside the strip */
  display: grid;
  flex: 0 0 calc((100% - 2 * var(--sp-gap)) / 3);
  align-content: start;
  gap: var(--sp-3);
  border-radius: var(--r);
  color: inherit;
  text-decoration: none;
  scroll-snap-align: start;
}
.reels-short .reel {
  flex-basis: calc((100% - 3 * var(--sp-gap)) / 4);
}
.reel-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--brand-soft);
}
.reels-short .reel-media {
  aspect-ratio: 9 / 16;
}
.reel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.reel-play {
  position: absolute;
  bottom: var(--sp-4);
  left: var(--sp-4);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--brand);
  box-shadow: 0 2px 10px rgba(11, 39, 71, 0.18);
  transition:
    background 0.3s,
    color 0.3s;
}
.reel-play svg {
  width: 20px;
  height: 20px;
  margin-left: 2px; /* the triangle looks centred a little to the right of its box */
}
.reel-t {
  display: -webkit-box;
  overflow: hidden;
  color: var(--brand);
  font-weight: 600;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
@media (hover: hover) {
  .reel:hover .reel-media img {
    transform: scale(1.04);
  }
  .reel:hover .reel-play {
    background: var(--brand);
    color: #fff;
  }
}
@media (max-width: 1000px) {
  .reel {
    flex-basis: calc((100% - var(--sp-gap)) / 2);
  }
  .reels-short .reel {
    flex-basis: calc((100% - 2 * var(--sp-gap)) / 3);
  }
}
@media (max-width: 600px) {
  .reels-head {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .reel {
    flex-basis: 78%;
  }
  .reels-short .reel {
    flex-basis: 46%;
  }
  .reels-short .reel-t {
    -webkit-line-clamp: 3; /* narrow cards: a third line keeps the titles whole on small phones */
  }
  .reel-play {
    bottom: var(--sp-3);
    left: var(--sp-3);
    width: 44px;
    height: 44px;
  }
}

/* 14. Books and articles */
.libri-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--sp-gutter);
}
.books {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 240px));
  gap: var(--sp-gap);
}
.book {
  display: grid;
  align-content: start;
  gap: var(--sp-3);
}
.book-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: var(--brand-soft);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(11, 39, 71, 0.1);
}
.book-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book-title {
  color: var(--brand);
  font: 600 var(--t-body) / 1.25 var(--serif);
  text-align: center;
  text-wrap: balance;
}
/* the articles: a numbered index, each line opens its article as a full page */
.arts {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.art {
  all: unset;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 2em minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-4);
  width: 100%;
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.art:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: -2.5px;
  border-radius: 4px;
}
.art-n {
  color: var(--muted);
  font: 600 var(--t-small) / 1 var(--sans);
  font-variant-numeric: tabular-nums;
}
.art-t {
  color: var(--brand);
  font: 600 var(--t-body) / 1.3 var(--serif);
  text-wrap: balance;
  transition: color 0.3s;
}
.art .arr {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--brand);
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
}
.art .arr svg {
  width: 18px;
  height: 18px;
}
@media (hover: hover) {
  .art:hover .art-t {
    color: var(--accent);
  }
  .art:hover .arr {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
  }
}
/* side by side, the books stay in view while the list of articles scrolls past */
@media (min-width: 901px) {
  .libri-grid > :first-child {
    position: sticky;
    top: 120px;
  }
}
@media (max-width: 900px) {
  .libri-grid {
    grid-template-columns: 1fr;
    row-gap: var(--sp-block);
  }
}

/* 15. Contacts */
.c-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: var(--sp-gap);
}
.c-card {
  display: grid;
  align-content: start;
  gap: var(--sp-4);
  padding: var(--sp-6);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.c-k {
  margin: 0;
  color: var(--muted);
  font: 650 var(--t-label) / 1 var(--sans);
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.c-phones {
  display: grid;
  gap: var(--sp-4);
}
.c-email {
  font: 600 var(--t-sub) / 1.3 var(--serif);
}
.c-email a {
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.phone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}
.c-card .phone {
  justify-content: space-between;
  row-gap: 6px;
}
.ph-name {
  flex-basis: 100%;
  color: var(--ink);
  font: 600 var(--t-body) / 1.2 var(--sans);
}
.ph-num {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font: 600 var(--t-sub) / 1.2 var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
  text-decoration: none;
  white-space: nowrap;
}
.ph-num svg {
  width: 22px;
  height: 22px;
  color: var(--ink);
}
.wa {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 38px;
  padding: 0 var(--sp-4);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 600;
  text-decoration: none;
}
.wa svg {
  width: 17px;
  height: 17px;
  color: var(--brand);
}
@media (hover: hover) {
  .wa:hover {
    border-color: var(--brand);
  }
}

.socials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2);
}
.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 600;
  text-decoration: none;
}

.c-hello {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--sp-5) var(--sp-gutter);
  margin-top: var(--sp-gap);
  padding: var(--sp-6) var(--sp-7) 0 var(--sp-6);
  border-radius: var(--r);
  background: var(--brand);
  color: #fff;
}
.c-hello img {
  grid-row: 1;
  align-self: end;
  width: auto;
  height: clamp(150px, 13vw, 190px);
  margin-top: var(--sp-5);
}
.c-hello > div,
.c-hello > .btn {
  align-self: center;
  margin-bottom: var(--sp-6);
}
.c-hello h3 {
  margin: 0 0 var(--sp-2);
  font: 600 var(--t-sub) / 1.2 var(--serif);
}
.c-hello p {
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.82);
}
@media (max-width: 1000px) {
  .c-grid {
    grid-template-columns: 1fr 1fr;
  }
  .c-call {
    grid-column: 1 / -1;
  }
}
@media (max-width: 900px) {
  .c-hello {
    grid-template-columns: 1fr;
    padding: var(--sp-6);
  }
  .c-hello img {
    grid-row: auto;
    justify-self: center;
    height: 170px;
    margin: 0 0 var(--sp-2);
  }
  .c-hello > div,
  .c-hello > .btn {
    margin-bottom: 0;
  }
}
@media (max-width: 640px) {
  .c-grid {
    grid-template-columns: 1fr;
  }
  .c-card .ph-num {
    gap: var(--sp-2);
    font-size: 20px;
  }
  .c-hello .btn {
    width: 100%;
  }
}

/* 16. Footer */
.foot {
  padding-block: var(--sp-6) calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--t-small);
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4) var(--sp-6);
}
.foot .brand svg {
  height: 58px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
}
.foot nav a {
  text-decoration: none;
}
@media (hover: hover) {
  .foot nav a:hover {
    color: var(--ink);
  }
}
.foot .copy {
  margin-left: auto;
}

/* 17. Dialogs: coaching areas and Hello Coach open as windows, training areas as full pages */
.dlg {
  width: 100%;
  max-width: min(980px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.dlg:focus {
  outline: none;
}
.dlg::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}
.dlg:has(.solo) {
  max-width: min(640px, calc(100vw - 24px));
}
.dlg-in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}
.dlg-in.solo {
  grid-template-columns: 1fr;
  max-width: 640px;
}
.dlg-media {
  min-height: 100%;
  margin: 0;
}
.dlg-media img {
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 24px);
  object-fit: cover;
}
.dlg-body {
  display: grid;
  align-content: start;
  gap: var(--sp-3);
  max-height: calc(100dvh - 24px);
  padding: var(--sp-gutter);
  overflow: auto;
  overscroll-behavior: none;
}
.dlg-eyebrow {
  padding-right: 48px;
  color: var(--muted);
  font: 650 12px/1.3 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.dlg h3 {
  padding-right: 48px;
  color: var(--brand);
  font-size: var(--t-title);
}
.dlg-ico {
  width: 1.05em;
  height: 1.05em;
  margin: -0.12em 0.3em 0 0;
}
.dlg p {
  color: var(--muted);
}
.dlg-meta {
  font-size: var(--t-small);
}
.dlg-cta {
  margin-top: var(--sp-3);
}
.dlg-x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}
.dlg-x svg {
  width: 20px;
  height: 20px;
}
.courses,
.ticks {
  display: grid;
  margin: var(--sp-2) 0 0;
  padding: 0;
  list-style: none;
}
.courses li {
  display: grid;
  align-content: start;
  gap: var(--sp-1);
  padding-block: var(--sp-3);
  border-top: 1px solid var(--line);
}
.courses strong {
  font: 600 var(--t-sub) / 1.3 var(--serif);
}
.courses span {
  color: var(--muted);
  font-size: var(--t-small);
  font-style: italic;
}
.ticks li {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
  border-top: 1px solid var(--line);
}
.ticks li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  transform: translateY(-2px);
}
.ways {
  display: grid;
  gap: var(--sp-4);
  margin-top: var(--sp-2);
}
.way {
  display: grid;
  gap: var(--sp-2);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}
.way-k {
  color: var(--muted);
  font: 650 var(--t-label) / 1 var(--sans);
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
@media (max-width: 760px) {
  .dlg {
    overflow-y: auto;
  }
  .dlg-in {
    grid-template-columns: 1fr;
  }
  .dlg-body {
    max-height: none;
    overflow: visible;
  }
}

/* full pages (training areas) */
.dlg.page {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  overflow-y: auto;
  border-radius: 0;
  box-shadow: none;
}
.dlg.page[open] {
  animation: page-in 0.35s ease;
}
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.dlg.page::backdrop {
  background: var(--bg);
  backdrop-filter: none;
}
.page .dlg-in {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  min-height: 100%;
}
.page .dlg-media {
  position: sticky;
  top: 0;
  height: 100dvh;
  min-height: 0;
}
.page .dlg-media img {
  display: block;
  max-height: none;
}
.page .dlg-body {
  max-width: 640px;
  max-height: none;
  padding: calc(var(--sp-block) + var(--sp-5)) var(--gut) var(--sp-block) var(--sp-block);
  overflow: visible;
}
.page .dlg-eyebrow,
.page h3 {
  padding-right: 0;
}
/* the close button stays in the top right corner while the page scrolls */
.page .dlg-x {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + var(--sp-3));
  right: calc(env(safe-area-inset-right, 0px) + var(--sp-3));
  z-index: 3;
}
@media (min-width: 761px) {
  .page .dlg-x {
    box-shadow: none; /* it sits on the white text column */
  }
}
@media (min-width: 761px) and (hover: hover) {
  .page .dlg-x:hover {
    background: #f1f2f4;
  }
}
@media (max-width: 760px) {
  .dlg-media {
    max-height: 220px;
  }
  .dlg-media img {
    display: block;
    max-height: 220px;
  }
  .page .dlg-in {
    grid-template-columns: 1fr;
  }
  .page .dlg-media {
    position: relative;
    height: auto;
    max-height: none;
  }
  .page .dlg-media img {
    height: 44svh;
    max-height: none;
  }
  .page .dlg-body {
    max-width: none;
    padding: var(--sp-6) var(--gut) var(--sp-block);
  }
}
/* wide screens: the whole area fits in one screen, courses in two columns, block centred in the height */
@media (min-width: 1081px) {
  .page .dlg-in {
    grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
  }
  .page .dlg-body {
    align-content: center;
    max-width: 880px;
    min-height: 100dvh;
    padding: calc(var(--sp-block) + var(--sp-4)) var(--sp-block);
  }
  .page .courses:has(li:nth-child(4)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--sp-gutter);
  }
  .page .courses:not(:has(li:nth-child(4))) {
    max-width: calc(50% - var(--sp-gutter) / 2);
  }
}
@media (min-width: 1081px) and (max-height: 820px) {
  .page .dlg-body {
    padding-block: var(--sp-6) var(--sp-5);
  }
  .page h3 {
    font-size: var(--t-index);
  }
  .page .courses li {
    padding-block: var(--sp-3) var(--sp-2);
  }
  .page .dlg-cta {
    margin-top: var(--sp-2);
  }
}
/* articles. Phones and tablets: one column set for reading, in the order of the client's files (cover, title,
   text). Computers, further down: the two columns of the site. Everywhere the "Articolo 3 di 15" line stays
   at the top as a white bar beside the close button, so the text never runs under the button */
.article {
  --art-pad: max(var(--gut), calc(50vw - 340px)); /* side margins: the column stops at 680px */
  scroll-padding-top: 84px;
}
.article .dlg-in {
  grid-template-columns: 1fr;
}
.article .dlg-body {
  align-content: start;
  max-width: none;
  min-height: 0;
  padding: 0 var(--art-pad) var(--sp-block);
}
.article .dlg-eyebrow {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: calc(env(safe-area-inset-top, 0px) + 44px + 2 * var(--sp-3)); /* the button and its margins */
  margin: 0 calc(-1 * var(--art-pad)) var(--sp-5);
  padding: env(safe-area-inset-top, 0px) calc(var(--art-pad) + 44px + var(--sp-3)) 0 var(--art-pad);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
/* the cover: as wide as the column. All the covers have the same format, 16:9:
   a file with other proportions is cut at the centre */
.art-cover {
  margin: 0;
}
.art-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  object-fit: cover;
}
.article h3 {
  margin-block: var(--sp-5) var(--sp-3);
  font-size: var(--t-index); /* the titles are long */
}
.art-text {
  display: grid;
  gap: var(--sp-4);
  color: var(--ink);
}
.art-text p {
  color: inherit;
  text-wrap: pretty;
}
.art-text h4 {
  margin-top: var(--sp-4);
  color: var(--brand);
  font-size: var(--t-sub);
  line-height: 1.25;
}
.art-text ul,
.art-text ol {
  display: grid;
  gap: var(--sp-3);
  margin: 0;
  padding-left: 1.3em;
}
.art-text li::marker {
  color: var(--accent);
}
.art-text blockquote {
  margin: var(--sp-2) 0;
  padding-left: var(--sp-5);
  border-left: 3px solid var(--accent);
  color: var(--brand);
  font: italic 400 var(--t-sub) / 1.4 var(--serif);
}
.art-text .art-tags {
  margin-top: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--t-small);
  overflow-wrap: anywhere;
}
/* at the foot, the way to the previous and to the next article:
   side by side when each card has room for its longest word, one above the other otherwise */
.art-nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}
.art-go {
  all: unset;
  box-sizing: border-box;
  display: grid;
  align-content: start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color 0.3s;
}
.art-go:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 3px;
}
.art-go-next {
  grid-column-end: -1; /* the last column: on the right when the cards sit side by side */
  text-align: right;
}
.art-go-l {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--muted);
  font: 650 var(--t-label) / 1 var(--sans);
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.art-go-next .art-go-l {
  justify-content: flex-end;
}
.art-go-l svg {
  flex: none;
  width: 14px;
  height: 14px;
}
.art-go:not(.art-go-next) svg {
  transform: scaleX(-1);
}
.art-go-t {
  color: var(--brand);
  font: 600 var(--t-body) / 1.3 var(--serif);
  text-wrap: balance;
  transition: color 0.3s;
}
@media (hover: hover) {
  .art-go:hover {
    border-color: var(--brand);
  }
  .art-go:hover .art-go-t {
    color: var(--accent);
  }
}
/* phones: the cover runs from edge to edge, right under the bar */
@media (max-width: 600px) {
  .article .dlg-eyebrow {
    margin-bottom: 0;
  }
  .art-cover {
    margin: calc(-1 * var(--sp-3)) calc(-1 * var(--art-pad)) 0;
  }
  .art-cover img {
    border-radius: 0;
  }
  .article h3 {
    margin-top: var(--sp-4);
  }
}
/* low screens (a phone held sideways): the cover narrows, so that it is seen whole under the bar */
@media (max-height: 560px) and (orientation: landscape) {
  .article .dlg-eyebrow {
    margin-bottom: var(--sp-5);
  }
  .art-cover {
    width: min(100%, calc((100svh - 110px) * 16 / 9));
    margin: 0 auto;
  }
  .art-cover img {
    border-radius: var(--r);
  }
}
/* computers: the article is set like a section of the site, with the same side margins and the same two columns.
   Title and cover open the page side by side; under a rule the text runs in the two columns. A sub-heading
   goes across both, so each part is read down the left column, then down the right one. Paragraphs are kept
   whole; one that makes a part on its own (class art-split) is shared between the columns */
@media (min-width: 1001px) and (min-height: 561px) {
  .article {
    --art-pad: max(var(--gut), calc(50vw - var(--wrap) / 2 + var(--gut)));
  }
  .article .dlg-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "bar bar"
      "title cover"
      "text text"
      "nav nav";
    column-gap: var(--sp-gutter);
    padding-bottom: var(--sp-section);
  }
  .article .dlg-eyebrow {
    grid-area: bar;
    margin-bottom: var(--sp-6);
  }
  .article h3 {
    grid-area: title;
    align-self: center;
    margin: 0;
    font-size: clamp(34px, 3.4vw, 48px); /* sized for half the page: the longest word of the titles fits */
    overflow-wrap: break-word;
  }
  .article .art-cover {
    grid-area: cover;
    align-self: center;
  }
  .article .art-text {
    display: block;
    grid-area: text;
    columns: 2;
    column-gap: var(--sp-gutter);
    margin-top: calc(var(--sp-block) - var(--sp-3));
    padding-top: var(--sp-block);
    border-top: 1px solid var(--line);
  }
  .article .art-text > * {
    margin-block: 0 var(--sp-4);
    break-inside: avoid;
  }
  .article .art-text > :last-child {
    margin-bottom: 0;
  }
  .article .art-text > .art-split {
    break-inside: auto;
    orphans: 2;
    widows: 2;
  }
  .article .art-text h4 {
    margin-top: var(--sp-6);
    column-span: all;
  }
  .article .art-text > ul,
  .article .art-text > ol {
    display: block;
    break-inside: auto;
  }
  .article .art-text li {
    break-inside: avoid;
  }
  .article .art-text li + li {
    margin-top: var(--sp-3);
  }
  .article .art-text .art-tags {
    margin-top: var(--sp-6);
    column-span: all;
  }
  .article .art-nav {
    grid-area: nav;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-gutter);
    margin-top: var(--sp-block);
  }
}

/* 18. Motion */
/* hero: hidden until the web fonts are ready (js/main.js removes .js-wait), so the text never jumps */
.hero-copy > * {
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.js-wait .hero-copy > *,
.js-wait .hero-svc {
  opacity: 0;
  transform: translateY(10px);
}
/* sections fade in as they scroll into view; js/main.js adds .rv only to what is still below the fold */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.rv.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
  .js-wait .hero-copy > *,
  .js-wait .hero-svc {
    transform: none;
  }
  .rv {
    opacity: 1;
    transform: none;
  }
}
