/* TERRACOTTA HOME — warm, homely family for family-scale brick residences.
   Tokens come from core.css + the per-project theme (<style id="pdx-theme">); --th-wall is the
   clay of the facade (set on the root). Type: the site's FactorA in sentence case, light weights. */

html[data-design="terracotta-home"] { --pdx-footer: #2a1c15; }
.th {
  --pdx-gutter: clamp(20px, 4.4vw, 76px);
  --th-radius: 18px;
  --th-paper: color-mix(in srgb, var(--pdx-surface) 92%, var(--th-wall));
  background: var(--pdx-bg);
  overflow-x: clip;
}

/* ---------- atoms ---------- */
.th-kicker { font: 500 12px/1.4 var(--pdx-font-text); letter-spacing: .14em; text-transform: uppercase; color: var(--pdx-accent); }
.th-title { font: 300 clamp(32px, 3.6vw, 60px)/1.08 var(--pdx-font-title); letter-spacing: -.02em; text-wrap: balance; color: var(--pdx-ink); }
.th-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 30px;
  border: 1px solid var(--pdx-ink);
  border-radius: 999px;
  font: 500 14px/1 var(--pdx-font-text);
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .35s, color .35s, border-color .35s, transform .35s var(--pdx-ease);
}
.th-btn:hover { transform: translateY(-2px); }
.th .th-btn--solid { background: var(--pdx-accent); border-color: var(--pdx-accent); color: var(--pdx-accent-ink); }
.th .th-btn--solid:hover { background: var(--pdx-ink); border-color: var(--pdx-ink); color: var(--pdx-bg); }
.th .th-btn--line { background: transparent; color: var(--pdx-ink); }
.th .th-btn--line:hover { background: var(--pdx-ink); color: var(--pdx-bg); }
.th-btn--block { width: 100%; }
.th-link { display: inline-flex; align-items: center; gap: 10px; padding: 6px 0; font: 500 14px/1 var(--pdx-font-text); text-decoration: none; color: var(--pdx-ink); border-bottom: 1px solid color-mix(in srgb, var(--pdx-accent) 60%, transparent); }
.th-link span { color: var(--pdx-accent); transition: transform .4s var(--pdx-ease); }
.th-link:hover span { transform: translateX(5px); }
.th-round { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid var(--pdx-line); border-radius: 50%; background: var(--pdx-surface); color: var(--pdx-ink); font-size: 22px; cursor: pointer; transition: transform .6s var(--pdx-ease), background-color .3s, color .3s; }
.th-round:hover { transform: rotate(-180deg); background: var(--pdx-accent); color: var(--pdx-accent-ink); }

.th-section { padding: clamp(90px, 14vh, 170px) var(--pdx-gutter) 0; }
.th-body { color: var(--pdx-muted); font-size: 17px; line-height: 1.7; max-width: 62ch; }
.th-body p + p { margin-top: .9em; }

/* a photo: white border like a print, soft shadow */
.th-photo {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--pdx-surface);
  cursor: zoom-in;
}
.th-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--pdx-ease); }
.th-photo:hover img { transform: scale(1.04); }

/* ---------- hero ---------- */
.th-hero { position: relative; padding: clamp(84px, 12vh, 120px) var(--pdx-gutter) clamp(48px, 8vh, 90px); }
.th-logo { position: absolute; z-index: 3; top: clamp(22px, 3.6vh, 36px); left: var(--pdx-gutter); width: clamp(104px, 9vw, 140px); }
.th-logo img { width: 100%; height: auto; filter: brightness(0); opacity: .85; }
.th-hero__copy { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: clamp(28px, 4vw, 80px); align-items: end; }
.th-hero__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 14px; font: 500 12px/1.4 var(--pdx-font-text); letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.th-hero__meta span + span::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 18px; border-radius: 50% 50% 0 0; background: currentColor; vertical-align: 2px; }
.th-hero__title { grid-column: 1; grid-row: 2 / span 2; font: 300 min(8.4vw, 150px, calc(44vw / (var(--len, 8) * .66)))/.92 var(--pdx-font-display); letter-spacing: -.045em; overflow-wrap: break-word; }
.th-hero--oculus .th-hero__title { font-size: min(8.4vw, 150px, calc(80vw / (var(--len, 8) * .58))); }
.th-hero__subtitle { grid-column: 2; font: 300 clamp(19px, 1.5vw, 24px)/1.4 var(--pdx-font-text); max-width: 34ch; }
.th-hero__actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.pdx.js-ready .th-hero__title { animation: th-rise 1.3s var(--pdx-ease) .25s both; }
.pdx.js-ready .th-hero__meta, .pdx.js-ready .th-hero__subtitle, .pdx.js-ready .th-hero__actions { animation: th-rise 1.2s var(--pdx-ease) .6s both; }
@keyframes th-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* hero: arches — the render seen through arched windows in a clay wall */
.th-hero--arches { padding-top: 0; background: var(--th-wall); color: #fbf6f0; }
.th-hero--arches .th-logo img { filter: brightness(0) invert(1); opacity: .95; }
.th-hero--arches .th-btn--solid { background: #fbf6f0; border-color: #fbf6f0; color: var(--th-wall); }
.th-hero--arches .th-btn--line { border-color: rgba(251, 246, 240, .7); color: #fbf6f0; }
.th-hero--arches .th-btn--solid:hover, .th-hero--arches .th-btn--line:hover { background: #2a1c15; border-color: #2a1c15; color: #fbf6f0; }
.th-hero--arches .th-link { color: #fbf6f0; border-color: rgba(251, 246, 240, .5); }
.th-hero--arches .th-link span { color: #fbf6f0; }
.th-arches { position: relative; margin: 0 calc(-1 * var(--pdx-gutter)) clamp(30px, 5vh, 56px); aspect-ratio: 16 / 7; max-height: 74svh; overflow: hidden; }
.th-arches__img { position: absolute; inset: -4% 0 0; }
.th-hero__img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pdx-hero-focus, 50% 50%); }
.th-arches__wall { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); fill: var(--th-wall); transform-origin: 50% 100%; transform: scale(calc(1 + var(--hp, 0) * .5)); }
.th-arches__wall--tall { display: none; }
.pdx.js-ready .th-arches__wall { animation: th-wall-open 1.8s var(--pdx-ease) .1s both; }
@keyframes th-wall-open { from { scale: 1 1.4; opacity: 0; } 30% { opacity: 1; } to { scale: 1 1; opacity: 1; } }
.th-arches__img img { transform: scale(1.1); }
.pdx.js-ready .th-arches__img img { animation: th-settle 2.4s var(--pdx-ease) .1s forwards; }
@keyframes th-settle { to { transform: scale(1); } }

/* hero: doorway — a tall arched doorway beside the text */
.th-hero--doorway { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); column-gap: clamp(28px, 5vw, 100px); align-items: center; min-height: 100svh; }
.th-hero--doorway .th-hero__copy { grid-column: 1; grid-row: 1; grid-template-columns: minmax(0, 1fr); }
.th-hero--doorway .th-hero__title, .th-hero--doorway .th-hero__subtitle, .th-hero--doorway .th-hero__actions { grid-column: 1; grid-row: auto; }
.th-hero--doorway .th-hero__subtitle { margin-top: 26px; }
.th-doorway { grid-column: 2; grid-row: 1; position: relative; justify-self: end; width: min(100%, 560px); aspect-ratio: 3 / 4.3; transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--pdx-ease); }
.th-doorway::before { content: ''; position: absolute; inset: 0; transform: translate(-22px, 22px); border: 1px solid color-mix(in srgb, var(--pdx-accent) 60%, transparent); border-radius: 999px 999px 0 0; }
.th-doorway__img { position: absolute; inset: 0; overflow: hidden; border-radius: 999px 999px 0 0; background: var(--pdx-surface); }
.pdx.js-ready .th-doorway__img { animation: th-door 1.6s var(--pdx-ease) .2s both; }
@keyframes th-door { from { clip-path: inset(100% 0 0 0 round 999px 999px 0 0); } to { clip-path: inset(0 0 0 0 round 999px 999px 0 0); } }

/* hero: oculus — the render inside a round window, a pearl */
.th-hero--oculus { display: grid; justify-items: center; text-align: center; }
.th-oculus { position: relative; width: min(64vh, 640px, 82vw); aspect-ratio: 1; margin-bottom: clamp(-90px, -7vw, -40px); transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--pdx-ease); }
.th-oculus__img { position: absolute; inset: 0; overflow: hidden; border-radius: 50%; }
.th-oculus__ring { position: absolute; inset: -16px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--pdx-accent) 60%, transparent); background: conic-gradient(from 210deg, transparent 0 62%, color-mix(in srgb, #fff 60%, var(--pdx-accent)) 70%, transparent 78%) border-box; -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: th-spin 14s linear infinite; }
@keyframes th-spin { to { transform: rotate(360deg); } }
.pdx.js-ready .th-oculus__img { animation: th-iris 1.6s var(--pdx-ease) .1s both; }
@keyframes th-iris { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(50% at 50% 50%); } }
.th-hero--oculus .th-hero__copy { grid-template-columns: minmax(0, 1fr); justify-items: center; max-width: 900px; }
.th-hero--oculus .th-hero__meta { justify-content: center; }
.th-hero--oculus .th-hero__title, .th-hero--oculus .th-hero__subtitle, .th-hero--oculus .th-hero__actions { grid-column: 1; grid-row: auto; justify-content: center; }
.th-hero--oculus .th-hero__title { position: relative; padding: .08em .3em; background: var(--pdx-bg); border-radius: 999px; }
.th-hero--oculus .th-hero__subtitle { margin-top: 18px; }

/* hero: lantern — a full-bleed night render, a glowing arch drawn over it */
.th-hero--lantern { display: grid; align-content: end; min-height: 100svh; overflow: hidden; color: #fff6ea; }
.th-lantern { position: absolute; inset: 0; z-index: 0; }
.th-lantern__img { position: absolute; inset: -6% 0 0; }
.th-lantern::after { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 55% at 50% 45%, transparent, rgba(16, 10, 6, .55) 80%), linear-gradient(0deg, rgba(16, 10, 6, .85), transparent 55%); }
.th-lantern__arch { position: absolute; z-index: 1; left: 50%; bottom: 0; width: min(46vh, 380px); height: min(64vh, 532px); transform: translateX(-50%); overflow: visible; fill: none; stroke: color-mix(in srgb, var(--pdx-accent) 85%, #fff); stroke-width: 1.4; filter: drop-shadow(0 0 10px var(--pdx-accent)) drop-shadow(0 0 30px var(--pdx-glow)); }
.th-lantern__arch path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.pdx.js-ready .th-lantern__arch path { animation: th-draw 2.6s var(--pdx-ease) .4s both; }
.pdx.js-ready .th-lantern__arch path + path { animation-delay: .8s; opacity: .55; }
@keyframes th-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.th-hero--lantern .th-logo img { filter: brightness(0) invert(1); }
.th-hero--lantern .th-hero__copy { z-index: 2; }
.th-hero--lantern .th-btn--line { color: #fff6ea; border-color: rgba(255, 246, 234, .7); }
.th-hero--lantern .th-link { color: #fff6ea; }

/* ---------- section nav: ribbon bookmarks on the right edge ---------- */
.th-nav { position: fixed; z-index: 40; right: 0; top: 50%; transform: translateY(-50%); transition: opacity .5s, transform .6s var(--pdx-ease); }
.th.is-hero-view .th-nav { opacity: 0; pointer-events: none; transform: translate(30px, -50%); }
.th-nav ol { display: grid; gap: 6px; justify-items: end; }
.th-nav a { display: flex; align-items: center; justify-content: flex-end; height: 26px; min-width: 22px; padding: 0 0 0 10px; text-decoration: none; color: var(--pdx-accent-ink); background: color-mix(in srgb, var(--pdx-accent) 55%, transparent); clip-path: polygon(8px 50%, 0 0, 100% 0, 100% 100%, 0 100%); transition: background-color .3s, min-width .5s var(--pdx-ease); }
.th-nav a span { max-width: 0; overflow: hidden; white-space: nowrap; font: 500 12px/1 var(--pdx-font-text); transition: max-width .5s var(--pdx-ease), padding .5s; }
.th-nav a:hover span, .th-nav a:focus-visible span { max-width: 240px; padding: 0 14px 0 8px; }
.th-nav a[aria-current="true"] { min-width: 44px; background: var(--pdx-accent); }
@media (max-width: 1099px) { .th-nav { display: none; } }

/* ---------- prologue ---------- */
.th-prologue { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); column-gap: clamp(28px, 4vw, 80px); align-items: start; }
.th-prologue .th-kicker { padding-top: .6em; }
.th-lede { font: 300 clamp(26px, 2.6vw, 44px)/1.25 var(--pdx-font-text); letter-spacing: -.015em; text-wrap: pretty; }
.th-prologue__rest { grid-column: 2; margin-top: 28px; max-width: 64ch; color: var(--pdx-muted); font-size: 17px; line-height: 1.7; }
.th-prologue__rest p + p { margin-top: 1em; }

/* ---------- features ---------- */
.th-features .th-title { margin-bottom: clamp(36px, 6vh, 64px); }
.th-feats { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 26px); }
.th-feat { position: relative; display: grid; align-content: start; gap: 14px; transition: transform .6s var(--pdx-ease), box-shadow .6s var(--pdx-ease); }
.th-feat__icon { display: grid; place-items: center; color: var(--pdx-ink); }
.th-glyph { width: 100%; height: auto; stroke-width: 1.3; }
.th-feat__title { font: 500 clamp(16px, 1.25vw, 20px)/1.3 var(--pdx-font-text); }
.th-feat__text { font-size: 14.5px; line-height: 1.55; color: var(--pdx-muted); }
.pdx.js-ready .th-feat { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--pdx-ease), transform 1s var(--pdx-ease), box-shadow .6s; transition-delay: calc(var(--d) * .12s), calc(var(--d) * .12s), 0s; }
.pdx.js-ready .th-feats.is-in .th-feat { opacity: 1; transform: none; }
.pdx.js-ready .th-feats.is-in .th-feat:hover, .th-feat:hover { transform: translateY(-8px); transition-delay: 0s; }

/* tiles: glazed clay tiles */
.th-features--tiles .th-feat { padding: clamp(18px, 2vw, 28px); border-radius: var(--th-radius); background: linear-gradient(150deg, color-mix(in srgb, var(--th-wall) 18%, var(--pdx-surface)), color-mix(in srgb, var(--th-wall) 6%, var(--pdx-surface))); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 22px 40px -30px rgba(70, 30, 15, .5); overflow: hidden; }
.th-features--tiles .th-feat::after { content: ''; position: absolute; inset: -40% -60%; background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .45) 50%, transparent 58%); transform: translateX(-60%); transition: transform 1.1s var(--pdx-ease); pointer-events: none; }
.th-features--tiles .th-feat:hover::after { transform: translateX(60%); }
.th-features--tiles .th-feat__icon { width: clamp(60px, 5.4vw, 84px); aspect-ratio: 1; padding: 12px; border-radius: 14px; background: var(--pdx-surface); box-shadow: 0 10px 20px -14px rgba(70, 30, 15, .5); }
.th-features--tiles .th-feat__title { margin-top: 10px; }
/* arches: cards with arched tops */
.th-features--arches .th-feat { padding: 0 0 22px; text-align: center; justify-items: center; }
.th-features--arches .th-feat__icon { width: 100%; aspect-ratio: 4 / 4.6; padding: 26% 26% 16%; border-radius: 999px 999px var(--th-radius) var(--th-radius); background: var(--th-paper); border: 1px solid color-mix(in srgb, var(--pdx-accent) 35%, transparent); transition: background-color .5s, border-color .5s; }
.th-features--arches .th-feat:hover .th-feat__icon { border-color: var(--pdx-accent); background: color-mix(in srgb, var(--pdx-accent) 12%, var(--pdx-surface)); }
.th-features--arches .th-feat__text { max-width: 28ch; }

/* ---------- chapters ---------- */
.th-chhead { display: grid; gap: 14px; margin-bottom: clamp(26px, 4vh, 44px); }
.th-chapter--text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); column-gap: clamp(28px, 4vw, 80px); align-items: start; }

/* stack: a spread with a pile of photos to leaf through */
.th-spread { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); column-gap: clamp(28px, 5vw, 100px); align-items: center; }
.th-spread__text { align-self: start; position: sticky; top: 14vh; }
.th-stack { position: relative; display: grid; gap: 22px; justify-items: center; }
.th-stack__pile { position: relative; width: 100%; aspect-ratio: 4 / 3; }
.th-stack__card { --o: min(var(--pos, var(--k)), 3); position: absolute; inset: 0; margin: 0; padding: 10px 10px 38px; border-radius: 12px; background: #fffdf9; box-shadow: 0 30px 60px -36px rgba(60, 25, 10, .55), 0 2px 0 rgba(60, 25, 10, .06); z-index: calc(50 - var(--pos, var(--k))); transform: translate(calc(var(--o) * 9px), calc(var(--o) * -7px)) rotate(var(--r)); transition: transform .8s var(--pdx-ease), opacity .5s; }
.th-stack__card .th-photo { border-radius: 6px; }
.th-stack__card.is-buried { opacity: 0; }
.pdx.js-ready .th-stack .th-stack__card { translate: 0 40px; opacity: 0; transition: transform .8s var(--pdx-ease), opacity .8s, translate 1s var(--pdx-ease); transition-delay: 0s, calc(min(var(--k), 4) * .08s), calc(min(var(--k), 4) * .08s); }
.pdx.js-ready .th-stack.is-in .th-stack__card { translate: 0 0; opacity: 1; }
.pdx.js-ready .th-stack.is-in .th-stack__card.is-buried { opacity: 0; }
.pdx.js-ready .th-stack.is-in .th-stack__card.is-leaving { transform: translate(115%, -6%) rotate(14deg); opacity: 0; transition: transform .55s cubic-bezier(.5, 0, .7, .4), opacity .45s .1s; transition-delay: 0s; }
.th-stack__ui { display: flex; align-items: center; gap: 18px; font: 300 15px/1 var(--pdx-font-text); color: var(--pdx-muted); }
.th-stack__ui b { font-weight: 500; color: var(--pdx-ink); }

/* album: a lead photo and a page with prints */
.th-album { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: clamp(28px, 4vw, 80px); align-items: start; }
.th-album__lead { margin: 0; aspect-ratio: 4 / 3.2; }
.th-album__lead .th-photo { border-radius: var(--th-radius); }
.th-album__prints { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.th-print { margin: 0; width: clamp(96px, 9vw, 140px); aspect-ratio: 1; padding: 6px 6px 18px; background: #fffdf9; border-radius: 6px; box-shadow: 0 16px 28px -18px rgba(60, 25, 10, .55); transform: rotate(var(--r)); transition: transform .5s var(--pdx-ease); }
.th-print:hover { transform: rotate(0) translateY(-6px) scale(1.06); z-index: 2; }
.th-print .th-photo { border-radius: 3px; }
.pdx.js-ready .th-album .th-album__lead { clip-path: inset(0 0 100% 0 round var(--th-radius)); transition: clip-path 1.3s var(--pdx-ease); }
.pdx.js-ready .th-album.is-in .th-album__lead { clip-path: inset(0 0 0 0 round var(--th-radius)); }
.pdx.js-ready .th-album .th-print { opacity: 0; translate: 0 18px; transition: opacity .7s var(--pdx-ease), translate .8s var(--pdx-ease), transform .5s var(--pdx-ease); transition-delay: calc(.5s + var(--j) * .08s), calc(.5s + var(--j) * .08s), 0s; }
.pdx.js-ready .th-album.is-in .th-print { opacity: 1; translate: 0 0; }

/* arcade: arched frames in a row */
.th-arcade { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--n) - 1) * clamp(12px, 1.4vw, 22px)) / var(--n)); gap: clamp(12px, 1.4vw, 22px); overflow-x: auto; scrollbar-width: none; margin-bottom: clamp(30px, 5vh, 56px); padding-bottom: 6px; }
.th-arcade::-webkit-scrollbar { display: none; }
.th-arch-frame { margin: 0; aspect-ratio: 3 / 4.4; }
.th-arch-frame .th-photo { border-radius: 999px 999px var(--th-radius) var(--th-radius); }
.pdx.js-ready .th-arcade .th-arch-frame { clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--pdx-ease); transition-delay: calc(var(--k) * .1s); }
.pdx.js-ready .th-arcade.is-in .th-arch-frame { clip-path: inset(0); }
.th-chapter--arcade .th-body { columns: 2 320px; column-gap: 56px; max-width: 980px; }

/* ---------- location: a postcard ---------- */
.th-location .th-title { margin-bottom: clamp(30px, 5vh, 50px); }
.th-location--continued { padding-top: clamp(30px, 5vh, 56px); }
.th-postcard { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); background: var(--th-paper); border-radius: var(--th-radius); box-shadow: 0 50px 90px -60px rgba(60, 25, 10, .55); overflow: hidden; }
.th-postcard--no-map { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.th .th-map { position: relative; margin: 0; min-height: clamp(420px, 62svh, 640px); }
.th-map__canvas { position: absolute; inset: 0; }
.th-postcard__back { position: relative; display: grid; align-content: start; gap: 18px; padding: clamp(28px, 3.4vw, 56px); border-left: 1px dashed var(--pdx-line); }
.th-postcard__place { font: 300 clamp(36px, 3.6vw, 60px)/1 var(--pdx-font-title); letter-spacing: -.03em; }
.th-postcard__to { padding: 10px 0; border-bottom: 1px solid var(--pdx-line); font: 500 16px/1.3 var(--pdx-font-text); }
.th-postcard__coords { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--pdx-line); font: 300 15px/1.4 var(--pdx-font-text); color: var(--pdx-muted); font-variant-numeric: tabular-nums; }
.th-stamps { display: flex; flex-wrap: wrap; gap: 16px; margin: 6px 0; }
.th-stamp {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  width: 112px;
  aspect-ratio: 4 / 5;
  padding: 10px 8px;
  text-align: center;
  color: var(--pdx-accent-ink);
  background: var(--pdx-accent);
  -webkit-mask: radial-gradient(circle 4px, transparent 97%, #000) -6px -6px / 12px 12px round, linear-gradient(#000 0 0) content-box;
  mask: radial-gradient(circle 4px, transparent 97%, #000) -6px -6px / 12px 12px round, linear-gradient(#000 0 0) content-box;
  transform: rotate(var(--r));
  transition: transform .5s var(--pdx-ease);
}
.th-stamp:hover { transform: rotate(0) scale(1.06); }
.th-stamp b { font: 300 40px/1 var(--pdx-font-text); }
.th-stamp i { font-style: normal; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.th-stamp span { font-size: 11.5px; line-height: 1.25; }
.pdx.js-ready .th-stamps .th-stamp { opacity: 0; scale: 1.5; transition: opacity .5s, scale .6s cubic-bezier(.3, 1.6, .5, 1), transform .5s var(--pdx-ease); transition-delay: calc(.4s + var(--d) * .18s), calc(.4s + var(--d) * .18s), 0s; }
.pdx.js-ready .th-stamps.is-in .th-stamp { opacity: 1; scale: 1; }

/* ---------- contact: a letter ---------- */
.th-contact { padding-bottom: clamp(90px, 14vh, 160px); }
.th-letter { position: relative; display: grid; justify-items: center; gap: 18px; max-width: 760px; margin: 0 auto; padding: clamp(120px, 14vw, 200px) clamp(24px, 5vw, 72px) clamp(36px, 5vw, 64px); text-align: center; background: var(--th-paper); border-radius: 999px 999px var(--th-radius) var(--th-radius); box-shadow: 0 50px 90px -60px rgba(60, 25, 10, .55); }
.th-letter::before { content: ''; position: absolute; inset: 14px; border: 1px solid color-mix(in srgb, var(--pdx-accent) 40%, transparent); border-radius: 999px 999px 10px 10px; pointer-events: none; }
.th-letter__text { color: var(--pdx-muted); font-size: 17px; }
.th-letter__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; }
.th .pd-form-box.th-form { display: block; width: 100%; max-width: 520px; margin: 10px 0 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--pdx-ink); text-align: left; backdrop-filter: none; }
.th .th-form form { display: grid; gap: 18px; }
.th .th-form .th-field { display: grid; gap: 6px; margin: 0; }
.th .th-form .th-field__label { font: 500 12px/1 var(--pdx-font-text); color: var(--pdx-muted); }
.th .th-form .th-field__row { display: flex; align-items: center; gap: 10px; padding: 0 18px; border: 1px solid var(--pdx-line); border-radius: 999px; background: var(--pdx-surface); transition: border-color .3s; }
.th .th-form input { width: 100%; margin: 0; padding: 15px 18px; border: 1px solid var(--pdx-line); border-radius: 999px; background: var(--pdx-surface); box-shadow: none; color: var(--pdx-ink); font: 400 16px/1.2 var(--pdx-font-text); transition: border-color .3s; }
.th .th-form .th-field__row input { padding: 15px 0; border: 0; background: transparent; }
.th .th-form input:focus { outline: none; border-color: var(--pdx-accent); }
.th .th-form .th-field__row:focus-within { border-color: var(--pdx-accent); }
.th .th-form .pd-phone-prefix { position: static; padding: 0; margin: 0; transform: none; color: var(--pdx-accent); font: 400 16px/1.2 var(--pdx-font-text); }
.th .th-form button[type="submit"] { min-height: 56px; margin-top: 6px; }
.th .th-form .th-form__consent { margin: 0; font-size: 12px; line-height: 1.5; color: var(--pdx-muted); text-align: center; }

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

/* ---------- tone: dark (night renders) ---------- */
.th[data-tone="dark"] { --th-paper: color-mix(in srgb, var(--pdx-surface) 90%, var(--pdx-accent)); }
.th[data-tone="dark"] .th-logo img { filter: none; }
.th[data-tone="dark"] .th-stack__card, .th[data-tone="dark"] .th-print { background: color-mix(in srgb, var(--pdx-surface) 70%, #fff 8%); }

/* ---------- tablets & phones ---------- */
@media (max-width: 899px) {
  .pdx.th { font-size: 16px; }
  .th-hero__copy, .th-hero--doorway, .th-prologue, .th-spread, .th-album, .th-chapter--text, .th-postcard { grid-template-columns: minmax(0, 1fr); }
  .th-hero__title, .th-hero__subtitle, .th-hero__actions { grid-column: 1; grid-row: auto; }
  .th-hero__title, .th-hero--oculus .th-hero__title { font-size: min(15vw, 90px, calc(88vw / (var(--len, 8) * .58))); }
  .th-hero__subtitle { margin-top: 18px; }
  .th-arches { aspect-ratio: 4 / 5; max-height: none; }
  .th-arches__wall--wide { display: none; }
  .th-arches__wall--tall { display: block; }
  .th-hero--doorway { min-height: 0; row-gap: 36px; }
  .th-doorway { grid-column: 1; grid-row: 1; justify-self: center; width: min(86%, 420px); }
  .th-hero--doorway .th-hero__copy { grid-row: 2; }
  .th-oculus { width: 84vw; margin-bottom: -36px; }
  .th-lantern__arch { width: 70vw; height: 98vw; }
  .th-prologue__rest { grid-column: 1; }
  .th-prologue .th-kicker { padding: 0 0 14px; }
  .th-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .th-spread__text { position: static; margin-bottom: 30px; }
  .th-album__page { margin-top: 26px; }
  .th-arcade { grid-auto-columns: 62%; margin-left: calc(-1 * var(--pdx-gutter)); margin-right: calc(-1 * var(--pdx-gutter)); padding: 0 var(--pdx-gutter) 6px; scroll-snap-type: x mandatory; }
  .th-arch-frame { scroll-snap-align: center; }
  .th-chapter--arcade .th-body { columns: 1; }
  .th .th-map { min-height: 360px; }
  .th-postcard__back { border-left: 0; border-top: 1px dashed var(--pdx-line); }
  .th-stamp { width: 96px; }
  .th-letter { padding-top: 34vw; border-radius: 50vw 50vw var(--th-radius) var(--th-radius); }
  .th-letter::before { border-radius: 50vw 50vw 10px 10px; }
  .th-contact { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .th-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: 8px;
    padding: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--pdx-surface) 94%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px -20px rgba(60, 25, 10, .5);
    transform: translateY(calc(100% + 24px));
    transition: transform .55s var(--pdx-ease);
  }
  .th-dock.is-visible { transform: none; }
  .th-dock .th-btn { min-height: 46px; padding: 0 12px; }
}

/* ---------- motion preferences ---------- */
.th[data-motion="none"] *, .th[data-motion="none"] *::before, .th[data-motion="none"] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .th-arches__wall { transform: none; }
  .th-oculus__ring { animation: none; }
}
