/* =====================================================================
   ABOUT PAGE: "Our Team" tilted-card slider
   Markup is in about.html, slider behaviour in scripts/about-team.js
   ===================================================================== */

/* ── Slider basics (shared) ─────────────────────────────────── */
.hs { position: relative; }
.hs-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hs-track::-webkit-scrollbar { display: none; }
.hs-track:focus-visible { outline: 2px solid var(--acc, #ffa305); outline-offset: 4px; border-radius: 12px; }
.hs-slide {
  flex: 0 0 calc(100% / var(--per, 5));
  scroll-snap-align: start;
  min-width: 0;
}
.hs-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #111;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}
.hs-btn:hover:not(:disabled) { background: #111; border-color: #111; color: #fff; }
.hs-btn:focus-visible { outline: 2px solid var(--acc, #ffa305); outline-offset: 2px; }
.hs-btn:disabled { opacity: 0.35; cursor: default; }
.hs-btn[hidden] { display: none; }

/* ── Section: dark brand backdrop with orange glows ─────────── */
.otm-sec {
  position: relative;
  padding: 96px 0;
  background: var(--off, #f5f5f5); /* same light grey as the offices section */
}

/* Full-width area holding the two white panels */
.otm-wrap {
  width: calc(100% - 64px);
  max-width: 1760px;
  margin: 0 auto;
  display: grid;
  gap: 40px;
}

/* White panel */
.otm-panel {
  position: relative;
  background: #fff;
  border-radius: 22px;
  padding: 72px clamp(28px, 4vw, 72px) 60px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.06);
  border: 1px solid #ececec;
}

/* Heading row: arrow + title on the left, intro on the right */
.otm-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 64px;
  align-items: center;
  margin-bottom: 56px;
}
.otm-title {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--head);
  font-size: clamp(34px, 4vw, 60px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #111;
  margin: 0;
}
.otm-title strong { font-weight: 800; }
.otm-title > span:last-child { white-space: nowrap; }
.otm-arrow {
  position: relative;
  flex: 0 0 84px;
  height: 2px;
  background: var(--acc, #ffa305);
}
.otm-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 11px;
  height: 11px;
  border-top: 2px solid var(--acc, #ffa305);
  border-right: 2px solid var(--acc, #ffa305);
  transform: translateY(-50%) rotate(45deg);
}
.otm-intro {
  font-size: 16px;
  line-height: 1.8;
  max-width: 760px;
  color: #222;
  margin: 0;
}

/* ── Tilted cards ───────────────────────────────────────────── */
/* Big cards (up to 400px wide); when they all fit they sit centred */
.otm-slider { --per: 4; --max: 400px; }
.otm-slider.tm { --per: 4; }
.otm-slider .hs-slide { flex-basis: min(calc(100% / var(--per)), var(--max)); }
.otm-slider .hs-slide:first-child { margin-left: auto; }
.otm-slider .hs-slide:last-of-type { margin-right: auto; }
.otm-slider.is-static .otm-foot-nav { display: none; }
.otm-slider .hs-track {
  /* room for the tilt and hover lift, so cards aren't clipped */
  padding: 34px 12px 58px;
  margin: -34px -12px -58px;
  scroll-padding-inline: 12px; /* snap to the first card, not the padding */
}
.otm-item { padding: 0 10px; position: relative; z-index: 1; }
.otm-photo {
  position: relative;
  margin: 0;
  aspect-ratio: 0.78;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 85%, rgba(255, 163, 5, 0.9), transparent 55%),
    radial-gradient(circle at 15% 10%, rgba(255, 120, 10, 0.45), transparent 50%),
    linear-gradient(160deg, #2a2420 0%, #141110 100%);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
  transform: rotate(var(--tilt, 0deg)) translateY(var(--lift, 0px));
  transition: transform 0.35s cubic-bezier(.2,.8,.3,1), box-shadow 0.35s;
}
.otm-item:nth-child(5n+1) { --tilt: -4deg; --lift: 4px; }
.otm-item:nth-child(5n+2) { --tilt: 3deg;  --lift: -2px; }
.otm-item:nth-child(5n+3) { --tilt: -1deg; --lift: 6px; }
.otm-item:nth-child(5n+4) { --tilt: 3.5deg; --lift: -4px; }
.otm-item:nth-child(5n+5) { --tilt: -3deg; --lift: 2px; }

.otm-photo img {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 92%;
  object-fit: contain;
  object-position: 50% 100%;
  transition: transform 0.5s;
  transform-origin: 50% 100%;
}

/* Dark fade so the name stays readable */
.otm-photo::after {
  content: "";
  position: absolute;
  inset: 45% 0 0 0;
  background: linear-gradient(to top, rgba(10, 8, 6, 0.92) 0%, rgba(10, 8, 6, 0.55) 45%, transparent 100%);
  pointer-events: none;
}
.otm-photo figcaption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 1;
  color: #fff;
}
.otm-name {
  display: block;
  font-family: var(--head);
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.otm-role {
  display: block;
  margin-top: 4px;
  font-size: clamp(12.5px, 1vw, 15px);
  font-weight: 500;
  color: #ffb84a;
  line-height: 1.35;
}

.otm-item:hover { z-index: 3; }
.otm-item:hover .otm-photo,
.otm-item:focus-within .otm-photo {
  transform: rotate(0deg) translateY(-8px) scale(1.04);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
}
.otm-item:hover .otm-photo img { transform: scale(1.03); }

/* Footer: prev · Join our team · next */
.otm-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}
.otm-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 40px;
  background: var(--acc, #ffa305);
  color: #111;
  font-family: var(--head);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.otm-cta i { font-size: 12px; transition: transform 0.2s; }
.otm-cta:hover { background: #111; color: #fff; transform: translateY(-2px); }
.otm-cta:hover i { transform: translateX(3px); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .otm-slider, .otm-slider.tm { --per: 4; }
  .otm-head { grid-template-columns: auto minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 900px) {
  .otm-panel { padding: 56px 36px 44px; }
  .otm-head { grid-template-columns: 1fr; gap: 18px; margin-bottom: 40px; }
  .otm-slider, .otm-slider.tm { --per: 2.4; }
}
@media (max-width: 768px) {
  .otm-sec { padding: 56px 0; }
  .otm-wrap { width: calc(100% - 24px); gap: 24px; }
  .otm-panel { padding: 40px 18px 32px; border-radius: 16px; }
  .otm-title { gap: 16px; }
  .otm-arrow { flex-basis: 44px; }
  .otm-intro { font-size: 14px; }
  .otm-slider, .otm-slider.tm { --per: 2.1; }
  .otm-foot { margin-top: 12px; }
}
@media (max-width: 480px) {
  .otm-slider, .otm-slider.tm { --per: 1.3; }
  .otm-name { font-size: 15px; }
  .otm-cta { padding: 12px 20px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-track { scroll-behavior: auto; }
  .otm-photo, .otm-photo img { transition: none; }
}

/* ── Colour swap: dark-orange panel, white photo frames ───────── */
.otm-panel {
  background:
    radial-gradient(ellipse 45% 70% at 12% 10%, rgba(196, 98, 22, 0.55), transparent 65%),
    radial-gradient(ellipse 50% 60% at 85% 95%, rgba(214, 140, 18, 0.45), transparent 65%),
    linear-gradient(160deg, #2a1d12 0%, #17110c 55%, #120d09 100%);
  border: 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}
.otm-panel .otm-title { color: #fff; }
.otm-panel .otm-intro { color: rgba(255, 255, 255, 0.72); }

/* White frame: photo on top, name and role underneath */
.otm-photo {
  aspect-ratio: 0.7;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}
.otm-photo::after { display: none; }
.otm-photo img {
  top: 18px;
  bottom: auto;
  left: 14px;
  right: 14px;
  width: calc(100% - 28px);
  height: calc(100% - 18px - 92px);
}
.otm-photo figcaption {
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-top: 1px solid #f0f0f0;
}
.otm-name { color: #111; }
.otm-role { color: #e08a00; }

/* Controls on the dark panel */
.otm-panel .hs-btn {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.otm-panel .hs-btn:hover:not(:disabled) { background: #fff; border-color: #fff; color: #111; }
.otm-panel .otm-cta:hover { background: #fff; color: #111; }

@media (max-width: 480px) {
  .otm-photo img { height: calc(100% - 18px - 80px); }
  .otm-photo figcaption { height: 80px; padding: 0 12px; }
}
