/* Ottawa Plated — the world (homepage only; other pages keep site.css) */
:root {
  --bg: #0b0a08;
  --bg-2: #15130f;
  --ink: #ece6d8;
  --mute: rgba(236, 230, 216, .52);
  --line: rgba(236, 230, 216, .16);
  --ease: cubic-bezier(.7, 0, .2, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(16px, 2.4vw, 32px);
  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--ink); }
body { background: radial-gradient(70% 70% at 50% 52%, #1d1912 0%, #110f0c 45%, var(--bg) 80%) fixed; }
body { font: 400 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: var(--pad); top: -60px; z-index: 50; padding: 8px 12px; background: var(--ink); color: var(--bg); }
.skip:focus { top: var(--pad); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.enter:focus-visible, .rv-close:focus-visible, .index:focus-visible { outline: none; }
.rv-close:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- world canvas ---------- */
.world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; opacity: 0; transition: opacity 1.2s var(--out); }
.is-entered .world { opacity: 1; }
.is-dragging .world { cursor: grabbing; }
@media (hover: hover) and (pointer: fine) { .world, .is-dragging .world { cursor: none; } }
body::after { /* soft vignette over the field */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(11, 10, 8, .75) 100%);
}

/* ---------- HUD ---------- */
.hud { position: fixed; left: 0; right: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: var(--pad); pointer-events: none; opacity: 0; transition: opacity .8s var(--out) .5s; }
.hud > * { pointer-events: auto; }
.is-entered .hud, .is-static .hud { opacity: 1; }
.hud-top { top: 0; padding-top: max(var(--pad), env(safe-area-inset-top)); }
.hud-bottom { bottom: 0; justify-content: flex-end; padding-bottom: max(var(--pad), env(safe-area-inset-bottom)); }
.mark { font-weight: 500; font-size: 13px; letter-spacing: .14em; }
.mark b { font-weight: 300; margin-left: .35em; color: var(--mute); }
.nav { display: flex; gap: clamp(14px, 2.4vw, 32px); font-size: 13px; }
.nav a { position: relative; padding: 4px 0; transition: opacity .3s; }
.nav i { font: normal 9px var(--mono); color: var(--mute); margin-right: 6px; vertical-align: 2px; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.hint, .count { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.hint i { font-style: normal; margin: 0 .5em; }
.hint.is-flash { color: var(--ink); }
.count .note { margin-right: 1em; color: #d9a76a; }
.is-static .hud-bottom { visibility: hidden; }
@media (max-width: 560px) { .hint .long { display: none; } }
@media (max-width: 560px) { .nav i { display: none; } .mark b { display: block; margin: 0; } }

/* ---------- cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 30; width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none; opacity: 0; transition: opacity .3s, width .4s var(--out), height .4s var(--out), margin .4s var(--out); display: grid; place-items: center; }
.cursor svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.cursor circle { fill: none; stroke-width: 1; vector-effect: non-scaling-stroke; }
.cur-track { stroke: var(--line); }
.cur-prog { stroke: var(--ink); stroke-dasharray: 163.36; stroke-dashoffset: 163.36; }
.cur-label { font: 9px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.cursor.is-on { opacity: 1; }
.cursor.is-plate { width: 88px; height: 88px; margin: -44px 0 0 -44px; }
.cursor.is-plate .cur-track { stroke: rgba(236, 230, 216, .5); }

/* ---------- preloader ---------- */
.loader { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; align-content: center; gap: 20px; background: var(--bg); transition: background 1s var(--ease) .5s, visibility 0s 1.6s; }
.ld-word { display: flex; overflow: hidden; font-weight: 500; font-size: clamp(64px, 17vw, 260px); line-height: .9; letter-spacing: -.02em; }
.ld-word span { display: block; transform: translateY(105%); animation: rise 1.1s var(--out) forwards; }
.ld-word span:nth-child(2) { animation-delay: .08s; } .ld-word span:nth-child(3) { animation-delay: .16s; }
.ld-word span:nth-child(4) { animation-delay: .24s; } .ld-word span:nth-child(5) { animation-delay: .32s; }
.ld-word span:nth-child(6) { animation-delay: .40s; }
.ld-tag { color: var(--mute); font-size: 14px; opacity: 0; animation: fade 1s var(--out) .8s forwards; }
.ld-foot { position: absolute; left: var(--pad); right: var(--pad); bottom: max(var(--pad), env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: center; color: var(--mute); }
.enter { position: relative; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; padding: 14px 0 14px .3em; opacity: 0; pointer-events: none; transition: opacity .6s var(--out); color: var(--ink); }
.enter::after { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--ink); transform: scaleX(0); transition: transform .8s var(--ease) .1s; }
.loader.is-ready .enter { opacity: 1; pointer-events: auto; }
.loader.is-ready .enter::after { transform: scaleX(1); }
.enter:hover::after { transform-origin: left; animation: line 1s var(--ease); }
.loader.is-out { background: transparent; visibility: hidden; }
.loader.is-out .ld-word span { animation: none; transform: translateY(-105%); transition: transform .9s var(--ease); }
.loader.is-out .ld-word span:nth-child(2) { transition-delay: .04s; } .loader.is-out .ld-word span:nth-child(3) { transition-delay: .08s; }
.loader.is-out .ld-word span:nth-child(4) { transition-delay: .12s; } .loader.is-out .ld-word span:nth-child(5) { transition-delay: .16s; }
.loader.is-out .ld-word span:nth-child(6) { transition-delay: .20s; }
.loader.is-out .ld-tag, .loader.is-out .ld-foot { opacity: 0; transition: opacity .4s; }
.is-skip .loader, .is-static .loader, .no-js .loader { display: none; }
@keyframes rise { to { transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes line { 0% { transform: scaleX(1); transform-origin: right; } 49% { transform: scaleX(0); transform-origin: right; } 50% { transform-origin: left; } 100% { transform: scaleX(1); transform-origin: left; } }

/* ---------- index view (also the no-JS / crawler / reduced-motion view) ---------- */
.index { position: fixed; inset: 0; z-index: 5; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--bg); padding: calc(var(--pad) * 2 + 40px) var(--pad) var(--pad); opacity: 0; visibility: hidden; transition: opacity .6s var(--out), visibility 0s .6s; }
.is-static .index, .no-js .index { opacity: 1; visibility: visible; transition: opacity .6s var(--out); }
.ix-head { display: grid; grid-template-columns: 1fr; align-items: end; gap: 12px 24px; padding-bottom: 28px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.ix-head .mono { grid-column: 1 / -1; color: var(--mute); }
.ix-lede { max-width: 30ch; font-size: clamp(20px, 2.6vw, 30px); line-height: 1.15; letter-spacing: -.01em; }
.grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 220px), 1fr)); gap: clamp(10px, 1.6vw, 20px); counter-reset: plate; }
.tile { counter-increment: plate; }
.tile a { display: block; position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-2); }
.tile img { color: transparent; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--out), opacity .6s; }
.tile img[data-crop] { inset: auto; object-fit: fill; }
.tile a:hover img { transform: scale(1.04); }
.ix-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 48px; padding: 20px 0 max(0px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font: 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.ix-foot a { margin-left: 20px; }
.ix-foot a:hover { color: var(--ink); }

/* ---------- the opened photograph ---------- */
/* the globe stays behind it, blurred and dimmed, so you never leave the installation */
.world { transition: opacity 1.2s var(--out), filter 1s var(--out), transform 1.2s var(--out); }
.is-viewing .world { filter: blur(16px) brightness(.42) saturate(.85); transform: scale(1.05); }
.hud-top { transition: opacity .6s var(--out); }
.is-viewing .hud-top { opacity: 0 !important; pointer-events: none; }
.is-viewing .cursor { opacity: 0; }

.reveal { position: fixed; inset: 0; z-index: 20; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: rgba(11, 10, 8, 0); transition: background .9s var(--out); }
.reveal.is-open { background: rgba(11, 10, 8, .28); }
.reveal.is-closing { background: rgba(11, 10, 8, 0); }
.rv-close { position: fixed; right: var(--pad); top: max(var(--pad), env(safe-area-inset-top)); z-index: 2; font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 8px 0; opacity: 0; transition: opacity .5s .5s; }
.reveal.is-open .rv-close { opacity: 1; }
.reveal.is-closing .rv-close { opacity: 0; transition-delay: 0s; }
.rv-body { min-height: 100%; display: grid; place-items: center; padding: clamp(64px, 9vh, 96px) var(--pad); }

/* photo + a small wall label beside it, bottom-aligned, like a print on a gallery wall */
.rv-grid { display: grid; grid-template-columns: auto minmax(180px, 240px); gap: clamp(28px, 3.5vw, 56px); align-items: end; transition: transform .6s var(--out), opacity .45s var(--ease); }
.rv-photo { width: min(70vh, 56vw); }
.rv-frame { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-2); transform-origin: 0 0; will-change: transform;
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .85), 0 18px 40px -20px rgba(0, 0, 0, .6); }
.rv-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; color: transparent; }
.rv-frame img[data-crop] { inset: auto; object-fit: fill; }
.reveal.is-closing .rv-grid { opacity: 0; transform: scale(.97); }

.rv-label { padding-bottom: 4px; }
.rv-label > * { opacity: 0; transform: translateY(10px); transition: opacity .9s var(--out), transform 1s var(--out); transition-delay: calc(.55s + var(--i, 0) * .08s); }
.rv-body.is-in .rv-label > * { opacity: 1; transform: none; }
.rv-label::before { content: ''; display: block; width: 24px; height: 1px; background: var(--line); margin-bottom: 16px; }
.rv-dish { font-weight: 400; font-size: 17px; line-height: 1.3; letter-spacing: -.005em; text-wrap: balance; }
.rv-rest { margin-top: 4px; font-size: 14px; color: var(--mute); }
.rv-desc { margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--mute); }
.rv-credit { margin-top: 14px; font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.rv-link { display: inline-block; margin-top: 18px; font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); padding: 6px 0; border-bottom: 1px solid var(--line); transition: opacity .9s var(--out) calc(.55s + var(--i, 0) * .08s), transform 1s var(--out) calc(.55s + var(--i, 0) * .08s), border-color .3s; }
.rv-link:hover { border-color: var(--ink); }

/* phones: the photo runs edge to edge, the label sits underneath, swipe down to close */
@media (max-width: 760px) {
  .rv-body { place-items: center stretch; padding: calc(56px + env(safe-area-inset-top)) 0 calc(32px + env(safe-area-inset-bottom)); }
  .rv-grid { grid-template-columns: 1fr; gap: 22px; align-items: start; touch-action: pan-x; }
  .rv-photo { width: 100%; }
  .rv-frame { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9); }
  .rv-label { padding: 0 var(--pad); }
  .rv-label::before { margin-bottom: 14px; }
  .rv-dish { font-size: 18px; }
  .rv-grid.is-dragging { transition: none; }
}

/* lock scrolling behind overlays */
.no-js body, .is-static body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* no instructions on screen: the cursor ring stays, its words go */
.cur-label { display: none; }

/* the plate count stays in the markup (the GitHub Action rewrites it) but is not shown */
.hud-bottom { display: none; }

.grid .empty { grid-column: 1 / -1; padding: 48px 0; color: var(--mute); font-size: 15px; }

/* ---------- the city ring ---------- */
.ring-labels { position: fixed; inset: 0; z-index: 6; pointer-events: none; opacity: 0; }
.ring-labels span { position: absolute; left: 0; top: 0; font: 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); white-space: nowrap; will-change: transform, opacity; }
.nav { transition: opacity .6s var(--out); }
.is-ring .nav a:not([href="/"]) { opacity: 0; pointer-events: none; }
/* no grey tap box on phones, and the ring's city names can't be selected */
html, .world, .ring-labels { -webkit-tap-highlight-color: transparent; }
.world, .ring-labels { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* ---------- plated.gallery, the front door ---------- */
.is-front .nav { opacity: 0; pointer-events: none; }
.cities-list { grid-template-columns: 1fr; gap: 0; }
.cities-list li a { display: block; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: clamp(22px, 3vw, 32px); letter-spacing: -.01em; }
.cities-list li::after { display: none; }

/* ---------- Collection (saved plates) ---------- */
/* the account link only shows inside the Collection, where Submit steps aside */
.nav .nav-acct { display: none; }
.is-my .nav .nav-acct:not([hidden]) { display: inline-block; }
.is-my .nav a[href$="/submit.html"] { display: none; }

/* save: a small plate under the label, outlined until it's kept */
.rv-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.rv-actions .rv-link { margin-top: 0; }
.rv-label > .rv-actions { transition: opacity .9s var(--out), transform 1s var(--out); transition-delay: calc(.55s + var(--i, 0) * .08s); }
.rv-save { position: relative; display: inline-flex; align-items: center; gap: 10px; margin-left: auto; padding: 8px 0 8px 8px; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.rv-save svg { width: 20px; height: 20px; flex: none; overflow: visible; }
.rv-save .s-ring { fill: none; stroke: currentColor; stroke-width: 1; opacity: .55; transition: opacity .4s var(--out); }
.rv-save .s-fill { fill: currentColor; transform-origin: 10px 10px; transform: scale(0); transition: transform .5s var(--out); }
.rv-save:hover .s-ring, .rv-save:focus-visible .s-ring { opacity: 1; }
.rv-save.is-on .s-ring { opacity: .9; }
.rv-save.is-on .s-fill { transform: scale(1); }
.rv-save.is-pop svg { animation: plate-set .6s var(--out); }
@keyframes plate-set { 0% { transform: scale(1); } 35% { transform: scale(.82); } 100% { transform: scale(1); } }
.rv-save-note { position: absolute; right: 30px; top: 50%; transform: translateY(-50%); font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); white-space: nowrap; opacity: 0; pointer-events: none; }
.rv-save.is-noted .rv-save-note { animation: note-fade 2.6s var(--out); }
@keyframes note-fade { 0% { opacity: 0; } 12% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
.rv-save:focus-visible { outline: none; }
.rv-save:focus-visible .s-ring { stroke-width: 1.6; }

/* the empty state and the gentle sign-in nudge, at the foot of the Collection */
.my-note { position: fixed; left: 50%; bottom: max(calc(var(--pad) + 4px), env(safe-area-inset-bottom)); z-index: 11; transform: translate(-50%, 8px); display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100vw - var(--pad) * 2); font-size: 13px; line-height: 1.4; color: var(--mute); text-align: center; opacity: 0; pointer-events: none; transition: opacity .8s var(--out), transform .8s var(--out); }
.my-note.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; transition-delay: .4s; }
.is-ring .my-note, .is-viewing .my-note, .is-acct .my-note, .is-static .my-note { opacity: 0; pointer-events: none; transition-delay: 0s; }
.my-note svg { width: 13px; height: 13px; vertical-align: -2px; margin: 0 1px; }
.my-note svg circle { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.my-note a { color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 1px; transition: border-color .3s; }
.my-note a:hover { border-color: var(--ink); }
.my-note button { font: 16px/1 var(--sans); color: var(--mute); padding: 4px 6px; }
.my-note button:hover { color: var(--ink); }

/* the sign-in panel: the globe blurs behind it, like an opened photograph */
.is-acct .world { filter: blur(16px) brightness(.42) saturate(.85); transform: scale(1.05); }
.is-acct .hud-top { opacity: 0 !important; pointer-events: none; }
.is-acct .cursor { opacity: 0; }
.acct { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: var(--pad); overflow-y: auto; background: rgba(11, 10, 8, 0); transition: background .6s var(--out); }
.acct[hidden] { display: none; }
.acct.is-open { background: rgba(11, 10, 8, .35); }
.acct .ac-close { opacity: 0; }
.acct.is-open .ac-close { opacity: 1; transition-delay: .2s; }
.ac-card { width: min(360px, 100%); opacity: 0; transform: translateY(12px); transition: opacity .6s var(--out), transform .8s var(--out); }
.acct.is-open .ac-card { opacity: 1; transform: none; transition-delay: .1s; }
.ac-body::before { content: ''; display: block; width: 24px; height: 1px; background: var(--line); margin-bottom: 18px; }
.ac-kicker { color: var(--mute); margin-bottom: 10px; }
.ac-title { font-weight: 400; font-size: 24px; line-height: 1.15; letter-spacing: -.01em; }
.ac-text { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--mute); }
.ac-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 46px; margin-top: 22px; border: 1px solid var(--line); font-size: 14px; color: var(--ink); transition: border-color .3s, background .3s, opacity .3s; }
.ac-btn:hover { border-color: rgba(236, 230, 216, .5); }
.ac-btn svg { width: 17px; height: 17px; }
.ac-btn:disabled { opacity: .5; cursor: default; }
.ac-google { background: rgba(236, 230, 216, .04); }
.ac-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; color: var(--mute); }
.ac-or::before, .ac-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ac-form { margin-top: 18px; }
.ac-or + .ac-form { margin-top: 18px; }
.ac-form .ac-btn { margin-top: 10px; }
.ac-input { display: block; width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); font: 16px var(--sans); outline: none; transition: border-color .3s; -webkit-appearance: none; appearance: none; }
.ac-input::placeholder { color: rgba(236, 230, 216, .35); }
.ac-input:focus { border-color: rgba(236, 230, 216, .6); }
.ac-err { min-height: 1.4em; margin-top: 12px; font-size: 13px; color: #d9a76a; }
.ac-err:empty { min-height: 0; margin: 0; }
.ac-line { margin-top: 20px; padding: 4px 0; font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); border-bottom: 1px solid var(--line); }
.ac-line:hover { color: var(--ink); border-color: var(--ink); }
.rv-actions .rv-save:only-child { margin-left: -8px; padding-left: 8px; }
.rv-save:only-child .rv-save-note { right: auto; left: 38px; }

/* Google's own button sits where ours was; reserve its height so nothing jumps while it loads */
.ac-gslot { display: flex; justify-content: center; min-height: 44px; margin-top: 22px; border: 1px solid var(--line); }
.ac-gslot.is-ready { border-color: transparent; }
.ac-gslot iframe { color-scheme: normal; }
