:root {
  color-scheme: light;
  --paper: #f5eee2;
  --ink: #29221b;
  --muted: #665b4c;
  --line: #cfc1ac;
  --accent: #943d2f;
  --stock: #fff6e3;
  --dark: #25312b;
  --mono: Courier, "Courier New", monospace;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --width: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--sans); }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
p, h1, h2, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.content-width { width: min(var(--width), calc(100% - clamp(36px, 8vw, 120px))); margin-inline: auto; }
.skip { position: fixed; inset: 0 auto auto 0; z-index: 10; background: var(--paper); padding: .75rem 1rem; transform: translateY(-110%); }
.skip:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-head { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; }
.wordmark img { height: auto; filter: brightness(0) saturate(100%); opacity: .86; }
.site-head nav { display: flex; align-items: center; gap: clamp(.8rem, 3.5vw, 2.25rem); }
.nav-cities, .site-footer > a:last-child { text-underline-offset: .24em; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 100vw; background: transparent; color: inherit; padding: .5rem 1rem; text-decoration: none; font-size: .875rem; line-height: 1.25; transition: background-color .16s, border-color .16s, color .16s; }
.button:hover { border-color: var(--ink); background-color: #e5d9c6; }
.primary, .nav-install { color: #fff9ef; background: var(--ink); border-color: var(--ink); }
.primary:hover, .nav-install:hover { background: #554437; border-color: #554437; }

.hero { display: grid; align-items: start; grid-template-columns: minmax(0, .79fr) minmax(0, 1.45fr); gap: clamp(25px, 4.2vw, 72px); padding-block: clamp(44px, 7.2vw, 108px) clamp(44px, 7.2vw, 96px); }
.hero-copy { padding-block: clamp(15px, 3.4vw, 54px) 0; }
.hero-copy h1 { font: 400 clamp(3rem, 5.8vw, 6rem)/.92 var(--serif); letter-spacing: -.086em; text-wrap: balance; }
.hero-copy h1 em { display: block; color: var(--accent); font-weight: inherit; }
.hero-copy p { max-width: 31ch; margin: clamp(18px, 2.55vw, 29px) 0 22px; font-size: clamp(1rem, 1.42vw, 1.17rem); color: var(--muted); }
.hero-index { font-weight: 650; text-underline-offset: .32em; }
.hero-index:hover { color: var(--accent); }
.experience { min-width: 0; }
.deck { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 5px 0 9px; touch-action: pan-y; user-select: none; perspective: 1400px; }
.postcard { position: relative; width: 91%; min-width: 0; aspect-ratio: 1.72; min-height: 256px; z-index: 2; perspective: 1250px; transform: translateX(var(--offset, 0)) rotate(var(--twist, 0deg)); }
.postcard-turn { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .54s cubic-bezier(.22,.7,.25,1); }
.postcard.is-flipped .postcard-turn { transform: rotateY(180deg); }
.postcard.no-turn .postcard-turn { transition: none; }
.stack-card, .postcard-front, .postcard-back { background: var(--stock); border-radius: 2px; box-shadow: 0 2px 4px #261b1730, 0 13px 26px #261b172b; }
.stack-card { position: absolute; width: 86%; height: 88%; padding: clamp(5px, .9vw, 10px); }
.stack-card img, .postcard-photo { width: 100%; height: 100%; object-fit: cover; }
.stack-card img { filter: saturate(.82) brightness(.86); }
.stack-left { left: 2.4%; transform: translateY(-1%) rotate(-4.5deg); }
.stack-right { right: 2.5%; transform: translateY(1%) rotate(4.2deg); }
.postcard-front, .postcard-back { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.postcard-front { --frame: clamp(6px, 1vw, 11px); padding: var(--frame); color: #fff9ec; }
.postcard-photo { background: #454e43; }
.postcard-front::after { position: absolute; inset: var(--frame); background: linear-gradient(0deg, #1a130fed, #1a130f38 45%, transparent 75%); content: ""; pointer-events: none; }
.postcard-caption { position: absolute; z-index: 1; inset: auto var(--frame) var(--frame); padding: clamp(15px, 3vw, 36px); }
.postcard-scene { margin-bottom: .35rem; font: 700 clamp(.75rem, 1.25vw, .9rem)/1.25 var(--mono); letter-spacing: .10em; text-transform: uppercase; }
.postcard-place { color: inherit; font: 400 clamp(2rem, 6vw, 5.6rem)/.93 var(--serif); letter-spacing: -.075em; overflow-wrap: anywhere; }
.postcard-back { display: grid; grid-template-columns: minmax(0, 60%) minmax(0, 40%); padding: clamp(15px, 3vw, 38px); background-image: radial-gradient(ellipse at 27% 26%, #fff9eb 0%, transparent 75%), repeating-linear-gradient(36deg, #775b3e09 0 1px, transparent 1px 4px); transform: rotateY(180deg); }
.letter { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: clamp(.4rem, 1.3vw, .9rem); padding-right: clamp(11px, 2.6vw, 29px); border-right: 1px solid #baaa8d; font-family: var(--mono); }
.letter-greeting { font-size: clamp(1.08rem, 2.3vw, 1.85rem); font-weight: 700; line-height: 1.1; }
.letter-note { font-size: clamp(.875rem, 1.55vw, 1.22rem); line-height: 1.35; max-width: 31ch; }
.letter-signature { width: clamp(76px, 9vw, 114px); height: auto; margin-top: .12rem; filter: brightness(0) saturate(100%); opacity: .79; }
.mail { position: relative; padding-left: clamp(7px, 2.3vw, 24px); }
.stamp { --stamp-turn: 5deg; --stamp-color: #225744; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; isolation: isolate; position: relative; z-index: 1; margin-left: auto; width: 62%; min-width: 57px; max-width: 124px; aspect-ratio: 1.15; color: #fff5df; background: var(--stamp-color); border: clamp(4px, .58vw, 6px) solid #fff8e7; transform: rotate(var(--stamp-turn)); font: 700 clamp(.52rem, .86vw, .66rem)/1.15 var(--mono); }
.stamp.portrait { width: 51%; aspect-ratio: .8; }
.stamp { mask: linear-gradient(#000 0 0) center / calc(100% - 6px) calc(100% - 6px) no-repeat, radial-gradient(circle at 4px 0, transparent 1.8px, #000 2px) top left / 8px 4px repeat-x, radial-gradient(circle at 4px 4px, transparent 1.8px, #000 2px) bottom left / 8px 4px repeat-x, radial-gradient(circle at 0 4px, transparent 1.8px, #000 2px) top left / 4px 8px repeat-y, radial-gradient(circle at 4px 4px, transparent 1.8px, #000 2px) top right / 4px 8px repeat-y; }
.stamp-country { padding: .3em .35em; white-space: nowrap; }
.stamp-image { width: 100%; height: 100%; min-height: 0; object-fit: cover; mix-blend-mode: luminosity; filter: grayscale(1) contrast(1.15); opacity: .94; }
.stamp-bottom { display: flex; justify-content: space-between; align-items: end; gap: .2em; padding: .28em .32em; }
.stamp-issue { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .78em; }
.stamp-value { flex: 0 0 auto; }
.postmark { position: absolute; display: flex; align-items: center; right: -1%; top: clamp(21px, 4.5vw, 51px); width: 96%; z-index: 2; color: #433934bd; transform: rotate(-11deg); pointer-events: none; }
.postmark-ring { flex: 0 0 auto; display: grid; gap: 2px; align-content: center; justify-items: center; text-align: center; width: clamp(37px, 6.1vw, 79px); aspect-ratio: 1; border: 1px solid; border-radius: 50%; outline: 1px dotted; outline-offset: -4px; font: 700 clamp(.32rem, .72vw, .56rem)/1.05 var(--mono); }
.postmark-place { width: 85%; overflow-wrap: anywhere; }
.postmark-date { border-block: 1px solid; }
.postmark-lines { flex: 1; height: clamp(10px, 2.4vw, 22px); background: repeating-linear-gradient(0deg, transparent 0 4px, currentColor 4px 5px); }
.postal-lines { position: absolute; display: grid; gap: clamp(12px, 2.8vw, 26px); inset: auto 1% 13% clamp(7px, 2.3vw, 24px); }
.postal-lines span { border-bottom: 1px solid #baaa8d; }
.postal-lines span:last-child { width: 70%; }
.deck-click { position: absolute; z-index: 3; inset: 5px 4.5% 9px; border: 0; background: transparent; border-radius: 1px; touch-action: pan-y; }
.postcard.flight { position: absolute; margin: auto; inset: 5px 0 auto; z-index: 4; pointer-events: none; }
.experience-controls, .browse, .back-actions { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.experience-controls { justify-content: space-between; margin: 12px 4.5% 0; }
.browse-prev, .browse-next { width: 44px; padding: .2rem; font-size: 1.55rem; line-height: 1; padding-bottom: .25rem; }
.deck-hint { color: var(--muted); font-size: .8125rem; margin-left: .35rem; }
.recommendation { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .72rem; margin: .65rem 4.5% 0; }
.recommend { color: var(--accent); border-color: #b88678; }
.recommend[aria-busy="true"] { opacity: .7; cursor: wait; }
.recommendation-note { font-size: .875rem; color: var(--muted); }
.back-actions { margin: .65rem 4.5% 0; }
.descriptor-cloud { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .38rem; margin: .45rem 4.5% 0; }
.descriptor { min-height: 32px; padding: .23rem .58rem; border-color: transparent; border-radius: 4px; color: var(--muted); font-size: .875rem; text-decoration: underline; text-underline-offset: .19em; text-decoration-color: #ac9e88; }
.descriptor:hover { text-decoration-color: currentColor; color: var(--accent); border-color: var(--line); background: #efe4d4; }
@media (pointer: coarse) { .descriptor { min-height: 44px; } }
.sample { margin: .75rem 4.5% 0; padding: .85rem; background: #efe4d4; border: 1px solid var(--line); }
.sample-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem .75rem; font-size: .875rem; }
.sample-track { font-weight: 700; }
.sample-artist { color: var(--muted); }
.sample-external { text-underline-offset: .17em; }
.sample iframe { width: 100%; max-width: 660px; height: 175px; border: 0; background: transparent; display: block; margin-top: 10px; }

.directory { background: #e9e2d4; border-block: 1px solid #d6cbb9; padding: clamp(35px, 5.8vw, 74px) 0; scroll-margin-top: 18px; }
.directory-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem 2rem; margin-bottom: clamp(20px, 3.2vw, 36px); }
.directory h2, .install-panel h2 { font: 400 clamp(2.3rem, 5vw, 4.4rem)/.98 var(--serif); letter-spacing: -.065em; }
.directory-head p { margin-top: .5rem; color: var(--muted); }
.search { min-width: min(100%, 320px); }
.search input { width: 100%; min-height: 46px; border: 1px solid #a79882; padding: .6rem .85rem; background: #f9f4ea; color: var(--ink); border-radius: 4px; }
.search input::placeholder { color: #63594d; }
.city-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2.1vw, 29px); }
.city-tile { display: grid; grid-template-rows: auto 1fr; min-width: 0; color: var(--ink); text-decoration: none; background: #faf1df; border: 1px solid #d5c7af; padding: clamp(4px, .6vw, 8px); box-shadow: 0 2px 5px #23190b14; transition: transform .18s, box-shadow .18s; }
.city-tile:hover { transform: translateY(-4px) rotate(-.45deg); box-shadow: 0 8px 14px #23190b23; }
.city-tile img { width: 100%; aspect-ratio: 1.6; height: auto; object-fit: cover; background: #a59c89; }
.tile-text { align-self: end; padding: .65rem .4rem .35rem; }
.tile-place { display: block; font: 400 clamp(1.05rem, 2.25vw, 1.72rem)/1.1 var(--serif); letter-spacing: -.035em; overflow-wrap: anywhere; }
.tile-country { display: block; color: var(--muted); font-size: .8125rem; margin-top: .18rem; }
.install-panel { background: var(--dark); color: #fff3de; }
.install-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.2rem 2rem; padding-block: clamp(44px, 6.7vw, 94px); }
.install-panel p { max-width: 52ch; color: #ecddc9; margin-top: .85rem; }
.install-button { border-color: #f7efdf; color: var(--dark); background: #f7efdf; padding-inline: 1.25rem; }
.install-button:hover { background: #e5d9c6; color: var(--ink); }
.site-footer { display: flex; min-height: 82px; align-items: center; justify-content: space-between; }

@media (max-width: 910px) {
  .hero { grid-template-columns: minmax(0, .83fr) minmax(0, 1.32fr); gap: 20px; }
  .hero-copy h1 { font-size: clamp(2.75rem, 6.2vw, 4.2rem); }
}
@media (max-width: 730px) {
  .site-head { min-height: 70px; }
  .wordmark img { width: 123px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 34px; gap: 34px; }
  .hero-copy { padding: 0; }
  .hero-copy h1 { font-size: clamp(2.9rem, 9vw, 4.75rem); text-wrap: inherit; }
  .hero-copy h1 em { display: inline; }
  .hero-copy p { max-width: 43ch; margin-bottom: .65rem; }
  .city-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .site-head nav { gap: .65rem; }
  .nav-cities { font-size: .875rem; }
  .nav-install { padding-inline: .75rem; }
  .wordmark img { width: 108px; }
  .hero-copy h1 em { display: block; }
  .deck { margin-inline: -3px; }
  .postcard { aspect-ratio: 1.25; min-height: 254px; }
  .postcard-back { grid-template-columns: minmax(0, 64%) minmax(0, 36%); }
  .stamp, .stamp.portrait { width: 84%; }
  .experience-controls, .recommendation, .back-actions, .descriptor-cloud, .sample { margin-inline: 0; }
  .deck-hint { margin-left: .1rem; }
  .browse { gap: .3rem; }
  .browse-prev, .browse-next { width: 36px; }
  .flip { padding-inline: .75rem; }
  .directory-head { align-items: stretch; }
  .search { width: 100%; }
  .city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
