/* Il Panettaio — La notte del pane (variante cinematica) */

:root {
  --brown: #683B11;
  --cream: #FBF0D3;
  --caramel: #A9773F;
  --amber: #E8B36A;
  --night: #140b04;
  --warm-white: #FFFDF8;
  --display: "Epilogue", sans-serif;
  --body: "Hanken Grotesk", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: var(--night);
  color: var(--cream);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 50;
  background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.4rem;
  transition: opacity .8s ease, visibility .8s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-logo { width: min(180px, 40vw); }
.loader-bar {
  width: min(260px, 60vw); height: 2px;
  background: rgba(104, 59, 17, .18); border-radius: 2px; overflow: hidden;
}
.loader-fill {
  height: 100%; width: 0%;
  background: var(--brown);
  transition: width .3s ease;
}
.loader-txt {
  color: var(--brown); font-size: .8rem; letter-spacing: .18em;
  text-transform: uppercase; font-weight: 600;
}

/* ---------- Scrub stage ---------- */
.scrub { height: 850vh; position: relative; }
.stage {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: var(--night);
}
#film { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* leggera vignettatura per leggibilità testi */
.grade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(10, 5, 2, .45) 100%),
    linear-gradient(to bottom, rgba(10, 5, 2, .25), transparent 30%, transparent 72%, rgba(10, 5, 2, .35));
}

/* ---------- HUD ---------- */
.hud {
  position: absolute; right: clamp(10px, 2.5vw, 34px); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: .9rem;
  text-align: right;
  color: var(--amber);
  font-family: var(--body);
  z-index: 5;
  text-shadow: 0 1px 8px rgba(0,0,0,.55);
}
.hud-top {
  font-size: .58rem; font-weight: 600; letter-spacing: .34em;
  opacity: .75; line-height: 1.7;
}
.hud-rail { position: relative; height: 34vh; width: 14px; }
.hud-ticks { position: absolute; inset: 0; }
.hud-tick {
  position: absolute; right: 0; width: 8px; height: 1px;
  background: rgba(232, 179, 106, .5);
}
.hud-tick.major { width: 14px; background: rgba(232, 179, 106, .9); }
.hud-tick .t-lab {
  position: absolute; right: 20px; top: -0.5em;
  font-size: .55rem; letter-spacing: .14em; color: rgba(232, 179, 106, .65);
}
.hud-dot {
  position: absolute; right: -3px; top: 0; width: 7px; height: 7px;
  border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 12px 2px rgba(232, 179, 106, .8);
}
.hud-clock {
  font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 300;
  letter-spacing: .12em; font-variant-numeric: tabular-nums;
}
.hud-zone {
  font-size: .62rem; font-weight: 800; letter-spacing: .4em;
  color: var(--cream);
}
.hud-temp {
  font-size: .58rem; letter-spacing: .26em; font-weight: 600;
  color: #ffb35c; opacity: 0; transition: opacity .5s ease;
}
.hud-temp.on { opacity: 1; }

/* ---------- Overlay pinnate ---------- */
.ovl {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(1.4rem, 9vw, 9rem);
  opacity: 0; visibility: hidden;
  pointer-events: none;
}
.ovl h1 {
  font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: -0.01em;
  font-size: clamp(2.5rem, 7vw, 5.8rem); line-height: .98;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,.65), 0 4px 30px rgba(0,0,0,.5);
  text-wrap: balance;
}
.ovl h2 {
  font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: -0.01em;
  font-size: clamp(2rem, 5.2vw, 4.3rem); line-height: 1.02;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,.65), 0 4px 30px rgba(0,0,0,.5);
  text-wrap: balance;
}
.eyebrow {
  font-size: .68rem; font-weight: 700; letter-spacing: .34em;
  color: #ffffff; margin-bottom: 1.2rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.8), 0 2px 16px rgba(0,0,0,.55);
}
.sub {
  margin-top: 1.3rem; font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 300; color: #ffffff; opacity: .96; letter-spacing: .02em;
  text-shadow: 0 1px 4px rgba(0,0,0,.8), 0 2px 16px rgba(0,0,0,.5);
}
.hint {
  margin-top: 2.6rem; font-size: .7rem; letter-spacing: .3em;
  text-transform: uppercase; color: #ffffff; font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,.8), 0 2px 16px rgba(0,0,0,.55);
}
.z-label {
  font-size: .68rem; font-weight: 800; letter-spacing: .38em;
  color: #ffffff; margin-bottom: 1.1rem;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(0,0,0,.8), 0 2px 16px rgba(0,0,0,.55);
}
.z-sub {
  margin-top: 1.1rem; font-family: var(--display); font-style: italic;
  font-weight: 400; text-transform: none;
  font-size: clamp(1rem, 1.7vw, 1.3rem); color: #ffffff; opacity: .94;
  text-shadow: 0 1px 4px rgba(0,0,0,.8), 0 2px 16px rgba(0,0,0,.55);
}
.ovl-open { align-items: flex-start; }

/* ---------- Mattina (dopo lo scrub) ---------- */
.morning {
  position: relative; z-index: 6;
  background: var(--cream); color: var(--brown);
}
.morning .intro {
  padding: clamp(4rem, 10vw, 8rem) clamp(1.4rem, 8vw, 8rem) clamp(2rem, 5vw, 4rem);
  max-width: 900px;
}
.morning-logo { width: min(140px, 34vw); margin-bottom: 2rem; }
.morning h2 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.02;
  text-wrap: balance;
}
.morning .intro p {
  margin-top: 1.4rem; font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 300; line-height: 1.7; max-width: 34em;
}

.sedi {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(1.2rem, 3vw, 2.4rem);
  padding: 0 clamp(1.4rem, 8vw, 8rem) clamp(4rem, 8vw, 6rem);
  max-width: 1100px;
}
.sede {
  background: var(--warm-white);
  border: 1px solid rgba(104, 59, 17, .12);
  border-radius: 18px;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: 0 18px 40px -18px rgba(104, 59, 17, .25);
  min-width: 0;
}
.sede h3 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: 1.8rem; margin-bottom: .9rem;
}
.sede .addr { line-height: 1.55; font-weight: 400; }
.sede .hours {
  margin-top: .8rem; line-height: 1.55;
  font-size: .92rem; color: var(--caramel); font-weight: 600;
}
.sede-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.btn {
  display: inline-block; padding: .72rem 1.25rem; border-radius: 999px;
  border: 1.5px solid var(--brown); color: var(--brown);
  text-decoration: none; font-weight: 600; font-size: .92rem;
  transition: background .25s, color .25s;
}
.btn:hover { background: var(--brown); color: var(--cream); }
.btn-wa { background: var(--brown); color: var(--cream); }
.btn-wa:hover { background: #4f2c0c; }
.sede-maps { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 1.2rem; }
.sede-maps a {
  color: var(--caramel); font-size: .85rem; font-weight: 600;
  text-decoration: none; border-bottom: 1px solid rgba(169, 119, 63, .4);
}
.sede-maps a:hover { color: var(--brown); }

footer {
  background: var(--brown); color: var(--cream);
  padding: clamp(3rem, 7vw, 5rem) clamp(1.4rem, 8vw, 8rem);
}
footer p:first-child {
  font-family: var(--display); font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem);
}
footer .fine { margin-top: 1rem; font-size: .85rem; opacity: .8; }
footer a { color: var(--amber); text-decoration: none; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .hud-rail { height: 24vh; }
  .hud-top { display: none; }
  .ovl { padding: 0 1.4rem 14vh; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .loader { transition: none; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: clamp(.85rem, 2vw, 1.25rem) clamp(1.2rem, 4vw, 2.6rem);
  background: linear-gradient(to bottom, rgba(20, 11, 4, .62), rgba(20, 11, 4, 0));
  transition: background .35s ease;
}
.nav-logo { display: block; line-height: 0; }
.nav-logo img {
  height: clamp(30px, 4vw, 44px); width: auto; display: block;
  /* logo marrone -> bianco sul film scuro */
  filter: brightness(0) invert(1);
  transition: filter .35s ease;
}
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.4rem); }
.nav-links a {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: .68rem; letter-spacing: .26em; text-decoration: none;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(15, 9, 4, .85), 0 2px 16px rgba(15, 9, 4, .6);
  padding-bottom: .2em; border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav-links a:hover { color: var(--amber); }
.nav-links a:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }

.nav.solid {
  background: var(--cream);
  border-bottom: 1px solid rgba(104, 59, 17, .16);
}
.nav.solid .nav-logo img { filter: none; }
.nav.solid .nav-links a { color: var(--brown); text-shadow: none; }
.nav.solid .nav-links a:hover { color: var(--caramel); }

@media (max-width: 640px) {
  .nav-links a { font-size: .56rem; letter-spacing: .2em; }
  .nav-links { gap: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .nav, .nav-logo img, .nav-links a { transition: none; }
}

/* ---------- Pagine interne (Chi siamo / Contatti) ---------- */
.page-hero {
  position: relative; min-height: 68vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(6rem, 16vh, 9rem) clamp(1.4rem, 8vw, 8rem) clamp(3rem, 7vw, 5rem);
  background-size: cover; background-position: center;
  color: #fff;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(20, 11, 4, .5), transparent 34%, transparent 58%, rgba(20, 11, 4, .62));
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: -0.01em; line-height: .98;
  font-size: clamp(2.4rem, 6.5vw, 5.4rem);
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,.65), 0 4px 30px rgba(0,0,0,.5);
  text-wrap: balance;
}
.page-hero .sub { max-width: 36em; }

.hero-chisiamo { background-image: url("frames/f_0030.webp"); }
.hero-contatti { background-image: url("frames/f_0483.webp"); }

.page-body { background: var(--cream); color: var(--brown); position: relative; z-index: 6; }

.page-intro {
  padding: clamp(3.5rem, 9vw, 7rem) clamp(1.4rem, 8vw, 8rem) clamp(2.5rem, 6vw, 4.5rem);
  max-width: 980px;
}
.page-intro h2 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.03; text-wrap: balance;
}
.page-intro p {
  margin-top: 1.5rem; font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 400; line-height: 1.7; max-width: 36em; color: #5c4630;
}
.page-intro strong { color: var(--brown); }

/* Split: immagine dal film + racconto */
.split {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: stretch;
  max-width: 1250px;
  padding: 0 clamp(1.4rem, 8vw, 8rem) clamp(3rem, 7vw, 5rem);
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.split-img {
  min-height: min(52vh, 460px);
  background-size: cover; background-position: center;
}
.split-txt { display: flex; flex-direction: column; justify-content: center; padding: 1rem 0; }
.split-txt h3 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.5rem, 3.2vw, 2.4rem); line-height: 1.05; text-wrap: balance;
}
.split-txt p {
  margin-top: 1.1rem; line-height: 1.7; max-width: 32em;
  font-size: clamp(.98rem, 1.5vw, 1.12rem); color: #5c4630;
}
.split-txt .firma {
  margin-top: 1.3rem; font-family: var(--display); font-style: italic;
  text-transform: none; font-weight: 400;
  color: var(--caramel); font-size: 1.05rem;
}
.img-impasto { background-image: url("frames/f_0165.webp"); }
.img-forno { background-image: url("frames/f_0400.webp"); }

/* Banda valori: tipografia grande su scuro */
.valori {
  background: var(--night); color: var(--cream);
  padding: clamp(3.5rem, 9vw, 6.5rem) clamp(1.4rem, 8vw, 8rem);
}
.valori li {
  list-style: none;
  padding: clamp(1.3rem, 3vw, 2rem) 0;
  border-top: 1px solid rgba(232, 179, 106, .28);
}
.valori li:last-child { border-bottom: 1px solid rgba(232, 179, 106, .28); }
.valori h3 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.5rem, 3.6vw, 2.7rem); line-height: 1.04;
}
.valori p { margin-top: .5rem; color: var(--amber); font-size: clamp(.95rem, 1.4vw, 1.1rem); }

/* CTA band */
.cta-band {
  padding: clamp(3.5rem, 9vw, 6.5rem) clamp(1.4rem, 8vw, 8rem);
  max-width: 980px;
}
.cta-band h2 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.03;
}
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* Footer cross-brand: Scopri Antica Genova */
.footer-brand {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  gap: .8rem; text-decoration: none; margin-top: 2rem;
}
.footer-brand img { height: clamp(34px, 5vw, 46px); width: auto; display: block; opacity: .96; transition: opacity .2s ease; }
.footer-brand span {
  font-size: .7rem; font-weight: 700; letter-spacing: .26em; text-transform: uppercase;
  color: var(--amber);
}
.footer-brand:hover img { opacity: .75; }
.footer-brand:focus-visible { outline: 2px solid var(--amber); outline-offset: 6px; }
@media (prefers-reduced-motion: reduce) { .footer-brand img { transition: none; } }

/* blocco chi-siamo breve in home: attaccato all'intro, niente doppio respiro */
.morning .chi-breve { padding-top: 0; }
