/* Photos wall (fotos.html). Values from the design handoff (design_handoff_photos_wall/SPEC.md).
   Grid columns/row height are set by js/wall.js from data/wall.js "layout". */

/* Zero-specificity base so every component rule below wins. style.css sets
   "* { font-family: sans-serif }" on every element, so the font is set the same way. */
:where(.wall-page, .wall-page *) {
    font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
}
:where(.wall-page button) {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: inherit;
    cursor: pointer;
}
.wall-page .wall-impact {
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-weight: normal;
}

/* ---------- header ---------- */
.wall-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 48px;
    padding: 184px 10% 40px;
}
.wall-header-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.wall-header h1 {
    margin: 0;
    font-size: 50px;
    color: #f5f5f5;
}
.wall-header p {
    max-width: 480px;
    margin: 0;
    font-size: 16px;
    line-height: 30px;
    color: rgba(131, 131, 131, 0.747);
    text-align: justify;
}
.wall-book {
    flex: none;
    padding: 15px 35px;
    border: 1px solid #f5f5f5;
    background: #f5f5f5;
    color: #000;
    font-size: 14px;
    white-space: nowrap;
    transition: 0.5s;
}
@media (hover: hover) {
    .wall-book:hover {
        background: #000;
        color: #f5f5f5;
    }
}

/* ---------- filter tabs ---------- */
.wall-tabs {
    display: flex;
    align-items: baseline;
    gap: 32px;
    margin: 0 10% 20px;
    padding-top: 20px;
    border-top: 1px solid #fff;
}
.wall-tabs button {
    flex: none;
    padding-bottom: 6px;
    border-bottom: 1px solid transparent;
    color: rgba(131, 131, 131, 0.747);
    font-size: 14px;
    white-space: nowrap;
    transition: 0.3s;
}
.wall-tabs button[aria-pressed="true"] {
    color: #f5f5f5;
    border-bottom-color: #f5f5f5;
}

/* ---------- grid ---------- */
.wall-grid {
    display: grid;
    grid-auto-flow: dense;
    gap: 10px;
    margin: 0 10%;
}

.wall-tile {
    position: relative;
    overflow: hidden;
    background: #111;
}
.wall-tile img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}
/* the whole tile is one button; the tape key sits above it */
.wall-open {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
}
.wall-open:focus-visible {
    outline: 2px solid #f5f5f5;
    outline-offset: -4px;
}
.wall-veil {
    position: absolute;
    inset: 0;
    background: transparent;
    transition: 0.5s;
    pointer-events: none;
}
.wall-corner {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    opacity: 0.6;
    transition: 0.3s;
    pointer-events: none;
}
.wall-bottom {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    pointer-events: none;
}
.wall-name {
    min-width: 0;
    font-size: 20px;
    line-height: 1;
    color: #fff;
    opacity: 0;
    transform: translateY(12px);
    transition: 0.5s;
}
.wall-s2x2 .wall-name { font-size: 50px; }
.wall-s2x1 .wall-name,
.wall-s1x2 .wall-name { font-size: 35px; }
.wall-bottom .tape-key {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}
.wall-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: #f5f5f5;
    pointer-events: none;
}

.wall-tile:hover .wall-veil,
.wall-open:focus-visible ~ .wall-veil {
    background: rgba(0, 0, 0, 0.6);
}
.wall-tile:hover .wall-corner { opacity: 1; }
.wall-tile:hover .wall-name,
.wall-open:focus-visible ~ .wall-bottom .wall-name {
    opacity: 1;
    transform: translateY(0);
}

/* phones have no hover: keep names visible on a soft shade */
@media (hover: none) {
    .wall-veil { background: linear-gradient(transparent 55%, rgba(0, 0, 0, 0.6)); }
    .wall-name { opacity: 1; transform: none; }
}

/* small tiles on phones: smaller insets so name and key fit */
@media (max-width: 559px) {
    .wall-bottom { left: 10px; right: 10px; bottom: 10px; gap: 8px; }
    .wall-corner { top: 10px; right: 10px; }
    .wall-s1x1 .wall-name { font-size: 16px; }
    .wall-s2x2 .wall-name { font-size: 35px; }
    .wall-s2x1 .wall-name,
    .wall-s1x2 .wall-name { font-size: 24px; }
}

/* ---------- theater ---------- */
.wall-theater {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.94);
    color: #fff;
}
.wall-theater[hidden] { display: none; }

.th-top {
    flex: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    height: 96px;
    padding: 0 40px;
}
.th-fs,
.th-close {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    box-sizing: border-box;
    border: 1px solid #f5f5f5;
    background: #f5f5f5;
    color: #000;
    transition: 0.5s;
}
.th-fs {
    padding: 0 28px;
    font-size: 16px;
    font-weight: bold;
}
.th-close {
    width: 48px;
    font: 32px/1 Arial, sans-serif;
}
/* hover only with a mouse: on phones a tapped button would stay inverted */
@media (hover: hover) {
    .th-fs:hover,
    .th-close:hover {
        background: #000;
        color: #f5f5f5;
    }
}

.th-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 40px;
}
.th-arrow {
    flex: none;
    width: 56px;
    font-size: 32px;
    text-align: center;
    color: #fff;
    opacity: 0.65;
}
.th-arrow:hover,
.th-arrow:focus-visible { opacity: 1; }
.th-arrow[aria-hidden="true"] { visibility: hidden; }
.th-photo {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.th-photo img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}

.th-bottom {
    flex: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px;
    margin: 24px 120px 32px;
    padding-top: 20px;
    border-top: 1px solid #fff;
}
.th-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.th-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
}
.th-title {
    margin: 0;
    font-size: 35px;
    color: #f5f5f5;
}
.th-counter {
    font-size: 12px;
    color: #ccc;
}
.th-caption {
    font-size: 13px;
    color: #777;
}

/* ---------- player row (theater) and now-playing strip ---------- */
.th-player {
    flex: 1;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.th-player .th-track { margin-left: 8px; }
.th-player[hidden],
.wall-strip[hidden] { display: none; }
.th-track {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.th-track-line {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}
.wall-song {
    font-size: 16px;
    color: #f5f5f5;
}
.wall-from {
    font-size: 13px;
    color: #777;
}
.th-bar {
    height: 2px;
    background: #333;
}
.th-bar i,
.strip-progress {
    display: block;
    width: 0;
    height: 2px;
    background: #f5f5f5;
}
.wall-sc {
    flex: none;
    font-size: 13px;
    color: rgba(131, 131, 131, 0.747);
}
.wall-sc:hover { color: #fff; }

.wall-strip {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 64px;
    padding: 0 24px;
    box-sizing: border-box;
    border-top: 1px solid #fff;
    background: #000;
}
/* the strip's timeline runs along its top edge; the hit area is taller than the line */
.strip-seek {
    position: absolute;
    left: 0;
    right: 0;
    top: -8px;
    padding: 7px 0;
}
.strip-cover {
    flex: none;
    width: 40px;
    height: 40px;
    object-fit: cover;
}
.strip-open {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}
.strip-open span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.strip-stop {
    padding: 0 8px;
    font: 24px/1 Arial, sans-serif;
    color: #fff;
    opacity: 0.65;
}
.strip-stop:hover { opacity: 1; }

/* footer clears the strip while it is showing */
.wall-has-strip #footer { padding-bottom: 124px; }

/* scroll lock while the theater is open (works on iOS too) */
.wall-locked {
    position: fixed;
    left: 0;
    right: 0;
    overflow: hidden;
}

/* ---------- full screen: photo fills the screen, bars float over it ---------- */
.wall-theater.th-full {
    background: #000;
}
.th-full .th-stage {
    position: absolute;
    inset: 0;
    padding: 0;
    gap: 0;
}
.th-full .th-photo {
    width: 100%;
    height: 100%;
}
.th-full .th-photo img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    box-shadow: none;
}
.th-full .th-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 72px;
    height: 120px;
    margin-top: -60px;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
    transition: opacity 0.4s;
}
.th-full .th-prev { left: 0; }
.th-full .th-next { right: 0; }
.th-full .th-top,
.th-full .th-bottom {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 3;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.th-full .th-top {
    top: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.6), transparent);
}
/* the white rule is drawn as a background line, inset like the normal bar */
.th-full .th-bottom {
    bottom: 0;
    margin: 0;
    padding: 56px 120px 32px;
    border-top: 0;
    background:
        linear-gradient(#fff, #fff) 120px 36px / calc(100% - 240px) 1px no-repeat,
        linear-gradient(to top, rgba(0, 0, 0, 0.85) 45%, rgba(0, 0, 0, 0));
}
/* idle: bars slide off the edges, arrows fade, cursor hides */
.th-full.th-idle {
    cursor: none;
}
.th-full.th-idle .th-top {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}
.th-full.th-idle .th-bottom {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}
.th-full.th-idle .th-arrow {
    opacity: 0;
    pointer-events: none;
}

/* big screens: keys are bigger (css/sc-player.css), so the now-playing strip
   grows with them to keep air between its top line and the keys */
@media (min-width: 1400px) {
    .wall-strip { height: 76px; }
}
@media (min-width: 1900px) {
    .wall-strip { height: 88px; }
}

@media (max-width: 700px) {
    .wall-header { padding-top: 140px; gap: 24px; }
    .th-top { height: 72px; padding: 0 16px; }
    .th-stage { gap: 8px; padding: 0 8px; }
    .th-arrow { width: 32px; }
    .th-bottom { margin: 16px 16px 20px; gap: 16px; }
    .th-full .th-bottom {
        padding: 52px 16px 20px;
        background:
            linear-gradient(#fff, #fff) 16px 36px / calc(100% - 32px) 1px no-repeat,
            linear-gradient(to top, rgba(0, 0, 0, 0.85) 45%, rgba(0, 0, 0, 0));
    }
    .th-full .th-arrow { width: 48px; }
    .th-title { font-size: 28px; }
    .th-player { min-width: 0; flex-basis: 100%; }
    .wall-strip { gap: 8px; padding: 0 10px; }
    .wall-strip .wall-sc,
    .wall-strip .strip-cover { display: none; }
}
