/* Text pages — About, Test shoot, thank-you, 404 — share one layout:
   one column on the logo's left edge, a large light statement, small 13px text blocks,
   small bold-caps section heads separated by space (no rules). Tokens live in fonts.css. */

.pg { padding: 190px 20px 140px; color: var(--ink); text-align: left; }

:where(.pg) * { text-align: left; }
.pg > *, .pg-section > * { max-width: 560px; }

/* the statement */
.pg > .pg-title {
  max-width: 820px; margin: 0 0 40px;
  font-family: var(--font) !important; font-weight: var(--light) !important;
  font-size: clamp(30px, 4.2vw, 56px); line-height: 1.1; letter-spacing: -.015em; text-transform: none; text-wrap: balance;
}
.pg-eyebrow { margin: 0 0 16px; font-size: var(--size); letter-spacing: var(--track); text-transform: uppercase; }   /* concept pages only */

/* text */
:where(.pg) p, .pg-lead { font-size: var(--size-read); line-height: 1.65; color: var(--ink); text-wrap: pretty; margin: 0 0 16px; }
.pg a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.pg a:hover { opacity: .6; }
.pg-contact { margin-top: 28px; }

/* sections: space, not lines */
.pg-section { margin-top: 96px; }
.pg-h2 { margin: 0 0 20px; font-size: var(--size); font-weight: var(--heavy); letter-spacing: var(--track-heavy); text-transform: uppercase; color: var(--ink); }

/* images */
.pg-more { margin: 8px 0 0; }
.pg-polaroid { margin: 48px 0 0; max-width: 340px; }
.pg-polaroid img, .pg-portrait img { display: block; width: 100%; height: auto; }   /* natural ratio, so a Polaroid keeps its frame */
.pg-portrait { margin: 0 0 48px; max-width: 460px; }

/* About with a portrait: photo beside the text on desktop, from the centre line */
@media (min-width: 900px) {
  .pg:has(> .pg-portrait) { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; align-content: start; padding-top: 170px; }
  .pg:has(> .pg-portrait) > * { grid-column: 1 / span 6; }
  .pg > .pg-portrait { grid-column: 7 / span 4; grid-row: 1 / span 4; margin: 0; max-width: 420px; align-self: start; }
}

@media (max-width: 700px) {
  .pg { padding-top: 120px; }
  .pg > .pg-title { margin-bottom: 28px; }
  .pg-section { margin-top: 72px; }
  .pg-polaroid { margin-top: 36px; }
  .pg-form .pg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }   /* measurements: 2 x 2 on phones */
}

/* text pages end with their own contact lines, so the site footer would only repeat them */
body:has(.pg) .footer-josuito { display: none; }

/* Numbered steps */
.pg-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.pg-steps li {
  float: none;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0 8px;
  margin: 0 0 16px;
  font-size: var(--size-read);
  line-height: 1.65;
  color: var(--ink);
  counter-increment: step;
}
.pg-steps li::before { content: counter(step, decimal-leading-zero); color: var(--ink); font-size: var(--size); padding-top: 1px; font-variant-numeric: tabular-nums; }

/* Facts list (About) */
.pg-facts { margin: 0; display: grid; grid-template-columns: 140px 1fr; gap: 12px 16px; font-size: var(--size-read); line-height: 1.5; }
.pg-facts dt { color: var(--ink); font-size: var(--size); text-transform: uppercase; letter-spacing: var(--track); padding-top: 1px; }
.pg-facts dd { margin: 0; color: var(--ink); }

/* Form details */
.pg-form label.pg-label { display: block; margin: 32px 0 4px; font-size: var(--size); font-weight: var(--heavy); text-transform: uppercase; letter-spacing: var(--track); color: var(--ink); }
.pg-form label.pg-label span { font-family: var(--font) !important; font-weight: var(--light) !important; letter-spacing: var(--track) !important; color: var(--ink); opacity: 1 !important; }
.pg-form .pg-hint { margin: 8px 0 0; font-size: var(--size); line-height: var(--lh); text-transform: uppercase; letter-spacing: var(--track); color: var(--ink-2); }

/* Inputs: underline only, square, uppercase placeholders (16px on touch so phones don't zoom) */
.pg-form input:not([type=checkbox]):not([type=submit]):not([type=file]), .pg-form select {
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background-color: transparent;
  padding: 14px 0 10px; margin: 0 0 4px; font-size: var(--size-read); box-shadow: none;
}
.pg-form select { padding-right: 28px; background-position: right 2px center; font-size: var(--size); text-transform: uppercase; letter-spacing: var(--track); }
.pg-form input::placeholder { text-transform: uppercase; font-size: var(--size); letter-spacing: var(--track); color: var(--ink-2); }
.pg-form input:focus, .pg-form select:focus { box-shadow: none; border-bottom-width: 2px; padding-bottom: 9px; }
@media (pointer: coarse) { .pg-form input:not([type=checkbox]):not([type=submit]), .pg-form select { font-size: 16px; } }
.pg-form .pg-row { gap: 16px; }
.pg-form .pg-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-form .pg-row input { flex: 1 1 120px; margin: 0; }
.pg-form .pg-check { display: flex; align-items: center; gap: 10px; margin: 32px 0 24px; font-size: var(--size); text-transform: uppercase; letter-spacing: var(--track); color: var(--ink); }
.pg-form .pg-check input { width: 14px; height: 14px; border: 1px solid var(--ink) !important; border-radius: 0 !important; padding: 0; cursor: pointer; flex: none; -webkit-appearance: none; appearance: none; background: #fff; }
.pg-form .pg-check input:checked { background: var(--ink); box-shadow: inset 0 0 0 2px #fff; }
.pg-form .pg-check input { margin: 0; }
.pg-form .submit-button { margin: 0; text-align: center; }

/* Photo uploader */
.pg-drop {
  display: block; cursor: pointer; padding: 16px; text-align: center;
  border: 1px solid var(--ink); border-radius: 0; background: #fff;
  color: var(--ink); font-size: var(--size); text-transform: uppercase; letter-spacing: var(--track);
  transition: background-color .15s ease, color .15s ease;
}
.pg-drop:hover, .pg-drop.is-over { background: var(--ink); color: #fff; }
.pg-drop[hidden], .pg-photos[hidden] { display: none; }
.pg-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 8px; }
.pg-photo { position: relative; aspect-ratio: 4 / 5; border-radius: 0; overflow: hidden; background: #eee; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #8a8a8a; }
.pg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-form .pg-photo-x {
  position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: #fff; color: var(--ink);
  font-size: 17px; line-height: 26px; text-align: center; cursor: pointer;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.pg-form .pg-photo-x:hover { background: var(--ink); color: #fff; }
.pg-form #photos-msg:empty { display: none; }

/* Text pages: the fixed header gets a white backdrop, so text scrolling underneath doesn't run into the logo and links
   (the home page keeps it transparent over the photo) */
body:has(.pg) header.header { background-color: #fff !important; }

/* Plain list (Good to know) */
.pg-list { list-style: none; margin: 0; padding: 0; }
.pg-list li { float: none; display: block; width: auto; position: relative; padding-left: 18px; margin: 0 0 10px; font-size: var(--size-read); line-height: 1.6; color: var(--ink); }
.pg-list li::before { content: '—'; position: absolute; left: 0; }

/* Digitals: four labelled 4:5 slots */
.pg-form p.pg-label { display: block; margin: 32px 0 12px; font-size: var(--size); font-family: var(--font-heavy) !important; font-weight: var(--heavy); text-transform: uppercase; letter-spacing: var(--track-heavy); }
.pg-form p.pg-label span { font-family: var(--font) !important; font-weight: var(--light); letter-spacing: var(--track); }
.pg-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pg-slot {
  position: relative; display: flex; align-items: flex-end; aspect-ratio: 4 / 5; cursor: pointer;
  border: 1px solid var(--ink); background: #fff center / cover no-repeat; transition: background-color .15s ease;
}
.pg-slot input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pg-slot-name { padding: 8px; font-size: var(--size); text-transform: uppercase; letter-spacing: var(--track); line-height: 1.2; }
.pg-slot:hover, .pg-slot.is-over { background-color: #f3f3f3; }
.pg-slot.is-set .pg-slot-name { background: #fff; margin: 6px; padding: 3px 6px; }
/* loading: soft pulse + label until the photo is decoded */
.pg-slot.is-loading { animation: pg-pulse 1.1s ease-in-out infinite; }
.pg-slot.is-loading::after { content: 'Loading…'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: var(--size); text-transform: uppercase; letter-spacing: var(--track); color: var(--ink-2); }
@keyframes pg-pulse { 0%, 100% { background-color: #fff; } 50% { background-color: #efefef; } }
@media (prefers-reduced-motion: reduce) { .pg-slot.is-loading { animation: none; background-color: #f3f3f3; } }
/* error: shown inside the slot */
.pg-slot.is-error { border-color: #b3261e; }
.pg-slot.is-error::after { content: attr(data-error); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; font-size: var(--size); line-height: 1.35; color: #b3261e; }
.pg-slot.is-error .pg-slot-name { color: #b3261e; }
.pg-form #photos-msg:empty { display: none; }
.pg-form #photos-msg { color: #b3261e; }
.pg-slot[data-ext]::after { content: attr(data-ext); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: var(--size); color: var(--ink-2); }
/* loaded: hovering hints that a click replaces it */
.pg-slot.is-set:not([data-ext]):hover::after { content: 'Replace'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.55); font-size: var(--size); text-transform: uppercase; letter-spacing: var(--track); color: var(--ink); }
.pg-form .pg-slot-x {
  position: absolute; top: 5px; right: 5px; z-index: 2; width: 20px; height: 20px; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: #fff; color: var(--ink); font-size: 14px; line-height: 20px; text-align: center; cursor: pointer;
}
.pg-form .pg-slot-x:hover { background: var(--ink); color: #fff; }
.pg-form .pg-slot-x[hidden] { display: none; }
@media (max-width: 700px) { .pg-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* phones: measurements as a 2 x 2 grid (after the base .pg-row rule so it wins) */
@media (max-width: 700px) { .pg-form .pg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; } }

/* Desktop: one centred column, as wide as the text it holds, so the text itself sits in the middle of the page.
   Everything inside shares the same width; text stays left-aligned. (Last in the file so it wins.) */
@media (min-width: 900px) {
  .pg { width: 600px; max-width: none; margin: 0 auto; padding-left: 0; padding-right: 0; }
  .pg > *, .pg-section > * { max-width: 100%; }
  .pg > .pg-title { max-width: 100%; font-size: 42px; }
  .pg > .pg-polaroid { max-width: 340px; }
}

/* Tighter rhythm for the informative sections; a bit more room before the form so it stands apart */
.pg > .pg-title { margin-bottom: 28px; }
.pg-polaroid, .pg > .pg-polaroid { margin-top: 32px; }
.pg-section { margin-top: 56px; }
.pg-section#apply { margin-top: 80px; }
.pg-h2 { margin-bottom: 14px; }
.pg-steps li { margin-bottom: 8px; }
.pg-list li { margin-bottom: 6px; }
@media (max-width: 700px) { .pg-section { margin-top: 48px; } .pg-section#apply { margin-top: 64px; } }

/* ---- Form, refined: hairline grey lines that turn black on focus, sentence-case placeholders and hints,
   thin outlines, an outlined button. Section labels stay in small bold caps. ---- */
.pg-form { --line: #d9d9d9; --hint: #9b9b9b; }
.pg-form input:not([type=checkbox]):not([type=submit]):not([type=file]), .pg-form select {
  border: 0 !important; border-radius: 0; box-shadow: none !important;
  background-color: transparent;
  background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--line), var(--line));
  background-size: 0% 1px, 100% 1px; background-position: 0 100%, 0 100%; background-repeat: no-repeat;
  transition: background-size .35s ease;
  padding: 16px 0 10px; margin: 0 0 6px; font-size: var(--size-read); letter-spacing: 0; color: var(--ink);
}
.pg-form input:not([type=checkbox]):not([type=submit]):not([type=file]):focus, .pg-form select:focus {
  outline: none; background-size: 100% 1px, 100% 1px; padding-bottom: 10px;
}
.pg-form input::placeholder { text-transform: none; font-size: var(--size-read); letter-spacing: 0; color: var(--hint); }
.pg-form input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset !important; -webkit-text-fill-color: var(--ink); }
.pg-form select {
  text-transform: none; font-size: var(--size-read); letter-spacing: 0; padding-right: 24px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='1'/></svg>"),
                    linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--line), var(--line));
  background-size: 10px 6px, 0% 1px, 100% 1px; background-position: right 2px center, 0 100%, 0 100%;
}
.pg-form select:focus { background-size: 10px 6px, 100% 1px, 100% 1px; }
.pg-form select:invalid, .pg-form select:has(option[value=""]:checked) { color: var(--hint); }
.pg-form .pg-hint { text-transform: none; font-size: var(--size-read); letter-spacing: 0; color: var(--hint); margin-top: 6px; }
.pg-form .pg-row { gap: 0 20px; }

/* photo slots: thin grey outline, sentence-case label */
.pg-slot { border-color: var(--line); }
.pg-slot:hover { border-color: var(--ink); background-color: #fff; }
.pg-slot-name { text-transform: none; font-size: var(--size-read); letter-spacing: 0; color: var(--hint); }
.pg-slot.is-set .pg-slot-name { color: var(--ink); }
.pg-slot.is-loading::after { text-transform: none; font-size: var(--size-read); letter-spacing: 0; }
.pg-slot.is-set:not([data-ext]):hover::after { text-transform: none; font-size: var(--size-read); letter-spacing: 0; }

/* checkbox */
.pg-form .pg-check { text-transform: none; font-size: var(--size-read); letter-spacing: 0; margin: 36px 0 28px; }
.pg-form .pg-check input { width: 15px; height: 15px; border: 1px solid #bdbdbd !important; transition: border-color .2s ease, background-color .2s ease; }
.pg-form .pg-check input:hover { border-color: var(--ink) !important; }
.pg-form .pg-check input:checked { border-color: var(--ink) !important; }

/* button: fine outline, fills on hover */
.pg-form .submit-button {
  background: #fff !important; color: var(--ink) !important; border: 1px solid var(--ink) !important;
  padding: 15px 0 !important; letter-spacing: .14em !important; transition: background-color .25s ease, color .25s ease;
}
.pg-form .submit-button:hover, .pg-form .submit-button:focus-visible { background: var(--ink) !important; color: #fff !important; }
.pg-form .submit-button:disabled { opacity: .5; cursor: default; }
/* touch screens: 16px in fields so iPhones don't zoom in on focus (after the refined rules so it wins) */
@media (pointer: coarse) {
  .pg-form input:not([type=checkbox]):not([type=submit]):not([type=file]), .pg-form select, .pg-form input::placeholder { font-size: 16px; }
}
/* explicit white page, so browsers in dark mode don't show a dark canvas behind the text pages */
html:has(.pg), body:has(.pg) { background: #fff; color-scheme: light; }

/* Required note, field errors */
.pg-form .pg-hint-top { margin: 0 0 4px; }
.pg-field { position: relative; }
.pg-form .pg-error { margin: 4px 0 0; font-size: var(--size-read); line-height: 1.4; color: #b3261e; }
.pg-form .pg-error:empty { display: none; }
.pg-form .pg-error-check { margin: -18px 0 22px 25px; }
.pg-form input.is-invalid { background-image: linear-gradient(#b3261e, #b3261e), linear-gradient(#b3261e, #b3261e) !important; background-size: 100% 1px, 100% 1px !important; }
.pg-form .pg-check input[aria-invalid="true"] { border-color: #b3261e !important; }

/* "Also open to": tick-any */
.pg-ticks { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 4px 0 0; }
.pg-tick { display: inline-flex; align-items: center; gap: 10px; font-size: var(--size-read); cursor: pointer; }
.pg-form .pg-tick input { width: 15px; height: 15px; margin: 0; padding: 0; flex: none; cursor: pointer; -webkit-appearance: none; appearance: none;
  border: 1px solid #bdbdbd !important; border-radius: 0 !important; background: #fff; transition: border-color .2s ease, background-color .2s ease; }
.pg-form .pg-tick input:hover { border-color: var(--ink) !important; }
.pg-form .pg-tick input:checked { border-color: var(--ink) !important; background: var(--ink); box-shadow: inset 0 0 0 2px #fff; }

/* Model quote */
.pg-quote { margin: 64px 0 0; }
.pg-quote blockquote { margin: 0; font-size: 19px; line-height: 1.45; font-family: var(--font) !important; font-weight: var(--light); letter-spacing: -.005em; text-wrap: pretty; }
.pg-quote figcaption { margin-top: 12px; font-size: var(--size); text-transform: uppercase; letter-spacing: var(--track); color: var(--ink-2); }
