/* DELIVERED — a documentary photo essay for completed projects.
   Tokens come from core.css + the per-project theme. Type: the site's FactorA, set like a
   printed photo story; photographs "develop" (from over-exposed to normal) as they appear. */

html[data-design="delivered"] { --pdx-footer: #141414; }
.dl {
  --pdx-gutter: clamp(18px, 4vw, 72px);
  background: var(--pdx-bg);
  overflow-x: clip;
}

/* ---------- atoms ---------- */
.dl-kicker { font: 500 12px/1.4 var(--pdx-font-text); letter-spacing: .2em; text-transform: uppercase; color: var(--pdx-accent); }
.dl-title { font: 300 clamp(32px, 3.6vw, 60px)/1.06 var(--pdx-font-title); letter-spacing: -.025em; text-wrap: balance; }
.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid currentColor;
  border-radius: 0;
  font: 500 12px/1 var(--pdx-font-text);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .3s, color .3s, border-color .3s;
}
.dl .dl-btn--solid { background: var(--pdx-ink); border-color: var(--pdx-ink); color: var(--pdx-bg); }
.dl .dl-btn--solid:hover { background: var(--pdx-accent); border-color: var(--pdx-accent); color: var(--pdx-accent-ink); }
.dl .dl-btn--line { background: transparent; color: inherit; }
.dl .dl-btn--line:hover { background: var(--pdx-ink); color: var(--pdx-bg); border-color: var(--pdx-ink); }
.dl-btn--block { width: 100%; }
.dl-link { display: inline-flex; align-items: center; gap: 10px; padding: 6px 0; font: 500 12px/1 var(--pdx-font-text); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: inherit; border-bottom: 1px solid var(--pdx-accent); }
.dl-link span { color: var(--pdx-accent); transition: transform .4s var(--pdx-ease); }
.dl-link:hover span { transform: translateX(5px); }
.dl-section { padding: clamp(90px, 14vh, 170px) var(--pdx-gutter) 0; }
.dl-progress { position: fixed; z-index: 40; left: 0; right: 0; top: 0; height: 3px; pointer-events: none; }
.dl-progress i { display: block; height: 100%; background: var(--pdx-accent); transform-origin: left; transform: scaleX(var(--progress, 0)); }

/* ---------- hero ---------- */
.dl-hero { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-content: end; min-height: 100svh; padding: clamp(84px, 12vh, 120px) var(--pdx-gutter) clamp(36px, 6vh, 70px); }
.dl-logo { position: absolute; z-index: 3; top: clamp(22px, 3.6vh, 36px); left: var(--pdx-gutter); width: clamp(104px, 9vw, 140px); }
.dl-logo img { width: 100%; height: auto; filter: brightness(0); }
.dl-hero__img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pdx-hero-focus, 50% 50%); }
.dl-hero__title { position: relative; z-index: 2; grid-column: 1 / -1; font: 300 min(11vw, 190px, calc(92vw / (var(--len, 8) * .6)))/.88 var(--pdx-font-display); letter-spacing: -.055em; overflow-wrap: break-word; }
.dl-hero__copy { position: relative; z-index: 2; grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; align-items: end; margin-top: 26px; padding-top: 18px; border-top: 1px solid currentColor; }
.dl-hero__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 24px; font: 500 12px/1.4 var(--pdx-font-text); letter-spacing: .16em; text-transform: uppercase; }
.dl-hero__subtitle { font: 300 clamp(19px, 1.6vw, 26px)/1.35 var(--pdx-font-text); max-width: 40ch; }
.dl-hero__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px 20px; }
.pdx.js-ready .dl-hero__title { animation: dl-rise 1.4s var(--pdx-ease) .3s both; }
.pdx.js-ready .dl-hero__copy { animation: dl-rise 1.2s var(--pdx-ease) .6s both; }
@keyframes dl-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes dl-develop { from { filter: brightness(2.6) contrast(.5) saturate(0) blur(2px); } 60% { filter: brightness(1.2) contrast(.9) saturate(.6); } to { filter: none; } }

/* seal */
.dl-seal { position: absolute; z-index: 3; right: var(--pdx-gutter); top: clamp(110px, 16vh, 160px); width: clamp(110px, 10vw, 160px); aspect-ratio: 1; padding: 6px; border-radius: 50%; background: var(--pdx-bg); box-shadow: 0 0 0 1px var(--pdx-line), 0 20px 40px -24px rgba(0, 0, 0, .4); rotate: calc(var(--seal, 0) * 1deg); }
.dl-hero--essay .dl-seal { background: transparent; box-shadow: none; }
.dl-seal svg { width: 100%; height: 100%; overflow: visible; }
.dl-seal text { fill: currentColor; font: 600 13px/1 var(--pdx-font-text); letter-spacing: .1em; }
.dl-seal__tick { fill: none; stroke: var(--pdx-accent); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.pdx.js-ready .dl-seal__tick { animation: dl-tick 1.2s var(--pdx-ease) 1.2s both; }
@keyframes dl-tick { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.pdx.js-ready .dl-seal { animation: dl-stamp .8s cubic-bezier(.3, 1.6, .5, 1) .9s both; }
@keyframes dl-stamp { from { opacity: 0; scale: 1.8; } to { opacity: 1; scale: 1; } }

/* hero: essay — a full-bleed photograph, white type over its foot */
.dl-hero--essay { color: #fff; }
.dl-hero--essay .dl-logo img { filter: brightness(0) invert(1); }
.dl-hero--essay .dl-hero__media { position: absolute; inset: 0; margin: 0; overflow: hidden; }
.dl-hero--essay .dl-hero__frame { position: absolute; inset: -6% 0 0; }
.dl-hero--essay .dl-hero__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .1) 55%, rgba(0, 0, 0, .3)); }
.dl-hero--essay .dl-btn--solid { background: #fff; border-color: #fff; color: #141414; }
.dl-hero--essay .dl-seal { color: #fff; }
.pdx.js-ready .dl-hero--essay .dl-hero__img, .pdx.js-ready .dl-hero--frame .dl-hero__img, .pdx.js-ready .dl-hero--split .dl-hero__img { animation: dl-develop 2.4s ease-out .1s both; }

/* hero: frame — the photograph in a passe-partout, title above it */
.dl-hero--frame { align-content: start; }
.dl-hero--frame .dl-hero__title { margin-bottom: 26px; }
.dl-hero--frame .dl-hero__media { grid-column: 1 / -1; height: clamp(320px, 56svh, 640px); margin: 0; padding: clamp(14px, 1.6vw, 26px); background: var(--pdx-surface); box-shadow: 0 0 0 1px var(--pdx-line), 0 50px 80px -60px rgba(0, 0, 0, .45); }
.dl-hero--frame .dl-hero__frame { position: relative; height: 100%; overflow: hidden; }
.dl-hero--frame .dl-seal { top: auto; bottom: calc(clamp(36px, 6vh, 70px) + 150px); }

/* hero: split — a title column beside a tall photograph */
.dl-hero--split { grid-template-rows: 1fr auto; align-content: stretch; }
.dl-hero--split .dl-hero__media { grid-column: 6 / -1; grid-row: 1 / span 2; margin: 0 calc(-1 * var(--pdx-gutter)) calc(-1 * clamp(36px, 6vh, 70px)) 0; overflow: hidden; }
.dl-hero--split .dl-hero__frame { position: absolute; inset: -4% 0 0; }
.dl-hero--split .dl-hero__media { position: relative; }
.dl-hero--split .dl-hero__title { grid-column: 1 / span 5; grid-row: 1; align-self: end; font-size: min(7vw, 120px, calc(38vw / (var(--len, 8) * .6))); }
.dl-hero--split .dl-hero__copy { grid-column: 1 / span 5; grid-row: 2; grid-template-columns: minmax(0, 1fr); }
.dl-hero--split .dl-hero__actions { justify-content: flex-start; }
.dl-hero--split .dl-seal { right: auto; left: calc(var(--pdx-gutter) + 2vw); top: clamp(100px, 16vh, 150px); }

/* hero: contact — a contact sheet, the hero picked with a grease pencil */
.dl-hero--contact { align-content: start; }
.dl-sheet { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); gap: 10px; margin-bottom: 26px; padding: 14px; background: #1a1a1a; }
.dl-sheet__frame { position: relative; margin: 0; aspect-ratio: 3 / 2; }
.dl-sheet__frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.6) contrast(1.05); transition: filter .5s; }
.dl-sheet__frame:hover img { filter: none; }
.dl-sheet__frame figcaption { position: absolute; left: 4px; bottom: -14px; font: 600 9px/1 var(--pdx-font-text); color: #e0a03c; letter-spacing: .1em; }
.dl-sheet__frame--pick { grid-column: span 2; grid-row: span 2; }
.dl-sheet__frame--pick img { filter: none; }
.dl-pencil { position: absolute; inset: -8%; width: 116%; height: 116%; overflow: visible; fill: none; stroke: var(--pdx-accent); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; pointer-events: none; }
.pdx.js-ready .dl-pencil { animation: dl-tick 1.4s var(--pdx-ease) .9s both; }
.pdx.js-ready .dl-sheet__frame { animation: dl-develop 1.8s ease-out both; animation-delay: calc(var(--k) * 70ms); }
.dl-hero--contact .dl-seal { top: auto; bottom: clamp(140px, 22vh, 220px); }

/* ---------- prologue ---------- */
.dl-prologue { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.dl-prologue .dl-kicker { grid-column: 1 / span 3; padding-top: .7em; }
.dl-lede { grid-column: 4 / span 8; font: 300 clamp(26px, 2.8vw, 48px)/1.22 var(--pdx-font-text); letter-spacing: -.018em; text-wrap: pretty; }
.dl-prologue__rest { grid-column: 4 / span 6; margin-top: 26px; color: var(--pdx-muted); font-size: 17px; line-height: 1.7; }

/* ---------- features ---------- */
.dl-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; margin-top: 30px; border-top: 1px solid var(--pdx-ink); }
.dl-feat { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 16px; padding: 20px 20px 22px 0; border-bottom: 1px solid var(--pdx-line); }
.dl-feat__icon { grid-row: 1 / span 2; width: 52px; }
.dl-glyph { width: 100%; height: auto; stroke-width: 1.4; }
.dl-feat__title { font: 500 16px/1.3 var(--pdx-font-text); }
.dl-feat__text { font-size: 14px; color: var(--pdx-muted); }

/* ---------- the photo essay ---------- */
.dl-article { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; margin-bottom: clamp(40px, 7vh, 80px); }
.dl-chhead { grid-column: 1 / span 3; display: grid; gap: 14px; align-content: start; }
.dl-body { grid-column: 4 / span 8; columns: 2 300px; column-gap: 40px; font-size: 17.5px; line-height: 1.72; color: var(--pdx-ink); }
.dl-body p + p { margin-top: .9em; }
.dl-body > p:first-child::first-letter { float: left; margin: .04em .12em 0 0; font: 300 4.6em/.8 var(--pdx-font-text); color: var(--pdx-accent); }
.dl-shot { position: relative; margin: 0; }
.dl-photo { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; overflow: hidden; background: #ddd; cursor: zoom-in; }
.dl-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--pdx-ease); }
.dl-photo:hover img { transform: scale(1.03); }
.dl-shot figcaption { margin-top: 10px; font: 400 12px/1.4 var(--pdx-font-text); letter-spacing: .06em; color: var(--pdx-muted); }
.dl-shot figcaption b { font-weight: 600; color: var(--pdx-ink); }
.pdx.js-ready .dl-shot[data-reveal] { transform: none; }
.pdx.js-ready .dl-shot[data-reveal] img { filter: brightness(2.6) contrast(.5) saturate(0) blur(2px); transition: filter 2s ease-out, transform 1.4s var(--pdx-ease); }
.pdx.js-ready .dl-shot[data-reveal].is-in img { filter: none; }
.dl-shot--bleed { margin: 0 calc(-1 * var(--pdx-gutter)); }
.dl-shot--bleed .dl-photo { height: clamp(380px, 80svh, 860px); }
.dl-shot--bleed figcaption { padding: 0 var(--pdx-gutter); }
.dl-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: clamp(40px, 7vh, 80px); }
.dl-pair .dl-photo { aspect-ratio: 4 / 3; }
.dl-pair .dl-shot:nth-child(2) { margin-top: 12vh; }
.dl-shot--inset, .dl-shot--inset-r { width: min(64%, 900px); margin-top: clamp(40px, 7vh, 80px); }
.dl-shot--inset-r { margin-left: auto; }
.dl-shot--inset .dl-photo, .dl-shot--inset-r .dl-photo { aspect-ratio: 3 / 2; }

/* filmstrip */
.dl-film { margin: 0 calc(-1 * var(--pdx-gutter)); padding: 22px 0 18px; background: #161616; }
.dl-film__track { display: flex; gap: 6px; overflow-x: auto; padding: 18px var(--pdx-gutter); scrollbar-width: none; scroll-snap-type: x proximity; background: radial-gradient(circle, #f1efe9 0 3px, transparent 3.5px) 0 0 / 22px 14px repeat-x, radial-gradient(circle, #f1efe9 0 3px, transparent 3.5px) 0 100% / 22px 14px repeat-x; cursor: grab; outline: none; }
.dl-film__track::-webkit-scrollbar { display: none; }
.dl-film__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.dl-film__track.is-dragging .dl-photo { pointer-events: none; }
.dl-shot--film { flex: 0 0 auto; scroll-snap-align: start; }
.dl-shot--film .dl-photo { height: clamp(260px, 46vh, 460px); aspect-ratio: 3 / 2; width: auto; }
.dl-shot--film figcaption { color: #bbb; }
.dl-shot--film figcaption b { color: #f2c063; }

/* grid */
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.dl-grid .dl-photo { aspect-ratio: 4 / 3; }
.dl-shot--wide { grid-column: 1 / -1; }
.dl-shot--wide .dl-photo { aspect-ratio: 21 / 9; }

/* ---------- location ---------- */
.dl-location { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 4vw, 60px); align-items: end; }
.dl-location__head { display: grid; gap: 16px; }
.dl-location__place { font: 300 clamp(40px, 4.4vw, 76px)/1 var(--pdx-font-title); letter-spacing: -.04em; }
.dl-location__coords { display: grid; gap: 2px; font: 400 15px/1.4 var(--pdx-font-text); color: var(--pdx-muted); font-variant-numeric: tabular-nums; }
.dl-stats { display: grid; gap: 8px; font-size: 15px; }
.dl-stats b { font: 300 30px/1 var(--pdx-font-text); color: var(--pdx-accent); }
.dl .dl-map { position: relative; margin: 0; min-height: clamp(400px, 62svh, 660px); box-shadow: 0 0 0 1px var(--pdx-line); }
.dl-map__canvas { position: absolute; inset: 0; }

/* ---------- contact ---------- */
.dl-contact { padding-bottom: clamp(90px, 14vh, 160px); }
.dl-contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(30px, 5vw, 90px); padding-top: 30px; border-top: 1px solid var(--pdx-ink); }
.dl-contact__text { margin-top: 18px; color: var(--pdx-muted); font-size: 17px; }
.dl-contact__links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; }
.dl .pd-form-box.dl-form { display: block; width: auto; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--pdx-ink); text-align: left; backdrop-filter: none; }
.dl .dl-form form { display: grid; gap: 22px; }
.dl .dl-form .dl-field { display: grid; gap: 6px; margin: 0; }
.dl .dl-form .dl-field__label { font: 500 11px/1 var(--pdx-font-text); letter-spacing: .16em; text-transform: uppercase; color: var(--pdx-muted); }
.dl .dl-form .dl-field__row { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--pdx-ink); }
.dl .dl-form input { width: 100%; margin: 0; padding: 10px 0 12px; border: 0; border-bottom: 1px solid var(--pdx-ink); border-radius: 0; background: transparent; box-shadow: none; color: var(--pdx-ink); font: 300 clamp(19px, 1.5vw, 23px)/1.2 var(--pdx-font-text); }
.dl .dl-form .dl-field__row input { border-bottom: 0; }
.dl .dl-form input:focus { outline: none; border-bottom-color: var(--pdx-accent); }
.dl .dl-form .dl-field__row:focus-within { border-bottom-color: var(--pdx-accent); }
.dl .dl-form .pd-phone-prefix { position: static; padding: 0; margin: 0; transform: none; color: var(--pdx-accent); font: 300 clamp(19px, 1.5vw, 23px)/1.2 var(--pdx-font-text); }
.dl .dl-form button[type="submit"] { min-height: 58px; margin-top: 6px; }
.dl .dl-form .dl-form__consent { margin: 0; font-size: 12px; line-height: 1.5; color: var(--pdx-muted); }

/* ---------- dock ---------- */
.dl-dock { display: none; }

/* ---------- tone: dark (darkroom) ---------- */
.dl[data-tone="dark"] .dl-logo img { filter: none; }
.dl[data-tone="dark"] .dl-photo { background: #222; }

/* ---------- tablets & phones ---------- */
@media (max-width: 899px) {
  .pdx.dl { font-size: 16px; }
  .dl-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 90px; }
  .dl-hero--essay { min-height: 100svh; }
  .dl-hero__title, .dl-hero--split .dl-hero__title { grid-column: 1; grid-row: auto; font-size: min(16vw, calc(88vw / (var(--len, 8) * .6))); }
  .dl-hero__copy, .dl-hero--split .dl-hero__copy { grid-column: 1; grid-row: auto; grid-template-columns: minmax(0, 1fr); }
  .dl-hero__actions { flex-direction: column; align-items: stretch; justify-content: flex-start; }
  .dl-hero--frame .dl-hero__media { grid-column: 1; height: 60vw; }
  .dl-hero--split .dl-hero__media { grid-column: 1; grid-row: auto; height: 70vw; margin: 0 calc(-1 * var(--pdx-gutter)) 24px; order: -1; }
  .dl-sheet { grid-column: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px; }
  .dl-seal { width: 92px; top: 76px; }
  .dl-hero--frame .dl-seal, .dl-hero--contact .dl-seal { top: 76px; bottom: auto; }
  .dl-hero--split .dl-seal { left: auto; right: var(--pdx-gutter); top: 76px; }
  .dl-prologue, .dl-article { grid-template-columns: minmax(0, 1fr); }
  .dl-prologue .dl-kicker, .dl-lede, .dl-prologue__rest, .dl-chhead, .dl-body { grid-column: 1; }
  .dl-prologue .dl-kicker { padding: 0 0 14px; }
  .dl-chhead { margin-bottom: 20px; }
  .dl-body { columns: 1; }
  .dl-pair, .dl-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .dl-pair .dl-shot:nth-child(2) { margin-top: 0; }
  .dl-shot--inset, .dl-shot--inset-r { width: 100%; }
  .dl-shot--bleed .dl-photo { height: 70vw; }
  .dl-location, .dl-contact__grid { grid-template-columns: minmax(0, 1fr); }
  .dl .dl-map { min-height: 360px; }
  .dl-contact { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .dl-dock {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 6px;
    background: var(--pdx-bg);
    box-shadow: 0 0 0 1px var(--pdx-ink), 0 16px 30px -16px rgba(0, 0, 0, .5);
    transform: translateY(calc(100% + 24px));
    transition: transform .5s var(--pdx-ease);
  }
  .dl-dock.is-visible { transform: none; }
  .dl-dock .dl-btn { min-height: 46px; padding: 0 10px; }
}

/* ---------- motion preferences ---------- */
.dl[data-motion="none"] *, .dl[data-motion="none"] *::before, .dl[data-motion="none"] *::after { animation: none !important; transition: none !important; }
.dl[data-motion="none"] .dl-shot img { filter: none !important; }
@media (prefers-reduced-motion: reduce) { .pdx.js-ready .dl-shot[data-reveal] img { filter: none; } .dl-seal { rotate: none; } }
