/*
 * About Us (about-us-template.php) and the web revamp header
 * (template-parts/oba-header.php).
 *
 * Desktop frame 1440 wide, mobile 393 wide. --u is one design pixel.
 * Vertical rhythm from the style sheet: 180px desktop, 90px mobile.
 */

body.oba-about-page {
  margin: 0;
  background: var(--oba-white);
}

/* The page brings its own header. */
body.oba-about-page .pos-f-t {
  display: none;
}

.oba-about {
  --u: calc(100vw / 1440);
  --oba-gap: calc(180 * var(--u));

  background: var(--oba-white);
  color: var(--oba-black);
  font-weight: 400;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.oba-header__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header ---------- */

.oba-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  box-sizing: border-box;
  height: calc(160 * var(--u));
  padding: calc(58 * var(--u)) calc(59 * var(--u)) 0 calc(87 * var(--u));
  background: var(--oba-white);
  color: var(--oba-black);
}

body.admin-bar .oba-header {
  top: 32px;
}

.oba-header__links {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(14 * var(--u));
  padding-top: calc(12 * var(--u));
}

/* Button: Josefin Sans 18 / 2%, black background on hover. */
.oba-header .oba-header__link,
.oba-header .oba-header__link:visited {
  all: unset;
  box-sizing: border-box;
  margin: calc(-4 * var(--u)) calc(-6 * var(--u));
  padding: calc(4 * var(--u)) calc(6 * var(--u)) calc(2 * var(--u));
  color: var(--oba-black);
  font-family: var(--oba-font-button);
  font-size: max(11px, calc(18 * var(--u)));
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.oba-header .oba-header__link:hover,
.oba-header .oba-header__link:active,
.oba-header .oba-header__link:focus-visible {
  background: var(--oba-black);
  color: var(--oba-white);
}

.oba-header .oba-header__logo {
  grid-column: 2;
  display: block;
  line-height: 0;
}

.oba-header .oba-header__logo img {
  display: block;
  width: calc(428 * var(--u));
  max-width: none;
  height: auto;
}

.oba-header__actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: calc(26 * var(--u));
  padding-top: calc(4 * var(--u));
}

.oba-header .oba-header__icon {
  all: unset;
  display: block;
  box-sizing: border-box;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.oba-header .oba-header__icon:hover {
  opacity: 0.6;
}

.oba-header .oba-header__icon--search {
  width: calc(45 * var(--u));
  height: calc(41 * var(--u));
}

.oba-header .oba-header__icon--menu {
  width: calc(43 * var(--u));
  height: calc(29 * var(--u));
}

.oba-header .oba-header__icon:focus-visible,
.oba-header .oba-header__logo:focus-visible,
.oba-about .oba-about__arrow:focus-visible,
.oba-about__track:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* ---------- Title + hero ---------- */

.oba-about__main {
  padding-top: calc(276 * var(--u));
}

.oba-about .oba-about__title {
  margin: 0;
  padding: 0 calc(40 * var(--u));
  color: var(--oba-black);
  font-family: var(--oba-font-title);
  font-size: calc(165 * var(--u));
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-align: center;
  text-transform: none;
}

.oba-about .oba-about__title::before,
.oba-about .oba-about__title::after {
  content: none;
}

.oba-about__word {
  display: inline-block;
  white-space: nowrap;
}

/*
 * Reference effect ("Animation Tactalians Only"): a wave runs through the
 * title, flipping each letter around its vertical axis into its mirror image,
 * then a second wave flips them back. 9 second loop.
 */
.oba-about__char {
  display: inline-block;
  animation: oba-about-flip 9s linear infinite;
  animation-delay: calc(1.5s + var(--i) * 0.19s);
  backface-visibility: visible;
  will-change: transform;
}

@keyframes oba-about-flip {
  0% {
    transform: rotateY(0deg);
  }

  11.11% {
    transform: rotateY(180deg);
  }

  33.33% {
    transform: rotateY(180deg);
  }

  44.44% {
    transform: rotateY(360deg);
  }

  100% {
    transform: rotateY(360deg);
  }
}

.oba-about__hero {
  width: calc(1281 * var(--u));
  margin: calc(45 * var(--u)) auto 0;
  aspect-ratio: 1281 / 960;
  overflow: hidden;
  background: #e9e9e9;
}

.oba-about__hero img,
.oba-about__slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* ---------- Slider ---------- */

.oba-about__slider {
  position: relative;
  margin-top: var(--oba-gap);
}

.oba-about__track {
  display: flex;
  width: calc(1066 * var(--u));
  margin: 0 auto;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.oba-about__track::-webkit-scrollbar {
  display: none;
}

/* One height for all; the width is the image's own (--ratio = width / height). */
.oba-about__slide {
  flex: 0 0 auto;
  width: calc(346 * var(--u) * var(--ratio, 0.75));
  height: calc(346 * var(--u));
  scroll-snap-align: start;
  background: #e9e9e9;
}

.oba-about .oba-about__arrow {
  all: unset;
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  color: var(--oba-black);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.oba-about .oba-about__arrow--prev {
  left: calc(129 * var(--u) - 22px);
}

.oba-about .oba-about__arrow--next {
  right: calc(129 * var(--u) - 22px);
}

.oba-about .oba-about__arrow svg {
  display: block;
  width: calc(10 * var(--u));
  min-width: 8px;
  height: auto;
  overflow: visible;
}

.oba-about .oba-about__arrow svg path {
  fill: none;
  stroke: currentColor;
}

.oba-about .oba-about__arrow[disabled] {
  opacity: 0.25;
  cursor: default;
}

/*
 * Once Slick has started (js/oba.js) it owns the strip: the native
 * scrolling above is only the fallback. Slides keep their own width, so the
 * strip shows as many images as fit (four and a bit on the 1440 design).
 */
.oba-about__track.slick-initialized {
  display: block;
  overflow: visible;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.oba-about__track.slick-initialized .slick-list {
  overflow: hidden;
  cursor: grab;
}

.oba-about__track.slick-initialized .slick-list.dragging {
  cursor: grabbing;
}

.oba-about__track.slick-initialized .slick-track {
  display: flex;
  will-change: transform;
}

.oba-about__track.slick-initialized .slick-slide {
  float: none;
  height: calc(346 * var(--u));
  outline: none;
}

/* Dragging the strip must not start a native image drag. */
.oba-about__track .oba-about__slide img {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

/* Slick writes an inline "display" on its arrows: keep ours in charge. */
.oba-about .oba-about__arrow.slick-arrow {
  display: grid !important;
}

.oba-about .oba-about__arrow.slick-hidden {
  display: none !important;
}

/* ---------- Essay: Courier Bold 20 / 130% / 2% ---------- */

.oba-about__essay {
  width: calc(425 * var(--u));
  min-width: 300px;
  max-width: calc(100% - 40px);
  margin: var(--oba-gap) auto 0;
}

.oba-about .oba-about__essay,
.oba-about .oba-about__essay p {
  color: var(--oba-black);
  font-family: var(--oba-font-essay) !important;
  font-size: max(14px, calc(20 * var(--u)));
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: none;
}

.oba-about .oba-about__essay p {
  margin: 0 0 1.3em;
}

.oba-about .oba-about__essay p:last-child {
  margin-bottom: 0;
}

.oba-about .oba-about__essay a {
  color: inherit;
  text-decoration: underline;
}

/* ---------- Statement: Helvetica Black 110 / 100% / -5%, slanted 15 degrees ---------- */

.oba-about__statement {
  display: flex;
  justify-content: center;
  margin-top: var(--oba-gap);
  padding: calc(193 * var(--u)) 0 calc(232 * var(--u));
  overflow: hidden;
  background: var(--oba-black);
  color: var(--oba-white);
}

.oba-about__statement-text {
  width: calc(1157 * var(--u));
  font-family: var(--oba-font-title);
  font-size: calc(110 * var(--u));
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  text-align: center;
  transform: translateX(calc(23 * var(--u))) rotate(-15deg);
}

/* ---------- Mobile (393 frame) ---------- */

@media (max-width: 767px) {
  .oba-about {
    --u: calc(100vw / 393);
    --oba-gap: calc(90 * var(--u));
  }

  .oba-header {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    padding: calc(37 * var(--u)) 0 0;
    background: transparent;
  }

  body.admin-bar .oba-header {
    top: 46px;
  }

  .oba-header .oba-header__logo {
    order: 1;
  }

  .oba-header .oba-header__logo img {
    width: calc(259 * var(--u));
  }

  .oba-header__links {
    order: 2;
    align-items: center;
    gap: calc(14 * var(--u));
    padding-top: calc(20 * var(--u));
  }

  .oba-header .oba-header__link,
  .oba-header .oba-header__link:visited {
    margin: 0;
    padding: calc(5 * var(--u)) calc(8 * var(--u)) calc(3 * var(--u));
    font-size: calc(12 * var(--u));
  }

  .oba-header__actions {
    position: absolute;
    top: calc(41 * var(--u));
    right: calc(19 * var(--u));
    padding: 0;
  }

  /* The mobile header has the menu button only. */
  .oba-header .oba-header__icon--search {
    display: none;
  }

  .oba-header .oba-header__icon--menu {
    width: calc(28 * var(--u));
    height: calc(19 * var(--u));
  }

  .oba-about__main {
    padding-top: calc(226 * var(--u));
  }

  /*
   * Figma: one line, as wide as the photo below it. The supplied Helvetica
   * Black runs wider than Figma's, so 44px here gives the width 50px has there.
   */
  .oba-about .oba-about__title {
    padding: 0 calc(10 * var(--u));
    font-size: calc(44 * var(--u));
  }

  .oba-about__hero {
    width: calc(353 * var(--u));
    margin-top: calc(18 * var(--u));
  }

  .oba-about__track {
    width: 100%;
  }

  /* Mobile: swipe only, no arrows. */
  .oba-about .oba-about__arrow,
  .oba-about .oba-about__arrow.slick-arrow {
    display: none !important;
  }

  .oba-about__essay {
    width: calc(290 * var(--u));
    min-width: 0;
  }

  .oba-about .oba-about__essay,
  .oba-about .oba-about__essay p {
    font-size: calc(15 * var(--u));
  }

  .oba-about__statement {
    padding: calc(95 * var(--u)) 0 calc(105 * var(--u));
  }

  /*
   * Figma: 40px in a 335px column. Slanted 15 degrees, a block that size runs
   * wider than the screen and its first and last lines get cut off, so it is
   * set 10% smaller (same line breaks) to stay inside the edges.
   */
  .oba-about__statement-text {
    width: calc(302 * var(--u));
    font-size: calc(36 * var(--u));
    letter-spacing: -0.03em;
    transform: rotate(-15deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .oba-about__char {
    animation: none;
  }

  .oba-about__track {
    scroll-behavior: auto;
  }
}
