/* CSB 4 Giugno · biliardimagenta.it */

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 300 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ink: #0d100e;
  --ink-2: #141915;
  --felt: #1d4436;
  --felt-lit: #2c6a52;
  --wood: #3a2519;
  --cream: #ece6d8;
  --cream-dim: #b9b3a5;
  --mute: #8a877d;
  --red: #c4222f;
  --amber: #d9a13b;
  --line: rgba(236, 230, 216, .14);

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gut: clamp(20px, 5vw, 72px);
  --max: 1320px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-stretch: 96%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 8 4 4; }
h1, h2, h3 { margin: 0; font-weight: 400; }
::selection { background: var(--amber); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--cream);
  color: var(--ink);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* ---------- tipografia ---------- */

.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(46px, 8.4vw, 132px);
  line-height: .94;
  letter-spacing: -.022em;
  font-optical-sizing: auto;
  text-wrap: balance;
}
p.display, p.lede { margin: 0; }
.display em { font-style: italic; font-weight: 300; }
.display--md { font-size: clamp(38px, 5.6vw, 84px); line-height: .98; }
.display--sm { font-size: clamp(30px, 3.4vw, 50px); line-height: 1.04; letter-spacing: -.015em; }

.kicker {
  font-family: var(--sans);
  font-stretch: 72%;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin: 0 0 22px;
}
.kicker--red { color: #e0525b; }
.kicker--amber { color: var(--amber); }

.lede {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.22;
  font-weight: 300;
  letter-spacing: -.01em;
}

.link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color .25s, border-color .25s;
}
.link:hover { color: var(--amber); }

/* ---------- header ---------- */

.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px var(--gut);
  transition: background-color .4s, padding .4s;
}
.top.is-solid {
  background: rgba(13, 16, 14, .86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.top__logo img { width: 168px; }
.top__nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 14px;
  font-stretch: 88%;
}
.top__nav a,
.top__call {
  text-decoration: none;
  color: var(--cream-dim);
  transition: color .2s;
}
.top__nav a:hover,
.top__call:hover { color: var(--cream); }
.top__call {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

@media (max-width: 860px) {
  .top__nav { display: none; }
  .top__call { margin-left: auto; border: 0; padding: 0; }
  .top__logo img { width: 140px; }
}

/* ---------- diamanti della sponda ---------- */

.rail {
  position: fixed;
  right: 22px;
  top: 50%;
  z-index: 40;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 7px;
  border-radius: 2px;
  background: linear-gradient(90deg, #2a1a11, #3f291c 55%, #2a1a11);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35);
  opacity: 0;
  transition: opacity .5s;
}
.rail.is-on { opacity: 1; }
.rail a {
  display: block;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: #cfc2a3;
  opacity: .45;
  transition: opacity .3s, background-color .3s;
}
.rail a:hover { opacity: .9; }
.rail a.is-active { opacity: 1; background: var(--amber); }

@media (max-width: 860px) { .rail { display: none; } }

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: 420vh;
}
.hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #0f1d17;
}
.hero__canvas,
.hero__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__canvas {
  transform: scale(var(--zoom, 1.08));
  transform-origin: 60% 45%;
}
.hero__poster { transition: opacity .6s; }
.hero.is-ready .hero__poster { opacity: 0; }

/* luce della lampada e fondo per il testo */
.hero__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13, 16, 14, .55) 0%, rgba(13, 16, 14, 0) 26%),
    linear-gradient(0deg, rgba(13, 16, 14, .92) 0%, rgba(13, 16, 14, .35) 34%, rgba(13, 16, 14, 0) 58%),
    linear-gradient(90deg, rgba(13, 16, 14, .6) 0%, rgba(13, 16, 14, 0) 55%);
}

.hero__bars span {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  height: calc(var(--bars, 1) * 11vh);
  background: var(--ink);
}
.hero__bars span:first-child { top: 0; }
.hero__bars span:last-child { bottom: 0; }

.hero__beat {
  position: absolute;
  z-index: 4;
  left: var(--gut);
  right: var(--gut);
  bottom: calc(11vh + 5vh);
  max-width: 1100px;
  opacity: 0;
  visibility: hidden;
  will-change: opacity, transform;
}
.hero__beat--a { bottom: calc(14vh); }
.hero__beat--b .lede { max-width: 17em; }
.hero__beat--c { bottom: 9vh; }
.hero__note {
  max-width: 34em;
  margin-top: 28px;
  color: var(--cream-dim);
  font-size: 16px;
}

.hero__hint {
  position: absolute;
  z-index: 4;
  right: var(--gut);
  bottom: calc(11vh * var(--bars, 1) + 22px);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-stretch: 72%;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cream-dim);
  opacity: calc(1 - var(--p, 0) * 8);
}
.hero__hint span {
  width: 1px;
  height: 38px;
  background: linear-gradient(var(--cream-dim), transparent);
  animation: drip 2.4s var(--ease) infinite;
  transform-origin: top;
}
@keyframes drip {
  0% { transform: scaleY(0); }
  55% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* movimento ridotto: una scena ferma, testo leggibile (per chi è senza JS c'è nojs.css) */
@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero__stage { position: relative; min-height: 560px; }
  .hero__canvas { transform: none; }
  .hero__beat--a { opacity: 1; visibility: visible; }
  .hero__beat--b, .hero__beat--c, .hero__bars, .hero__hint { display: none; }
  .reveal img { transition: none; }
}

/* ---------- la sala ---------- */

.sala { padding: clamp(96px, 16vh, 180px) 0 clamp(72px, 10vh, 120px); }
.sala__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: end;
}
.sala__text h2 { margin-bottom: 40px; }
.sala__text p { max-width: 33em; color: var(--cream-dim); }
.sala__text p:first-of-type { color: var(--cream); font-size: 19px; }
.sala__fig { margin: 0; }

.ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(64px, 10vh, 110px) 0 0;
  border-top: 1px solid var(--line);
}
.ledger div {
  padding: 22px 24px 0 0;
}
.ledger dt {
  font-size: 12px;
  font-stretch: 72%;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 6px;
}
.ledger dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-variant-numeric: lining-nums tabular-nums;
}

@media (max-width: 900px) {
  .sala__grid { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: 1fr 1fr; row-gap: 20px; }
}

/* ---------- due strade ---------- */

.strade { padding: clamp(40px, 8vh, 90px) 0 0; }
.strade__head { margin-bottom: clamp(56px, 10vh, 110px); }

.strada {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(36px, 6vw, 104px);
  align-items: start;
  max-width: var(--max);
  margin: 0 auto clamp(96px, 16vh, 180px);
  padding: 0 var(--gut);
}
.strada--flip { grid-template-columns: 6fr 5fr; }
.strada--flip .strada__fig { order: 2; }
.strada__fig {
  margin: 0;
  position: sticky;
  top: 96px;
}
.strada__text { padding-top: clamp(0px, 6vh, 64px); }
.strada__text h2,
.strada__text h3 { margin-bottom: 32px; }
.strada__text > p { max-width: 31em; color: var(--cream-dim); }
.strada__text > p:first-of-type { color: var(--cream); }

.facts { margin: 36px 0 34px; }
.facts div {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt {
  font-size: 12px;
  font-stretch: 72%;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute);
  padding-top: 4px;
}
.facts dd { margin: 0; font-size: 16px; }

@media (max-width: 900px) {
  .strada,
  .strada--flip { grid-template-columns: 1fr; }
  .strada--flip .strada__fig { order: 0; }
  .strada__fig { position: static; }
  .strada__text { padding-top: 0; }
}

/* ---------- immagini: si aprono come una tenda ---------- */

.reveal { overflow: hidden; }
.reveal img {
  transition: clip-path 1.4s var(--ease), transform 1.8s var(--ease);
}
.js .reveal:not(.is-in) img {
  clip-path: inset(100% 0 0 0);
  transform: scale(1.12);
}
.reveal.is-in img { clip-path: inset(0 0 0 0); transform: none; }

/* ---------- visione ---------- */

.visione {
  position: relative;
  min-height: 110vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.visione__bg {
  position: absolute;
  inset: -12% 0;
  z-index: -1;
}
.visione__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  transform: translateY(var(--shift, 0));
  filter: brightness(.55) saturate(.85);
}
.visione::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--ink) 0%, rgba(13, 16, 14, .1) 30%, rgba(13, 16, 14, .1) 60%, var(--ink) 100%),
    linear-gradient(90deg, rgba(13, 16, 14, .75) 0%, rgba(13, 16, 14, .15) 70%);
}
.visione__quote { margin: 0 auto; padding-top: 12vh; padding-bottom: 12vh; }
.visione blockquote { margin: 0; }
.visione blockquote p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(30px, 4.4vw, 64px);
  line-height: 1.12;
  letter-spacing: -.015em;
  max-width: 19em;
  text-indent: -.42em;
  hyphens: manual;
}
.visione blockquote em { color: var(--amber); }
.visione figcaption {
  margin-top: 36px;
  font-size: 14px;
  color: var(--cream-dim);
}

/* ---------- orari ---------- */

.orari { padding: clamp(40px, 8vh, 90px) 0 clamp(96px, 16vh, 180px); }
.orari__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 7vw, 120px);
}
.orari__fig { margin: 48px 0 0; max-width: 480px; }

.hours {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: lining-nums tabular-nums;
}
.hours caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.hours tr { border-top: 1px solid var(--line); }
.hours tr:last-child { border-bottom: 1px solid var(--line); }
.hours th,
.hours td {
  padding: 16px 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.2;
  text-align: left;
}
.hours td { text-align: right; }
.hours td span {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--mute);
  margin: 0 6px;
}
.hours tr.is-today th,
.hours tr.is-today td { color: var(--amber); }
.hours tr.is-today th::after {
  content: attr(data-now);
  margin-left: 14px;
  font-family: var(--sans);
  font-size: 11px;
  font-stretch: 72%;
  letter-spacing: .16em;
  text-transform: uppercase;
  vertical-align: middle;
}
.hours__note {
  margin-top: 26px;
  color: var(--cream-dim);
  max-width: 30em;
}
.hours__note a { color: var(--cream); }

@media (max-width: 900px) {
  .orari__grid { grid-template-columns: 1fr; }
}

/* ---------- prossimamente ---------- */

.presto {
  padding: clamp(56px, 9vh, 96px) 0;
  border-top: 1px solid var(--line);
}
.presto__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: baseline;
}
.presto h2 { margin-bottom: 16px; }
.presto p:not(.kicker) { color: var(--cream-dim); max-width: 32em; margin: 0; }

@media (max-width: 900px) {
  .presto__grid { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- faq ---------- */

.faq {
  padding: clamp(80px, 12vh, 140px) 0;
  background: var(--ink-2);
  border-top: 1px solid var(--line);
}
.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 120px);
}
.faq__list details { border-top: 1px solid var(--line); }
.faq__list details:last-child { border-bottom: 1px solid var(--line); }
.faq__list summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font-family: var(--serif);
  font-size: clamp(21px, 1.9vw, 26px);
  line-height: 1.25;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: .55em;
  border-right: 1.5px solid var(--cream-dim);
  border-bottom: 1.5px solid var(--cream-dim);
  transform: rotate(45deg);
  transition: transform .3s var(--ease);
}
.faq__list details[open] summary::after { transform: rotate(-135deg); }
.faq__list summary:hover { color: var(--amber); }
.faq__list details p {
  max-width: 36em;
  color: var(--cream-dim);
  padding-bottom: 24px;
  margin: 0;
}

@media (max-width: 900px) {
  .faq__grid { grid-template-columns: 1fr; }
}

/* ---------- contatti ---------- */

.contatti {
  position: relative;
  padding: clamp(110px, 20vh, 220px) 0 clamp(90px, 14vh, 160px);
  overflow: hidden;
  isolation: isolate;
}
.contatti__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.contatti__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  filter: brightness(.42) saturate(.8);
}
.contatti::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--ink) 0%, rgba(13, 16, 14, .2) 35%, rgba(13, 16, 14, .75) 100%);
}
.contatti__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: end;
}
.contatti__list { font-style: normal; }
.contatti__list p {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 16px;
  padding: 16px 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.contatti__list span {
  font-size: 12px;
  font-stretch: 72%;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute);
  padding-top: 7px;
}
.contatti__list a {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.2;
  text-decoration: none;
  font-variant-numeric: lining-nums;
  overflow-wrap: anywhere;
}
.contatti__list a:hover { color: var(--amber); }
.contatti__list .contatti__note {
  display: block;
  color: var(--cream-dim);
  font-size: 15px;
  padding-top: 22px;
}

@media (max-width: 900px) {
  .contatti__grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .contatti__list p,
  .facts div { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- footer ---------- */

.foot {
  padding: 56px 0 64px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--mute);
}
.foot__grid {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.foot__logo { width: 180px; }
.foot p { margin: 0; line-height: 1.7; }

@media (max-width: 760px) {
  .foot__grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- 404 ---------- */

.e404 { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.e404__txt { margin-top: 32px; color: var(--cream-dim); max-width: 30em; }
