/*
Theme Name: Cris Watkins Photography
Theme URI: https://criswatkins.com/
Author: Cris Watkins
Description: A dark, gig-poster portfolio theme for live music photography. Home page slider of favourite shots, scrolling credits banner, masonry galleries with a full-screen lightbox, and festival albums. Captions, shoot dates, festivals and Colour / Black & White are read from each photo's own metadata on upload.
Version: 1.8.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: criswatkins
Tags: photography, portfolio, dark, one-column, custom-logo, custom-menu
*/

/* Fonts (self-hosted, SIL Open Font License — see assets/fonts) */
@font-face { font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/anton-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/archivo-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/archivo-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
	--accent: #E6FF00;
	--bg: #0B0B0B;
	--ink: #F2EEE6;
	--muted: #A8A39A;
	--line: #2A2A2A;
	--panel: #1C1B1A;
	--paper: #F2EEE6;
	--paper-ink: #0B0B0B;
	--paper-muted: #3D3A35;
	--display: "Anton", Impact, "Arial Narrow", sans-serif;
	--body: "Archivo", system-ui, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
	--gutter: clamp(16px, 4vw, 56px);
	--section: clamp(56px, 8vw, 120px);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.lead { font-size: 18px; line-height: 1.5; max-width: 34em; }
.label, .label-l, .kicker, .crumbs, .pill, .btn, .more, .card-meta, .tag, .lb-count, .lb-cap, .lb-credit, .hero-cap, .site-footer, .site-nav { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.label { font-size: 13px; }
.label-l { font-size: 15px; font-weight: 500; letter-spacing: 0.14em; }
.display-xl, .display-l, .display-m, .hero-title, .wordmark, .card-title, .album-title { font-family: var(--display); font-weight: 400; text-transform: uppercase; }
.display-xl { font-size: clamp(64px, 11vw, 168px); line-height: 0.86; }
.display-l { font-size: clamp(48px, 7vw, 96px); line-height: 0.9; }
.display-m { font-size: clamp(36px, 4vw, 56px); line-height: 0.95; }

.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 12px 16px; background: var(--accent); color: var(--bg); font-family: var(--mono); }
.skip-link:focus { top: 8px; color: var(--bg); }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 20px var(--gutter); border-bottom: 1px solid var(--line); }
.wordmark { font-size: 28px; letter-spacing: 0.02em; line-height: 1; }
.site-logo img { max-height: 48px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; font-size: 14px; }
.nav-list { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 0; padding: 0; list-style: none; }
.nav-list a { display: inline-block; padding: 12px 2px; border-bottom: 2px solid transparent; }
.nav-list a:hover { border-bottom-color: currentColor; }
.nav-list .current-menu-item > a, .nav-list a[aria-current="page"] { border-bottom-color: var(--accent); }
.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; }

/* Hero slider */
.hero { position: relative; height: clamp(560px, 62vw, 860px); background: var(--panel); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,11,11,.92) 0%, rgba(11,11,11,.55) 38%, rgba(11,11,11,0) 70%); pointer-events: none; }
.hero-bar { position: absolute; top: 20px; left: var(--gutter); right: var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; z-index: 2; }
.hero-cap { padding: 10px 14px; background: rgba(11,11,11,.72); font-size: 13px; }
.hero-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; background: rgba(11,11,11,.72); }
.hero-btn, .hero-dot { display: inline-flex; align-items: center; justify-content: center; height: 44px; background: none; border: 0; padding: 0; cursor: pointer; }
.hero-btn { width: 44px; }
.hero-dot { width: 34px; }
.hero-dot span { display: block; width: 22px; height: 4px; background: rgba(242,238,230,.45); transition: background .3s; }
.hero-dot[aria-current="true"] span { background: var(--accent); }
.hero-content { position: relative; z-index: 1; padding: 0 var(--gutter) clamp(32px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.hero-text { display: flex; flex-direction: column; gap: 20px; }
.kicker { font-size: 14px; letter-spacing: 0.14em; }
.hero-title { font-size: clamp(72px, 12vw, 196px); line-height: 0.86; letter-spacing: -0.01em; }
.just-shot { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; border: 1px solid var(--ink); min-width: 240px; max-width: 360px; background: rgba(11,11,11,.35); }
.just-shot .label { color: var(--muted); font-size: 12px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.just-shot-title { font-size: 20px; font-weight: 600; line-height: 1.25; }
.just-shot:hover { background: rgba(11,11,11,.6); }
.hero-text { text-shadow: 0 2px 24px rgba(0,0,0,.45); }
@media (max-width: 640px) {
	.hero { height: auto; min-height: 640px; }
	.hero-content { padding-top: 120px; }
	.hero-bar { top: 12px; flex-wrap: nowrap; }
	.hero-cap { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.hero-dot { display: none; }
	.just-shot { max-width: none; width: 100%; }
}

/* Credits banner */
.credits { background: var(--accent); color: var(--bg); overflow: hidden; padding: 16px 0; font-family: var(--display); font-size: 26px; text-transform: uppercase; letter-spacing: 0.02em; }
.marquee { display: flex; white-space: nowrap; width: max-content; animation: cw-roll 55s linear infinite; }
.marquee-set { display: flex; gap: 48px; padding-right: 48px; }
.credits:hover .marquee { animation-play-state: paused; }
@keyframes cw-roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.marquee { animation: none; width: auto; padding: 0 var(--gutter); }
	.marquee-set { flex-wrap: wrap; white-space: normal; gap: 4px 24px; padding: 0; }
	.marquee-set + .marquee-set { display: none; }
}

/* Sections */
.section { padding: var(--section) var(--gutter); display: flex; flex-direction: column; gap: 40px; }
.section--tight { padding-top: 0; gap: 28px; }
.page-gallery .section--tight, .page-gallery .section { padding-top: clamp(40px, 5vw, 72px); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-head .lead { max-width: 420px; font-size: 17px; }
.section-head--rule { border-top: 1px solid var(--line); padding-top: 24px; }
.more { font-size: 14px; padding: 12px 0; }

/* Gallery cards on the home page */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 680px) { .card--wide { grid-column: span 2; } }
.card-img { display: block; overflow: hidden; aspect-ratio: 4 / 5; background: var(--panel); }
.card--wide .card-img { aspect-ratio: 16 / 9; }
.card-img img, .album-img img, .feature-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img, .album:hover .album-img img, .feature:hover .feature-img img { transform: scale(1.03); }
.card-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.card-title { font-size: 40px; line-height: 1; }
.card-num { font-size: 20px; vertical-align: top; margin-right: 10px; }
.card-meta { font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .card-img img, .album-img img, .feature-img img { transition: none; } }

/* Tiles: masonry, and the "fresh" row */
.masonry { padding: 0 var(--gutter) var(--section); columns: 300px 4; column-gap: 14px; }
.tile { position: relative; display: block; margin: 0 0 14px; break-inside: avoid; cursor: zoom-in; background: var(--panel); }
.tile img { width: 100%; }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px; background: rgba(11,11,11,.84); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; line-height: 1.4; opacity: 0; transition: opacity .2s ease; }
.tile:hover .tile-cap, .tile:focus-visible .tile-cap { opacity: 1; }
@media (hover: none) { .tile-cap { position: static; opacity: 1; background: none; padding: 8px 0 4px; color: var(--muted); } .tile { background: none; } }
.tile.is-hidden { display: none; }
/* Script-built columns (keeps photos in place when more load) */
.masonry.is-js { columns: auto; display: flex; align-items: flex-start; gap: 14px; }
.masonry-col { flex: 1 1 0; min-width: 0; }
.load-more { padding: 0 var(--gutter) var(--section); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.load-more .btn { cursor: pointer; background: none; color: var(--ink); }
.load-more .btn:hover { border-color: var(--accent); color: var(--accent); }
.load-more .btn:disabled { opacity: .5; cursor: progress; }
.masonry.has-more { padding-bottom: 24px; }
.fresh { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 640px) { .fresh .tile:nth-child(n + 5) { display: none; } }
.fresh .tile { margin: 0; aspect-ratio: 3 / 4; overflow: hidden; }
.fresh .tile img { height: 100%; object-fit: cover; }
@media (hover: none) { .fresh .tile-cap { display: none; } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--gutter) 28px; }
.pill { min-height: 44px; padding: 0 18px; border: 1px solid #3A3A3A; background: transparent; font-size: 13px; cursor: pointer; }
.pill:hover { border-color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* Gallery page header */
.page-head { padding: clamp(40px, 6vw, 88px) var(--gutter) 32px; display: flex; flex-direction: column; gap: 24px; }
.page-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.crumbs { font-size: 13px; color: var(--muted); letter-spacing: .14em; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.term-desc p + p { margin-top: 1em; }

/* Album index (Festivals) */
.feature { margin: 0 var(--gutter); display: flex; flex-wrap: wrap; border: 1px solid var(--line); }
.feature-img { flex: 999 1 560px; min-width: 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--panel); }
.feature-body { flex: 1 1 300px; padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.feature-text { display: flex; flex-direction: column; gap: 12px; }
.tag { align-self: flex-start; padding: 6px 12px; background: var(--accent); color: var(--bg); font-size: 12px; letter-spacing: .12em; }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.album { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.album-img { display: block; overflow: hidden; aspect-ratio: 3 / 2; background: var(--panel); }
.album-title { font-size: 28px; line-height: 1; }

/* Pagination */
.pagination { padding: 0 var(--gutter) var(--section); }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); text-transform: uppercase; font-size: 13px; letter-spacing: .08em; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid #3A3A3A; }
.page-numbers.current { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.page-numbers.dots { border: 0; }
.empty { padding: 0 var(--gutter) var(--section); }

/* About */
.about { padding: var(--section) var(--gutter); background: var(--paper); color: var(--paper-ink); display: flex; flex-wrap: wrap; gap: clamp(32px, 6vw, 96px); }
.about a:hover { color: var(--paper-ink); }
.about-photo { flex: 1 1 320px; max-width: 520px; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-body { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; justify-content: center; }
.about--no-photo .about-body { max-width: 900px; }
.about-text { font-size: 20px; line-height: 1.55; max-width: 640px; }
.about-text p + p { margin-top: 1em; font-size: 17px; color: var(--paper-muted); }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; font-size: 14px; letter-spacing: .1em; }
.btn--solid { background: var(--paper-ink); color: var(--paper); }
.about .btn--solid:hover { color: var(--accent); }
.btn--line { border: 2px solid var(--paper-ink); color: var(--paper-ink); }
.btn--line-light { border: 2px solid var(--ink); }

/* Footer */
.site-footer { padding: 40px var(--gutter); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); }
.about + .site-footer, .site-footer:first-child { border-top: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 1000; background: rgba(6,6,6,.97); display: flex; flex-direction: column; }
.lb[hidden] { display: none; }
.lb-top, .lb-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px clamp(16px, 3vw, 32px); }
.lb-count { font-size: 13px; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 clamp(8px, 2vw, 24px); }
.lb-figure { margin: 0; flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-btn { flex: none; width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #3A3A3A; background: rgba(11,11,11,.6); cursor: pointer; }
.lb-btn:hover { border-color: var(--ink); }
.lb-cap { font-size: 13px; color: var(--ink); }
.lb-credit { font-size: 13px; color: var(--muted); }
.lb-link { font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; padding: 12px 0; }
.lb-link[hidden], .lb-show[hidden] { display: none; }
.lb-show { font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; padding: 12px 0; }
.lb-bottom .lb-cap { flex: 1 1 320px; }

/* Published work: show whole pages and covers, no cropping */
.masonry--published .tile { background: #151515; padding: 0; }
.masonry--published .tile-cap { opacity: 1; position: static; background: none; padding: 10px 0 6px; color: var(--muted); }
.masonry--published .tile { background: none; }
@media (max-width: 640px) { .lb-stage .lb-prev, .lb-stage .lb-next { display: none; } .lb-stage { padding: 0; } }
body.lb-open { overflow: hidden; }

/* Photo protection: no long-press "Save image" on phones, no dragging */
.cw-protect img { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }

/* Text pages */
.page-text .entry { padding: 0 var(--gutter) var(--section); }
.page-text .entry .page-head { padding-left: 0; padding-right: 0; }
.entry-content { max-width: 720px; font-size: 18px; }
.entry-content > * + * { margin-top: 1em; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { margin: 2em 0; }
.entry-content h2, .entry-content h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: 1; margin-top: 1.4em; }
.entry-content h2 { font-size: 40px; }
.entry-content h3 { font-size: 28px; }
.entry-photo { margin: 0; }
.entry-photo figcaption { margin-top: 12px; }
.page-text > .page-head .buttons { padding-top: 16px; }
.alignwide, .alignfull { max-width: none; }
.wp-block-image figcaption, .wp-caption-text { font-family: var(--mono); font-size: 13px; color: var(--muted); }
