/* Fratelli Ricci: due porte, un palo da barbiere come menu e cinquant'anni da percorrere */
@font-face { font-family: "Gloock"; src: url(../assets/font/Gloock.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url(../assets/font/HankenGrotesk.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --inchiostro: #17190F;
  --verde: #8FBE22;
  --verde-scuro: #4A7209;
  --crema: #F4EEE1;
  --carta: #FBF8F1;
  --tenue: #5C5B4E;
  --tenue-chiaro: #B9B8A6;
  --bordo: #DDD4C1;
  --titoli: "Gloock", Georgia, serif;
  --testo: "Hanken Grotesk", system-ui, sans-serif;
  --palo: 104px;
  --strisce: repeating-linear-gradient(-45deg, var(--verde) 0 18px, var(--carta) 18px 36px, #000 36px 54px, var(--carta) 54px 72px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.6 var(--testo); color: var(--inchiostro); background: var(--crema); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font-family: var(--titoli); font-weight: 400; line-height: 1.04; text-wrap: balance; }
h2 { font-size: clamp(34px, 4.6vw, 56px); }
:focus-visible { outline: 3px solid var(--verde); outline-offset: 3px; border-radius: 3px; }
.nascosto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.gabbia { width: min(1120px, 100% - 64px); margin-inline: auto; }
.sezione { padding: clamp(72px, 9vw, 120px) 0; }
.sezione--bianca { background: var(--carta); }
.occhiello { font-weight: 700; font-size: 15px; line-height: 1.2; color: var(--verde-scuro); margin-bottom: 14px; }
.occhiello--chiaro { color: var(--verde); }
.intestazione { max-width: 700px; margin-bottom: 44px; }

.pulsante {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 20px;
  font-weight: 700; font-size: 16px; line-height: 1; white-space: nowrap; text-decoration: none; border-radius: 4px;
  background: var(--verde); color: var(--inchiostro); border: 2px solid var(--verde); transition: background .15s, border-color .15s, color .15s;
}
.pulsante:hover { background: #fff; border-color: #fff; }
.pulsante--vuoto { background: none; border-color: rgba(255,255,255,.6); color: #fff; }
.pulsante--vuoto:hover { color: var(--inchiostro); }
.azioni { display: flex; flex-wrap: wrap; gap: 10px; }

/* Il contenuto lascia il posto al palo */
main, .piede { margin-left: var(--palo); }

/* Le due porte */
.porte { position: relative; display: flex; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; background: var(--inchiostro); }
.porta { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; color: #fff; overflow: hidden; transition: flex-grow .5s cubic-bezier(.2,.7,.2,1); }
.porta + .porta { border-left: 4px solid var(--inchiostro); }
.porta > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.porta[data-sede="anguillara"] > img { object-position: 50% 70%; }
.porta[data-sede="bracciano"] > img { object-position: 30% 50%; }
.porta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(14,15,8,.94) 8%, rgba(14,15,8,.62) 42%, rgba(14,15,8,.12) 72%, rgba(14,15,8,.34)); }
.porta__testo { position: relative; z-index: 1; width: 100%; padding: 0 clamp(22px, 3vw, 44px) clamp(26px, 4vh, 44px); }
.porta h2 { font-size: clamp(38px, 4.6vw, 64px); white-space: nowrap; margin-top: 10px; }
.porta__indirizzo { margin-top: 6px; color: #E4E2D2; }
.porta__indirizzo b { color: #fff; }
.stella { color: #F0B429; }
.porta__piega { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .4s ease, opacity .3s ease; }
.porta__piega > div { overflow: hidden; min-height: 0; }
.porta .azioni { margin-top: 18px; }
.orari { width: 100%; max-width: 440px; border-collapse: collapse; margin-top: 16px; font-size: 16px; }
.orari th { text-align: left; font-weight: 600; white-space: nowrap; }
.orari td { text-align: right; font-variant-numeric: tabular-nums; }
.orari th, .orari td { padding: 8px 8px; border-top: 1px solid rgba(255,255,255,.26); }
.orari tr.oggi th, .orari tr.oggi td { background: rgba(255,255,255,.14); font-weight: 700; }
.porta__nota { margin-top: 10px; font-size: 15px; color: #E4E2D2; }
.stato { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.stato[hidden] { display: none; }
.stato i { width: 10px; height: 10px; border-radius: 50%; background: #F0B429; }
.stato.aperto i { background: var(--verde); box-shadow: 0 0 0 4px rgba(143,190,34,.32); }

/* La porta scelta si apre */
@media (hover: hover) and (min-width: 961px) {
  .porta:hover, .porta:focus-within { flex-grow: 1.42; }
  .porta:hover > img, .porta:focus-within > img { transform: scale(1.04); }
  .porta:hover .porta__piega, .porta:focus-within .porta__piega { grid-template-rows: 1fr; opacity: 1; }
  .porte:has(.porta[data-sede="anguillara"]:is(:hover, :focus-within)) .insegna { left: 58.7%; }
  .porte:has(.porta[data-sede="bracciano"]:is(:hover, :focus-within)) .insegna { left: 41.3%; }
}
@media (hover: none), (max-width: 960px) {
  .porta__piega { grid-template-rows: 1fr; opacity: 1; }
}

/* L'insegna a cavallo delle due porte */
.insegna {
  position: absolute; z-index: 3; top: clamp(30px, 8vh, 72px); left: 50%; transform: translateX(-50%);
  padding: 18px 34px 16px; text-align: center; background: var(--crema); color: var(--inchiostro); border-radius: 4px;
  box-shadow: 0 0 0 3px var(--crema), 0 0 0 5px var(--inchiostro), 0 18px 44px rgba(0,0,0,.42);
  white-space: nowrap; pointer-events: none; transition: left .5s cubic-bezier(.2,.7,.2,1);
}
.insegna h1 { font-size: clamp(40px, 5.2vw, 72px); line-height: 1; }
.insegna p { margin-top: 6px; font-weight: 700; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--verde-scuro); }

/* Il palo: il menu del sito */
.palo { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; width: var(--palo); display: flex; background: var(--inchiostro); }
.palo__strisce { flex: none; width: 20px; background-image: var(--strisce); background-size: 101.82px 101.82px; }
.palo ul { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding-left: 6px; }
.palo a { position: relative; display: block; padding: 9px 8px 9px 14px; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; color: #C9C8B8; transition: color .15s; }
.palo a::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 2px; background: currentColor; opacity: .5; }
.palo a:hover { color: #fff; }
.palo a[aria-current="true"] { color: var(--verde); font-weight: 700; }
.palo a[aria-current="true"]::before { width: 12px; opacity: 1; }

/* Cinquant'anni */
.anni { padding: clamp(72px, 9vw, 120px) 0 clamp(40px, 5vw, 70px); }
.anni__apertura { max-width: 820px; margin-bottom: clamp(44px, 6vw, 80px); }
.anni__apertura h2 { font-size: clamp(38px, 5.6vw, 72px); line-height: 1.02; }
.capitolo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding: clamp(44px, 6vw, 72px) 0; border-top: 2px solid var(--inchiostro); scroll-margin-top: 20px; }
.capitolo__anno { position: sticky; top: 8vh; align-self: start; font: 400 clamp(100px, 13.5vw, 196px)/.92 var(--titoli); letter-spacing: -.01em; color: var(--verde-scuro); }
.capitolo__corpo h3 { font-size: clamp(28px, 3vw, 38px); margin: 26px 0 10px; }
.capitolo__corpo > p { color: var(--tenue); max-width: 34em; }
.capitolo__foto { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.ricordo { background: #fff; padding: 14px 14px 12px; box-shadow: 0 14px 34px rgba(23,25,15,.16); transform: rotate(-1.4deg); }
.ricordo img { width: 100%; }
.ricordo figcaption { margin-top: 10px; font-size: 15px; color: var(--tenue); text-align: center; }
.voce { background: var(--verde); padding: clamp(26px, 3vw, 38px); border-radius: 4px; }
.voce p { font: 400 clamp(25px, 2.7vw, 34px)/1.14 var(--titoli); text-wrap: balance; }
.voce footer { margin-top: 12px; font-weight: 600; font-size: 15px; }

/* Tagli */
.tagli { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tagli img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
.tagli img:nth-child(3n + 2) { margin-top: 36px; }

/* Listino */
.listino { background: var(--inchiostro); color: #fff; padding: clamp(72px, 9vw, 120px) 0; }
.listino__griglia { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: start; }
.listino__nota { margin-top: 18px; color: var(--tenue-chiaro); max-width: 30em; }
.altri { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.altri li { padding: 6px 13px; border: 1px solid rgba(255,255,255,.28); border-radius: 4px; font-size: 15px; font-weight: 500; }
.prezzi > div { display: flex; align-items: baseline; gap: 10px; padding: 13px 0; }
.prezzi > div + div { border-top: 1px solid rgba(255,255,255,.12); }
.prezzi dt { font: 400 24px/1.2 var(--titoli); }
.prezzi dd { margin-left: auto; font: 400 24px/1.2 var(--titoli); color: var(--verde); white-space: nowrap; }

/* Chiusura */
.chiusura { background: var(--verde); padding: clamp(48px, 6vw, 72px) 0; }
.chiusura__riga { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.chiamate { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chiamate a { display: block; padding: 14px 20px; background: var(--inchiostro); color: #fff; text-decoration: none; border-radius: 4px; }
.chiamate span { display: block; font-size: 14px; color: #D3D2C3; }
.chiamate b { display: block; font: 400 22px/1.25 var(--titoli); white-space: nowrap; }

/* Piede */
.piede { background: var(--inchiostro); color: var(--tenue-chiaro); padding: 40px 0; font-size: 15px; }
.piede__riga { display: flex; justify-content: space-between; gap: 28px; align-items: flex-end; }
.piede__nome { font: 400 26px/1.2 var(--titoli); color: #fff; margin-bottom: 8px; }
.piede__fine { text-align: right; }
.piede a { color: #fff; text-underline-offset: 3px; overflow-wrap: anywhere; }

.barra-telefono { display: none; }

@media (max-width: 960px) {
  main, .piede { margin-left: 0; }
  html { scroll-padding-top: 62px; }
  .gabbia { width: calc(100% - 40px); }

  /* Le porte una sopra l'altra, l'insegna in cima */
  .porte { flex-direction: column; height: auto; min-height: 0; padding-top: 118px; }
  .porta { flex: none; min-height: 640px; }
  .porta::after { background: linear-gradient(to top, rgba(14,15,8,.96) 52%, rgba(14,15,8,.8) 66%, rgba(14,15,8,.08) 88%); }
  .porta + .porta { border-left: 0; border-top: 4px solid var(--inchiostro); }
  .porta h2 { white-space: normal; }
  .insegna { top: 16px; left: 16px; right: 16px; transform: none; padding: 14px 16px 12px; white-space: normal; }
  .insegna h1 { font-size: clamp(36px, 10.5vw, 56px); }
  .insegna p { font-size: 13px; }

  /* Il palo si stende in orizzontale e resta in cima mentre si scorre */
  .palo { position: sticky; top: 0; bottom: auto; width: 100%; flex-direction: column; }
  .palo__strisce { width: 100%; height: 10px; }
  .palo ul { flex-direction: row; justify-content: space-between; gap: 0; padding: 0 12px; }
  .palo__sedi { display: list-item; }
  .palo a { padding: 13px 6px; }
  .palo a::before { display: none; }

  .capitolo { grid-template-columns: 1fr; gap: 20px; scroll-margin-top: 62px; }
  .capitolo__anno { position: static; font-size: clamp(84px, 26vw, 150px); }
  .listino__griglia { grid-template-columns: 1fr; }
  .tagli { grid-template-columns: repeat(2, 1fr); }
  .tagli img:nth-child(3n + 2) { margin-top: 0; }
  .tagli img:nth-child(even) { margin-top: 24px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 62px; }
  .gabbia { width: calc(100% - 32px); }
  .porta__testo { padding: 0 18px 22px; }
  .porta .azioni .pulsante { flex: 1; padding: 0 12px; }
  .orari th, .orari td { padding: 8px 5px; font-size: 15px; }
  .palo a { font-size: 14px; padding: 13px 3px; }
  .ricordo { padding: 10px 10px 8px; }
  .prezzi dt, .prezzi dd { font-size: 21px; }
  .chiamate { width: 100%; }
  .chiamate a { padding: 12px; }
  .chiamate b { font-size: 19px; }
  .piede__riga { flex-direction: column; align-items: flex-start; }
  .piede__fine { text-align: left; }
  .barra-telefono {
    position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    background: rgba(255,255,255,.2);
  }
  .barra-telefono a { display: block; padding: 8px 6px 9px; background: var(--inchiostro); color: #fff; text-align: center; text-decoration: none; font-weight: 700; font-size: 16px; line-height: 1.2; }
  .barra-telefono small { display: block; font-size: 12.5px; font-weight: 500; color: var(--verde); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .porta, .porta > img, .porta__piega, .insegna, .pulsante, .palo a { transition: none; }
  .porta:hover > img, .porta:focus-within > img { transform: none; }
}
