/* ============================================================
   Platynum — portfolio.css (portfolio.html only)
   ============================================================ */

/* Hero: short, cinematic, same depth layers as the homepage */
.pf-hero { position: relative; overflow: hidden; padding: calc(var(--nav-h) + 72px) 0 56px; }
.pf-hero-layers { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.pf-hero-layers div { position: absolute; border-radius: var(--r-lg); overflow: hidden; opacity: 0.35; box-shadow: var(--shadow-lg); }
.pf-hero-layers img { width: 100%; height: 100%; object-fit: cover; }
.pf-l1 { right: 6%; top: 10%; width: clamp(180px, 20vw, 320px); aspect-ratio: 16 / 10; transform: rotate(5deg); }
.pf-l2 { right: 24%; bottom: -8%; width: clamp(120px, 12vw, 200px); aspect-ratio: 9 / 16; transform: rotate(-6deg); }
.pf-l3 { left: -4%; bottom: -20%; width: clamp(220px, 26vw, 420px); aspect-ratio: 16 / 10; transform: rotate(-3deg); opacity: 0.25; }
.pf-hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; }
.pf-hero .lead { justify-self: end; max-width: 42ch; }
.pf-hero-wash { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(11, 16, 38, 0.4), rgba(11, 16, 38, 0.1) 40%, var(--bg)); }

/* Filter bar */
.pf-filter { position: sticky; top: 0; z-index: 50; padding: 14px 0; background: rgba(11, 16, 38, 0.78); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border-bottom: 1px solid var(--line-2); }
.pf-filter .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pf-tabs { display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 500; color: var(--text-2); white-space: nowrap; transition: all 0.25s ease; }
.pf-tab small { font-size: 0.72rem; font-weight: 600; color: var(--text-3); background: rgba(255, 255, 255, 0.06); padding: 2px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.pf-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.pf-tab.is-active { background: var(--teal); color: var(--bg); }
.pf-tab.is-active small { background: rgba(11, 16, 38, 0.2); color: var(--bg); }
.pf-tab[hidden] { display: none; }
.pf-filter-note { font-family: var(--serif); font-style: italic; color: var(--text-3); white-space: nowrap; }

/* Groups */
.pf-work { padding: 56px 0 var(--chapter); }
.pf-grid { display: flex; flex-direction: column; gap: 72px; }
.pf-group[hidden] { display: none; }
.pf-group-title { display: flex; align-items: center; gap: 16px; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.8rem; color: var(--text-2); margin-bottom: 22px; }
.pf-group-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pf-group.is-solo .pf-group-title { display: none; }
.pf-group-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; align-items: stretch; }

/* Cards */
.pf-card { position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); cursor: pointer; outline: none; text-decoration: none; color: inherit; transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease; }
.pf-card:hover, .pf-card:focus-visible { transform: translateY(-6px); border-color: var(--teal-line); box-shadow: var(--shadow-md); }
.pf-card:focus-visible { box-shadow: 0 0 0 3px var(--aqua); }
.pf-card-film { grid-column: span 4; }
.pf-card-featured { grid-column: span 8; }
.pf-card-reel { grid-column: span 3; }
.pf-card-website { grid-column: span 6; }
.pf-card-branding { grid-column: span 3; }

.pf-media { position: relative; overflow: hidden; background: var(--bg-2); flex-shrink: 0; }
.pf-card-film .pf-media { aspect-ratio: 16 / 9; flex: 1; }
.pf-card-featured .pf-media { aspect-ratio: auto; flex: 1; min-height: 0; }
.pf-card-reel .pf-media { aspect-ratio: 9 / 16; }
.pf-card-branding .pf-media { aspect-ratio: 4 / 5; }
.pf-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pf-card:hover .pf-media img { transform: scale(1.05); }
.pf-media-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, rgba(11, 16, 38, 0.05) 50%, rgba(11, 16, 38, 0.6)); transition: background 0.35s ease; }
.pf-card:hover .pf-media-overlay { background: linear-gradient(180deg, rgba(11, 16, 38, 0.3) 30%, rgba(11, 16, 38, 0.8)); }
.pf-card-branding .pf-media-overlay { background: none; }
.pf-play { width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--bg); display: grid; place-items: center; box-shadow: var(--shadow-md); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pf-card-featured .pf-play { width: 72px; height: 72px; }
.pf-card:hover .pf-play { transform: scale(1.12); background: #fff; }
.pf-chip { position: absolute; top: 12px; left: 12px; font-family: var(--serif); font-style: italic; font-size: 0.9rem; color: var(--text); background: rgba(11, 16, 38, 0.6); border: 1px solid rgba(255, 255, 255, 0.14); padding: 4px 12px; border-radius: 999px; background: rgba(11, 16, 38, 0.78); }

/* Website card: desktop + phone frames drawn in CSS */
.pf-card-website .pf-media { aspect-ratio: 16 / 10; background: linear-gradient(135deg, rgba(30, 180, 166, 0.18), rgba(18, 102, 140, 0.14)); padding: 28px 28px 0; }
.pf-desktop { position: relative; height: 100%; border-radius: 10px 10px 0 0; overflow: hidden; background: #fff; box-shadow: var(--shadow-lg); }
.pf-desktop::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 18px; background: #eef1f6 radial-gradient(circle, #c9d0de 2.5px, transparent 3px) 8px 4px / 11px 11px repeat-x; z-index: 1; }
.pf-desktop img { position: absolute; top: 18px; left: 0; width: 100%; height: calc(100% - 18px); object-position: top; }
.pf-phone { position: absolute; right: 22px; bottom: 0; width: 22%; aspect-ratio: 390 / 740; border-radius: 18px 18px 0 0; border: 4px solid var(--bg); border-bottom: 0; overflow: hidden; background: #fff; box-shadow: var(--shadow-lg); z-index: 2; }
.pf-phone img { object-position: top; }
.pf-card-website .pf-media-overlay { background: none; }

.pf-info { padding: 16px 18px 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; }
.pf-client { display: block; font-family: var(--serif); font-style: italic; color: var(--aqua); font-size: 0.95rem; margin-bottom: 3px; }
.pf-title { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.pf-link { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2); transition: all 0.3s ease; }
.pf-card:hover .pf-link { background: var(--text); color: var(--bg); border-color: var(--text); }
.pf-empty { text-align: center; padding: 80px 24px; border: 1px dashed var(--line); border-radius: var(--r-lg); color: var(--text-2); }
.pf-empty strong { display: block; font-size: 1.3rem; color: var(--text); margin-bottom: 6px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .pf-hero .container { grid-template-columns: 1fr; gap: 18px; }
  .pf-hero .lead { justify-self: start; }
  .pf-filter-note { display: none; }
  .pf-card-film { grid-column: span 6; }
  .pf-card-featured { grid-column: span 12; }
  .pf-card-featured .pf-media { aspect-ratio: 16 / 9; flex: none; }
  .pf-card-reel { grid-column: span 4; }
  .pf-card-branding { grid-column: span 4; }
  .pf-card-website { grid-column: span 12; }
}
@media (max-width: 720px) {
  .pf-grid { gap: 48px; }
  .pf-group-grid { gap: 12px; }
  .pf-card-film { grid-column: span 12; }
  .pf-card-branding { grid-column: span 6; }
  /* reels become a swipeable strip */
  .pf-group-reel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: none; }
  .pf-group-reel::-webkit-scrollbar { display: none; }
  .pf-group-reel .pf-card-reel { flex: 0 0 62vw; scroll-snap-align: start; }
  .pf-card-website .pf-media { padding: 18px 18px 0; }
  .pf-phone { right: 12px; width: 26%; }
}
