/* Direction pages — shared shell on top of src/css/site.css (+ scrollbar.css, liquid-type.css).
   Prefix pg- / reel / lbx so nothing collides with the home page sections. */
@import url('../css/lbx.css');
@import url('../css/talk.css');

/* top bar directions menu and the VY|MIRY mark live in src/css/site.css (shared with the home page) */

/* ---------- sections ---------- */
.pg-sec { position: relative; padding: 0 0 clamp(72px, 12vh, 140px); }
.pg-sec > .clip-head { margin-bottom: clamp(56px, 9vh, 110px); }
.pg-sec.alt { background: var(--bg-2); }
.pg-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 64px); align-items: end; margin-bottom: clamp(28px, 5vh, 56px); }
.pg-head .sec-h { margin: 0; font-size: clamp(40px, 6.4vw, 96px); }
.pg-head p { margin: 0; color: var(--muted); max-width: 46ch; font-size: clamp(15px, 1.1vw, 17px); }
.pg-hint { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.pg-chip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pg-chip::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--accent)); }

/* ---------- hero ---------- */
.pg-hero {
  position: relative; min-height: min(100svh, 1000px); display: grid; align-items: center;
  padding: clamp(96px, 14vh, 140px) 0 clamp(48px, 8vh, 88px);
  background: radial-gradient(90% 70% at 78% 40%, color-mix(in oklab, var(--dir) 12%, var(--bg)) 0%, var(--bg) 70%);
}
.pg-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 4.5vw, 80px); align-items: center; }
.pg-hero .kick { margin-bottom: 22px; }
.pg-hero h1 { font-family: var(--f-display); font-weight: var(--display-w); font-variation-settings: var(--display-vs); letter-spacing: var(--display-ls); line-height: 0.98; margin: 0 0 26px; font-size: clamp(44px, 6.6vw, 112px); }
.pg-hero h1.lt { font-family: var(--lt-font); }
.pg-lead { font-size: clamp(18px, 1.55vw, 23px); line-height: 1.4; margin: 0 0 16px; max-width: 32ch; font-weight: 500; }
.pg-body { color: var(--muted); margin: 0 0 14px; max-width: 48ch; font-size: clamp(15px, 1.1vw, 17px); }
.pg-act { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 26px; }

/* program monitor */
.hm { position: relative; }
.hm-bar { display: flex; align-items: center; gap: 12px; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--surface); font-family: var(--f-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.hm-bar .rec { color: var(--rec); }
.hm-bar .hm-tc { color: var(--text); font-variant-numeric: tabular-nums; }
.hm-bar .hm-name { margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.hm-frame { position: relative; aspect-ratio: var(--ar, 16 / 9); overflow: hidden; background: #050506; border: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.hm-frame img, .hm-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.hm-frame video { opacity: 0; transition: opacity 0.2s linear; }
.hm-frame video.on { opacity: 1; }
.hm.cut .hm-frame::after { content: ''; position: absolute; inset: 0; background: #fff; opacity: 0.08; }
.hm-safe { position: absolute; inset: 6% 5%; border: 1px dashed rgba(255, 255, 255, 0.22); border-radius: 4px; pointer-events: none; z-index: 2; }
.hm-safe::before, .hm-safe::after { content: ''; position: absolute; left: 50%; top: 50%; background: rgba(255, 255, 255, 0.4); }
.hm-safe::before { width: 18px; height: 1px; transform: translate(-50%, -50%); }
.hm-safe::after { width: 1px; height: 18px; transform: translate(-50%, -50%); }

/* ---------- reel (justified contact sheet) ---------- */
.reel { --row: clamp(150px, 19vw, 260px); display: flex; flex-wrap: wrap; gap: 10px; }
.reel-card {
  position: relative; flex: calc(var(--a) * 100) 1 calc(var(--a) * var(--row)); aspect-ratio: var(--a); min-width: 0;
  padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--card-bg); color: #fff; text-align: left;
  transition: transform 0.4s var(--ease-out);
}
.reel-end { flex: 10000 1 0; }
.reel-media, .reel-media img, .reel-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.reel-media img { transition: transform 1.2s var(--ease-out), filter 0.4s; }
.reel-media video { opacity: 0; transition: opacity 0.25s linear; }
.reel-media video.on { opacity: 1; }
.reel-card:hover .reel-media img { transform: scale(1.04); }
.reel-cap {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; align-items: baseline; padding: 30px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78)); font-size: 13px; font-weight: 600; line-height: 1.3;
  opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
.reel-cap b { font-weight: 500; font-size: 11px; opacity: 0.8; }
.reel-card:hover .reel-cap, .reel-card:focus-visible .reel-cap, .reel-card.playing .reel-cap { opacity: 1; transform: none; }
.reel-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); pointer-events: none; }
.reel-card.playing::after { box-shadow: inset 0 0 0 2px var(--rec); }
@media (hover: none) { .reel-cap { opacity: 1; transform: none; } }

}

/* ---------- talk (contact) ---------- */
.pg-talk-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.pg-talk .sec-h { font-size: clamp(40px, 5.6vw, 92px); }
.pg-talk .sec-h.lt, .pg-talk .sec-h { margin: 0 0 clamp(20px, 3vh, 32px); line-height: 1.02; }
.pg-hero h1.lt { margin: 0 0 clamp(18px, 3vh, 30px); }
.pg-talk-lead { font-size: clamp(17px, 1.4vw, 21px); max-width: 36ch; margin: 0 0 28px; }
.pg-channels { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 22px 0 0; padding: 0; }
.pg-channels a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; font-size: 14px; font-weight: 600; transition: border-color 0.2s, background-color 0.2s; }
.pg-channels a:hover { border-color: var(--text); }
.pg-brief {
  display: grid; gap: 10px; padding: clamp(22px, 3vw, 34px); border-radius: var(--radius); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden;
  transition: border-color 0.25s, transform 0.4s var(--ease-out);
}
.pg-brief:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.pg-brief b { font-family: var(--f-display); font-weight: var(--display-w); font-variation-settings: var(--display-vs); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.05; letter-spacing: var(--display-ls); }
.pg-brief > span:not(.kick):not(.link-arrow) { color: var(--muted); }
.pg-brief .kick { margin: 0; }
.pg-brief .lines { display: grid; gap: 6px; margin: 6px 0 4px; }
.pg-brief .lines i { display: block; height: 8px; border-radius: 3px; background: var(--line-strong); transform-origin: 0 50%; }
.pg-brief .lines i:nth-child(1) { width: 78%; } .pg-brief .lines i:nth-child(2) { width: 54%; } .pg-brief .lines i:nth-child(3) { width: 66%; }
.pg-brief:hover .lines i { animation: brief-line 0.9s var(--ease-out) both; }
.pg-brief:hover .lines i:nth-child(2) { animation-delay: 0.08s; } .pg-brief:hover .lines i:nth-child(3) { animation-delay: 0.16s; }
@keyframes brief-line { from { transform: scaleX(0.1); } to { transform: none; } }

/* ---------- next direction ---------- */
.pg-next { position: relative; padding: 0 0 clamp(56px, 9vh, 100px); }
.pg-next > .clip-head { margin-bottom: clamp(40px, 7vh, 80px); }
.pg-next-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.pg-next-link { position: relative; display: block; text-decoration: none; color: var(--text); border-radius: var(--radius); overflow: hidden; isolation: isolate; padding: clamp(24px, 4vw, 52px); min-height: clamp(260px, 38vh, 420px); background: var(--surface); border: 1px solid var(--line); }
.pg-next-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; z-index: -2; opacity: 0.0; transform: scale(1.08); transition: opacity 0.6s, transform 1.4s var(--ease-out); }
.pg-next-link::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--surface) 0%, color-mix(in oklab, var(--surface) 80%, transparent) 48%, color-mix(in oklab, var(--surface) 30%, transparent) 100%); }
.pg-next-link:hover .pg-next-poster, .pg-next-link:focus-visible .pg-next-poster { opacity: 0.85; transform: scale(1); }
.pg-next-kick { display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pg-next-kick::before { content: ''; width: 14px; height: 9px; border-radius: 2px; background: var(--c); }
.pg-next-name { font-family: var(--f-display); font-weight: var(--display-w); font-variation-settings: var(--display-vs); letter-spacing: var(--display-ls); font-size: clamp(42px, 7.4vw, 128px); line-height: 0.96; margin: 18px 0 16px; }
.pg-next-name.lt { font-family: var(--lt-font); }
.pg-next-line { max-width: 44ch; color: var(--muted); margin: 0; font-size: clamp(15px, 1.1vw, 17px); }
.pg-next-go { position: absolute; right: clamp(20px, 3vw, 40px); bottom: clamp(20px, 3vw, 40px); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--btn-bg); color: var(--btn-ink); transition: transform 0.4s var(--ease-out); }
.pg-next-go svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pg-next-link:hover .pg-next-go { transform: translateX(6px); }
.pg-ring { position: relative; width: min(100%, 300px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; }
.pg-ring::before { content: ''; position: absolute; inset: 4%; border-radius: 50%; border: 1px dashed var(--line-strong); }
.pg-ring a { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 6px; text-decoration: none; font-size: 12px; font-weight: 600; color: var(--muted); min-width: 44px; min-height: 44px; align-content: center; }
.pg-ring a i { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--c); transition: transform 0.3s var(--ease-out), background-color 0.3s; }
.pg-ring a:hover { color: var(--text); }
.pg-ring a:hover i { transform: scale(1.3); }
.pg-ring a.cur { color: var(--text); }
.pg-ring a.cur i { background: var(--c); transform: scale(1.4); box-shadow: 0 0 0 5px color-mix(in oklab, var(--c) 30%, transparent); }
.pg-ring a.nx i { background: color-mix(in oklab, var(--c) 45%, var(--surface)); }
.pg-ring a.home { left: 50%; top: 50%; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 14px; min-height: 40px; color: var(--text); }
.pg-ring a.home:hover { border-color: var(--text); }

/* ---------- footer ---------- */
.pg-foot { position: relative; background: var(--bg); padding: clamp(28px, 6vh, 64px) 0 calc(28px + var(--tsb-bottom)); border-top: 1px solid var(--line); overflow: hidden; }
.pg-foot-word { padding: 0 calc(var(--gutter) + var(--tsb-right)) 0 var(--gutter); font-family: var(--f-display); font-weight: var(--display-w); font-variation-settings: var(--display-vs); letter-spacing: var(--display-ls); font-size: clamp(34px, 8.6vw, 156px); line-height: 0.95; white-space: nowrap; color: color-mix(in oklab, var(--text) 9%, var(--bg)); margin-bottom: clamp(18px, 3vh, 32px); user-select: none; }
.pg-foot-row { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 13px; color: var(--muted); }
.pg-foot-row nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.pg-foot-row a { color: var(--muted); }
.pg-foot-row a:hover { color: var(--text); }

/* ---------- small screens: separate composition ---------- */
@media (max-width: 900px) {
  .pg-hero { min-height: 0; padding-top: 78px; align-items: start; }
  .pg-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .pg-hero .hm { order: -1; margin: 0 calc(var(--gutter) * -1 + 4px); }
  .pg-hero .hm-frame { aspect-ratio: var(--ar-m, 5 / 4); border-radius: 0 0 10px 10px; }
  .pg-hero h1 { font-size: clamp(40px, 11.5vw, 72px); margin-bottom: 18px; }
  .pg-head { grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
  .pg-talk-grid, .pg-next-grid { grid-template-columns: minmax(0, 1fr); }
  .pg-ring { width: min(100%, 280px); }
  .reel { --row: 132px; gap: 6px; }
}
@media (max-width: 480px) {
  .topbar-r { gap: 5px; }
  .topbar .seg-lang button { padding: 5px 7px; }
  .brand { font-size: 12px; padding: 6px 8px; }
  .reel-card { flex-basis: calc(var(--a) * 118px); }
  .pg-next-go { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .reel-media img, .reel-card, .pg-next-poster, .pg-brief { transition: none !important; }
  .pg-brief:hover .lines i { animation: none; }
}
