/* ==========================================================================
   RETALIA — foglio di stile unico
   Palette e impaginazione derivate dalle brochure Studio e Infrastrutture.
   ========================================================================== */

:root {
  /* Colori */
  --ink:        #1B1916;   /* fondo scuro delle brochure */
  --ink-deep:   #121110;
  --ink-panel:  #24211D;   /* riquadri su fondo scuro */
  --cream:      #F7F4EE;
  --cream-warm: #EFEAE1;
  --paper:      #FCFAF6;

  --gold:       #B8945A;   /* oro delle brochure */
  --gold-soft:  #D6BC8C;
  --gold-deep:  #9A7B44;

  --text:       #423D35;
  --text-mute:  #6F6960;
  --text-light: #C9C2B6;   /* testo su fondo scuro */
  --text-faint: #8D877C;

  --rule:       #E3DDD2;
  --rule-dark:  rgba(184, 148, 90, 0.22);

  /* Tipografia */
  --display: "Bodoni Moda", "Didot", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Misure */
  --wrap: 1180px;
  --gutter: 24px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* --- Impaginazione ------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap--narrow { max-width: 880px; }

.band { padding: 96px 0; }
.band--tight { padding: 64px 0; }
.band--cream { background: var(--cream); }
.band--paper { background: var(--paper); }
.band--warm  { background: var(--cream-warm); }
.band--dark  { background: var(--ink); color: var(--text-light); }
.band--deep  { background: var(--ink-deep); color: var(--text-light); }

.band--dark h2, .band--dark h3, .band--dark h4,
.band--deep h2, .band--deep h3, .band--deep h4 { color: #F3EFE7; }

/* --- Tipografia --------------------------------------------------------- */
.eyebrow {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 18px;
}
.band--dark .eyebrow, .band--deep .eyebrow { color: var(--gold); }

.eyebrow .en {
  color: var(--text-faint);
  font-weight: 400;
  margin-left: 10px;
}
.band--dark .eyebrow .en, .band--deep .eyebrow .en { color: #6B6459; }

h1, h2, h3, h4 { font-weight: 400; margin: 0 0 16px; }

.h-display {
  font-family: var(--display);
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: #2A251E;
}
.band--dark .h-display, .band--deep .h-display { color: #F6F2EA; }

.lede {
  font-size: clamp(16px, 2vw, 18.5px);
  font-style: italic;
  line-height: 1.62;
  color: var(--text-mute);
  max-width: 62ch;
  margin: 0 0 34px;
}
.band--dark .lede, .band--deep .lede { color: #A9A296; }

.prose { max-width: 68ch; }
.prose p { margin: 0 0 18px; }
.prose strong { font-weight: 600; color: #2F2A23; }
.band--dark .prose strong, .band--deep .prose strong { color: var(--gold-soft); }

/* Frase di chiusura sezione: nera + oro corsivo, come nelle brochure */
.pull {
  margin: 64px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
  max-width: 780px;
}
.band--dark .pull, .band--deep .pull { border-top-color: var(--rule-dark); }

.pull p.statement {
  font-family: var(--display);
  font-size: clamp(21px, 2.9vw, 28px);
  line-height: 1.42;
  font-weight: 600;
  color: #23201A;
  margin: 0 0 14px;
}
.band--dark .pull p.statement, .band--deep .pull p.statement { color: #F3EFE7; }

.pull p.statement em {
  font-weight: 500;
  font-style: italic;
  color: var(--gold-deep);
}
.band--dark .pull p.statement em,
.band--deep .pull p.statement em { color: var(--gold-soft); }

.pull p.note { font-size: 15px; color: var(--text-mute); margin: 0; }
.band--dark .pull p.note, .band--deep .pull p.note { color: #948D82; }

.caption {
  font-size: 13px;
  font-style: italic;
  color: var(--gold-deep);
  text-align: center;
  margin-top: 26px;
}
.band--dark .caption, .band--deep .caption { color: var(--gold); }

/* --- Griglie ------------------------------------------------------------ */
.grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.band--dark .grid, .band--deep .grid {
  background: var(--rule-dark);
  border-color: var(--rule-dark);
}

.cell { background: var(--paper); padding: 30px 28px; }
.band--warm .cell { background: var(--paper); }
.band--dark .cell, .band--deep .cell { background: var(--ink-panel); }

.cell h3 {
  font-family: var(--body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #2C271F;
  margin: 0 0 10px;
}
.band--dark .cell h3, .band--deep .cell h3 { color: #F1ECE3; }

.cell h3.serif {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  color: var(--gold-deep);
}
.band--dark .cell h3.serif, .band--deep .cell h3.serif { color: var(--gold-soft); }

.cell p { font-size: 14.5px; line-height: 1.65; color: var(--text-mute); margin: 0 0 10px; }
.cell p:last-child { margin-bottom: 0; }
.band--dark .cell p, .band--deep .cell p { color: #A29B90; }

/* Pallino numerato delle brochure */
.dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold-soft);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  font-family: var(--display);
}
.band--dark .dot, .band--deep .dot { background: #0F0E0C; border: 1px solid var(--rule-dark); }
.dot--gold { background: var(--gold); color: #221E17; }

/* Etichetta 01 / 02 / 03 su fondo oro */
.tag {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  font-weight: 600;
  padding: 5px 11px;
  background: rgba(184, 148, 90, 0.16);
  color: var(--gold-deep);
  margin-bottom: 18px;
}
.band--dark .tag, .band--deep .tag { background: rgba(184, 148, 90, 0.2); color: var(--gold-soft); }
.tag--solid { background: var(--gold); color: #211D16; }

/* --- Elenchi ------------------------------------------------------------ */
.ticks { list-style: none; margin: 22px 0 0; padding: 0; }
.ticks li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 11px;
  color: var(--text-mute);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 10px;
  width: 6px; height: 1px;
  background: var(--gold);
}
.band--dark .ticks li, .band--deep .ticks li { color: #A29B90; }

/* --- Tabella a due colonne (voce / spiegazione) ------------------------- */
.deftable { border-top: 1px solid var(--rule); margin-top: 8px; }
.deftable .row {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--rule);
}
.deftable .key { font-size: 15px; font-weight: 600; color: #2C271F; }
.deftable .val { font-size: 14.5px; color: var(--text-mute); }
.band--dark .deftable, .band--deep .deftable { border-top-color: var(--rule-dark); }
.band--dark .deftable .row, .band--deep .deftable .row { border-bottom-color: var(--rule-dark); }
.band--dark .deftable .key, .band--deep .deftable .key { color: #EFE9DF; }
.band--dark .deftable .val, .band--deep .deftable .val { color: #A29B90; }

/* --- Listino ------------------------------------------------------------ */
.pricing { width: 100%; border-collapse: collapse; margin-top: 10px; }
.pricing th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-deep);
  padding: 0 16px 14px 0;
  border-bottom: 1px solid var(--rule);
}
.pricing td {
  vertical-align: top;
  padding: 20px 16px 20px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14.5px;
  color: var(--text-mute);
}
.pricing .service { font-size: 15px; font-weight: 600; color: #2C271F; }
.pricing .service small { display: block; font-weight: 400; font-size: 12.5px; color: var(--text-faint); margin-top: 3px; }
.pricing .amount { font-family: var(--display); font-size: 19px; color: var(--gold-deep); white-space: nowrap; }
.band--dark .pricing th, .band--deep .pricing th { border-bottom-color: var(--rule-dark); color: var(--gold); }
.band--dark .pricing td, .band--deep .pricing td { border-bottom-color: var(--rule-dark); color: #A29B90; }
.band--dark .pricing .service, .band--deep .pricing .service { color: #EFE9DF; }
.band--dark .pricing .amount, .band--deep .pricing .amount { color: var(--gold-soft); }

/* --- Riquadro nota ------------------------------------------------------ */
.notebox {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 26px 28px;
  margin-top: 28px;
  font-size: 14.5px;
  color: var(--text-mute);
}
.notebox p { margin: 0 0 12px; }
.notebox p:last-child { margin: 0; }
.band--dark .notebox, .band--deep .notebox {
  border-color: var(--rule-dark);
  background: rgba(255, 255, 255, 0.02);
  color: #A29B90;
}

/* --- Numeri --------------------------------------------------------------*/
.figure { font-family: var(--display); font-size: 42px; line-height: 1; color: var(--gold); display: block; margin-bottom: 12px; }
.cell--center { text-align: center; }

/* --- Intestazione ------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  padding: 18px 0;
  transition: background 0.35s ease, padding 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: rgba(23, 21, 18, 0.94);
  backdrop-filter: blur(8px);
  padding: 12px 0;
  border-bottom-color: var(--rule-dark);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.monogram {
  width: 36px; height: 36px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 16px;
  color: var(--gold);
  flex: 0 0 auto;
}
.brand .name {
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 0.26em;
  color: #F4F0E8;
  line-height: 1;
}
.brand .division {
  display: block;
  font-family: var(--body);
  font-size: 8.5px;
  letter-spacing: 0.42em;
  color: var(--gold);
  margin-top: 5px;
}

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: #CFC8BC;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav a:hover, .nav a:focus-visible { color: var(--gold-soft); border-bottom-color: var(--gold); }
.nav a.current { color: var(--gold); border-bottom-color: var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule-dark);
  color: var(--gold-soft);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 9px 14px;
  cursor: pointer;
}

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--text-light);
  padding: 190px 0 90px;
  overflow: hidden;
}
.hero--photo::before {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
  opacity: 0.28;
}
.hero--photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(18,17,16,0.96) 20%, rgba(18,17,16,0.55) 100%);
}
.hero .wrap { position: relative; z-index: 2; }

.hero .wordmark {
  font-family: var(--display);
  font-size: clamp(46px, 10vw, 104px);
  line-height: 1;
  letter-spacing: 0.16em;
  color: #F8F5EF;
  margin: 0;
}
.hero .division-label {
  font-size: clamp(11px, 1.6vw, 14px);
  letter-spacing: 0.62em;
  color: var(--gold);
  margin: 14px 0 20px;
  font-weight: 500;
}
.hero .claim {
  font-style: italic;
  font-size: clamp(15px, 2vw, 18px);
  color: #ADA69A;
  max-width: 56ch;
  margin: 0 0 40px;
}
.hero .thesis {
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 34px);
  line-height: 1.36;
  font-weight: 600;
  color: #F6F2EA;
  max-width: 20ch;
  margin: 0;
}
.hero .thesis em { font-weight: 500; font-style: italic; color: var(--gold-soft); }

.hero-foot {
  margin-top: 70px;
  padding-top: 22px;
  border-top: 1px solid var(--rule-dark);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #7C7669;
}
.hero-foot span { color: var(--gold); margin: 0 4px; }

/* --- Il diaframma: le due anime dello studio ---------------------------- */
.diaframma { display: flex; min-height: 66vh; background: var(--ink-deep); }

.anima {
  position: relative;
  flex: 1 1 50%;
  display: block;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: flex-grow 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  border: 0;
}
.anima + .anima { border-left: 1px solid var(--gold); }

.anima .photo {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
  opacity: 0.42;
}
.anima::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,14,12,0.55) 0%, rgba(15,14,12,0.92) 78%);
}
.anima .content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px clamp(28px, 5vw, 64px) 52px;
}
.anima .kicker {
  font-size: 10.5px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}
.anima h2 {
  font-family: var(--display);
  font-size: clamp(26px, 3.6vw, 40px);
  letter-spacing: 0.06em;
  color: #F7F4EE;
  margin: 0 0 12px;
}
.anima p { font-size: 15px; color: #B3ABA0; max-width: 42ch; margin: 0 0 26px; }
.anima .enter {
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.anima .enter::after {
  content: "";
  width: 30px; height: 1px;
  background: var(--gold);
  transition: width 0.4s ease;
}
.anima:hover .photo, .anima:focus-visible .photo { transform: scale(1); opacity: 0.6; }
.anima:hover .enter::after, .anima:focus-visible .enter::after { width: 56px; }

@media (hover: hover) and (min-width: 861px) {
  .diaframma:hover .anima { flex-grow: 0.82; }
  .diaframma .anima:hover { flex-grow: 1.36; }
}

/* --- Bottoni ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 30px;
  border: 1px solid var(--gold);
  color: var(--gold-deep);
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn:hover, .btn:focus-visible { background: var(--gold); color: #211D16; }
.band--dark .btn, .band--deep .btn, .hero .btn { color: var(--gold-soft); }
.band--dark .btn:hover, .band--deep .btn:hover, .hero .btn:hover { color: #211D16; }
.btn + .btn { margin-left: 12px; }
.btn-row { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row .btn + .btn { margin-left: 0; }

/* --- Team --------------------------------------------------------------- */
.person { display: flex; gap: 22px; align-items: flex-start; }
.person img {
  width: 92px; height: 92px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  filter: grayscale(100%) contrast(1.04);
  transition: filter 0.5s ease;
}
.person:hover img { filter: grayscale(0%); }
.person .role {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.band--dark .person .role, .band--deep .person .role { color: var(--gold); }
.person h3 { font-family: var(--display); font-size: 21px; margin: 0 0 10px; }

/* --- Figura fotografica ------------------------------------------------- */
.figure-photo { margin: 42px 0 0; }
.figure-photo img { width: 100%; height: clamp(220px, 34vw, 420px); object-fit: cover; }
.figure-photo figcaption {
  padding: 16px 20px;
  background: var(--ink-panel);
  border-left: 1px solid var(--gold);
}
.figure-photo .label {
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 5px;
}
.figure-photo .text { font-size: 13.5px; font-style: italic; color: #9A9388; }

/* --- Contatti ----------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; margin-top: 40px; }
.contact-grid h3 { font-family: var(--display); font-size: 22px; color: var(--gold-deep); }
.band--dark .contact-grid h3, .band--deep .contact-grid h3 { color: var(--gold); }
.contact-list { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.contact-list li { margin-bottom: 9px; color: var(--text-mute); }
.band--dark .contact-list li, .band--deep .contact-list li { color: #A29B90; }
.contact-list .k { font-weight: 600; color: #2C271F; }
.band--dark .contact-list .k, .band--deep .contact-list .k { color: #EFE9DF; }
.contact-list a { color: var(--gold-deep); text-decoration: none; border-bottom: 1px solid rgba(184,148,90,0.35); }
.band--dark .contact-list a, .band--deep .contact-list a { color: var(--gold-soft); }
.contact-list a:hover { border-bottom-color: var(--gold); }

/* --- Piede -------------------------------------------------------------- */
.site-footer { background: var(--ink-deep); color: #7C7669; padding: 54px 0 38px; font-size: 13px; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; align-items: flex-start; }
.site-footer a { color: #9C9488; text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); }
.site-footer .legal { margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.06); font-size: 12px; color: #665F55; }
.site-footer .footer-nav { display: flex; flex-direction: column; gap: 8px; }

/* --- Comparsa allo scroll ----------------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22,1,0.36,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* --- Accessibilità ------------------------------------------------------ */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.skip {
  position: absolute; left: -9999px;
  background: var(--gold); color: #1B1916;
  padding: 12px 18px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .anima, .anima .photo, .diaframma:hover .anima { transition: none; }
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .deftable .row { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 860px) {
  .band { padding: 68px 0; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .diaframma { flex-direction: column; min-height: 0; }
  .anima { min-height: 46vh; }
  .anima + .anima { border-left: 0; border-top: 1px solid var(--gold); }
  .hero { padding: 150px 0 70px; }

  .nav {
    position: fixed;
    inset: 0 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(18,17,16,0.985);
    padding: 92px 26px 34px;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
    height: 100vh;
  }
  .nav.is-open { transform: none; }
  .nav a { font-size: 15px; letter-spacing: 0.1em; padding: 16px 0; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .nav-toggle { display: block; position: relative; z-index: 70; }
  .person { flex-direction: column; }
}

@media (max-width: 620px) {
  .pricing thead { display: none; }
  .pricing tr { display: block; border-bottom: 1px solid var(--rule); padding: 18px 0; }
  .pricing td { display: block; border: 0; padding: 3px 0; }
  .band--dark .pricing tr, .band--deep .pricing tr { border-bottom-color: var(--rule-dark); }
  .btn { width: 100%; text-align: center; }
}

/* --- Stampa ------------------------------------------------------------- */
@media print {
  .site-header, .nav-toggle, .diaframma { display: none; }
  body { background: #fff; color: #000; }
  .band--dark, .band--deep { background: #fff; color: #000; }
}
