/* =========================================================================
   Pasticceria Maritan · maritan.css
   Foglio di stile esterno. In Elementor restano solo struttura, contenuti e
   classi globali "mr-*" VUOTE: tutto lo stile e le animazioni stanno qui.
   Ogni regola parte da .mr-page (il contenitore radice delle pagine nuove),
   così non tocca le pagine vecchie e vince sugli stili base di Elementor.
   Direzione: "The specimen catalogue" (taste skill, seed 1051552055).
   ========================================================================= */

/* ---------- 1. Font ospitati sul server (licenza SIL OFL) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/fraunces-normal-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/instrument-sans-normal-latin.woff2") format("woff2");
}

/* ---------- 2. Token ---------- */
.mr-page {
  --mt-notte: #12261F;
  --mt-bosco: #1E4D3B;
  --mt-salvia: #A9BBA3;
  --mt-panna: #FAF5EA;
  --mt-burro: #F1E7D0;
  --mt-cacao: #4A3328;

  --bg: var(--mt-panna);
  --ink: var(--mt-notte);
  --muted: #3E4F47;
  --accent: var(--mt-bosco);
  --on-dark: var(--mt-panna);

  --font-title: "Fraunces", Georgia, serif;
  --font-text: "Instrument Sans", system-ui, sans-serif;

  --fs-display: clamp(56px, 10vw, 164px);
  --fs-big: clamp(46px, 6.6vw, 108px);
  --fs-h2: clamp(38px, 4.6vw, 72px);
  --fs-name: clamp(20px, 1.6vw, 24px);
  --fs-body: 18px;
  --fs-small: 15px;

  --margin: clamp(16px, 2.2vw, 32px);
  --section: clamp(120px, 14vw, 200px);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: 180ms;
  --t-enter: 900ms;

  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* azzera i default dei contenitori Elementor (padding 10px, min-width) */
.mr-page div { min-width: 0; }
.mr-page .e-con,
.mr-page.e-con {
  --padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px;
  --gap: 0px; --row-gap: 0px; --column-gap: 0px;
  padding: 0;
  margin: 0;
  width: auto;
  max-width: none;
  min-width: 0;
  flex-wrap: nowrap;
}
.mr-page .elementor-element { --widgets-spacing: 0px; margin-block: 0; }

/* "carrier" del footer: porta le classi del footer UiCore sulla pagina, non si vede.
   Si toglie quando anche gli stili del footer passano in questo file. */
.mr-page > .mt-footer { display: none; }
.mr-page img { display: block; max-width: 100%; height: auto; }
.mr-page a { color: inherit; }
.mr-page strong { font-weight: 600; }
.mr-page :focus-visible { outline: 3px solid var(--mt-salvia); outline-offset: 3px; }
.mr-page ::selection { background: var(--mt-salvia); color: var(--mt-notte); }

/* ---------- 3. Tipografia ---------- */
.mr-page .mr-h1,
.mr-page .mr-h2,
.mr-page .mr-name,
.mr-page .mr-fact__n,
.mr-page .mr-day__name,
.mr-page .mr-visit__row {
  display: block;
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-optical-sizing: auto;
  color: inherit;
  text-wrap: balance;
}

.mr-page .mr-h1 { font-size: var(--fs-display); line-height: .88; letter-spacing: -.035em; }
.mr-page .mr-h2 { font-size: var(--fs-h2); line-height: 1; letter-spacing: -.025em; }
.mr-page .mr-name { font-size: var(--fs-name); line-height: 1.15; letter-spacing: -.005em; }

.mr-page .mr-p,
.mr-page .mr-lead,
.mr-page .mr-small,
.mr-page .mr-status {
  display: block;
  margin: 0;
  font-family: var(--font-text);
  color: inherit;
  max-width: 46ch;
}

.mr-page .mr-p { font-size: var(--fs-body); line-height: 1.55; }
.mr-page .mr-lead { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; }
.mr-page .mr-small { font-size: var(--fs-small); line-height: 1.45; color: var(--muted); }

/* ---------- 4. Bottoni e link ---------- */
.mr-page .mr-btn,
.mr-page .mr-btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  font-family: var(--font-text);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) linear;
}

.mr-page .mr-btn { background: var(--accent); color: var(--on-dark); }
.mr-page .mr-btn:hover { background: var(--mt-notte); }
.mr-page .mr-btn-light { background: var(--mt-panna); color: var(--mt-bosco); }
.mr-page .mr-btn-light:hover { background: var(--mt-burro); }
.mr-page .mr-btn:active,
.mr-page .mr-btn-light:active { transform: scale(.97); }

.mr-page .mr-link,
.mr-page .mr-link a {
  display: inline-block;
  font-family: var(--font-text);
  font-size: var(--fs-body);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--mt-salvia);
  transition: text-underline-offset var(--t-fast) var(--ease-out), text-decoration-color var(--t-fast) linear;
}

.mr-page .mr-link:hover,
.mr-page .mr-link a:hover { text-underline-offset: 3px; text-decoration-color: currentColor; }

/* ---------- 5. Hero: dettaglio a tutto schermo, una frase sopra ---------- */
.mr-page .mr-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  color: var(--on-dark);
  background: var(--mt-notte);
  overflow: hidden;
  isolation: isolate;
}

.mr-page .mr-hero__media { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }

.mr-page .mr-hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.6s linear;
}

.mr-page .mr-hero__media img:first-of-type,
.mr-page .mr-hero__media img.is-on { opacity: 1; }
.mr-page .mr-hero__media.is-running img:first-of-type:not(.is-on) { opacity: 0; }

.mr-page .mr-hero::after {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(10, 18, 14, .74), rgba(10, 18, 14, 0)); /* taste-skill-ignore: velo neutro su foto */
  pointer-events: none;
}

.mr-page .mr-hero__body {
  width: 100%;
  padding: 0 var(--margin) clamp(32px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px 48px;
}

.mr-page .mr-hero__text { display: grid; gap: 28px; }
.mr-page .mr-hero .mr-lead { max-width: 34ch; }
.mr-page .mr-hero__actions { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

.mr-page .mr-status {
  font-size: var(--fs-small);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mr-page .mr-status::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mt-salvia);
}

.mr-page .mr-status.is-closed::before { background: var(--mt-burro); opacity: .6; }

/* ---------- 6. Vetrina: fila di torte, una sollevata ---------- */
.mr-page .mr-run {
  padding: var(--section) var(--margin) 0;
  display: grid;
  grid-template-columns: minmax(200px, 22%) minmax(0, 1fr);
  gap: 32px;
}

.mr-page .mr-run__side { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.mr-page .mr-run__side .mr-small { margin-top: auto; }

.mr-page .mr-run__track { display: flex; flex-direction: row; align-items: flex-end; gap: 6px; }
.mr-page .mr-frame { flex: 1 1 0; display: flex; flex-direction: column; gap: 0; }
.mr-page .mr-frame--lift { flex-grow: 2.4; }

.mr-page .mr-frame img {
  width: 100%;
  height: 30vh;
  min-height: 220px;
  object-fit: cover;
  transition: transform .8s var(--ease-out);
}

.mr-page .mr-frame--lift img { height: 66vh; min-height: 460px; }
.mr-page .mr-frame:hover img { transform: scale(1.015); }
.mr-page .mr-frame .mr-p { padding-top: 10px; font-size: var(--fs-small); line-height: 1.35; }
.mr-page .mr-frame .mr-small { line-height: 1.35; }

/* ---------- 7. Banda a tutto schermo con il testo sopra ---------- */
.mr-page .mr-band {
  position: relative;
  min-height: 92svh;
  margin-top: var(--section);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  color: var(--on-dark);
  overflow: hidden;
  isolation: isolate;
}

.mr-page .mr-band > img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08) translateY(var(--mr-drift, 0px));
  will-change: transform;
}

.mr-page .mr-band::after {
  content: "";
  position: absolute;
  inset: 0 0 45%;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(10, 18, 14, .62), rgba(10, 18, 14, 0)); /* taste-skill-ignore: velo neutro su foto */
}

.mr-page .mr-band__body {
  width: 100%;
  padding: clamp(40px, 7vw, 104px) var(--margin);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.mr-page .mr-band__body .mr-h2 { grid-column: 1 / span 7; font-size: var(--fs-big); }
.mr-page .mr-band__body .mr-lead { grid-column: 9 / span 4; align-self: end; }

/* ---------- 8. Catalogo: ogni prodotto su un campo di colore ---------- */
.mr-page .mr-catalogue { padding: var(--section) var(--margin) 0; }

.mr-page .mr-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px;
  margin-bottom: 48px;
}

.mr-page .mr-head > :last-child { justify-self: end; }

.mr-page .mr-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 12px;
}

.mr-page .mr-tile { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
.mr-page .mr-tile--big { grid-column: span 2; grid-row: span 2; }

.mr-page .mr-tile__field {
  aspect-ratio: 4 / 5;
  margin-bottom: 12px;
  padding: 12%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--mt-salvia);
}

.mr-page .mr-tile--big .mr-tile__field { aspect-ratio: auto; flex: 1; padding: 9%; }
.mr-page .mr-tile:nth-child(4n + 2) .mr-tile__field { background: var(--mt-burro); }
.mr-page .mr-tile:nth-child(4n + 3) .mr-tile__field { background: var(--mt-cacao); }
.mr-page .mr-tile:nth-child(4n + 4) .mr-tile__field { background: var(--mt-bosco); }

.mr-page .mr-tile__field img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease-out);
}

.mr-page .mr-tile:hover .mr-tile__field img { transform: scale(1.04); }

/* ---------- 9. Caffetteria: foto larga, campo di colore, numeri ---------- */
.mr-page .mr-cafe { padding: calc(var(--section) + 24px) var(--margin) 0; }
.mr-page .mr-cafe > .mr-h2 { margin-bottom: 24px; }
.mr-page .mr-cafe > .mr-lead { margin-bottom: 72px; }

.mr-page .mr-cafe__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 16px;
}

.mr-page .mr-cafe__photo { min-height: 560px; }
.mr-page .mr-cafe__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

.mr-page .mr-cafe__tile {
  background: var(--mt-bosco);
  color: var(--on-dark);
  padding: clamp(28px, 3.4vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.mr-page .mr-facts { display: grid; gap: 28px; }
.mr-page .mr-facts .mr-p { color: var(--on-dark); }
.mr-page .mr-fact__n { font-size: var(--fs-h2); line-height: 1; letter-spacing: -.025em; }

/* ---------- 10. Orari: la settimana, oggi in evidenza ---------- */
.mr-page .mr-hours {
  margin-top: var(--section);
  padding: clamp(72px, 8vw, 120px) var(--margin);
  background: var(--mt-notte);
  color: var(--on-dark);
}

.mr-page .mr-hours__head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  margin-bottom: 64px;
}

.mr-page .mr-hours__head .mr-h2 { font-size: var(--fs-big); }
.mr-page .mr-hours__head > :last-child { justify-self: end; }
.mr-page .mr-hours__head img { width: clamp(120px, 16vw, 240px); aspect-ratio: 3 / 4; object-fit: cover; }

.mr-page .mr-day {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 16px;
  padding: 22px 20px;
  transition: background-color .4s linear;
}

.mr-page .mr-day:nth-child(odd) { background: rgba(250, 245, 234, .05); }
.mr-page .mr-day__name { font-size: var(--fs-name); }
.mr-page .mr-day__time { display: block; margin: 0; font-size: var(--fs-body); font-variant-numeric: tabular-nums; text-align: right; }
.mr-page .mr-day.is-today { background: var(--mt-salvia); color: var(--mt-notte); }
.mr-page .mr-day.is-today .mr-day__name::after { content: ", oggi"; }

/* ---------- 11. Dove siamo: indirizzo in righe grandi ---------- */
.mr-page .mr-visit { background: var(--mt-bosco); color: var(--on-dark); }

.mr-page .mr-visit .mr-visit__row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  min-height: clamp(110px, 12vw, 160px);
  max-width: none;
  padding: 0 var(--margin) clamp(18px, 2vw, 28px);
  font-size: var(--fs-big);
  line-height: 1;
  letter-spacing: -.025em;
  text-decoration: none;
  transition: background-color var(--t-fast) linear;
}

.mr-page .mr-visit .mr-visit__row:nth-child(even) { background: #1A4434; }
.mr-page .mr-visit a.mr-visit__row:hover { background: var(--mt-notte); }

/* ---------- 12. Entrate allo scroll (solo se c'è JavaScript) ---------- */
.mr-js .mr-page .mr-reveal > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-enter) var(--ease-out), transform var(--t-enter) var(--ease-out);
}

.mr-js .mr-page .mr-reveal.is-in > * { opacity: 1; transform: none; }
.mr-js .mr-page .mr-reveal.is-in > :nth-child(2) { transition-delay: 80ms; }
.mr-js .mr-page .mr-reveal.is-in > :nth-child(3) { transition-delay: 160ms; }
.mr-js .mr-page .mr-reveal.is-in > :nth-child(4) { transition-delay: 240ms; }
.mr-js .mr-page .mr-reveal.is-in > :nth-child(5) { transition-delay: 320ms; }
.mr-js .mr-page .mr-reveal.is-in > :nth-child(n + 6) { transition-delay: 400ms; }
.mr-js .mr-page .mr-run__track.mr-reveal > * { transform: translateX(40px); }
.mr-js .mr-page .mr-run__track.mr-reveal.is-in > * { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .mr-js .mr-page .mr-reveal > * { opacity: 1; transform: none; transition: none; }
  .mr-page .mr-hero__media img,
  .mr-page .mr-frame img,
  .mr-page .mr-tile__field img { transition: none; }
  .mr-page .mr-band > img { transform: none; }
}

/* ---------- 13. Tablet ---------- */
@media (max-width: 1024px) {
  .mr-page .mr-run { grid-template-columns: 1fr; }
  .mr-page .mr-run__side .mr-small { margin-top: 0; }
  .mr-page .mr-band__body .mr-h2 { grid-column: 1 / -1; }
  .mr-page .mr-band__body .mr-lead { grid-column: 1 / span 9; }
  .mr-page .mr-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mr-page .mr-tile--big { grid-row: auto; }
  .mr-page .mr-tile--big .mr-tile__field { aspect-ratio: 16 / 10; flex: none; }
  .mr-page .mr-cafe__grid { grid-template-columns: 1fr; }
  .mr-page .mr-cafe__photo { min-height: 0; }
  .mr-page .mr-cafe__photo img { aspect-ratio: 4 / 3; }
}

/* ---------- 14. Telefono ---------- */
@media (max-width: 640px) {
  .mr-page { --fs-body: 17px; --section: 72px; }
  .mr-page .mr-hero__body { grid-template-columns: 1fr; }
  .mr-page .mr-hero__actions .mr-btn-light { width: 100%; }
  .mr-page .mr-run__track { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 8px; }
  .mr-page .mr-frame img { height: auto; aspect-ratio: 4 / 5; min-height: 0; }
  .mr-page .mr-frame--lift { grid-column: 1 / -1; }
  .mr-page .mr-frame--lift img { min-height: 0; }
  .mr-page .mr-band { min-height: 86svh; }
  .mr-page .mr-band__body .mr-lead { grid-column: 1 / -1; }
  .mr-page .mr-head { grid-template-columns: 1fr; }
  .mr-page .mr-head > :last-child { justify-self: start; }
  .mr-page .mr-tiles { gap: 28px 8px; }
  .mr-page .mr-tile--big { grid-column: 1 / -1; }
  .mr-page .mr-hours__head { grid-template-columns: 1fr auto; }
  .mr-page .mr-hours__head img { grid-row: 1 / span 2; grid-column: 2; width: 34vw; }
  .mr-page .mr-hours__head > :last-child { justify-self: start; }
  .mr-page .mr-day { padding: 18px 14px; }
  .mr-page .mr-visit .mr-visit__row { font-size: clamp(32px, 9.4vw, 44px); }
}
