/* OSTERIA MAMMA — navigation, hero, sticky ordering */

/* ── navigation ───────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  height: calc(var(--nav-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(16, 15, 13, 0.92) 0%, rgba(16, 15, 13, 0) 100%);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}
.nav.is-solid {
  background: rgba(16, 15, 13, 0.95);
  border-bottom-color: var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav__inner {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__brand {
  display: inline-flex;
  flex-direction: column;
  min-height: 2.5rem;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.05;
}
.nav__brand-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
}
.nav__brand-sub {
  font-size: 0.625rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--copper);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2.1rem);
  list-style: none;
  margin: 0; padding: 0;
}
.nav__link {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  text-decoration: none;
  padding-block: 0.5rem;
  position: relative;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-out);
}
.nav__link:hover { color: var(--cream); }
.nav__link:hover::after,
.nav__link[aria-current='true']::after { transform: scaleX(1); }
.nav__link[aria-current='true'] { color: var(--copper-lit); }

.nav__order { padding: 0.6rem 1.25rem; min-height: 2.6rem; white-space: nowrap; }

@media (max-width: 900px) { .nav__links { display: none; } }
@media (max-width: 520px) {
  .nav__brand-sub { display: none; }
  .nav__order { padding: 0.5rem 1rem; min-height: 2.5rem; font-size: 0.75rem; }
}

/* ── hero ─────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}

.hero__stage { position: absolute; inset: 0; z-index: 0; background: var(--ink); }

/* The film is a true 9:16 vertical piece. Phones therefore get it full-bleed
   with almost no crop; wider screens keep it whole as a centred portal and
   the surround is filled by the same frame thrown out of focus. */
.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 50%;
}
@media (max-aspect-ratio: 3/4) {
  .hero__media { object-fit: cover; }
}

.hero__ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.2);
  filter: blur(30px) saturate(1.2) brightness(0.62);
}
@media (max-aspect-ratio: 3/4) { .hero__ambient { display: none; } }

#hero-video { z-index: 2; opacity: 0; transition: opacity 600ms var(--ease-out); }
#hero-video.is-active { opacity: 1; }

/* The film's own last frame, revealed underneath before the video fades so
   the plaque simply stops moving. */
#hero-rest { z-index: 1; opacity: 0; transition: opacity 700ms var(--ease-out); }
#hero-rest.is-visible { opacity: 1; }

/* Present from the first paint — this is what reduced-motion, no-JS and
   slow-connection visitors see, and it is already the finished logo frame. */
#hero-still { z-index: 1; opacity: 1; }
.hero.is-playing #hero-still { opacity: 0; transition: opacity 400ms var(--ease-out); }

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(16, 15, 13, 0.8) 0%, rgba(16, 15, 13, 0.1) 20%,
                    rgba(16, 15, 13, 0.1) 42%, rgba(16, 15, 13, 0.62) 66%,
                    rgba(16, 15, 13, 0.93) 84%, rgba(16, 15, 13, 0.99) 100%);
}

/* ── hero content ─────────────────────────────────────────────────── */
/* Nothing here waits on the film: ordering is available from first paint. */

.hero__content {
  position: relative;
  z-index: 4;
  grid-row: 2;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0 var(--gutter) calc(clamp(2rem, 6vh, 3.5rem) + var(--safe-bottom));
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1.1rem;
}

.hero__eyebrow {
  font-size: var(--fs-eyebrow);
  white-space: nowrap;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--copper-lit);
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.hero__actions .btn { min-width: 13.5rem; }
.hero__meta { font-size: var(--fs-small); color: var(--text-soft); letter-spacing: 0.04em; }

@media (max-width: 600px) {
  .hero__actions { width: 100%; flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; min-width: 0; }
}

/* Sound is off unless the visitor asks for it — nothing ever autoplays audibly. */
.hero__sound {
  position: absolute;
  z-index: 5;
  right: var(--gutter);
  top: calc(var(--nav-h) + var(--safe-top) + 0.75rem);
  min-height: 2.5rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.75rem;
  background: rgba(16, 15, 13, 0.6);
  border-color: var(--line-soft);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── sticky ordering bar ──────────────────────────────────────────── */

.order-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 95;
  display: none;
  gap: 0.5rem;
  padding: 0.7rem var(--gutter) calc(0.7rem + var(--safe-bottom));
  background: rgba(16, 15, 13, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(110%);
  transition: transform var(--dur-med) var(--ease-out);
}
.order-bar.is-visible { transform: none; }
.order-bar .btn { flex: 1 1 auto; min-height: 2.9rem; padding-inline: 1rem; }
.order-bar .btn--ghost { flex: 0 0 auto; min-width: 3.4rem; }

@media (max-width: 900px) {
  .order-bar { display: flex; }
  body.has-order-bar #visit, body.has-order-bar .footer { padding-bottom: 5.5rem; }
}
