/* team.css — White Sand Salon team pages (/artist/, /our-team/).
 * Coastal editorial luxury, matching service.css. Scoped under .team so it's
 * inert elsewhere (loaded globally from base.js). Consumes tokens.css. */

.team {
  --edge: clamp(1.25rem, 5vw, 3.5rem);
  color: var(--ink);
  background: var(--paper);
  overflow-x: clip;
}
.team .rule {
  display: block;
  width: 64px;
  height: 1px;
  margin: 0 auto var(--space-6);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.team [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.team [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Hero — full-viewport cinematic chapter -------------------------------------- */
.team-hero {
  position: relative;
  min-height: 82vh;
  min-height: 82svh;
  display: flex;
  align-items: flex-end;
  overflow: clip;
  isolation: isolate;
  background: var(--ocean-deep);
}
.team-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.team-hero__img {
  position: absolute;
  left: 0;
  top: -12%;
  width: 100%;
  height: 124%;
  object-fit: cover;
  filter: grayscale(0.2) saturate(0.9) contrast(1.06) brightness(0.98) sepia(0.06);
  transform: translate3d(0, 0, 0);
  transition: filter var(--dur-slow) var(--ease);
}
.team-hero__grade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: overlay;
}
.team-hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
      to top,
      rgba(6, 23, 28, 0.74) 0%,
      rgba(6, 23, 28, 0.3) 42%,
      rgba(6, 23, 28, 0.08) 72%,
      rgba(6, 23, 28, 0) 100%
    ),
    linear-gradient(to right, rgba(6, 23, 28, 0.5) 0%, rgba(6, 23, 28, 0) 58%);
}
.team-hero__inner {
  position: relative;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6.5rem) var(--edge) clamp(2.75rem, 7vw, 5.5rem);
  text-align: left;
  color: var(--paper);
}
.team-hero__eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-100);
  font-weight: var(--fw-medium);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin: 0 0 var(--space-5);
}
.team-hero__h1 {
  margin: 0 0 0 -0.03em;
  font-family: var(--serif);
  font-weight: var(--fw-medium);
  font-size: clamp(2.2rem, 6.46vw, 5.04rem);
  line-height: 0.98;
  letter-spacing: -0.024em;
  color: var(--paper);
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(6, 23, 28, 0.45);
}
.team-hero__whisper {
  margin: clamp(0.9rem, 2vw, 1.5rem) 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: var(--fw-regular);
  font-size: clamp(0.96rem, 1.98vw, 1.44rem);
  line-height: 1.3;
  color: rgba(250, 246, 238, 0.9);
  max-width: 30ch;
}
/* Typographic fallback (no hero image) */
.team-hero--type {
  background: var(--sand);
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.team-hero--type .team-hero__inner {
  text-align: center;
  color: var(--ink);
}
.team-hero--type .team-hero__eyebrow {
  color: var(--gold-deep);
}
.team-hero--type .team-hero__h1 {
  color: var(--ink);
  font-style: italic;
  text-shadow: none;
  margin-left: 0;
}
.team-hero--type .team-hero__whisper {
  color: var(--ink-soft);
  font-style: normal;
  margin: clamp(0.9rem, 2vw, 1.5rem) auto 0;
}

/* Body ---------------------------------------------------------------------- */
.team-body {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 9rem) var(--edge) clamp(4.5rem, 11vw, 9rem);
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 8vw, 7rem);
}
.team-intro {
  max-width: var(--container-narrow);
  margin: 0 auto;
  width: 100%;
  text-align: center;
}
.team-intro__prose {
  font-size: clamp(1.2rem, 2.3vw, 1.55rem);
  line-height: 1.58;
  color: var(--ink);
}

/* Editorial pull-quote — a large Montserrat-italic line lifted verbatim. */
.team-quote {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}
.team-quote__rule {
  display: block;
  width: 40px;
  height: 1px;
  margin: 0 auto var(--space-6);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.team-quote__q {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: var(--fw-light);
  font-size: clamp(1.2rem, 2.58vw, 1.69rem);
  line-height: 1.34;
  color: var(--ink-soft);
  text-wrap: balance;
  hanging-punctuation: first;
}
.team-quote__q::before {
  content: "\201C";
}
.team-quote__q::after {
  content: "\201D";
}
.team-quote__cite {
  display: block;
  margin-top: var(--space-5);
  font-family: var(--sans);
  font-style: normal;
  font-size: var(--fs-100);
  font-weight: var(--fw-medium);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.team-intro__prose p {
  margin: 0 0 var(--space-4);
}
.team-intro__prose p:last-child {
  margin-bottom: 0;
}

/* Roster grid --------------------------------------------------------------- */
/* Column counts mirror the original team page: one full-width card per row on a
   phone, three across on desktop (never four — a 4-up column is too narrow to
   read an open bio in). Cards STRETCH to a common row height, as the original's
   do, so the closed grid — what almost everyone sees — is perfectly even. */
.team-grid {
  display: grid;
  gap: clamp(1.1rem, 2.5vw, 1.9rem);
  grid-template-columns: 1fr;
}
.team-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur-slow) var(--ease);
}
.team-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--gold-light);
}
.team-card__media {
  position: relative;
  display: block;
  /* Square at 1-up (a 4:5 full-width portrait makes a 10-stylist phone page
     endless); the taller editorial 4:5 crop returns from 2-up on. */
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--sand);
}
.team-card__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(15, 15, 15, 0.1);
  pointer-events: none;
  transition: box-shadow var(--dur-slow) var(--ease);
}
.team-card:hover .team-card__media::before {
  box-shadow: inset 0 0 0 1px var(--gold-light);
}
/* Move 11: uniform desaturated-warm portrait grade → full colour on hover, so a
   mixed set of stylist photos reads as one editorial shoot. */
.team-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transform: scale(1.02);
  filter: var(--img-grade);
  transition: transform var(--dur-slow) var(--ease), filter var(--dur-slow) var(--ease);
}
.team-card:hover .team-card__img {
  transform: scale(1.07);
}
@media (hover: hover) {
  .team-card:hover .team-card__img {
    filter: var(--img-grade-hover);
  }
}
.team-card__media--mono {
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--ocean-deep), #0d2830);
}
.team-card__mono {
  font-family: var(--serif);
  font-size: clamp(2.0rem, 6.08vw, 2.88rem);
  font-weight: var(--fw-medium);
  letter-spacing: 0.04em;
  color: var(--gold-light);
}
.team-card__body {
  padding: var(--space-5) var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: center;
  /* Fill the stretched card so the booking action can sit on the floor. */
  flex: 1;
}
.team-card__name {
  font-family: var(--serif);
  font-weight: var(--fw-medium);
  font-size: var(--fs-500);
  line-height: 1.1;
  margin: 0;
}
.team-card__role {
  font-family: var(--sans);
  font-size: var(--fs-200);
  line-height: var(--lh-snug);
  color: var(--ink-soft);
}

/* "Read More" disclosure — the original site's per-member accordion, restated as
   a hairline-gold text toggle so a grid of ten never shouts. Native <details>:
   works with JS off, keyboard + screen-reader accessible for free. ------------ */
.team-card__more {
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
  text-align: left;
}
.team-card__more-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  list-style: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: var(--fs-100);
  font-weight: var(--fw-medium);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  padding: var(--space-2) 0;
  transition: color var(--dur) var(--ease);
}
.team-card__more-toggle::-webkit-details-marker {
  display: none;
}
.team-card__more-toggle:hover {
  color: var(--ink);
}
.team-card__more-toggle:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: var(--radius);
}
/* Gold chevron drawn in CSS — rotates to point up when the bio is open. */
.team-card__more-toggle::after {
  content: "";
  width: 0.42em;
  height: 0.42em;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-0.15em) rotate(45deg);
  transition: transform var(--dur) var(--ease);
}
.team-card__more[open] .team-card__more-toggle::after {
  transform: translateY(0.05em) rotate(-135deg);
}
.team-card__bio {
  padding-top: var(--space-3);
  margin-top: var(--space-1);
  border-top: 1px solid var(--line);
  text-align: left;
}
.team-card__bio-p {
  margin: 0 0 var(--space-3);
  font-family: var(--sans);
  font-size: var(--fs-200);
  line-height: 1.66;
  color: var(--ink-soft);
}
.team-card__bio-p:first-child {
  /* The original leads several bios with a bold role line before the prose. */
  color: var(--ink);
}
.team-card__bio-p:last-child {
  margin-bottom: 0;
}
.team-card__socials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: var(--space-4) 0 0;
}
.team-card__social {
  font-family: var(--sans);
  font-size: var(--fs-100);
  font-weight: var(--fw-medium);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-light);
  padding-bottom: 2px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.team-card__social:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* Per-person booking — the owner's second directive. An elegant gold-hairline
   twin of .btn--gold: ten of these read as a set, and the one filled gold CTA
   stays the closing "Book With Our Team". Pushed to the card's foot so a row of
   cards with different bio lengths still aligns its actions. ----------------- */
.team-card__book {
  margin-top: auto; /* floor of the card, so a row's actions always align */
  align-self: center;
  width: 100%;
  max-width: 22rem;
  text-align: center;
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-100);
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--gold-deep);
  background: transparent;
  border-color: var(--gold-light);
}
.team-card__book:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--paper);
}
.team-card__book:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

/* Closing chapter — full-viewport "Visit / Book" close ----------------------- */
.team-visit {
  min-height: 78vh;
  min-height: 78svh;
  display: grid;
  place-items: center;
  padding: clamp(4.5rem, 11vw, 9rem) var(--edge);
  background: var(--paper);
  border-top: 1px solid var(--line);
  text-align: center;
}
.team-visit__inner {
  max-width: 860px;
  margin: 0 auto;
}
.team-visit__eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-100);
  font-weight: var(--fw-medium);
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 var(--space-5);
}
.team-visit__h {
  margin: 0;
  font-family: var(--serif);
  font-weight: var(--fw-medium);
  font-size: clamp(2.0rem, 4.94vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.team-visit__lead {
  margin: clamp(1.25rem, 3vw, 2rem) auto 0;
  max-width: 46ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink-soft);
}
.team-visit__btn {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: var(--space-4) var(--space-8);
  font-size: var(--fs-300);
}

/* Responsive ---------------------------------------------------------------- */
@media (min-width: 560px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .team-card__media {
    aspect-ratio: 4 / 5;
  }
}
@media (min-width: 980px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .team [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .team-card__img,
  .team-card:hover .team-card__img {
    transform: none;
  }
  .team-hero__img {
    transform: none !important;
  }
}
.no-js .team [data-reveal] {
  opacity: 1;
  transform: none;
}
