/* Joey's Gallerie. Same type system as Dream District, light-led, hung like a gallery */
:root {
  --wall: #F4EEE4;
  --wall-deep: #ECE3D5;
  --print: #FBF8F2;
  --umber: #1A1613;
  --espresso: #2E2620;
  --sand: #E4D5BE;
  --taupe: #A08B6F;
  --gold: #DCB979;
  --gold-deep: #B8934E;
  --gold-ink: #8C6B2F;
  --ink: var(--umber);
  --ink-soft: #5E4F40;
  --rule: rgba(160, 139, 111, .35);
  --on-dark: #F4EEE4;
  --on-dark-soft: rgba(244, 238, 228, .7);

  --serif: "Fraunces", "Newsreader", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
  --header-h: 84px;
  --hang: 0 1px 1px rgba(26, 22, 19, .06), 0 3px 6px rgba(26, 22, 19, .06), 0 28px 50px -26px rgba(26, 22, 19, .5);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; background: var(--wall); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }

/* Grain, felt not seen */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .08; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 6.4vw, 5.6rem); line-height: 1.02; }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.5rem); line-height: 1.06; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--gold-ink); }
.dark h2 em { color: var(--gold); }
.label { font: 500 .9375rem/1.3 var(--sans); color: var(--gold-ink); margin-bottom: 1rem; }
.dark .label { color: var(--gold); }

.btn { display: inline-flex; align-items: center; justify-content: center; font: 500 1rem/1 var(--sans); padding: 1.05rem 1.6rem; border-radius: 6px; text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s, border-color .2s; }
.btn-ink { background: var(--umber); color: var(--wall); }
.btn-ink:hover { background: var(--espresso); color: var(--gold); }
.btn-gold { background: var(--gold); color: var(--umber); }
.btn-gold:hover { background: #EBD9B4; }
.btn-line { padding: .7rem 1.1rem; font-size: .9375rem; border: 1px solid rgba(26, 22, 19, .3); }
.btn-line:hover { border-color: var(--umber); }
.text-link { font-weight: 500; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 3px; transition: color .2s; }
.text-link:hover { color: var(--gold-ink); }
.dark .text-link:hover { color: var(--gold); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 40; transition: background-color .3s, box-shadow .3s; }
.site-header > .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.site-header.scrolled { background: rgba(244, 238, 228, .94); box-shadow: 0 1px 0 var(--rule); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.logo img { width: 180px; }
.nav { display: flex; align-items: center; gap: 2.25rem; }
.nav ul { display: flex; gap: 2rem; margin: 0; padding: 0; list-style: none; }
.nav ul a { text-decoration: none; font-size: .9375rem; transition: color .2s; }
.nav ul a:hover { color: var(--gold-ink); }

/* Entrance */
.entrance { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--header-h) + clamp(40px, 7vw, 104px)) 0 clamp(80px, 10vw, 140px); }
.entrance::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 55% 60% at 78% 10%, rgba(255, 251, 243, .95), transparent 70%), radial-gradient(ellipse 50% 50% at 10% 100%, rgba(228, 213, 190, .55), transparent 70%); }
.entrance-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(36px, 6vw, 96px); align-items: center; }
.entrance .lede { max-width: 33rem; margin: 1.6rem 0 2.25rem; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); color: var(--ink-soft); }

/* The pointer to Dream District, right under the intro */
.dd-callout { display: flex; align-items: center; gap: .9rem; max-width: 33rem; margin: -.75rem 0 2.25rem; padding: .8rem 1.1rem .8rem .8rem; border: 1px solid var(--rule); border-radius: 8px; background: rgba(255, 252, 245, .65); font-size: .9375rem; line-height: 1.45; color: var(--ink-soft); text-decoration: none; transition: border-color .2s, background-color .2s; }
.dd-callout strong { font-weight: 600; color: var(--ink); }
.dd-callout .mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 6px; background: var(--umber); }
.dd-callout .go { flex: none; margin-left: auto; font-size: 1.125rem; color: var(--gold-ink); transition: transform .2s; }
.dd-callout:hover { border-color: var(--gold-deep); background: var(--print); }
.dd-callout:hover .go { transform: translateX(3px); }

/* A hung print and its placard */
.piece { position: relative; margin: 0; }
.piece::before { content: ""; position: absolute; z-index: -1; left: -22%; right: -22%; top: -16%; height: 80%; background: radial-gradient(closest-side, rgba(255, 252, 245, .75), rgba(255, 252, 245, 0)); pointer-events: none; }
.print { padding: clamp(6px, .7vw, 11px); background: var(--print); box-shadow: var(--hang); }
.print img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.print.r45 img { aspect-ratio: 4 / 5; }
.placard { display: grid; grid-template-columns: auto 1fr; column-gap: .75rem; margin-top: 1rem; font-size: .8125rem; line-height: 1.45; color: var(--ink-soft); }
.placard .no { grid-row: span 2; padding-top: .2rem; font: 500 .75rem/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--gold-ink); }
.placard .t { font: italic 500 1.0625rem/1.25 var(--serif); color: var(--ink); }
.placard.solo { grid-template-columns: 1fr; }
.entrance .piece { max-width: 440px; justify-self: end; width: 100%; }

/* The wall */
.room { padding-block: clamp(56px, 7vw, 96px); overflow-x: clip; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.room .wall { padding-top: clamp(28px, 3.5vw, 48px); border-top: 1px solid var(--rule); }
/* A salon hang: prints edge to edge on the grid, a large one spanning two rows of small ones */
.wall { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 2.6vw, 36px) clamp(12px, 1.7vw, 24px); align-items: start; }
.wall .piece { grid-column: var(--c); grid-row: var(--r, auto); }
.wall .print { padding: clamp(5px, .5vw, 8px); }
.wall .print img { aspect-ratio: auto; }
/* A print with more than one frame from its shoot: the frames stack and crossfade (js/site.js) */
.print.cycle { display: grid; }
.print.cycle img { grid-area: 1 / 1; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; }
.print.cycle img.on { opacity: 1; }
.wall .placard { margin-top: .75rem; }
/* With JavaScript on, the wall shows its first 16 prints and a button opens the rest in place */
.js .wall:not(.open) .piece.later { display: none; }
.wall-more { display: flex; justify-content: center; margin-top: clamp(32px, 4vw, 48px); }
.wall.open + .wall-more, :root:not(.js) .wall-more { display: none; }

/* Behind the camera, dark room */
.dark { background: var(--umber); color: var(--on-dark); }
.after { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(96px, 12vw, 168px); }
.after::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 50% 60% at 20% 30%, rgba(120, 90, 55, .4), transparent 70%); }
.after-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.after .piece::before { background: radial-gradient(closest-side, rgba(220, 185, 121, .14), rgba(220, 185, 121, 0)); }
.after .print { padding: 0; background: none; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7); }
.after .placard { color: var(--on-dark-soft); }
.after .placard .t { color: var(--on-dark); }
.after .prose p { max-width: 34rem; font-size: 1.125rem; color: var(--on-dark-soft); }
.after .prose p + p { margin-top: 1.1em; }
.after .prose .big { font: 300 clamp(1.375rem, 2.2vw, 1.75rem)/1.4 var(--serif); color: var(--on-dark); }
.after h2 + .prose { margin-top: 1.75rem; }

/* Sessions */
.sessions { background: var(--wall-deep); padding-block: clamp(88px, 11vw, 150px); }
.sessions .intro { max-width: 40rem; }
.sessions .intro p:not(.label) { margin-top: 1.25rem; font-size: 1.125rem; color: var(--ink-soft); }
.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); margin-top: clamp(48px, 6vw, 72px); }
.kind h3 { margin-top: 1.5rem; font-size: 1.5rem; font-weight: 500; }
.kind p { margin-top: .4rem; color: var(--ink-soft); }
.kind .print img { aspect-ratio: 4 / 5; }
.kind .tag { display: inline-block; margin-top: .9rem; font-size: .875rem; font-weight: 500; color: var(--gold-ink); }
/* The inquiry form for graduation, prom and portraits, under the session cards */
.inquire { display: grid; grid-template-columns: 5fr 7fr; gap: 2rem clamp(40px, 6vw, 96px); align-items: start; margin-top: clamp(48px, 6vw, 72px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--rule); }
.inquire h3 { font-size: clamp(1.75rem, 3vw, 2.4rem); line-height: 1.1; }
.inquire .section-head .fine { margin-top: 1.25rem; font-size: .9375rem; }
.fine { font-size: .9375rem; color: var(--ink-soft); }

/* Dream District handoff */
.handoff { padding-block: clamp(64px, 8vw, 104px); }
.handoff .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.handoff p { max-width: 40rem; font: 300 clamp(1.375rem, 2.4vw, 1.875rem)/1.35 var(--serif); }
.handoff p strong { font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid rgba(244, 238, 228, .14); padding-block: 44px; font-size: .9375rem; color: var(--on-dark-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; }
.foot-brand { display: flex; align-items: center; gap: .9rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin: 0; padding: 0; list-style: none; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--gold); }

/* Birthday page */
.section-head { max-width: 42rem; }
.section-head p:not(.label) { margin-top: 1.25rem; font-size: 1.125rem; color: var(--ink-soft); }
.room .section-head { margin-bottom: clamp(28px, 3.5vw, 48px); }
.how { background: var(--wall-deep); padding-block: clamp(72px, 9vw, 128px); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 40px); margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; list-style: none; }
.steps li { padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.steps .no { font: 500 .75rem/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--gold-ink); }
.steps h3 { margin-top: .9rem; font-size: 1.375rem; font-weight: 500; }
.steps p { margin-top: .5rem; color: var(--ink-soft); }
.included { display: grid; grid-template-columns: 4fr 8fr; gap: 1.25rem 3rem; margin-top: clamp(48px, 6vw, 72px); padding-top: 1.75rem; border-top: 1px solid var(--rule); }
.included h3 { font-size: 1.5rem; font-weight: 500; }
.included ul { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 2rem; margin: 0; padding: 0; list-style: none; }
.included li { padding-left: 1.1rem; position: relative; }
.included li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-deep); }
.included .fine { grid-column: 2; }
.faq { padding-block: clamp(72px, 9vw, 128px); }
.faq-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 2rem 3rem; }
.faq dl { margin: 0; }
.faq dt { font: 500 1.25rem/1.3 var(--serif); }
.faq dd { margin: .45rem 0 0; color: var(--ink-soft); }
.faq dd + dt { margin-top: 1.6rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.signup { background: var(--wall-deep); padding-block: clamp(72px, 9vw, 128px); }
.signup-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 2.5rem clamp(40px, 6vw, 96px); align-items: start; }
.form { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
/* Turnstile stays out of the grid (no empty row) until Cloudflare actually wants a click */
.form .cf-turnstile { grid-column: 1 / -1; }
.form .cf-turnstile:not(.shown) { position: absolute; }
.field { display: grid; gap: .4rem; }
.field.full, .form .btn, .form-note { grid-column: 1 / -1; }
.field label { font-size: .9375rem; font-weight: 500; }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field :is(input, select, textarea) { width: 100%; font: inherit; color: var(--ink); background: var(--print); border: 1px solid rgba(26, 22, 19, .22); border-radius: 6px; padding: .8rem .95rem; }
.field textarea { min-height: 7.5rem; resize: vertical; }
.field :is(input, select, textarea):focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(184, 147, 78, .2); }
.form .btn { justify-self: start; border: 0; cursor: pointer; }
.form-note { font-size: .9375rem; color: var(--gold-ink); }

/* Tablet */
@media (max-width: 960px) {
  .entrance-grid, .after-grid { grid-template-columns: 1fr; }
  .entrance .piece { justify-self: start; max-width: 380px; }
  .after .piece { max-width: 420px; }
  .kinds { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .included, .faq-grid, .signup-grid, .inquire { grid-template-columns: 1fr; }
  .included .fine { grid-column: auto; }
}

/* Phone: two prints across, the large ones full width */
@media (max-width: 760px) {
  :root { --header-h: 68px; }
  .logo img { width: 150px; }
  .nav ul { display: none; }
  .nav .btn-line { padding: .6rem .85rem; font-size: .875rem; }
  .entrance .piece { max-width: 300px; justify-self: end; width: 82%; }
  .wall { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .wall .piece { grid-column: auto; grid-row: auto; }
  .wall .piece.wide { grid-column: 1 / -1; }
  .steps, .included ul, .form { grid-template-columns: 1fr; }
  .kinds { grid-template-columns: 1fr; gap: 44px; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* Motion: the light comes up on each print, then the photo develops out of the paper like a darkroom print.
   Only runs once the head script adds .motion (JavaScript on, reduced motion off). The page script adds .in */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes rise-sm { from { opacity: 0; transform: translateY(8px); } }
@keyframes light { from { opacity: 0; } }
@keyframes develop {
  from { opacity: 0; filter: brightness(2) contrast(1.5) saturate(0) sepia(.35); }
  35% { opacity: 1; filter: brightness(1.45) contrast(1.3) saturate(.25) sepia(.2); }
  to { opacity: 1; filter: brightness(1) contrast(1) saturate(1) sepia(0); }
}
.motion :is(.wall .piece, .after .piece, .kind):not(.in) :is(.print, .placard, h3, p, .tag),
.motion :is(.wall .piece, .after .piece):not(.in)::before { opacity: 0; }
.motion .in::before { animation: light 1.6s ease var(--d, 0s) backwards; }
.motion .in .print { animation: rise 1.1s cubic-bezier(.16, .8, .24, 1) calc(var(--d, 0s) + .1s) backwards; }
.motion .in .print img:first-child { animation: develop 2.6s cubic-bezier(.3, .55, .3, 1) calc(var(--d, 0s) + .35s) backwards; }
.motion .in :is(.placard, h3, p, .tag) { animation: rise-sm .8s ease calc(var(--d, 0s) + 1.1s) backwards; }
.motion .entrance-grid > div > * { animation: rise 1s cubic-bezier(.16, .8, .24, 1) backwards; }
.motion .entrance-grid > div > :nth-child(2) { animation-delay: .1s; }
.motion .entrance-grid > div > :nth-child(3) { animation-delay: .22s; }
.motion .entrance-grid > div > :nth-child(4) { animation-delay: .34s; }
.motion .entrance-grid > div > :nth-child(5) { animation-delay: .46s; }

/* Hovering a print lifts it off the wall a little */
@media (hover: hover) {
  .wall .print { transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s; }
  .wall .piece:hover .print { transform: translateY(-6px); box-shadow: 0 2px 2px rgba(26, 22, 19, .06), 0 8px 14px rgba(26, 22, 19, .07), 0 44px 70px -30px rgba(26, 22, 19, .55); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Privacy policy and 404 */
.legal { padding: calc(var(--header-h) + clamp(40px, 7vw, 96px)) 0 clamp(80px, 10vw, 140px); }
.legal .prose { max-width: 44rem; }
.legal h1 { margin-bottom: 1.75rem; }
.legal h2 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); margin: 2.5rem 0 .75rem; }
.legal p, .legal li { font-size: 1.0625rem; color: var(--ink-soft); }
.legal p + p { margin-top: 1em; }
.legal .big { font: 300 clamp(1.25rem, 2vw, 1.5rem)/1.45 var(--serif); color: var(--ink); }
.legal ul { margin: 0; padding-left: 1.2rem; }
.legal li + li { margin-top: .6rem; }
.legal strong, .legal a { color: var(--ink); }
.legal .actions { margin-top: 2.25rem; }
