/* roll.golddubs.com — the Golddubs Camera Roll. Magazine on the outside (a big
   italic masthead, gold labels, a condensed cover headline), the iPhone's Photos
   app on the inside: tight square grids, a For You · Albums · All Photos switch,
   and a black, photo-first viewer with a filmstrip. Few words; the photos lead. */

:root {
  --ground: #ffffff;
  --ink: #111111;
  --soft: #6e6e73;
  --faint: #c7c7cc;
  --line: #e5e5ea;
  --gold: #d4af37;
  --gold-deep: #b8922a;
  --head: 'Anton', 'Impact', 'Arial Narrow Bold', sans-serif;
  --mast: 'Bodoni Moda', 'Didot', 'Bodoni 72', serif;
  --text: 'Source Serif 4', Georgia, serif;
  --ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left));
  --wide: 1400px;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--ground); color: var(--ink); font: 16px/1.45 var(--ui); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
img { display: block; max-width: 100%; }
.muted { color: var(--soft); }
.status { padding: 120px var(--gutter); text-align: center; font-family: var(--mast); font-style: italic; font-size: 22px; color: var(--soft); }
.tag { display: inline-block; padding: 3px 8px 2px; background: var(--gold); color: #000; font: 800 11px/1.3 var(--ui); letter-spacing: 1px; text-transform: uppercase; }

/* --- header: masthead, the switch, the kinds ------------------------------------------------ */
.top { background: var(--ground); }
.top-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; max-width: var(--wide); margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) var(--gutter) 6px; }
.top-side { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.top-side.end { justify-content: flex-end; }
.caps { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.quiet { color: var(--soft); }
.word { font-family: var(--mast); font-weight: 900; font-style: italic; font-size: clamp(34px, 6vw, 64px); line-height: 1; letter-spacing: -0.03em; text-align: center; }
.word::first-letter { color: var(--gold-deep); }
.years { border: 0; background: none; cursor: pointer; padding: 4px 0; font-size: 12px; font-weight: 600; color: var(--soft); }
.kinds { position: sticky; top: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px var(--gutter);
  background: rgba(255, 255, 255, 0.86); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
/* The switch, like the segmented control in Photos. */
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: #eeeef0; }
.seg button { padding: 6px 16px; border-radius: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.seg button[aria-selected="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
.chips { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { padding: 5px 12px; border-radius: 999px; background: #f2f2f4; font-size: 13px; font-weight: 600; color: var(--soft); white-space: nowrap; }
.chips button[aria-pressed="true"] { background: var(--ink); color: #fff; }

main { min-height: 60vh; outline: none; }
.band { max-width: var(--wide); margin: 0 auto; padding: 22px var(--gutter) 6px; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.band-head h2 { font-family: var(--head); font-weight: 400; font-size: clamp(26px, 3vw, 36px); line-height: 1; text-transform: uppercase; letter-spacing: 0.3px; }
.link { color: var(--gold-deep); font-size: 15px; font-weight: 600; }
.link:hover { text-decoration: underline; }

/* --- For You: the cover story (full bleed) and the Memories row ------------------------------- */
.cover-story { position: relative; display: block; height: min(86vh, 900px); min-height: 420px; overflow: hidden; background: #111; color: #fff; }
.cover-story img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; transition: transform 2s cubic-bezier(.16, 1, .3, 1); }
.cover-story:hover img { transform: scale(1.02); }
.cs-text { position: absolute; left: 0; right: 0; bottom: 0; display: grid; justify-items: start; gap: 10px; padding: 80px var(--gutter) clamp(26px, 5vw, 56px);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62)); }
.cs-title { font-family: var(--head); font-size: clamp(54px, 10vw, 150px); line-height: 0.9; text-transform: uppercase; max-width: 12ch; }
.cs-date { font-size: 14px; font-weight: 600; opacity: 0.85; }

.memories { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: none; }
.memories::-webkit-scrollbar { display: none; }
.memory { position: relative; flex: 0 0 min(300px, 72vw); aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; scroll-snap-align: start; background: #222; color: #fff; }
.memory img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform 1.2s cubic-bezier(.16, 1, .3, 1); }
.memory:hover img { transform: scale(1.04); }
.m-text { position: absolute; inset: auto 0 0 0; display: grid; justify-items: start; gap: 6px; padding: 60px 16px 16px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.6)); }
.m-title { font-family: var(--head); font-size: 30px; line-height: 0.95; text-transform: uppercase; }
.m-date { font-size: 12.5px; font-weight: 600; opacity: 0.85; }

/* --- tiles: the camera-roll grid (squares, hairline gaps) ---------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(96px, 16vw, 190px), 1fr)); gap: 2px; }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; background: #f0f0f2; cursor: zoom-in; }
.tile img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; transition: opacity 0.2s, transform 0.5s; }
.tile:hover img { opacity: 0.88; }
.tile:active img { transform: scale(0.97); }
/* In an album, the first photo is a big square (the magazine touch). */
.album-tiles { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.album-tiles .tile.big { grid-column: span 2; grid-row: span 2; }

/* --- Albums ------------------------------------------------------------------------------------ */
.acovers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr)); gap: 22px 14px; }
.acover { display: grid; gap: 2px; }
.ac-img { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #f0f0f2; margin-bottom: 6px; }
.ac-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s; }
.acover:hover .ac-img img { transform: scale(1.04); }
.ac-title { font-size: 15px; font-weight: 600; }

/* --- All Photos: small album headers over each run ---------------------------------------------- */
.group + .group { margin-top: 22px; }
.g-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 2px 8px; }
.g-head span:first-child { font-size: 17px; font-weight: 700; }
.g-head:hover span:first-child { color: var(--gold-deep); }
.more { display: block; margin: 26px auto 40px; padding: 10px 26px; border-radius: 999px; background: #f2f2f4; font-weight: 600; }

/* --- an album: the hero and the bar ------------------------------------------------------------- */
.hero { position: relative; height: min(70vh, 720px); min-height: 360px; overflow: hidden; background: #111; color: #fff; }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.hero-back { position: absolute; top: 14px; left: var(--gutter); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(10px); font-size: 28px; line-height: 1; padding-bottom: 3px; }
.hero-text { position: absolute; left: 0; right: 0; bottom: 0; display: grid; justify-items: start; gap: 8px; padding: 80px var(--gutter) 26px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.6)); }
.hero h1 { font-family: var(--head); font-weight: 400; font-size: clamp(46px, 8vw, 110px); line-height: 0.9; text-transform: uppercase; }
.hero p { font-size: 14px; font-weight: 600; opacity: 0.88; }
.album-bar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 16px var(--gutter) 12px; }
.album-line { max-width: 60ch; margin: 0 auto 16px; padding: 0 var(--gutter); text-align: center; font-family: var(--text); font-style: italic; font-size: 17px; color: #333; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px; background: #f2f2f4; font-size: 14px; font-weight: 600; }
.pill svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill.solid { background: var(--ink); color: #fff; }
.pill.wide { width: 100%; justify-content: center; padding: 13px; }
.pill:disabled { opacity: 0.5; cursor: default; }

/* --- the viewer: black, the photo as big as it goes, a filmstrip, bars that fade ------------------ */
.viewer { position: fixed; inset: 0; z-index: 30; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #000; color: #fff;
  opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; }
.viewer.open { opacity: 1; visibility: visible; }
.v-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 10px 6px; transition: opacity 0.3s; }
.v-where { display: grid; justify-items: center; line-height: 1.25; min-width: 0; }
.v-album { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.v-count { font-size: 12px; color: rgba(255, 255, 255, 0.6); }
.v-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.v-btn:hover { background: rgba(255, 255, 255, 0.12); }
.v-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.v-stage { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; touch-action: pan-y; }
.v-photo { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; will-change: transform; }
.v-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); font-size: 30px; line-height: 1; padding-bottom: 4px; color: #fff; transition: opacity 0.3s, background 0.2s; }
.v-nav:hover { background: rgba(255, 255, 255, 0.22); }
.v-prev { left: 14px; } .v-next { right: 14px; }
.v-bottom { display: grid; gap: 8px; padding: 8px 0 calc(10px + env(safe-area-inset-bottom)); transition: opacity 0.3s; }
.v-text { display: grid; justify-items: center; gap: 2px; padding: 0 var(--gutter); text-align: center; min-height: 0; }
.v-text b { font-family: var(--head); font-weight: 400; font-size: 22px; letter-spacing: 0.3px; text-transform: uppercase; }
.v-text span { font-family: var(--text); font-style: italic; font-size: 15px; color: rgba(255, 255, 255, 0.85); max-width: 60ch; }
.v-text small { font-size: 11.5px; color: rgba(255, 255, 255, 0.55); }
/* The filmstrip: small frames, the current one wider and lifted, centred as you go. */
.v-strip { display: flex; align-items: center; gap: 2px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 50%; scrollbar-width: none; height: 52px; }
.v-strip::-webkit-scrollbar { display: none; }
.v-thumb { flex: 0 0 30px; height: 42px; overflow: hidden; opacity: 0.55; scroll-snap-align: center; transition: flex-basis 0.25s, height 0.25s, opacity 0.25s; }
.v-thumb img { width: 100%; height: 100%; object-fit: cover; }
.v-thumb:hover { opacity: 0.85; }
.v-thumb.on { flex-basis: 52px; height: 50px; opacity: 1; margin: 0 6px; border-radius: 3px; }
.v-links { display: flex; justify-content: center; gap: 22px; font-size: 13px; }
.v-links a { color: var(--gold); font-weight: 600; }
.v-links button { color: rgba(255, 255, 255, 0.5); }
/* Calm: the bars fade so the photo has the screen; a tap brings them back. */
.viewer.calm .v-top, .viewer.calm .v-bottom, .viewer.calm .v-nav { opacity: 0; }
.viewer.calm { cursor: none; }
/* After the last photo: other albums. */
.v-end { position: absolute; inset: 0; display: grid; place-content: center; gap: 16px; padding: 20px; text-align: center; background: #000; }
.v-end[hidden] { display: none; }
.v-end-head { font-family: var(--head); font-size: clamp(30px, 4vw, 48px); text-transform: uppercase; color: var(--gold); }
.v-end-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 170px)); gap: 10px; justify-content: center; }
.v-end-card { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.v-end-card img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: 8px; }

/* --- forms (a sheet like iOS) ---------------------------------------------------------------------- */
.sheet { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; }
.sheet.open { opacity: 1; visibility: visible; }
.panel { position: relative; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 18px; padding: 26px 22px 22px; color: var(--ink); }
.panel .x { position: absolute; top: 10px; right: 10px; color: var(--ink); background: #f2f2f4; width: 32px; height: 32px; }
.panel .x svg { width: 16px; height: 16px; }
.panel h2 { font-family: var(--head); font-weight: 400; font-size: 34px; line-height: 1; text-transform: uppercase; margin: 10px 36px 8px 0; }
.small { font-size: 14.5px; color: var(--soft); }
.fields { display: grid; gap: 14px; margin-top: 16px; }
.fields label { display: grid; gap: 5px; }
.fields label > span { font-size: 12.5px; font-weight: 600; color: var(--soft); }
.fields input, .fields textarea { width: 100%; padding: 11px 12px; border: 0; border-radius: 10px; background: #f2f2f4; font-size: 16px; outline: none; }
.fields input:focus, .fields textarea:focus { box-shadow: 0 0 0 2px var(--gold); }
.fields textarea { resize: vertical; }
.fields .check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: #333; }
.fields .check input { width: auto; margin-top: 3px; }
.pick { display: grid; place-items: center; padding: 20px; border-radius: 12px; border: 2px dashed var(--faint); cursor: pointer; font-weight: 600; }
.pick:hover { border-color: var(--gold); }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.thumbs img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { min-height: 1em; font-size: 13px; color: #c0392b; }
.done { display: grid; gap: 16px; margin-top: 16px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; padding: 10px 18px; border-radius: 999px;
  background: rgba(30, 30, 30, 0.9); color: #fff; font-size: 14px; font-weight: 600; }

/* --- footer -------------------------------------------------------------------------------------------- */
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px clamp(18px, 5vw, 50px); margin-top: 40px; padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--soft); }
.foot a:hover { color: var(--ink); }
.foot .credit { width: 100%; text-align: center; letter-spacing: 0; font-weight: 400; text-transform: none; font-family: var(--mast); font-style: italic; font-size: 15px; }
.foot .credit strong { color: var(--ink); font-weight: 900; }

@media (max-width: 680px) {
  .top-side .quiet { display: none; }
  .seg button { padding: 6px 12px; font-size: 13px; }
  .v-nav { display: none; }
  .v-end-grid { grid-template-columns: repeat(2, minmax(0, 150px)); }
  .cover-story { height: 78vh; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cover-story img, .memory img, .tile img, .ac-img img, .viewer, .sheet, .v-thumb, .v-top, .v-bottom, .v-nav { transition: none; }
}
