/* Nom Coffee Room hero (13 Nov 2026): the owner's street photo with the logo in plain white.
   Scrolling rolls the photo a little, blurs it, then lets the plain white room in. */
:root {
  --paper: #ffffff;
  --ink: #000000;
  --mute: #6b6b6b;
  --line: #e8e8e8;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(18px, 2.8vw, 44px);
  --fs: 40vw;            /* logo letter height, fitted in JS */
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body {
  font-family: "Montserrat", Arial, "Helvetica Neue", Helvetica, sans-serif; font-weight: 600;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html, body { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 999px; }

/* ---------- bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: calc(var(--pad) * .7) var(--pad);
}
.logo { justify-self: start; display: block; width: clamp(80px, 6.6vw, 100px); }
.logo img { width: 100%; height: auto; transform-origin: 50% 60%; transition: filter .45s var(--ease); }
.links { display: flex; gap: clamp(18px, 2.4vw, 36px); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.links a { position: relative; padding: 6px 0; transition: color .45s var(--ease); }
.links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.links a:hover::after { transform: scaleX(1); transform-origin: left; }
.order {
  justify-self: end; font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  background: var(--ink); color: var(--paper); padding: 13px 22px; border-radius: 999px;
  transition: transform .4s var(--ease), background-color .45s var(--ease), color .45s var(--ease);
}
.order:hover { transform: translateY(-1px); }
.order:active { transform: scale(.98); }

/* over the street photo the bar is white; it turns back to ink as the page turns white */
.bar.on-photo .logo img { filter: brightness(0) invert(1); }
.bar.on-photo .links a { color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .22); }
.bar.on-photo .order { background: #fff; color: var(--ink); }
.bar.on-photo .navbtn, .bar.on-photo .bagbtn { background: rgba(255, 255, 255, .18); color: #fff; }
.bar.on-photo .bagbtn:hover { background: #fff; color: var(--ink); }
.bar.on-photo :focus-visible { outline-color: #fff; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: 1fr auto; overflow: hidden;
  padding: 0 var(--pad) calc(var(--pad) * .9);
  isolation: isolate; color: #fff;
}
.hero :focus-visible { outline-color: #fff; }

/* the photo stays put behind the page while the hero scrolls away; hero.js rolls, blurs and fades it */
.hero .photo {
  position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1;
  overflow: hidden; pointer-events: none; background: #2a536d; contain: strict;
}
.hero .ph-roll { position: absolute; inset: 0; transform-origin: 50% 46%; will-change: transform; }
.hero .ph {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%; user-select: none; -webkit-user-drag: none;
}
/* the blur is two ready-blurred copies cross-faded in: cheap on phones, unlike an animated CSS blur */
.hero .ph-soft, .hero .ph-blur { opacity: 0; will-change: opacity; }
/* a little shade where words sit: under the bar, and under the info row */
.hero .ph-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(6, 18, 30, .26), rgba(6, 18, 30, 0) 17%),
    linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, .22) 19%, rgba(0, 0, 0, 0) 40%);
}

/* the logo: the brand's own n and m in plain white, with the drink as the o; 1em = the letter height */
.hero:not(.laid) .word, .hero:not(.laid) .meta { visibility: hidden; }
.word {
  position: absolute; left: var(--wx, 50%); top: var(--wy, 30%);
  margin: 0; padding: 0 0 .25em;
  font-size: var(--fs); line-height: 1;
  display: flex; align-items: center; white-space: nowrap;
}
.clip { display: block; flex: none; height: 1em; overflow: hidden; padding: .04em; margin: -.04em; box-sizing: content-box; }
.cn { width: .9833em; }
.cm { width: 1.4644em; }
.word .l { display: block; width: 100%; height: 100%; overflow: visible; fill: #fff; transform: translateY(108%); transition: transform 1.25s var(--ease); }
.is-in .word .l { transform: none; }
.is-in .cm .l { transition-delay: .09s; }

/* the o is the drink: an iced coffee or matcha seen from above, turning; drag it to swirl, the switch swaps it */
.word .o {
  position: relative; display: block; flex: none;
  width: .98em; height: .98em; margin: 0 -.0549em 0 -.0172em;
}
.word .shade {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .28), rgba(0, 0, 0, .1) 62%, rgba(0, 0, 0, 0) 100%);
  transform: translate(4%, 9%) scale(1.06); opacity: 0;
  transition: opacity 1.4s var(--ease) .35s;
}
.is-in .word .shade { opacity: 1; }
.word .tilt { position: absolute; inset: 0; border-radius: 50%; will-change: transform; }
.word .spin {
  position: absolute; inset: 0; border-radius: 50%;
  transform: rotate(-120deg) scale(.7); opacity: 0;
  transition: transform 1.6s var(--ease) .15s, opacity .9s var(--ease) .15s;
  cursor: grab; touch-action: none;
}
.is-in .word .spin { transform: none; opacity: 1; }
.word .spin.dragging { cursor: grabbing; }
.word .g { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; will-change: transform, opacity; user-select: none; -webkit-user-drag: none; }
.word .g-matcha { opacity: 0; }
.word .sheen {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at var(--sx, 30%) var(--sy, 25%), rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 42%);
  mix-blend-mode: soft-light; opacity: .9;
}
/* the logo's sparkle, as a glint of light on the glass */
.word .spk { position: absolute; left: 14%; top: 12%; width: 14%; height: 14%; fill: #fff; overflow: visible; pointer-events: none;
  filter: drop-shadow(0 0 .06em rgba(255, 255, 255, .9)); opacity: 0; transform: scale(.3) rotate(-35deg); }
.is-in .word .spk { animation: glint 6s var(--ease) 2.2s infinite; }
@keyframes glint {
  0% { opacity: 0; transform: scale(.3) rotate(-35deg); }
  9% { opacity: 1; transform: scale(1) rotate(0deg); }
  20% { opacity: 0; transform: scale(.45) rotate(30deg); }
  100% { opacity: 0; transform: scale(.3) rotate(30deg); }
}

/* the logo's own "coffee room" line sits under the word, as in the lockup; it wipes in after the letters */
.sub { position: absolute; left: 50%; bottom: 0; width: 1.7em; height: .1813em; translate: -50% 0; pointer-events: none;
  clip-path: inset(0 100% 0 0); transition: clip-path 1.2s var(--ease) .6s; }
.sub svg { display: block; width: 100%; height: 100%; fill: #fff; overflow: visible; }
.is-in .sub { clip-path: inset(0 0 0 0); }

/* ---------- meta row ---------- */
.meta {
  grid-row: 2; position: relative;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  opacity: 0; transform: translateY(14px);
  transition: opacity 1s var(--ease) .9s, transform 1s var(--ease) .9s;
}
.hero .meta { color: #fff; text-shadow: 0 1px 14px rgba(0, 0, 0, .3); }
.hero .meta > * { opacity: var(--fade, 1); }   /* hero.js fades the row out before it reaches the bar */
.is-in .meta { opacity: 1; transform: none; }
.meta p { margin: 0; }
.where { justify-self: end; text-align: right; display: flex; gap: 18px; align-items: center; }
.addr { color: inherit; }
.open { display: inline-flex; align-items: center; gap: 8px; color: var(--mute); }
.open i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }
.open.is-open { color: var(--ink); }
.open.is-open i { background: currentColor; animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
.hero .open { color: rgba(255, 255, 255, .8); }
.hero .open.is-open { color: #fff; }

.pick {
  position: relative; display: inline-flex; padding: 4px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper);
}
.pick button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 9px;
  border: 0; background: none; cursor: pointer; padding: 7px 16px 7px 7px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--ink);
  transition: color .5s var(--ease);
}
.pick button img { width: 24px; height: 24px; border-radius: 50%; transition: transform .7s var(--ease); }
.pick button[aria-checked="true"] { color: var(--paper); }
.pick button[aria-checked="true"] img { transform: rotate(-90deg); }
.pick-ink {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0;
  background: var(--ink); border-radius: 999px;
  transition: transform .7s var(--ease), width .7s var(--ease);
}
/* on the photo: a clear pill, the chosen drink in white */
.hero .pick { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); text-shadow: none; }
.hero .pick button { color: #fff; }
.hero .pick button[aria-checked="true"] { color: var(--ink); }
.hero .pick-ink { background: #fff; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .links { display: none; }
  .bar { grid-template-columns: 1fr auto; }
  .meta { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 18px; }
  .tag { order: 2; color: var(--mute); }
  .hero .tag { color: rgba(255, 255, 255, .88); }
  .pick { order: 1; }
  .where { order: 3; justify-self: center; text-align: center; flex-direction: column; gap: 6px; }
  .hero { padding-bottom: calc(var(--pad) * 1.6); }
}

@media (prefers-reduced-motion: reduce) {
  .word .l, .word .spin, .word .shade, .meta, .sub { transition-duration: .01ms !important; transition-delay: 0s !important; }
  .word .spk { animation: none !important; opacity: .9; transform: none; }
  .open.is-open i { animation: none; }
}
