/*
Theme Name: Peter Lipton Photography v7
Author: Peter Lipton
Description: Art-photography portfolio theme after the layout of thomasprior.com. Vertical portfolio feed with single, flicker, carousel, pair, contact-sheet and full-bleed modules, a thumbnail index, an Editorial section and an About page. Fork of Peter Lipton Photography v6.
Version: 7.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: peter-lipton
Tags: photography, portfolio, minimal, custom-post-type
*/

/* ========================================
   RESET
   ======================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ========================================
   TOKENS
   One typeface at one size, paper ground. The three widths change only these.
   ======================================== */

:root {
  --color-bg: #f4f2ee;
  --color-text: #141414;
  --color-line: rgba(20, 20, 20, 0.18);

  --font-size: 17px;
  --font-size-small: 13px;
  --line-height: 1.2;

  --header-h: 45px;
  --header-top: 15px;
  --gutter: 15px;
  --peek: 20px;

  --fade: 0.8s ease-in-out;
  --ease-nav: cubic-bezier(0.645, 0.045, 0.355, 1);
}

@media (min-width: 760px) {
  :root {
    --header-h: 70px;
    --header-top: 30px;
    --gutter: 45px;
  }
}

@media (min-width: 1020px) {
  :root {
    --peek: 60px;
  }
}

body {
  font-family: var(--pnl-body-font, "Inter Tight"), -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: var(--pnl-body-weight, 400);
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--pnl-heading-font, inherit);
  font-weight: var(--pnl-heading-weight, 400);
  font-size: inherit;
  line-height: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes plFadeIn {
  to { opacity: 1; }
}

/* ========================================
   HEADER
   A fixed bar; each room places its links differently (see header.php).
   ======================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  z-index: 1000;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.site-header > * {
  pointer-events: auto;
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

.site-header__name,
.site-header__editorial,
.site-header__portfolio,
.site-header__index {
  position: absolute;
  top: var(--header-top);
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  transition: left 0.6s var(--ease-nav), right 0.6s var(--ease-nav), opacity 0.2s ease;
}

.site-header a:hover,
.site-header button:hover {
  opacity: 0.6;
}

.site-header__name {
  font-family: var(--pnl-site-title-font, inherit);
  font-weight: var(--pnl-site-title-weight, inherit);
  font-size: inherit;
  left: var(--gutter);
}

.room-editorial .site-header__name,
.room-editorial-entry .site-header__name {
  left: auto;
  right: var(--gutter);
}

.room-about .site-header__name,
.room-page .site-header__name {
  left: 50%;
  transform: translateX(-50%);
}

.site-header__editorial,
.site-header__portfolio {
  font-family: var(--pnl-nav-font, inherit);
  font-weight: var(--pnl-nav-weight, inherit);
}

.site-header__editorial {
  left: var(--gutter);
}

.site-header__portfolio {
  right: var(--gutter);
}

.site-header__index {
  left: var(--gutter);
  top: calc(var(--header-top) + 1px);
  display: block;
  width: 15px;
  height: 15px;
  padding: 0;
}

.site-header__index--right {
  left: auto;
  right: var(--gutter);
}

.site-header__index svg {
  display: block;
  width: 15px;
  height: 15px;
}

.site-header__index[aria-pressed="true"] {
  opacity: 0.5;
}

.room-404 .site-header {
  display: none;
}

/* ========================================
   PAGE FRAME + FOOTER
   The header overlays the content; each room pads for it.
   ======================================== */

.site {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.room-portfolio .site {
  min-height: 0;
}

.room-portfolio .site-main {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 0 20px 30px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  border-bottom: 1px solid currentColor;
}

@media (min-width: 760px) {
  .site-footer {
    padding: 0 40px 30px;
  }
}

/* ========================================
   ABOUT (and plain pages)
   A 580px column, vertically centred when short. The intro and the
   contact lines are centred; everything after the first heading is a CV.
   ======================================== */

.room-about {
  background-color: var(--about-bg-color, var(--color-bg));
  color: var(--about-text-color, var(--color-text));
}

.cv {
  width: 100%;
  max-width: 620px;
  margin: auto;
  padding: calc(var(--header-h) + 45px) 20px 60px;
  font-family: var(--pnl-about-body-font, inherit);
}

.cv p {
  text-align: center;
  margin: 0 0 25px;
}

.cv p:last-child {
  margin-bottom: 0;
}

.cv a {
  color: var(--about-link-color, inherit);
  border-bottom: 1px solid currentColor;
}

.cv a:hover {
  opacity: 0.6;
}

.cv__headshot {
  width: 200px;
  margin: 0 auto 40px;
}

.cv__headshot-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.cv__section {
  margin-top: 60px;
}

.cv__section p {
  text-align: left;
}

.cv__section--centred p {
  text-align: center;
}

.cv__heading {
  font-family: var(--pnl-about-heading-font, inherit);
  font-size: var(--font-size-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 20px;
}

.cv__section--centred .cv__heading {
  text-align: center;
}

.cv__list {
  display: grid;
  gap: 14px;
}

.cv__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 30px;
}

.cv__row-title,
.cv__venue {
  display: block;
}

@media (min-width: 760px) {
  .cv__row {
    grid-template-columns: 200px 1fr;
  }
}

.cv__content {
  margin-top: 60px;
}

.cv__content p,
.cv--page p {
  text-align: left;
}

.cv__content h1,
.cv__content h2,
.cv__content h3,
.cv__content h4 {
  font-family: var(--pnl-about-heading-font, inherit);
  font-size: var(--font-size-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 40px 0 12px;
}

.cv__content > :first-child {
  margin-top: 0;
}

.cv__content ul,
.cv__content ol {
  margin: 0 0 25px;
}

.cv__content li {
  padding: 3px 0;
}

.cv__title {
  font-size: 21px;
  line-height: 26px;
  margin: 0 0 25px;
}

.cv--page .cv__content {
  margin-top: 0;
}

/* ========================================
   404
   No header; one paragraph.
   ======================================== */

.not-found {
  padding: 15px;
}

.not-found p {
  max-width: 580px;
  margin-bottom: 2rem;
}

.not-found a {
  border-bottom: 1px solid currentColor;
}

@media (min-width: 760px) {
  .not-found {
    padding: 30px 45px;
  }
}

/* ========================================
   EDITORIAL INDEX
   Centred flow of 240x200 thumbnails. From 760px on hover-capable screens
   the title takes the place of the thumbnail on hover; otherwise it sits below.
   ======================================== */

.room-editorial {
  background-color: var(--jg-bg-color, var(--color-bg));
}

.journal-index {
  padding: calc(var(--header-h) + 55px) 0 100px;
  text-align: center;
  font-size: 0;
}

.journal-index__item {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin: 37px 30px;
  font-size: var(--font-size);
  color: var(--jg-title-color, inherit);
}

.journal-index__image {
  display: block;
  width: 240px;
  height: 200px;
  object-fit: contain;
  margin: 0 auto;
}

.journal-index__title {
  display: block;
  width: 240px;
  margin: 10px auto 0;
  text-align: center;
}

@media (min-width: 760px) and (hover: hover) {
  .journal-index__image {
    position: relative;
    z-index: 2;
    transition: opacity 0.2s ease-out;
  }

  .journal-index__title {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    margin: 0;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease-out;
  }

  .journal-index__item:hover .journal-index__image {
    opacity: 0;
  }

  .journal-index__item:hover .journal-index__title {
    opacity: 1;
  }
}

.journal-index .no-content {
  font-size: var(--font-size);
  padding: 40px 20px;
}

/* ========================================
   EDITORIAL ENTRY (with infinite loading)
   Title in the first cell, then the gallery; one column on phones, two from 760px.
   ======================================== */

.room-editorial-entry {
  background-color: var(--journal-bg-color, var(--color-bg));
  color: var(--journal-text-color, var(--color-text));
}

.journal-entries-container {
  padding: calc(var(--header-h) + 15px) 35px 60px;
}

.journal-entry {
  padding: 35px 0;
}

.journal-entry__gallery {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 35px;
  align-items: center;
}

.gallery-item--title {
  display: flex;
  align-items: center;
  justify-content: center;
}

.journal-entry__title {
  font-family: var(--pnl-journal-title-font, var(--pnl-heading-font, inherit));
  font-weight: var(--pnl-journal-title-weight, var(--pnl-heading-weight, 400));
  /* 21px on a 375px phone, growing with the viewport to 50px at 1280px */
  font-size: clamp(21px, calc(9px + 3.2vw), 50px);
  line-height: 1.2;
  text-align: center;
  color: var(--journal-title-color, inherit);
}

.journal-entry__gallery .gallery-item img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  opacity: 0;
  animation: plFadeIn var(--fade) forwards;
}

.journal-entry__gallery .gallery-caption {
  margin-top: 10px;
  font-size: var(--font-size-small);
  text-align: center;
}

.gallery-item--content {
  grid-column: 1 / -1;
}

.journal-entry__content {
  max-width: 580px;
  margin: 0 auto;
}

.journal-entry__content p {
  margin-bottom: 25px;
}

.journal-entry__content a {
  border-bottom: 1px solid currentColor;
}

.journal-loading {
  display: flex;
  justify-content: center;
  padding: 80px 0;
}

.journal-loading__spinner {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-line);
  border-top-color: var(--color-text);
  border-radius: 50%;
  animation: journalSpin 0.8s linear infinite;
}

@keyframes journalSpin {
  to { transform: rotate(360deg); }
}

@media (min-width: 760px) {
  .journal-entries-container {
    padding: 0 100px 100px;
  }

  .journal-entry {
    padding: 100px 0;
  }

  .journal-entry__gallery {
    grid-template-columns: 1fr 1fr;
    column-gap: 100px;
    row-gap: 100px;
  }

  .journal-entry__gallery .gallery-item img {
    width: auto;
    max-height: 40vw;
  }
}

/* ========================================
   MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
