/*
 * About Us: the hero (About hero 1, 10 Oct 2026). The markup and the reasoning
 * are in inc/about-hero.php; the year's count is assets/js/company-about-hero.js.
 *
 * GEOMETRY. From 700px the hero uses the timeline's own grid (the words, the
 * spine's gap, the stage), so the spine below sits exactly in the middle of the
 * gap and the line out of the ring can end on it with no script: the ring's
 * box runs from the ring to the foot of the hero and from the spine to the
 * stage's edge, and the line is a stretched S inside it. Under 700px the
 * words and the stage dissolve into one column and the ring sits at its foot,
 * its line ending on the left edge's spine (--tl-x, 18px).
 *
 * START STATES ONLY UNDER html.sr-motion, each a CSS animation that ends in
 * the final state, so nothing waits on script; with JS off or reduced motion
 * the ring and the line are drawn, every word shows and the photos show NOW.
 *
 * Every selector starts at .srk-page.srpk-root (the page's <main>), which
 * outranks the kit's type floors and Elementor's Global Kit.
 */

.srk-page.srpk-root .srco-hl {
  --hl-g: 112px;
  --hl-ring: clamp(220px, min(26vw, 38vh), 340px);
  --hl-ring-top: clamp(8px, 4vh, 40px);
  --hl-card: clamp(150px, min(13vw, 24vh), 196px);
  --hl-ink: var(--srh-pale, #EDF3FF);
  --hl-soft: rgba(234, 240, 255, 0.8);
  --hl-line: 2px;
  position: relative;
  overflow: hidden;
  padding-bottom: 0;
}

/* Read, not drawn ("opens in a new tab" after an outlet's name). */
.srk-page.srpk-root .srco-hl .srco-tl-vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- The year behind */

.srk-page.srpk-root .srco-hl-year {
  position: absolute;
  left: max(var(--srpk-pad, 40px), calc((100% - 1180px) / 2));
  right: 0;
  bottom: calc(min(46vh, 28vw) * -0.16);
  height: min(46vh, 28vw);
  z-index: 0;
  pointer-events: none;
}

.srk-page.srpk-root .srco-hl-year-svg {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  overflow: visible;
}

.srk-page.srpk-root .srco-hl-year-svg path {
  fill: none;
  stroke: rgba(170, 196, 255, 0.13);
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}

/* ---------------------------------------------------------------- The words */

.srk-page.srpk-root .srco-hl-inner {
  position: relative;
  z-index: 1;
}

.srk-page.srpk-root .srco-hl-kicker {
  margin: 0 0 14px;
}

.srk-page.srpk-root .srco-hl .srco-hl-h1 {
  margin: 0;
  color: var(--hl-ink);
  font-size: clamp(42px, 4.7vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 650;
  max-width: none;
}

.srk-page.srpk-root .srco-hl-h1-line {
  text-wrap: balance;
}

.srk-page.srpk-root .srco-hl-h1-line ~ .srco-hl-h1-line {
  /* The second sentence carries the journey's accent (a solid colour: a text
     gradient does not reach words that are boxes of their own). */
  color: color-mix(in srgb, var(--srk-accent-live, #4D8AFF) 62%, #FFFFFF);
}

/*
 * A word is a box of its own only while it can rise (html.sr-motion). With
 * motion off it is plain text, so the h1 is one block of text and stays the
 * Largest Contentful Paint (boxed words are counted piecemeal).
 */
html.sr-motion .srk-page.srpk-root .srco-hw {
  display: inline-block;
}

.srk-page.srpk-root .srco-hl .srco-hl-second {
  margin: 0.6em 0 0;
  max-width: 24ch;
  color: var(--hl-ink);
  font-size: clamp(22px, 2.1vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 600;
  text-wrap: balance;
}

.srk-page.srpk-root .srco-hl .srco-hl-lede {
  margin: 0;
  max-width: 34em;
  color: var(--hl-soft);
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.5;
}

.srk-page.srpk-root .srco-hl .srco-hl-lede--1 {
  margin-top: 22px;
}

.srk-page.srpk-root .srco-hl .srco-hl-lede--2 {
  margin-top: 6px;
}

.srk-page.srpk-root .srco-hl .srco-hl-actions {
  margin-top: 30px;
}

/* ---------------------------------------------------------------- The ring and its line */

.srk-page.srpk-root .srco-hl-mark {
  position: absolute;
  display: block;
  width: var(--hl-ring);
  height: var(--hl-ring);
  overflow: visible;
  filter: drop-shadow(0 0 28px rgba(77, 138, 255, 0.35));
}

.srk-page.srpk-root .srco-hl-mark-fill {
  fill: #FFFFFF;
}

.srk-page.srpk-root .srco-hl-mark-draw {
  fill: none;
  stroke: #CFE0FF;
  stroke-width: 6;
  stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  opacity: 0;
}

.srk-page.srpk-root .srco-hl-lead {
  position: absolute;
  display: block;
  overflow: visible;
  pointer-events: none;
}

.srk-page.srpk-root .srco-hl-lead path {
  stroke-width: var(--hl-line);
  filter: drop-shadow(0 0 6px rgba(127, 166, 255, 0.55));
}

/* ---------------------------------------------------------------- The founders */

.srk-page.srpk-root .srco-hl-duo {
  margin: 0;
}

/*
 * About hero 5: a matched pair. Both cards are one size (the list no longer
 * stretches the first to the second's height, which pushed Tim's caption down),
 * level (eyes on one line), and mirror each other's tilt; nothing else differs.
 */
.srk-page.srpk-root .srco-hl-duo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
}

.srk-page.srpk-root .srco-hl-card {
  position: relative;
  flex: 0 0 auto;
  width: var(--hl-card);
  padding: 8px 8px 10px;
  border-radius: 14px;
  background: #F4F1EA;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  transform: rotate(-4deg);
}

/* Level with the first, overlapping only its frame's edge (0.12): neither face is covered. */
.srk-page.srpk-root .srco-hl-card--1 {
  margin-left: calc(var(--hl-card) * -0.12);
  transform: rotate(4deg);
}

.srk-page.srpk-root .srco-hl-photo {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #0A0E36;
}

.srk-page.srpk-root .srco-hl-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.srk-page.srpk-root .srco-hl-name {
  display: block;
  margin-top: 7px;
  color: #10153A;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
}

/* ---------------------------------------------------------------- From 700px */

@media (min-width: 700px) {
  .srk-page.srpk-root.srk-flow .srk-scene.srco-hl {
    padding-bottom: 0;
  }

  .srk-page.srpk-root.srk-flow .srk-scene.srco-hl > .srk-scene-inner.srco-hl-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--hl-g) minmax(0, 1fr);
    align-items: center;
    align-self: stretch;
    margin-block: 0;
    /* The stage runs to the foot of the hero, where the spine begins. */
    min-height: calc(var(--vph, 100dvh) - var(--srk-header-raw, 72px) - clamp(16px, 3vh, 40px));
  }

  /*
   * About hero 5: the hero ends on its buttons (the proof list is gone), so
   * the words sit on the stage's middle, level with the founders' cards,
   * with only a small lift; they no longer leave a band under the buttons.
   */
  .srk-page.srpk-root .srco-hl-words {
    grid-column: 1;
    grid-row: 1;
    padding-bottom: clamp(8px, 1.6vh, 20px);
  }

  /* One sentence a line; the first may run on into the spine's gap (the ring sits further right). */
  .srk-page.srpk-root .srco-hl-h1-line {
    white-space: nowrap;
  }

  .srk-page.srpk-root .srco-hl-stage {
    grid-column: 3;
    grid-row: 1;
    align-self: stretch;
    position: relative;
  }

  /* The ring's box: from the ring to the foot of the hero, from the spine to the stage's right edge. */
  .srk-page.srpk-root .srco-hl-ring {
    position: absolute;
    top: var(--hl-ring-top);
    bottom: 0;
    left: calc(var(--hl-g) / -2);
    right: 0;
  }

  /* The ring's centre: 40% across the stage (the box is the stage plus half the gap). */
  .srk-page.srpk-root .srco-hl-ring {
    --hl-cx: calc(var(--hl-g) / 2 + (100% - var(--hl-g) / 2) * 0.4);
  }

  .srk-page.srpk-root .srco-hl-mark {
    top: 0;
    left: calc(var(--hl-cx) - var(--hl-ring) / 2);
  }

  /* The line: from the bottom of the ring (its right end) to the spine (its left end). */
  .srk-page.srpk-root .srco-hl-lead {
    top: calc(var(--hl-ring) - 1px);
    left: -1px;
    width: calc(var(--hl-cx) + 1px);
    /* An explicit height: an absolute SVG keeps its own square shape otherwise. */
    height: calc(100% - var(--hl-ring) + 1px);
  }

  /* The founders lean in at the ring's lower right, over its rim and clear of the S and of the line. */
  .srk-page.srpk-root .srco-hl-duo {
    position: absolute;
    top: calc(var(--hl-ring-top) + var(--hl-ring) * 0.74);
    right: calc(var(--hl-card) * -0.3);
    z-index: 2;
  }
}

@media (min-width: 700px) and (max-width: 999px) {
  .srk-page.srpk-root .srco-hl {
    --hl-g: 64px;
    --hl-ring: clamp(180px, 26vw, 240px);
    --hl-card: 132px;
  }
}

/* Short desktop windows (1366x768, 1280x720) give up display size, never body size. */
@media (min-width: 700px) and (max-height: 820px) {
  .srk-page.srpk-root .srco-hl .srco-hl-h1 {
    font-size: clamp(40px, 4.4vw, 62px);
  }

  .srk-page.srpk-root .srco-hl .srco-hl-second {
    font-size: clamp(20px, 2vw, 28px);
  }

  .srk-page.srpk-root .srco-hl .srco-hl-lede {
    font-size: 17px;
  }

  .srk-page.srpk-root .srco-hl .srco-hl-lede--1 {
    margin-top: 16px;
  }

  .srk-page.srpk-root .srco-hl .srco-hl-actions {
    margin-top: 18px;
  }

  .srk-page.srpk-root .srco-hl-words {
    padding-bottom: 8px;
  }
}

/* The shortest laptop windows (1280x720): a step smaller again. */
@media (min-width: 700px) and (max-height: 740px) {
  .srk-page.srpk-root .srco-hl .srco-hl-h1 {
    font-size: clamp(40px, 4vw, 56px);
  }

  .srk-page.srpk-root .srco-hl .srco-hl-second {
    font-size: clamp(20px, 1.8vw, 24px);
  }

  .srk-page.srpk-root .srco-hl-kicker {
    margin-bottom: 8px;
  }
}

/* ---------------------------------------------------------------- Under 700px: one column, the ring at its foot */

@media (max-width: 699px) {
  .srk-page.srpk-root .srco-hl {
    --hl-ring: 52px;
    --hl-ring-x: 46px;
    --hl-card: min(132px, 17vh);
    --tl-x: 18px;
  }

  .srk-page.srpk-root.srk-flow .srk-scene.srco-hl {
    padding-top: calc(var(--srk-header-raw, 72px) + 14px);
    padding-bottom: 0;
  }

  .srk-page.srpk-root.srk-flow .srk-scene.srco-hl > .srk-scene-inner.srco-hl-inner {
    display: flex;
    flex-direction: column;
    margin-block: 0;
    min-height: calc(var(--vph, 100dvh) - var(--srk-header-raw, 72px) - 14px);
  }

  .srk-page.srpk-root .srco-hl-words,
  .srk-page.srpk-root .srco-hl-stage {
    display: contents;
  }

  .srk-page.srpk-root .srco-hl-kicker { order: 0; margin-bottom: 8px; }
  .srk-page.srpk-root .srco-hl .srco-hl-h1 { order: 1; font-size: clamp(34px, 10.6vw, 42px); line-height: 1; }
  .srk-page.srpk-root .srco-hl .srco-hl-second { order: 2; margin-top: 10px; font-size: clamp(19px, 5.4vw, 22px); max-width: none; }
  .srk-page.srpk-root .srco-hl .srco-hl-lede--1 { order: 3; margin-top: 12px; }
  .srk-page.srpk-root .srco-hl .srco-hl-lede--2 { order: 4; margin-top: 4px; }
  .srk-page.srpk-root .srco-hl-duo { order: 5; margin-top: 16px; }
  .srk-page.srpk-root .srco-hl .srco-hl-actions { order: 6; margin-top: 18px; }
  .srk-page.srpk-root .srco-hl-ring { order: 7; }

  .srk-page.srpk-root .srco-hl .srco-hl-lede {
    font-size: 16px;
    line-height: 1.45;
  }

  .srk-page.srpk-root .srco-hl-lede-tail {
    display: block;
  }

  .srk-page.srpk-root .srco-hl .srco-hl-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .srk-page.srpk-root .srco-hl .srco-hl-actions .srk-btn {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 12px;
    white-space: nowrap;
  }

  .srk-page.srpk-root .srco-hl-duo-list {
    padding-left: 6px;
  }

  .srk-page.srpk-root .srco-hl-card {
    padding: 6px 6px 7px;
    border-radius: 11px;
  }

  .srk-page.srpk-root .srco-hl-name {
    margin-top: 5px;
    font-size: 14px;
  }

  /* The ring's block fills what is left of the screen and reaches the hero's
     foot; it spans the full width so its line can end on the spine at 18px. */
  .srk-page.srpk-root .srco-hl-ring {
    position: relative;
    flex: 1 0 auto;
    min-height: calc(var(--hl-ring) + 30px);
    margin-top: 14px;
    margin-left: calc(-1 * var(--srpk-pad, 20px));
    margin-right: calc(-1 * var(--srpk-pad, 20px));
  }

  .srk-page.srpk-root .srco-hl-mark {
    top: 0;
    left: calc(var(--hl-ring-x) - var(--hl-ring) / 2);
    filter: drop-shadow(0 0 14px rgba(77, 138, 255, 0.4));
  }

  .srk-page.srpk-root .srco-hl-mark-draw {
    stroke-width: 18;
  }

  .srk-page.srpk-root .srco-hl-lead {
    top: calc(var(--hl-ring) - 1px);
    left: calc(var(--tl-x) - 1px);
    width: calc(var(--hl-ring-x) - var(--tl-x) + 1px);
    height: calc(100% - var(--hl-ring) + 1px);
  }

  .srk-page.srpk-root .srco-hl-year {
    left: auto;
    right: -4px;
    bottom: 6px;
    height: 84px;
  }
}

/* The narrowest phones (360px): the lede a step smaller, so the h1 stays the largest text. */
@media (max-width: 379px) {
  .srk-page.srpk-root .srco-hl .srco-hl-lede {
    font-size: 15px;
  }
}

/* ---------------------------------------------------------------- The hand-off to the timeline */

/*
 * The hero's line ends on the spine at the top of the 2017 stop, so the spine
 * no longer fades in there: it carries straight on, drawing down with scroll.
 */
.srk-page.srpk-root .srco-tl .srco-tl-yr--first .srco-tl-part--a .srco-tl-seg {
  -webkit-mask-image: none;
          mask-image: none;
}

/* ---------------------------------------------------------------- Motion (start states) */

@keyframes srco-hl-rise {
  from { opacity: 0; transform: translateY(0.42em); }
  to { opacity: 1; transform: none; }
}

@keyframes srco-hl-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes srco-hl-draw {
  0% { opacity: 1; stroke-dashoffset: 1; }
  80% { opacity: 1; stroke-dashoffset: 0; }
  100% { opacity: 0; stroke-dashoffset: 0; }
}

@keyframes srco-hl-fill {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes srco-hl-wipe {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes srco-hl-card-in {
  from { opacity: 0; translate: 0 26px; }
  to { opacity: 1; translate: 0 0; }
}

html.sr-motion .srco-hl .srco-hw {
  animation: srco-hl-rise 720ms var(--srk-ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
  animation-delay: calc(140ms + var(--w, 0) * 70ms);
}

html.sr-motion .srco-hl .srco-hl-kicker,
html.sr-motion .srco-hl .srco-hl-second,
html.sr-motion .srco-hl .srco-hl-lede,
html.sr-motion .srco-hl .srco-hl-actions {
  animation: srco-hl-up 700ms var(--srk-ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
}

html.sr-motion .srco-hl .srco-hl-kicker { animation-delay: 40ms; }
html.sr-motion .srco-hl .srco-hl-second { animation-delay: calc(240ms + var(--hl-words, 5) * 70ms); }
html.sr-motion .srco-hl .srco-hl-lede--1 { animation-delay: calc(360ms + var(--hl-words, 5) * 70ms); }
html.sr-motion .srco-hl .srco-hl-lede--2 { animation-delay: calc(450ms + var(--hl-words, 5) * 70ms); }
html.sr-motion .srco-hl .srco-hl-actions { animation-delay: calc(540ms + var(--hl-words, 5) * 70ms); }

/* The ring draws itself (1.2 s), the fill comes up behind the outline. */
html.sr-motion .srco-hl .srco-hl-mark-draw {
  animation: srco-hl-draw 1500ms var(--srk-ease, cubic-bezier(0.22, 1, 0.36, 1)) 120ms both;
}

html.sr-motion .srco-hl .srco-hl-mark-fill {
  animation: srco-hl-fill 600ms ease-out 900ms both;
}

/* As it completes, the line runs out of the bottom of the ring. */
html.sr-motion .srco-hl .srco-hl-lead {
  animation: srco-hl-wipe 900ms cubic-bezier(0.55, 0, 0.35, 1) 1250ms both;
}

/* The founders lean in. */
html.sr-motion .srco-hl .srco-hl-card {
  animation: srco-hl-card-in 800ms var(--srk-spring, cubic-bezier(0.34, 1.56, 0.64, 1)) both;
  animation-delay: calc(520ms + var(--k, 0) * 110ms);
}

/* A replay (scrolled back to the hero): the script rewinds by taking the
   animations off for a frame, then putting them back. */
html.sr-motion .srco-hl.hl-rewind * {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .srco-hl * {
    animation: none !important;
  }
}

/*
 * Chain 6 round 1: the founders lean out past the stage, but never past the
 * screen (at 1280x720 the second card ended at 1285px). The stage's right edge
 * sits the page's side padding in from the screen's; the cards may use that
 * padding less 26px (their tilt included).
 */
@media (min-width: 700px) {
  .srk-page.srpk-root .srco-hl-duo {
    right: max(calc(var(--hl-card) * -0.3), calc(26px - max(var(--srpk-pad, 40px), (100vw - 1180px) / 2)));
  }
}
