/*
Theme Name: ParrRRRCK Custom Starter
Theme URI: https://wordpress.org/documentation/article/appearance-themes-screen/
Author: Custom Starter
Description: Minimal image portfolio, horizontal/vertical homepage, WORK galleries and INFO contact modal.
Version: 1.5.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: parrrrck-starter
*/

/* ===== MAIN DESIGN VARIABLES: adjust here ===== */
:root {
  --site-side-padding: 29px;
  --header-top-padding: 20px;
  --home-header-height: 68px;
  --home-bottom-gap: 19px;
  --image-gap: 24px;
  --text-color: #333;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: #fff;
  color: var(--text-color);
  margin: 0;
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 16px;
  line-height: 1.4;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .6; }
/* Portfolio imagery should stay at full opacity on hover. */
.portfolio-item__link:hover, .work-card__link:hover { opacity: 1; }
.portfolio-item__link:hover img, .work-card__link:hover img { opacity: 1; filter: none; }
button, input, textarea { font: inherit; }
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: var(--header-top-padding) var(--site-side-padding) 0;
  min-height: var(--home-header-height);
}
.site-title { font-size: 16px; font-weight: 400; line-height: 1.3; margin: 6px 0 0; }
.site-navigation { display: flex; gap: 60px; align-items: center; }
.site-navigation a { display: inline-block; font-size: 16px; white-space: nowrap; }


/* ===== HOME: DESKTOP — ONE HORIZONTAL ROW ===== */
body.home { overflow: hidden; }
.home-main {
  margin: 0;
  padding: 0 var(--site-side-padding);
  height: calc(100vh - var(--home-header-height) - var(--home-bottom-gap));
  height: calc(100dvh - var(--home-header-height) - var(--home-bottom-gap));
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.home-main::-webkit-scrollbar { display: none; }
.home-main:focus-visible { outline: 1px solid #777; outline-offset: -1px; }
.portfolio-rail {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--image-gap);
  width: max-content;
  min-width: 100%;
  height: 100%;
  padding-right: var(--site-side-padding);
}
/* Both the old Customizer photos and WORK posts live in the same row. */
.portfolio-stack {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--image-gap);
  flex: 0 0 auto;
  height: 100%;
}
.portfolio-item {
  flex: 0 0 auto;
  width: auto;
  height: 100%;
  max-width: none;
  margin: 0;
  overflow: hidden;
  background: transparent;
}
.portfolio-item--large,
.portfolio-item--medium,
.portfolio-item--small { max-width: none; }
.portfolio-item__link {
  display: block;
  height: 100%;
  width: 100%;
}
.portfolio-item img {
  display: block;
  width: auto;
  max-width: none;
  height: 100%;
  object-fit: contain;
}
/* If a legacy image has not been selected yet, show a black slot. */
.portfolio-item.is-placeholder { background: #000; width: min(70vw, 630px); }
.portfolio-item--small.is-placeholder { width: min(52vw, 470px); }
.portfolio-item--medium.is-placeholder { width: min(62vw, 550px); }
.portfolio-item.is-placeholder .portfolio-item__link { height: 100%; }

.portfolio-load-area {
  flex: 0 0 95px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.portfolio-more-link { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.portfolio-load-area.is-observing:not(.is-error) .portfolio-more-link { display: none; }
.portfolio-load-area.is-error .portfolio-more-link { display: inline; }
.portfolio-load-area.is-loading::before { content: 'LOADING'; font-size: 12px; color: #888; }

/* ===== OTHER PAGES — unchanged layout ===== */
.basic-page { max-width: 760px; margin: 112px auto 110px; padding: 0 var(--site-side-padding); }
.basic-page h1 { font-size: 30px; font-weight: 400; }
.basic-page p { line-height: 1.6; }
.basic-page img { max-width: 100%; height: auto; }
.project-detail { max-width: 1100px; margin: 110px auto 140px; padding: 0 var(--site-side-padding); }
.project-detail__back { font-size: 13px; margin: 0 0 24px; }
.project-detail__title { font-size: 24px; line-height: 1.3; font-weight: 400; margin: 0 0 30px; }
.project-detail__cover img, .project-detail__content img { max-width: 100%; height: auto; }
.project-detail__content { max-width: 880px; margin-top: 40px; }
.project-detail__content p { line-height: 1.6; }

/* ===== MOBILE — FULL-WIDTH VERTICAL FEED ===== */
@media (max-width: 767px) {
  :root {
    --site-side-padding: 0px;
    --header-top-padding: 16px;
    --home-header-height: 54px;
    --image-gap: 10px;
  }
  body.home { overflow-x: hidden; overflow-y: auto; }
  .site-header {
    padding-left: 12px;
    padding-right: 12px;
    align-items: flex-start;
    gap: 10px;
  }
  .site-title, .site-navigation a { font-size: 13px; }
  .site-title { margin-top: 1px; }
  .site-navigation { gap: 17px; }
  .home-main {
    height: auto;
    padding: 0;
    overflow: visible;
  }
  .portfolio-rail,
  .portfolio-stack {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--image-gap);
    height: auto;
    width: 100%;
    min-width: 0;
    padding: 0;
  }
  .portfolio-item,
  .portfolio-item--large,
  .portfolio-item--medium,
  .portfolio-item--small {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    flex: 0 0 auto;
  }
  .portfolio-item img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: initial;
  }
  .portfolio-item__link { height: auto; }
  .portfolio-item.is-placeholder,
  .portfolio-item--small.is-placeholder,
  .portfolio-item--medium.is-placeholder { width: 100%; aspect-ratio: 3 / 4; }
  .portfolio-item.is-placeholder .portfolio-item__link { height: 100%; }
  .portfolio-load-area {
    min-height: 55px;
    width: 100%;
    height: auto;
    flex: 0 0 auto;
  }

  .basic-page { margin-top: 95px; padding: 0 16px; }
  .project-detail { margin-top: 95px; padding: 0 16px; }
}
@media (max-width: 380px) {
  .site-navigation { gap: 12px; }
  .site-title, .site-navigation a { font-size: 12px; }
}


/* ===========================================================
   v1.4 WORK pages — homepage styling remains unchanged above.
   Desktop: 2-column archive. Mobile: photo + captions side by side.
   =========================================================== */
:root {
  --work-list-width: 1130px;
  --work-list-gap: 36px;
  --work-list-top: 54px;
  --work-detail-outer-width: 1044px;
  --work-detail-photo-width: 612px;
}
.work-archive {
  width: min(calc(100% - 58px), var(--work-list-width));
  margin: var(--work-list-top) auto 105px;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--work-list-gap);
  row-gap: 52px;
  align-items: start;
}
.work-card { min-width: 0; margin: 0; }
.work-card__link { display: block; }
.work-card__cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center center;
  background-color: #f3f3f3;
}
.work-card__cover--empty { background: #f2f2f2; }
.work-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  padding: 10px 24px 0;
  font-size: 16px;
  font-weight: normal;
  line-height: 1.35;
}
.work-card__name { min-width: 0; overflow-wrap: anywhere; }
.work-card__season { flex: 0 0 auto; white-space: nowrap; }
.work-empty { font-size: 15px; color: #666; margin: 30px 0; }
.work-load-area {
  text-align: center;
  padding: 45px 0 10px;
  min-height: 75px;
  font-size: 13px;
  letter-spacing: .03em;
}
.work-load-area.is-loading::after { content: 'LOADING'; color: #888; }
.work-load-area.is-loading .work-load-link,
.work-load-area.is-observing .work-load-link { display: none; }
.work-load-area.is-error .work-load-link { display: inline; }

/* Detail page: centered content zone, images aligned to zone's left. */
body.single-parrrrck_work .project-detail {
  max-width: var(--work-detail-outer-width);
  width: calc(100% - 58px);
  padding: 0;
  margin: -16px auto 110px;
}
body.single-parrrrck_work .project-detail__title {
  font-family: inherit;
  color: #000;
  font-size: clamp(54px, 5.4vw, 90px);
  font-weight: 400;
  line-height: .99;
  letter-spacing: -.025em;
  margin: 0;
}
body.single-parrrrck_work .project-detail__season {
  font-size: 14px;
  line-height: 1.3;
  color: #555;
  margin: 4px 0 10px;
}
body.single-parrrrck_work .project-detail__images {
  width: min(100%, var(--work-detail-photo-width));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
body.single-parrrrck_work .project-detail__photo {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  vertical-align: top;
}
body.single-parrrrck_work .project-detail__description {
  width: min(100%, var(--work-detail-photo-width));
  font-size: 15px;
  margin-top: 24px;
  line-height: 1.55;
}
body.single-parrrrck_work .project-detail__description img {max-width: 100%;height: auto;}
body.single-parrrrck_work .project-detail .work-load-area {
  width: min(100%, var(--work-detail-photo-width));
}
@media (max-width: 767px) {
  .work-archive {
    width: auto;
    margin: 26px 24px 90px;
  }
  .work-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
  .work-card { width: 100%; }
  .work-card__link {
    display: grid;
    grid-template-columns: 50% minmax(0, 50%);
    align-items: center;
  }
  .work-card__cover { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }
  .work-card__meta {
    padding: 0 clamp(0px, 2.4vw, 18px) 0 clamp(12px, 7.4vw, 62px);
    font-size: clamp(12px, 2.45vw, 20px);
    gap: 5px;
    align-items: center;
  }
  .work-card__name { overflow-wrap: normal; word-break: keep-all; }
  .work-card__season { font-size: inherit; }
  .work-load-area {padding: 34px 0;}

  body.single-parrrrck_work .project-detail {
    max-width: none;
    width: auto;
    margin: 18px 24px 60px;
    padding: 0;
  }
  body.single-parrrrck_work .project-detail__title {
    font-size: clamp(60px, 12vw, 104px);
    line-height: .94;
  }
  body.single-parrrrck_work .project-detail__season {
    margin-top: 7px;
    margin-bottom: 13px;
    font-size: clamp(14px, 2.25vw, 18px);
  }
  body.single-parrrrck_work .project-detail__images,
  body.single-parrrrck_work .project-detail .work-load-area,
  body.single-parrrrck_work .project-detail__description { width: 100%; max-width: none; }
}
@media (max-width: 420px) {
  .work-archive { margin-left: 12px; margin-right: 12px; }
  body.single-parrrrck_work .project-detail { margin-left: 12px; margin-right: 12px; }
  .work-card__meta { padding-left: 12px; padding-right: 0; }
}


/* ============================================================
   v1.5 refinements — keeps existing main feed and project posts.
   WORK images retain their original aspect ratio; no hover dimming.
   ============================================================ */
.work-card__cover { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }
.portfolio-item__link, .work-card__link { transition: none; }
.portfolio-item__link:hover, .work-card__link:hover { opacity: 1; }
.portfolio-item__link img, .work-card__cover { opacity: 1 !important; filter: none !important; transition: none; }

/* PC project: images left and large title/season to the right. */
@media (min-width: 768px) {
  body.single-parrrrck_work .project-detail {
    width: min(calc(100% - 58px), 1044px);
    max-width: none;
    margin: 0 auto 120px;
    padding: 0;
  }
  body.single-parrrrck_work .project-detail__article {
    display: grid;
    grid-template-columns: minmax(0, 612px) minmax(0, 1fr);
    column-gap: 74px;
    align-items: start;
  }
  body.single-parrrrck_work .project-detail__heading {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    position: sticky;
    top: 24px;
    z-index: 1;
  }
  body.single-parrrrck_work .project-detail__gallery-wrap {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  body.single-parrrrck_work .project-detail__title {
    margin: -7px 0 0;
    font-size: clamp(76px, 7.5vw, 125px);
    line-height: 1.0;
    letter-spacing: -.025em;
    white-space: nowrap;
  }
  body.single-parrrrck_work .project-detail__season {
    margin: 110px 0 0;
    font-size: 20px;
    color: #333;
  }
  body.single-parrrrck_work .project-detail__images,
  body.single-parrrrck_work .project-detail__description,
  body.single-parrrrck_work .project-detail .work-load-area { width: 100%; }
}

/* Mobile project: title, season, then one continuous stack of images. */
@media (max-width: 767px) {
  body.single-parrrrck_work .project-detail { margin-top: 14px; }
  body.single-parrrrck_work .project-detail__article { display: block; }
  body.single-parrrrck_work .project-detail__heading { position: static; }
  body.single-parrrrck_work .project-detail__title { margin: 0; }
  body.single-parrrrck_work .project-detail__season { margin: 7px 0 13px; }
  body.single-parrrrck_work .project-detail__gallery-wrap { width: 100%; }
}

/* INFO — desktop side-by-side; mobile image above contact details. */
.info-page {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 40px;
  min-height: calc(100vh - var(--home-header-height));
  min-height: calc(100dvh - var(--home-header-height));
  padding: 0 var(--site-side-padding) 100px;
}
.info-page__media {
  width: min(36.5vw, 600px);
  flex: 0 0 auto;
  margin: 0;
}
.info-page__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
.info-page__details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 400;
  color: #333;
}
.info-page__details p { margin: 0; }
.info-page__details a:hover, .info-email-button:hover { opacity: .65; }
.info-email-button {
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
@media (max-width: 767px) {
  .info-page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
    gap: 24px;
    padding: 28px 24px 60px;
  }
  .info-page__media { width: 100%; flex: 0 0 auto; }
  .info-page__details { gap: 13px; font-size: clamp(15px, 2.4vw, 19px); }
}
@media (max-width: 420px) {
  .info-page { padding: 24px 12px 55px; }
}

/* In-site email composer pop-up. */
.info-contact-dialog {
  width: min(460px, calc(100vw - 36px));
  max-width: 100%;
  max-height: min(90dvh, 720px);
  overflow-y: auto;
  margin: auto;
  padding: 28px;
  border: 1px solid #bcbcbc;
  border-radius: 0;
  background: #fff;
  color: #222;
  box-shadow: 0 14px 45px rgba(0,0,0,.13);
}
.info-contact-dialog::backdrop { background: rgba(0,0,0,.35); }
.info-contact-dialog__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.info-contact-dialog__title { font-size: 24px; font-weight: 400; line-height: 1.2; margin: 0 0 16px; }
.info-contact-dialog__close { border: 0; background: none; font: inherit; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.info-contact-dialog__form { display: grid; gap: 12px; }
.info-contact-dialog__form label { display: grid; gap: 5px; font-size: 14px; }
.info-contact-dialog__form input, .info-contact-dialog__form textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #ccc;
  border-radius: 0;
  font-size: 15px;
  line-height: 1.5;
  font-family: inherit;
  background: #fff;
  color: #222;
}
.info-contact-dialog__form textarea { min-height: 130px; resize: vertical; }
.info-contact-dialog__form button[type='submit'] {
  width: 100%;
  background: #222;
  color: white;
  border: 1px solid #222;
  padding: 11px;
  cursor: pointer;
}
.info-contact-dialog__form button[disabled] { opacity: .5; cursor: progress; }
.info-contact-dialog__status { min-height: 1.4em; font-size: 13px; margin: 0; }
.info-contact-dialog__fallback { font-size: 13px; text-decoration: underline; }
.info-contact-dialog__note { font-size: 12px; color: #666; margin: 0; }
.info-contact-dialog__trap { position: absolute; left: -99999px; height: 1px; overflow: hidden; }

@media (min-width: 768px) and (max-width: 1250px) {
  body.single-parrrrck_work .project-detail__article {
    grid-template-columns: minmax(0, 58%) minmax(0, 1fr);
    column-gap: 4vw;
  }
  body.single-parrrrck_work .project-detail__title { font-size: clamp(52px, 7vw, 92px); }
  body.single-parrrrck_work .project-detail__season { margin-top: 56px; }
}
