/* Portfolio page: a curved ring of the studio's sites, then an index with hover previews. Uses the tokens in styles.css. */
.pf main { padding-top: var(--bar); }
.bar__nav a[aria-current="page"]::after { transform: scaleX(1); }

.pf-hero { padding: clamp(80px, 12vh, 140px) var(--m) 0; text-align: center; }
.pf-title { font: 100 clamp(4rem, 1rem + 10vw, 11rem)/0.9 var(--display); letter-spacing: -0.02em; }
.pf-title .line { display: inline-block; }
.pf-title em { color: var(--accent); font-style: italic; }
.pf-sub { margin: 24px auto 0; max-width: 46ch; font-size: var(--step-lead); line-height: 1.4; color: var(--muted); }

/* The ring */
.ring-wrap { padding: 40px 0 0; }
.ring { position: relative; height: clamp(360px, 52vh, 560px); perspective: 1300px; perspective-origin: 50% 40%; overflow: hidden; touch-action: pan-y; cursor: grab; outline-offset: -4px; }
.ring.is-drag { cursor: grabbing; }
.ring__track { position: absolute; inset: 0; transform-style: preserve-3d; }
.card { --cw: clamp(260px, 30vw, 540px); position: absolute; left: 50%; top: 50%; width: var(--cw); aspect-ratio: 16 / 10; margin: calc(var(--cw) * -0.3125) 0 0 calc(var(--cw) / -2); border-radius: 18px; overflow: hidden; background: var(--surface); text-decoration: none; will-change: transform, opacity; transition: box-shadow .4s; -webkit-user-drag: none; }
.card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.card.is-front { outline: 2px solid var(--accent); outline-offset: 3px; }

.ring__info { text-align: center; padding: 28px var(--m) 0; }
.ring__kind { margin-top: 10px; color: var(--muted); font-size: var(--step-body); }
.ring__name { font: 300 clamp(2.75rem, 1.5rem + 4vw, 5.5rem)/1 var(--display); letter-spacing: -0.01em; }
.ring__line { margin: 12px auto 0; max-width: 44ch; font-size: var(--step-lead); line-height: 1.35; }
.ring__act { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 28px; }
.round-btn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid #3a3a3a; background: transparent; color: var(--ink); font-size: 1.25rem; cursor: pointer; transition: background-color .25s, border-color .25s, transform .3s var(--ease); }
.round-btn:hover { background: var(--surface); border-color: var(--accent); transform: scale(1.06); }
.round-btn:active { transform: scale(.95); }
.ring__info .is-swap { animation: swap .5s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } }

/* Index with a floating preview */
.index { position: relative; padding: clamp(120px, 14vw, 200px) var(--m) 0; }
.index__title { font: 300 var(--step-head)/1 var(--display); margin-bottom: 40px; }
.index__list { list-style: none; margin: 0; padding: 0; }
.index__list a { position: relative; display: grid; grid-template-columns: 1.2fr 1fr 1.6fr auto; align-items: baseline; gap: 24px; padding: 28px 20px; margin: 0 -20px; border-radius: 16px; text-decoration: none; transition: color .3s, padding-left .45s var(--ease), background-color .3s; }
.index__list a:hover, .index__list a:focus-visible { background: var(--surface); }
.i-name { font: 300 clamp(2.25rem, 1.4rem + 2.6vw, 4rem)/1 var(--display); }
.i-kind, .i-style { color: var(--muted); }
.i-go { color: var(--accent); white-space: nowrap; }
.index__list a:hover, .index__list a:focus-visible { padding-left: 36px; }
.index__list a:hover .i-name { color: var(--accent); }
.i-thumb { display: none; }
.peek { position: fixed; left: 0; top: 0; z-index: 30; width: 360px; aspect-ratio: 16 / 10; margin: 0; border-radius: 14px; overflow: hidden; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.85); transition: opacity .3s, transform .4s var(--ease); }
.peek.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.peek img { width: 100%; height: 100%; object-fit: cover; }
.index__note { margin-top: 40px; color: var(--muted); max-width: 60ch; }

.pf-cta { padding: clamp(120px, 14vw, 200px) var(--m); text-align: center; }
.pf-cta__title { font: 300 var(--step-head)/1 var(--display); }
.pf-cta__title em { color: var(--accent); }
.pf-cta p { margin: 18px auto 28px; max-width: 40ch; color: var(--muted); font-size: var(--step-lead); }

.pf-foot { min-height: 0; grid-template-rows: auto auto auto; padding-top: 64px; }
.pf-foot .foot__links { grid-column: 1 / -1; grid-row: 1; flex-direction: row; flex-wrap: wrap; gap: 0 28px; }
.pf-foot .foot__legal { grid-row: 2; margin-top: 24px; }
.pf-foot .foot__word { grid-row: 3; }

@media (max-width: 860px) {
  .card { --cw: 72vw; border-radius: 14px; }
  .ring { height: 300px; }
  .index__list a { grid-template-columns: 1fr auto; gap: 6px 16px; padding: 20px 0; }
  .i-name { grid-column: 1; }
  .i-go { grid-column: 2; grid-row: 1; }
  .i-kind, .i-style { grid-column: 1 / -1; font-size: 1rem; }
  .i-thumb { display: block; grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; margin-top: 10px; }
  .peek { display: none; }
  .index__list a { margin: 0 -12px; padding: 20px 12px; }
  .index__list a:hover, .index__list a:focus-visible { padding-left: 12px; }
}
