/* ==========================================================================
   YFL Photo Gallery — website discovery layer (/photos/ and /photos/album).
   Premium football editorial: photography first, bold Inter type, warm-white
   and near-black sections, the site's orange used only as an accent.
   Scoped to body.pg-page; builds on css/style.css tokens (no overrides there).
   ========================================================================== */

.pg-page {
  --pg-ink: #0b0b0b;
  --pg-charcoal: #141414;
  --pg-paper: #f5f5f0;
  --pg-muted: #6b6b66;
  --pg-muted-dark: #9a9a94;
  --pg-gap: clamp(1.25rem, 2.4vw, 2.25rem);
  background: var(--pg-ink);
}
/* The [hidden] attribute must win over component display rules. */
.pg-page [hidden] { display: none !important; }

/* --- Type ---------------------------------------------------------------- */
.pg-eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 1rem;
}
.pg-display {
  font-size: clamp(2.6rem, 7.2vw, 6.25rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0;
}
.pg-display--sm { font-size: clamp(2rem, 4.6vw, 3.75rem); }
.pg-lede {
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  line-height: 1.6;
  max-width: 34rem;
  margin: 1.5rem 0 0;
}
.pg-note { font-size: 0.85rem; margin: 1.25rem 0 0; opacity: 0.7; }
.pg-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
.pg-section-title { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 900; letter-spacing: -0.03em; text-transform: uppercase; line-height: 1; margin: 0; }

/* --- Arrow links + buttons ------------------------------------------------ */
.pg-arrowlink { display: inline-flex; align-items: center; gap: 0.15rem; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.pg-arrow { display: inline-block; transition: transform 0.25s ease; }
a:hover .pg-arrow, a:focus-visible .pg-arrow { transform: translateX(4px); }
.pg-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.pg-page .btn { border-radius: 2px; padding: 0.95rem 1.6rem; }
.pg-page a:focus-visible, .pg-page button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }

/* --- Image crop rules ------------------------------------------------------ */
/* Cards / featured / hero / album preview: fill, keep heads (center top). */
.pg-card-img, .pg-feature-img, .pg-hero-img, .pg-album-img, .pg-story-img, .pg-final-img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top;
}
.pg-noimg { width: 100%; height: 100%; background: #1d1d1b; }

/* ==========================================================================
   1. HERO — full-bleed photograph, editorial type bottom-left
   ========================================================================== */
.pg-hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: var(--pg-ink);
}
.pg-hero-media { position: absolute; inset: 0; }
.pg-hero-img { object-position: center 30%; }
.pg-hero-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,8,8,0.82) 0%, rgba(8,8,8,0.45) 48%, rgba(8,8,8,0.05) 100%),
              linear-gradient(0deg, rgba(8,8,8,0.7) 0%, rgba(8,8,8,0) 45%);
}
.pg-hero-content { position: relative; z-index: 1; width: 100%; padding-top: calc(var(--nav-height) + 4rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.pg-hero .pg-lede { color: rgba(255,255,255,0.86); }

/* ==========================================================================
   2. FEATURED — editorial spread on warm white
   ========================================================================== */
.pg-paper { background: var(--pg-paper); color: var(--pg-ink); }
.pg-featured { padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.pg-feature {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  color: inherit;
}
.pg-feature-media { aspect-ratio: 3 / 2; overflow: hidden; background: #e7e6df; }
.pg-feature-img { transition: transform 0.6s ease; }
.pg-feature:hover .pg-feature-img { transform: scale(1.025); }
.pg-feature-title { font-size: clamp(2.2rem, 4.8vw, 4.4rem); font-weight: 900; line-height: 0.95; letter-spacing: -0.035em; text-transform: uppercase; margin: 0; }
.pg-feature-date { font-size: clamp(1rem, 1.5vw, 1.25rem); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin: 1rem 0 0; }
.pg-feature-comp { display: inline-block; margin: 1.5rem 0 1.5rem; padding-top: 0.75rem; border-top: 3px solid var(--color-primary); font-weight: 900; letter-spacing: 0.12em; font-size: 0.85rem; }
.pg-feature-text .pg-arrowlink { display: flex; }

/* ==========================================================================
   3. LATEST ALBUMS — one album = one card = one photograph
   ========================================================================== */
.pg-latest { padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(4rem, 8vw, 7rem); }
.pg-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.25rem, 4vw, 3.25rem) var(--pg-gap); }
@media (min-width: 640px) { .pg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .pg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pg-card { display: block; color: inherit; }
.pg-card-media { aspect-ratio: 4 / 5; overflow: hidden; background: #e7e6df; }
.pg-card-img { transition: transform 0.6s ease; }
.pg-card:hover .pg-card-img { transform: scale(1.03); }
.pg-card-body { padding-top: 1.1rem; }
.pg-card-comp { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.16em; color: var(--color-primary); margin: 0 0 0.45rem; }
.pg-card-title { font-size: clamp(1.25rem, 1.9vw, 1.55rem); font-weight: 900; letter-spacing: -0.02em; text-transform: uppercase; line-height: 1.05; margin: 0; }
.pg-card-date { font-size: 0.92rem; color: var(--pg-muted); margin: 0.45rem 0 0.9rem; }
.pg-more { display: flex; justify-content: center; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.pg-latest-note { color: var(--pg-muted); font-size: 1rem; margin: 0; }

/* skeleton */
.pg-skeleton .pg-card-media { animation: pg-pulse 1.4s ease-in-out infinite; }
.pg-skel-line { height: 0.9rem; background: #e2e1da; margin-top: 0.7rem; width: 70%; animation: pg-pulse 1.4s ease-in-out infinite; }
.pg-skel-line--short { width: 30%; }
.pg-skel-line--title { height: clamp(2.2rem, 5vw, 4.4rem); width: 85%; margin-top: 1rem; }
.pg-skeleton-box { animation: pg-pulse 1.4s ease-in-out infinite; }
@keyframes pg-pulse { 50% { opacity: 0.55; } }

/* states */
.pg-state { padding: 2.5rem 0; max-width: 40rem; }
.pg-state-title { font-size: 1.4rem; font-weight: 900; text-transform: uppercase; letter-spacing: -0.01em; margin: 0 0 0.6rem; }
.pg-state-text { color: var(--pg-muted); margin: 0 0 1.25rem; line-height: 1.6; }

/* ==========================================================================
   4. APP CONVERSION — dark, typographic, real data only (no mock screens)
   ========================================================================== */
.pg-app { background: var(--pg-charcoal); color: #fff; padding: clamp(4.5rem, 9vw, 8rem) 0; }
.pg-app-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.pg-app .pg-lede { color: rgba(255,255,255,0.78); }
/* Device: a real YFL App screenshot inside a restrained, straight-on iPhone frame (no 3D, no glow). */
.pg-phone { margin: 0; display: flex; justify-content: center; }
.pg-phone-frame {
  width: clamp(270px, 27vw, 380px);
  padding: 3.2%;
  border-radius: 15.5% / 7.2%;
  background: linear-gradient(145deg, #2b2b2f 0%, #121214 45%, #1d1d20 100%);
  box-shadow: inset 0 0 0 1.5px #3a3a3f, inset 0 0 0 5px #0a0a0b, 0 40px 80px -30px rgba(0, 0, 0, 0.75);
}
.pg-phone-screen {
  position: relative;
  aspect-ratio: 1125 / 2436; /* the supplied screenshot's native ratio — never stretched or cropped */
  border-radius: 12.5% / 5.8%;
  overflow: hidden;
  background: #0b0b0c;
}
.pg-phone-screen img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pg-phone-island { position: absolute; top: 1.6%; left: 50%; transform: translateX(-50%); width: 31%; height: 3.6%; border-radius: 999px; background: #000; }
.pg-app-points { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0.9rem; }
.pg-app-points li { position: relative; padding-left: 1.5rem; color: rgba(255,255,255,0.86); }
.pg-app-points li::before { content: ''; position: absolute; left: 0; top: 0.65em; width: 0.6rem; height: 2px; background: var(--color-primary); }

/* ==========================================================================
   5. STORYTELLING — editorial accents from YFL photography
   ========================================================================== */
.pg-story { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.pg-story-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.pg-story-head .pg-lede { color: #3d3d3a; margin: 0; }
.pg-story-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto; gap: var(--pg-gap); }
.pg-story-fig { margin: 0; overflow: hidden; background: #e7e6df; position: relative; }
.pg-story-fig--a { grid-row: span 2; aspect-ratio: 4 / 5; }
/* the two right-hand photographs share the height of the tall one exactly */
.pg-story-fig--b .pg-story-img, .pg-story-fig--c .pg-story-img { position: absolute; inset: 0; }
.pg-story-fig--b .pg-story-img { object-position: center 35%; }

/* ==========================================================================
   6. FINAL CTA — full-width photograph
   ========================================================================== */
.pg-final { position: relative; color: #fff; min-height: min(80vh, 720px); display: flex; align-items: center; overflow: hidden; }
.pg-final-media { position: absolute; inset: 0; }
.pg-final-img { object-position: center 35%; }
.pg-final-media::after { content: ''; position: absolute; inset: 0; background: rgba(8,8,8,0.6); }
.pg-final-content { position: relative; z-index: 1; width: 100%; padding-top: clamp(5rem, 10vw, 8rem); padding-bottom: clamp(5rem, 10vw, 8rem); }
.pg-final .pg-lede { color: rgba(255,255,255,0.86); }

/* ==========================================================================
   ALBUM PAGE — one Website Preview + the app
   ========================================================================== */
.pg-album { background: var(--pg-paper); color: var(--pg-ink); padding: calc(var(--nav-height) + clamp(2.5rem, 6vw, 4.5rem)) 0 clamp(3.5rem, 7vw, 6rem); }
.pg-album-inner { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.pg-backlink { display: inline-block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pg-muted); margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.pg-backlink:hover { color: var(--pg-ink); }
.pg-album-title { font-size: clamp(2.5rem, 6vw, 5.25rem); font-weight: 900; line-height: 0.92; letter-spacing: -0.035em; text-transform: uppercase; margin: 0; }
.pg-album-meta { font-size: clamp(1rem, 1.5vw, 1.2rem); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin: 1.25rem 0 0; }
.pg-album-desc { color: #3d3d3a; line-height: 1.65; margin: 1.25rem 0 0; max-width: 34rem; white-space: pre-line; }
.pg-album-media { aspect-ratio: 4 / 5; overflow: hidden; background: #e7e6df; }
.pg-album-app { background: var(--pg-charcoal); color: #fff; padding: clamp(4rem, 8vw, 6.5rem) 0; }
.pg-album-app-inner .pg-lede { color: rgba(255,255,255,0.8); }
.pg-album-app .pg-appstore { margin-top: 2rem; }
.pg-album-state { background: var(--pg-paper); color: var(--pg-ink); padding: calc(var(--nav-height) + 4rem) 0 5rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1023px) {
  .pg-feature, .pg-app-inner, .pg-story-head, .pg-album-inner { grid-template-columns: 1fr; }
  .pg-feature-media { aspect-ratio: 4 / 3; }
  .pg-phone { margin-top: 1rem; }
  .pg-phone-frame { width: min(320px, 74vw); }
}
@media (max-width: 639px) {
  .pg-page main .container { padding-left: 1.25rem; padding-right: 1.25rem; }
  .pg-hero { min-height: 0; display: block; }
  .pg-hero-media { position: relative; aspect-ratio: 4 / 5; }
  .pg-hero-media::after { background: linear-gradient(0deg, rgba(8,8,8,1) 0%, rgba(8,8,8,0) 40%); }
  .pg-hero-content { padding-top: 0; padding-bottom: 3rem; margin-top: -4.5rem; }
  .pg-actions .btn { flex: 1 1 100%; justify-content: center; }
  .pg-display { font-size: clamp(2.1rem, 9.6vw, 2.6rem); }
  .pg-story-grid { grid-template-columns: 1fr; }
  .pg-story-fig--a { grid-row: auto; }
  .pg-story-fig--b, .pg-story-fig--c { aspect-ratio: 3 / 2; }
  .pg-section-head { display: block; }
  .pg-album-media { order: -1; }
  .pg-album .pg-backlink { margin-bottom: 1.25rem; }
  .pg-final { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-card-img, .pg-feature-img, .pg-arrow { transition: none; }
  .pg-card:hover .pg-card-img, .pg-feature:hover .pg-feature-img { transform: none; }
  .pg-skeleton .pg-card-media, .pg-skel-line, .pg-skeleton-box { animation: none; }
}
