/*
 * styles.css
 * Single-page actor/VO site for Opal Besson. Responsive by screen shape:
 *   - Portrait / narrow screens (phones): full-bleed hero photo, text overlaid.
 *   - Landscape / wide screens (desktop): whole portrait shown in full inside a
 *     frame on a backdrop drawn from the photo, text beside it. No face cropping.
 * A <picture> serves a tall crop on phones and a wider crop on desktop.
 * Overlaid: name, tagline, IMDb button, resume button, and an inline VO demo player.
 *
 * status: two-image responsive hero + IMDb/resume buttons + VO audio player
 * issues: none
 * todo: none
 */

:root {
  --color-ink: #ffffff;
  --color-ink-soft: rgba(255, 255, 255, 0.88);
  /* Backdrop sampled from the photo's own grey background, darkened slightly. */
  --color-backdrop: #322f3a;
  /* Name accent: the muted teal/sage from Opal's previous site, which she liked.
     Complements the warm rust/grey tones of the headshot. */
  --color-name: #6ea9a0;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --space-sm: 12px;
  --space-md: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-body);
  line-height: 1.5;
  background: var(--color-backdrop);
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------------------
   Base layout = MOBILE / narrow / portrait screens: full-bleed hero photo.
--------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* The <picture> is the positioning box; its <img> does the covering. */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Focal point on her face so tall screens don't crop to the forehead. */
  object-position: center 38%;
}

/* Bottom-weighted gradient so the lower-centered text stays legible. */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.4) 26%,
    rgba(0, 0, 0, 0.05) 52%,
    rgba(0, 0, 0, 0) 72%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  color: var(--color-ink);
  padding: clamp(32px, 7vh, 72px) clamp(24px, 6vw, 56px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 6rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
  color: var(--color-name);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
}

.tagline {
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
  letter-spacing: 0.1em;
  color: var(--color-ink-soft);
  margin: var(--space-sm) 0 0;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.5);
}

/* Mobile: two stacked lines, no separator. Role in normal case, union uppercase. */
.tagline-role,
.tagline-union {
  display: block;
}

.tagline-union {
  text-transform: uppercase;
  margin-top: 4px;
}

.tagline-sep {
  display: none;
}

.links {
  margin-top: clamp(22px, 4vw, 34px);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px clamp(14px, 4vw, 20px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  color: var(--color-ink);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(2px);
  text-decoration: none;
  font-size: clamp(0.82rem, 3.4vw, 0.95rem);
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.link-button:hover,
.link-button:focus-visible {
  background: #ffffff;
  color: #1a1a1a;
}

.link-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* IMDb button: the yellow badge sits on a transparent pill so the logo reads
   as itself, not recolored on hover. */
.link-imdb {
  padding: 9px clamp(12px, 3vw, 16px);
  background: rgba(255, 255, 255, 0.08);
}

.link-imdb:hover,
.link-imdb:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.imdb-logo {
  display: block;
  height: clamp(22px, 5.5vw, 26px);
  width: auto;
}

/* Voiceover demo player: blurs/dims the page and docks a thin dark bar bottom-center. */
.player {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
}

.player[hidden] {
  display: none;
}

.player-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
}

.player-bar {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(20, 19, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  animation: player-rise 0.28s ease;
}

@keyframes player-rise {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.player-play {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--color-name);
  color: #14131a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.player-play:hover,
.player-play:focus-visible {
  filter: brightness(1.1);
}

.player-play svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.player-body {
  flex: 1 1 auto;
  min-width: 0;
}

.player-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 7px;
}

.player-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  overflow: hidden;
}

.player-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--color-name);
}

.player-time {
  flex: 0 0 auto;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
}

.player-close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 2px 4px;
}

.player-close:hover,
.player-close:focus-visible {
  color: #ffffff;
}

/* Accessibility helper: hidden but read by screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------------------
   WIDE / landscape screens (desktop): SAME full-bleed centered hero as mobile —
   the (wider) desktop photo fills the screen, text centered over the scrim.
   The <picture> swaps in the desktop crop here; this block only scales the type
   up and caps the text column so it doesn't stretch.
   (Cover-crop is intentional: the desktop image should be a looser/wider crop.)
--------------------------------------------------------------------------- */
@media (min-aspect-ratio: 1 / 1) and (min-width: 720px) {
  /* Bias the wide crop toward the upper-middle so the face reads well behind the
     centered text. Opal can fine-tune by how she frames the desktop photo. */
  .hero-photo img {
    object-position: center 35%;
  }

  .hero-content {
    max-width: 640px;
    padding: clamp(40px, 6vh, 80px) clamp(40px, 5vw, 88px);
  }

  .name {
    font-size: clamp(4rem, 7vw, 7rem);
  }

  .tagline {
    font-size: clamp(1rem, 1.5vw, 1.3rem);
  }

  /* Desktop: one line with the separator between role and union. */
  .tagline {
    white-space: nowrap;
  }

  .tagline-role,
  .tagline-union,
  .tagline-sep {
    display: inline;
  }

  .tagline-union {
    margin-top: 0;
  }

  .tagline-sep {
    margin: 0 0.6em;
    color: rgba(255, 255, 255, 0.5);
  }

  /* Roomier buttons on desktop (mobile keeps them compact to fit one line). */
  .link-button {
    padding: 12px 22px;
    font-size: 0.95rem;
    gap: 0;
  }
}
