/* ==========================================================================
   /our-team/ — hero, sticky full-screen member panels and cursor cards.
   Card measurements come from the Framer "cursor" components.
   ========================================================================== */

/* ---------- Hero ---------- */
.team-hero { position: relative; height: 100vh; min-height: 560px; overflow: hidden; background: var(--c-brown-900); color: #fff; }
.team-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.team-hero__wordmark {
  position: absolute; left: 0; right: 0; bottom: 0.04em; z-index: 1; text-align: center; pointer-events: none;
  font-size: 31vw; line-height: 0.8; letter-spacing: -0.08em; color: #fff;
  text-shadow: 0 0.02em 0.12em rgba(33, 24, 16, 0.18);
}
/* A warm shade at the top (nav) and bottom (wordmark) so white text reads over the bright photo. */
.team-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(33, 24, 16, 0.42) 0%, rgba(33, 24, 16, 0) 22%),
    linear-gradient(0deg, rgba(33, 24, 16, 0.62) 0%, rgba(33, 24, 16, 0.28) 24%, rgba(33, 24, 16, 0) 46%);
}

/* ---------- Member panels (each one slides over the previous) ---------- */
.member-stack { position: relative; }
.member { position: sticky; top: 0; height: 100vh; overflow: hidden; background: #111; }
.member__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Always-visible name + "Read profile" (the full profile opens in a dialog). */
.member__label {
  position: absolute; left: var(--gutter); top: calc(var(--nav-h) + 20px); z-index: 3;
  display: grid; justify-items: start; gap: 4px; color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.member__name { font-size: var(--fs-h3); line-height: 1.05; letter-spacing: -0.06em; font-weight: 400; }
.member__role { font-size: var(--fs-small); font-weight: 500; color: #fff; letter-spacing: 0.01em; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 0 18px rgba(0, 0, 0, 0.45); }
.member__open {
  margin-top: 12px; padding: 9px 16px; border-radius: 999px; cursor: pointer; text-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.55); background: rgba(43, 33, 25, 0.35); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 13px; letter-spacing: 0.04em; transition: background-color .2s;
}
.member__open:hover { background: rgba(43, 33, 25, 0.7); }

.profile {
  margin: auto; /* the global reset removes the native dialog centring */
  width: min(560px, calc(100% - 32px)); padding: 40px 36px 36px; border: 0; border-radius: 16px;
  background: var(--c-paper); color: var(--c-brown-700); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.5);
}
.profile::backdrop { background: rgba(33, 24, 16, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.profile__close { position: absolute; top: 12px; right: 16px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--c-taupe); }
.profile__head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.profile__photo { width: 96px; height: 120px; object-fit: cover; border-radius: 10px; }
.profile__role { font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--c-bronze); }
.profile__name { margin: 8px 0 0; font-size: var(--fs-h3); line-height: 1.05; letter-spacing: -0.06em; font-weight: 400; color: var(--c-brown-900); }
.profile { max-height: calc(100vh - 48px); overflow-y: auto; }
.profile__cv { display: grid; gap: 14px; margin-bottom: 20px; font-size: 16px; line-height: 1.6; letter-spacing: -0.01em; }
.profile__languages { margin-bottom: 28px; padding-top: 14px; border-top: 1px solid var(--c-line); font-size: 14px; color: var(--c-brown-900); }
.profile__languages span { margin-right: 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c-bronze); }

/* ---------- About ---------- */
.team-about { position: relative; min-height: 100vh; display: grid; place-items: center; padding-block: 120px; background: var(--c-paper); }
.team-about__text {
  max-width: 980px; margin-inline: auto; text-align: center;
  font-size: var(--fs-h3); line-height: 1.1; letter-spacing: -0.07em; color: var(--c-brown-700);
}

/* ---------- Cursor cards ---------- */
.cursor-card {
  z-index: 5; color: #fff; border-radius: 20px;
  font-family: "Geist", var(--font); font-weight: 500; letter-spacing: normal;
  background: linear-gradient(rgba(10, 10, 10, 0.2), rgba(10, 10, 10, 0.2)), rgba(13, 13, 13, 0.5);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  /* touch / no-JS: sits inside its section */
  position: absolute; left: var(--gutter); bottom: var(--gutter); max-width: calc(100% - var(--gutter) * 2);
}
.cursor-card__media { overflow: hidden; border-radius: 14px; }
.cursor-card__media img, .cursor-card__media video { width: 100%; height: 100%; object-fit: cover; }

.cursor-card--intro { width: 450px; min-height: 239px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.cursor-card__title { font-size: 24px; line-height: 1.2; letter-spacing: -0.04em; font-weight: 500; }
.cursor-card__intro { font-size: 16px; line-height: 1.3; letter-spacing: -0.03em; color: #adadad; }
.cursor-card__intro strong { color: #fff; font-weight: 500; }

.cursor-card--member {
  width: 700px; padding: 8px; display: grid; gap: 8px; grid-template-columns: 290px 386px;
  font-family: var(--font); font-weight: 400;
}
.cursor-card--member .cursor-card__text { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 16px; }
.cursor-card__name, .cursor-card__role, .cursor-card__bio { font-size: 18px; line-height: 1.4; letter-spacing: -0.05em; font-weight: 400; }
.cursor-card__role { color: #adadad; }
.cursor-card--member .cursor-card__media { height: 290px; }

.cursor-card--about { width: 340px; padding: 8px; display: grid; gap: 8px; }
.cursor-card__label { display: flex; align-items: center; gap: 8px; padding: 0 8px; font-size: 14px; line-height: 1.3; letter-spacing: -0.03em; }
.cursor-card__dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2); }
.cursor-card--about .cursor-card__media { height: 243px; }

.cursor-card--clock { display: flex; gap: 16px; padding: 12px 16px; font-size: 14px; line-height: 1.3; color: #adadad; white-space: nowrap; }
.cursor-card--clock strong { color: #fff; font-weight: 500; }
.cursor-card__time { color: #fff; }

/* Fine pointer: the card follows the mouse (modules/cursor-cards.js). */
.has-cursor-cards .cursor-card {
  position: fixed; left: 0; top: 0; bottom: auto; max-width: none;
  opacity: 0; scale: 0.92; pointer-events: none; will-change: transform;
  transition: opacity 0.25s ease, scale 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.has-cursor-cards .cursor-card.is-visible { opacity: 1; scale: 1; }

/* Touch devices: text-only cards inside each section. */
html:not(.has-cursor-cards) .cursor-card--member { grid-template-columns: 1fr; width: auto; }
html:not(.has-cursor-cards) .cursor-card--member .cursor-card__media,
html:not(.has-cursor-cards) .cursor-card--clock { display: none; }
html:not(.has-cursor-cards) .team-about .cursor-card { position: static; margin: 32px auto 0; max-width: 340px; }
/* The intro card sits at the bottom of the hero here (≈210px), so "Lamas" rests just
   above it, over the people's shoulders rather than their faces. */
html:not(.has-cursor-cards) .team-hero__wordmark { bottom: 236px; }
html:not(.has-cursor-cards) .team-hero::after {
  background:
    linear-gradient(180deg, rgba(33, 24, 16, 0.42) 0%, rgba(33, 24, 16, 0) 18%),
    linear-gradient(0deg, rgba(33, 24, 16, 0.6) 0%, rgba(33, 24, 16, 0.3) 40%, rgba(33, 24, 16, 0) 62%);
}

/* ---------- Rest of the team ---------- */
.team-more .display { max-width: 900px; margin-bottom: 56px; }
.team-more__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px 24px; }
.team-more__card {
  display: grid; gap: 4px; width: 100%; padding: 0; border: 0; background: none; text-align: left; font: inherit; color: inherit;
}
button.team-more__card { cursor: pointer; }
.team-more__photo, .team-more__avatar { width: 100%; aspect-ratio: 4 / 5; margin-bottom: 14px; border-radius: 12px; object-fit: cover; object-position: top; transition: transform .6s var(--ease-out); }
.team-more__avatar { display: grid; place-items: center; background: var(--c-soft); color: var(--c-taupe); font-size: 40px; letter-spacing: -0.04em; }
button.team-more__card:hover .team-more__photo { transform: translateY(-4px); }
.team-more__name { font-size: 19px; letter-spacing: -0.04em; color: var(--c-brown-900); }
.team-more__role { font-size: 14px; color: var(--c-taupe); }
.team-more__cta { margin-top: 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c-bronze); }

@media (max-width: 699px) {
  .cursor-card--intro { width: auto; min-height: 0; }
  .cursor-card__name, .cursor-card__role, .cursor-card__bio { font-size: 16px; }
  .team-hero__wordmark { font-size: 36vw; }
}

/* A soft shade behind the name and role, so they read over bright stone on any screen. */
.member::after { content: ""; position: absolute; inset: 0 auto auto 0; width: min(70%, 760px); height: 42%; z-index: 2; pointer-events: none; background: radial-gradient(120% 100% at 0% 0%, rgba(33, 24, 16, 0.62), rgba(33, 24, 16, 0) 72%); }

/* Portrait screens: crop each panel around the person (FOCUS in src/pages/team.mjs), and
   shade the top so the name and role read over the bright stone. */
@media (max-aspect-ratio: 1/1) {
  .member__bg { object-position: var(--focus-x, 50%) center; }
  .member::before { content: ""; position: absolute; inset: 0 0 auto; height: 45%; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(33, 24, 16, 0.55), rgba(33, 24, 16, 0)); }
}
@media (max-width: 699px) {
  .team-more__grid[data-swipe] { --swipe-w: 70%; }
}
