/**
 * Scroll effects — the visual layer.
 *
 * Everything here is additive: without JavaScript, or with "reduce motion"
 * switched on, every element renders in its final state. The JS adds
 * `okg-fx` to <html> first, and only then do the "start" states below apply,
 * so a broken script can never leave the page blank.
 *
 * Only three things are animated, all compositor-friendly (opacity, transform,
 * clip-path). Nothing moves layout, so no CLS and no jank on phones.
 */

/* ------------------------------------------------------------- baseline -- */
html.okg-fx [data-fx] {
  will-change: opacity, transform;
}

/* Rise + fade. */
html.okg-fx [data-fx="up"] {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 0.75s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: calc(var(--fx-i, 0) * 90ms);
}
html.okg-fx [data-fx="up"].is-fx-in {
  opacity: 1;
  transform: none;
}

/* Curtain reveal, for photography.
   The clip lives on an inner mask, never on the observed element: an element
   clipped to zero area has zero intersection area, so IntersectionObserver
   would never fire and the curtain would never open. */
html.okg-fx .okg-feat__mask {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.05s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: calc(var(--fx-i, 0) * 110ms);
}
html.okg-fx .okg-feat__media.is-fx-in .okg-feat__mask {
  clip-path: inset(0 0 0 0);
}

/* Slow settle, for large blocks. */
html.okg-fx [data-fx="zoom"] {
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.9s ease, transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}
html.okg-fx [data-fx="zoom"].is-fx-in {
  opacity: 1;
  transform: none;
}

/* Drifting hairline, used behind section headings. */
html.okg-fx .okg-fx-rule {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
html.okg-fx .is-fx-in .okg-fx-rule,
html.okg-fx .okg-fx-rule.is-fx-in {
  transform: scaleX(1);
}

/* ------------------------------------------------- features (alternating) -- */
/*
 * One model per row: photo on one side, copy on the other, sides swapping on
 * every row. The photo sits in a fixed-ratio frame and drifts inside it on
 * scroll, so the two columns of a row never move in step.
 */
.okg-feat {
  position: relative;
  overflow: hidden;
  padding: clamp(52px, 6vw, 96px) 0 clamp(40px, 5vw, 76px);
  background: #fff;
}
.okg-feat__list {
  display: grid;
}
.okg-feat__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 3.6vw, 56px);
  align-items: center;
  padding: clamp(28px, 3.8vw, 60px) 0;
  border-top: 1px solid #ecf1f0;
}
.okg-feat__row:first-child {
  border-top: 0;
  padding-top: clamp(6px, 1vw, 12px);
}
.okg-feat__row.is-reverse .okg-feat__media {
  order: 2;
}
.okg-feat__media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #eaf0ee;
  aspect-ratio: 5 / 3;
  box-shadow: 0 18px 44px rgba(16, 27, 32, 0.08);
}
.okg-feat__mask {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
}
.okg-feat__mask img {
  position: absolute;
  inset: -8% 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  /* Slightly right of centre on the driving / cycling shots keeps the rider's
     face in frame after the overscan crop. */
  object-position: 50% 42%;
  transform: translate3d(0, var(--fx-y, 0px), 0);
  will-change: transform;
}
.okg-feat__body {
  min-width: 0;
}
.okg-feat__name {
  margin: 0 0 clamp(14px, 1.6vw, 22px);
  color: var(--ink, #101820);
  font-size: clamp(22px, 2.3vw, 32px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.015em;
}
.okg-feat__specs {
  display: grid;
  gap: clamp(8px, 1vw, 12px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.okg-feat__specs li {
  position: relative;
  padding-left: 18px;
  color: var(--muted, #5d6d76);
  font-size: 15px;
  line-height: 1.7;
}
.okg-feat__specs li::before {
  content: "·";
  position: absolute;
  left: 1px;
  top: -1px;
  color: var(--titanium, #aab7c2);
  font-weight: 800;
}
.okg-feat__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(18px, 2vw, 26px);
  color: var(--ink, #101820);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
}
.okg-feat__cta svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}
.okg-feat__cta:hover svg,
.okg-feat__cta:focus-visible svg {
  transform: translateX(4px);
}

@media (max-width: 1080px) {
  .okg-feat__specs li {
    font-size: 14.5px;
  }
}

@media (max-width: 860px) {
  .okg-feat__row {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(16px, 4vw, 26px);
    padding: clamp(26px, 6vw, 40px) 0;
  }
  /* Photo first on every row, whatever the desktop order was. */
  .okg-feat__row.is-reverse .okg-feat__media,
  .okg-feat__media {
    order: -1;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
  }
  .okg-feat__name {
    margin-bottom: 12px;
    font-size: 21px;
  }
  .okg-feat__specs li {
    font-size: 14.5px;
    line-height: 1.62;
  }
  /* No parallax on phones: the frames are short and it costs more than it gives. */
  .okg-feat__mask img {
    inset: 0;
    height: 100%;
    transform: none;
  }
}

/* --------------------------------------------------------------- video --- */
/* The film band stays bright: only the video frame itself is dark. */
.okg-video {
  position: relative;
  padding: clamp(56px, 6vw, 96px) 0;
  color: var(--ink, #101820);
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(184, 243, 74, .18), transparent 66%),
    linear-gradient(180deg, #f7fbe9 0%, #f0faf6 100%);
  overflow: hidden;
}
.okg-video__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.okg-video__eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 14px;
  border: 1px solid rgba(10, 113, 104, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, .66);
  color: var(--aqua-deep, #0a7168);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.okg-video__title {
  margin: 0 0 14px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.02em;
}
.okg-video__text {
  margin: 0 0 22px;
  color: var(--muted, #5b6b74);
  font-size: 15px;
  line-height: 1.62;
}
.okg-video__stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius, 16px);
  aspect-ratio: 16 / 9;
  background: var(--media-bg, #eef4f2);
  box-shadow: 0 30px 64px rgba(16, 24, 32, .18);
}
.okg-video__stage video,
.okg-video__stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.okg-video__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(8, 14, 24, 0.28);
  cursor: pointer;
  transition: background 0.2s ease;
}
.okg-video__play:hover {
  background: rgba(8, 14, 24, 0.12);
}
.okg-video__play span {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--deep, #101820);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.okg-video__play svg {
  width: 24px;
  height: 24px;
  margin-left: 3px;
}
.okg-video.is-playing .okg-video__play {
  display: none;
}

@media (max-width: 860px) {
  .okg-video__inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .okg-video__stage {
    order: -1;
  }
}

/* -------------------------------------------------------------- events -- */
.okg-events {
  padding: clamp(52px, 5.5vw, 88px) 0;
}
.okg-events__list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.okg-events__row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  padding: 18px clamp(16px, 2vw, 26px);
  border: 1px solid var(--line, #e1e8e7);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.okg-events__row:hover {
  border-color: #cfdad7;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(16, 27, 32, 0.08);
}
.okg-events__date {
  display: grid;
  gap: 1px;
  padding-right: 16px;
  border-right: 1px solid var(--line, #e1e8e7);
  color: var(--ink, #101820);
}
.okg-events__date b {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.okg-events__date em {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted, #5d6d76);
}
.okg-events__name {
  min-width: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink, #101820);
}
.okg-events__name span {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, #5d6d76);
}
.okg-events__cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--aqua-deep, #0b7d73);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .okg-events__row {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .okg-events__cta {
    display: none;
  }
}

/* ------------------------------------------------------------- reduce ---- */
@media (prefers-reduced-motion: reduce) {
  html.okg-fx [data-fx],
  html.okg-fx .okg-fx-rule {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }
  .okg-feat__mask img {
    transform: none !important;
  }
}
