/*
 * Studio Grison & Partners: "il bilancio" design system.
 *
 * A printed annual on screen: one grotesk (Switzer, self-hosted), paper, ink and one
 * saturated colour (the crimson of the Ordine). Everything hangs from a vertical axis
 * at 42% of the viewport. No gradients, no shadows at rest, no hairlines.
 *
 * Loaded by every page. Home (body.home) uses only this file; the inner pages also load
 * the legacy Bootstrap/template CSS and are bridged in grison-pages.css.
 */

@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f1f0ed;
  --stone: #e1dfda;
  --ink: #1c1b1d;
  --ink-2: #262427;
  --soft: #58555b;
  --soft-on-ink: #b9b5bb;
  --red: #a31125;
  --red-deep: #7b0c1c;

  --m: clamp(16px, 2.2vw, 32px);
  --axis: 42vw;
  --head-h: 56px;

  --step-small: 1rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-statement: clamp(1.375rem, 1rem + 1.3vw, 2.125rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4.25rem);
  --step-display: clamp(2.6rem, 7vw, 7.25rem);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--head-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Switzer", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.005em;
  text-align: left;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.home {
  height: auto;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.98;
  color: inherit;
  text-wrap: balance;
}

p {
  margin: 0;
  color: inherit;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: inherit;
}

::selection {
  background: var(--red);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  box-shadow: none; /* taste-skill-ignore */
}

.on-dark :focus-visible,
.on-red :focus-visible,
.site-foot :focus-visible,
.cookie-banner :focus-visible {
  outline-color: var(--paper);
}

.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px; /* taste-skill-ignore */
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 8px;
  top: -80px;
  z-index: 10000;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 18px;
  font-weight: 500;
}

.skip-link:focus {
  top: 8px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px; /* taste-skill-ignore */
  overflow: hidden;
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 0;
  background: var(--red);
  color: #fff;
  font: 500 var(--step-body) / 1.2 "Switzer", system-ui, sans-serif;
  letter-spacing: -0.005em;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn--paper {
  background: var(--paper);
  color: var(--red-deep);
}

.btn--ink {
  background: var(--ink);
  color: var(--paper);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background: var(--red-deep);
    color: #fff;
  }
  .btn--paper:hover {
    background: #fff;
    color: var(--red-deep);
  }
  .btn--ink:hover {
    background: var(--red);
    color: #fff;
  }
}

.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-underline-offset 160ms var(--ease-out), color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .link:hover {
    text-underline-offset: 0.4em;
  }
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  cursor: pointer;
}

/* ---------- Header: ink block, crimson tab, paper strip ---------- */
.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: grid;
  grid-template-columns: var(--axis) 1fr;
  height: var(--head-h);
  background: var(--paper);
}

.site-head__left {
  display: flex;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 0 22px 0 var(--m);
  background: var(--ink);
  color: var(--paper);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand img {
  width: 28px;
  height: 27px;
  border-radius: 50%;
}

.brand:hover {
  color: var(--paper);
}

.site-nav {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  background: var(--red);
}

.site-nav__list {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 0 14px;
}

.site-nav__list > li {
  position: relative;
  display: flex;
}

.site-nav__list a,
.site-nav__list button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: #fff;
  font: 500 1rem / 1 "Switzer", system-ui, sans-serif;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .site-nav__list > li > a:hover,
  .site-nav__list > li > button:hover,
  .site-nav__list > li:focus-within > button {
    background: var(--red-deep);
    color: #fff;
  }
}

.site-nav__list a.is-active {
  background: var(--red-deep);
}

.site-nav .caret {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 200ms var(--ease-out);
}

.site-nav .has-sub[aria-expanded="true"] .caret,
.site-nav__list > li:hover > .has-sub .caret {
  transform: rotate(225deg) translate(-2px, -2px);
}

.site-nav .has-dropdown > a {
  padding-right: 4px;
}

.site-nav .has-dropdown > .has-sub {
  padding: 0 12px 0 4px;
}

.site-nav__sub {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 270px;
  padding: 8px 0;
  background: var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 120ms ease, transform 120ms ease-out, visibility 0s linear 120ms;
}

.site-nav__sub a {
  padding: 13px 22px;
  color: var(--paper);
  font-size: 1rem;
}

@media (hover: hover) and (pointer: fine) {
  .site-nav__sub a:hover {
    background: var(--red);
    color: #fff;
  }
}

.has-dropdown:hover > .site-nav__sub,
.has-dropdown:focus-within > .site-nav__sub,
.has-dropdown.is-open > .site-nav__sub {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s;
}

.site-head__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding-left: var(--m);
}

.head-phone {
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.site-head__right .btn {
  align-self: stretch;
  min-height: 0;
  padding: 0 28px;
}

.menu-toggle {
  display: none;
}

.only-mobile {
  display: none !important;
}

@media (max-width: 1099px) {
  .site-head {
    grid-template-columns: 1fr auto;
  }

  .site-head__right {
    display: none;
  }

  .site-nav {
    position: fixed;
    inset: var(--head-h) 0 0 0;
    z-index: 99;
    display: block;
    padding: 28px var(--m) 40px;
    overflow-y: auto;
    background: var(--ink);
    color: var(--paper);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 200ms ease, transform 200ms var(--ease-out), visibility 0s linear 200ms;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .site-nav__list > li {
    flex-direction: column;
  }

  .site-nav__list > li.has-dropdown {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .site-nav__list > li.has-dropdown > a {
    flex: 1 1 auto;
    width: auto;
  }

  .site-nav__list > li.has-dropdown > .has-sub {
    flex: 0 0 auto;
    width: auto;
    padding: 14px 6px 14px 20px;
  }

  .site-nav__list > li.has-dropdown > .site-nav__sub {
    flex: 1 0 100%;
  }

  .site-nav__list a,
  .site-nav__list button {
    padding: 14px 0;
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.05;
    justify-content: space-between;
    width: 100%;
  }

  .site-nav__list a.is-active {
    background: none;
    color: var(--soft-on-ink);
  }

  .site-nav__sub {
    position: static;
    display: none;
    min-width: 0;
    padding: 0 0 12px;
    background: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .has-dropdown.is-open > .site-nav__sub {
    display: block;
  }

  .has-dropdown:hover > .site-nav__sub {
    display: none;
  }

  .has-dropdown.is-open:hover > .site-nav__sub {
    display: block;
  }

  .site-nav__sub a {
    padding: 8px 0;
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--soft-on-ink);
  }

  .only-mobile {
    display: flex !important;
  }

  .site-nav__list .only-mobile a {
    font-size: var(--step-lead);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--paper);
  }

  .menu-toggle {
    display: block;
    padding: 0 var(--m);
    border: 0;
    background: var(--red);
    color: #fff;
    font: 500 1rem / 1 "Switzer", system-ui, sans-serif;
    cursor: pointer;
    transition: transform 160ms var(--ease-out), background-color 160ms ease;
  }

  .menu-toggle:active {
    transform: scale(0.97);
  }

  .brand {
    padding-right: 16px;
    font-size: 1rem;
  }
}

@media (max-width: 420px) {
  .brand .brand__amp {
    display: none;
  }
}

/* ---------- Masthead (home) ---------- */
.masthead {
  padding-top: var(--head-h);
  background: var(--paper);
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, 1fr);
  height: clamp(300px, calc(52svh - var(--head-h)), 540px);
  background: var(--ink);
}

.cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter 500ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .cell:hover img {
    filter: grayscale(0) contrast(1.02); /* taste-skill-ignore */
  }
}

.c-pacioli {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}
.c-pacioli img {
  object-position: 50% 30%;
  transform-origin: 50% 40%;
  animation: drift 26s var(--ease-in-out) infinite alternate;
}
.c-red {
  grid-column: 3;
  grid-row: 1 / 3;
  background: var(--red);
  color: #fff;
}
.c-summa {
  grid-column: 4 / 6;
  grid-row: 1;
}
.c-summa img {
  object-position: 50% 52%;
  transform: scale(1.55);
  transform-origin: 50% 45%;
}
.c-ink {
  grid-column: 6;
  grid-row: 1;
  background: var(--ink-2);
  color: var(--paper);
}

.caption {
  display: flex;
  align-items: flex-end;
  padding: 18px 20px;
}

.caption p {
  font-size: var(--step-small);
  line-height: 1.4;
}
.c-chiesa {
  grid-column: 4;
  grid-row: 2;
}
.c-chiesa img {
  object-position: 34% 60%;
}
.c-mani {
  grid-column: 5 / 7;
  grid-row: 2;
}
.c-mani img {
  object-position: 55% 40%;
}

@keyframes drift {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.07);
  }
}

.status {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 20px;
}

.status__state {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--step-lead);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.status__dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
}

.status.is-open .status__dot {
  animation: beat 2.4s ease-in-out infinite;
}

@keyframes beat {
  50% {
    opacity: 0.3;
  }
}

.status__next {
  font-size: var(--step-small);
  line-height: 1.35;
}

.status__phone {
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.masthead__text {
  display: grid;
  grid-template-columns: calc(var(--axis) - var(--m)) minmax(0, 1fr);
  align-items: start;
  padding: clamp(56px, 7.5vw, 112px) var(--m) clamp(64px, 8vw, 120px);
}

.display {
  grid-column: 2;
  grid-row: 1;
  font-size: var(--step-display);
  letter-spacing: -0.055em;
  line-height: 0.93;
}

.display .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
  white-space: nowrap;
}

.display .line > span {
  display: block;
}

.masthead__sub {
  grid-column: 2;
  grid-row: 2;
  margin-top: clamp(16px, 1.8vw, 28px);
  font-size: var(--step-lead);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.masthead__lead {
  grid-column: 1;
  grid-row: 1 / 3;
  padding-right: clamp(24px, 4vw, 64px);
}

.standfirst {
  max-width: 31ch;
  font-size: var(--step-lead);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 32px;
}

/* masked line reveal (signature move) */
.js .display .line > span {
  transform: translateY(108%);
}

.js .display.is-in .line > span {
  transform: none;
  transition: transform 900ms var(--ease-out);
}

.js .display.is-in .line:nth-child(2) > span {
  transition-delay: 110ms;
}

.js .masthead__lead > *,
.js .masthead__sub {
  opacity: 0;
  transform: translateY(14px);
}

.js .masthead__lead.is-in > *,
.js .masthead__sub.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

.js .masthead__sub.is-in {
  transition-delay: 60ms;
}

.js .masthead__lead.is-in > :nth-child(2) {
  transition-delay: 90ms;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(88px, 12vw, 184px) var(--m);
}

.on-axis {
  margin-left: calc(var(--axis) - var(--m));
}

.head {
  font-size: var(--step-head);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.statement {
  font-size: var(--step-statement);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 400;
}

.body-col {
  max-width: 38ch;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.soft {
  color: var(--soft);
}

.on-dark .soft,
.on-red .soft {
  color: inherit;
  opacity: 0.78;
}

/* scroll reveal */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 700ms var(--ease-out) var(--d, 0ms), transform 700ms var(--ease-out) var(--d, 0ms);
}

/* 1. Studio: text page on the axis */
.studio {
  display: grid;
  grid-template-columns: calc(var(--axis) - var(--m)) minmax(0, 1fr);
  align-items: start;
}

.studio__side {
  padding-right: 32px;
  font-size: var(--step-small);
  line-height: 1.5;
}

.studio__side dt {
  color: var(--soft);
}

.studio__side dd {
  margin: 0 0 20px;
  font-size: var(--step-body);
  font-weight: 500;
  line-height: 1.35;
}

.studio__main .statement {
  max-width: 24em;
}

.studio__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 38ch));
  gap: 0 clamp(24px, 3vw, 56px);
  margin-top: clamp(40px, 5vw, 72px);
}

.studio__cols p {
  hyphens: auto;
  -webkit-hyphens: auto;
}

.studio__cols p + p {
  margin-top: 1em;
}

/* 2. Crisi: a full colour page */
.crisi {
  background: var(--red);
  color: #fff;
}

.crisi .head {
  font-size: var(--step-display);
  letter-spacing: -0.055em;
  line-height: 0.93;
}

.crisi__grid {
  display: grid;
  grid-template-columns: calc(var(--axis) - var(--m)) minmax(0, 1fr);
  margin-top: clamp(48px, 6vw, 96px);
  align-items: start;
}

.crisi__copy {
  padding-right: clamp(24px, 4vw, 64px);
}

.crisi__copy p {
  max-width: 32ch;
  font-size: var(--step-lead);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.crisi__copy .actions {
  margin-top: 36px;
}

.crisi__signs li {
  padding: 0 0 clamp(14px, 1.6vw, 22px);
  font-size: var(--step-statement);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.crisi__signs-intro {
  margin-bottom: 28px;
  font-size: var(--step-body);
  opacity: 0.85;
}

/* 3. Services: statement cell + dark rows */
.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 90svh;
}

.services__cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 72px;
  padding: clamp(72px, 9vw, 140px) var(--m) clamp(40px, 5vw, 72px);
  background: var(--stone);
}

.zigzag {
  font-size: var(--step-head);
  line-height: 1;
  letter-spacing: -0.05em;
}

.zigzag span {
  display: block;
}

.zigzag .r {
  text-align: right;
}

.services__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.services__foot p {
  max-width: 30ch;
}

.services__rows {
  background: var(--ink);
  color: var(--paper);
}

.service-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 8px clamp(18px, 2vw, 32px);
  padding: 32px var(--m) 32px clamp(20px, 2.4vw, 36px);
  background: var(--ink);
  transition: background-color 200ms ease;
}

.service-row:nth-child(even) {
  background: var(--ink-2);
}

.service-row h3 {
  font-size: var(--step-lead);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.service-row h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.service-row p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--soft-on-ink);
  hyphens: auto;
  -webkit-hyphens: auto;
}

.service-row ul {
  font-size: var(--step-small);
  line-height: 1.45;
}

.service-row li + li {
  margin-top: 4px;
}

.service-row__go {
  display: inline-block;
  margin-left: 0.35em;
  transition: transform 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .service-row:hover {
    background: var(--red);
  }
  .service-row:hover p {
    color: #fff;
  }
  .service-row:hover .service-row__go {
    transform: translateX(8px);
  }
}

.service-row:active {
  background: var(--red-deep);
}

/* 4. About: portrait as drop cap */
.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--m);
  align-items: start;
}

.about__facts {
  grid-column: 1 / 3;
  font-size: var(--step-small);
  line-height: 1.4;
}

.about__facts li {
  margin-bottom: 20px;
}

.about__facts b {
  display: block;
  font-weight: 500;
  font-size: 1rem;
}

.about__text {
  grid-column: 3 / 13;
}

.about__text p {
  font-size: var(--step-statement);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.about__text p + p {
  margin-top: 1.4em;
  max-width: 44em;
  color: var(--soft);
  font-size: var(--step-lead);
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.about__mark {
  float: left;
  width: 3.6em;
  height: 3.6em;
  margin: 0.08em 0.5em 0.1em 0;
  padding: 0.5em;
  background: var(--stone);
}

.about__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.about__text strong {
  font-weight: 600;
}

/* 5. Values: ink page */
.values {
  background: var(--ink);
  color: var(--paper);
}

.values__grid {
  display: grid;
  grid-template-columns: calc(var(--axis) - var(--m)) minmax(0, 1fr);
  align-items: start;
}

.values__photo {
  width: min(100%, 520px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.values__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

.values__list li {
  font-size: clamp(2rem, 4.6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.04;
}

.values__lead {
  max-width: 28ch;
  margin-bottom: clamp(28px, 3vw, 48px);
  font-size: var(--step-lead);
  line-height: 1.3;
  color: var(--soft-on-ink);
}

/* 6. Where and when: the table pushed right */
.where__head {
  max-width: 14em;
}

.where__head span:first-child {
  display: block;
  padding-left: 3vw;
}

.where__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--m);
  margin-top: clamp(56px, 7vw, 96px);
}

.where__photo {
  grid-column: 1 / 5;
  grid-row: 1;
  align-self: end;
  width: 100%;
  max-width: 22vw;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.where__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 34% 50%;
  filter: grayscale(1) contrast(1.05);
}

.where__table {
  grid-column: 8 / 13;
  grid-row: 1;
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step-body);
  font-variant-numeric: tabular-nums;
}

.where__table th,
.where__table td {
  padding: 13px 0;
  text-align: left;
  font-weight: 400;
  vertical-align: top;
}

.where__table th {
  width: 34%;
  padding-right: 16px;
  color: var(--soft);
}

.where__table td:last-child {
  text-align: right;
}

.where__table tbody + tbody tr:first-child > * {
  padding-top: 52px;
}

.where__table tr.is-today td,
.where__table tr.is-today th {
  color: var(--red);
  font-weight: 500;
}

.where__table a {
  display: inline-flex;
  gap: 0.5em;
  text-decoration: none;
}

.where__table .arrow {
  display: inline-block;
  transition: transform 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .where__table a:hover .arrow {
    transform: translateX(6px);
  }
  .where__table a:hover {
    color: var(--red);
  }
}

.where__now {
  grid-column: 8 / 13;
  margin-top: 28px;
  font-size: var(--step-body);
  font-weight: 500;
}

/* 7. Contact */
.contact {
  background: var(--stone);
}

.contact__grid {
  display: grid;
  grid-template-columns: calc(var(--axis) - var(--m)) minmax(0, 1fr);
  align-items: start;
}

.contact__side {
  padding-right: clamp(24px, 4vw, 64px);
}

.contact__side .statement {
  max-width: 17em;
}

.contact__links {
  margin-top: 36px;
  font-size: var(--step-lead);
  line-height: 1.5;
  letter-spacing: -0.015em;
}

.contact__links a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.contact__meta {
  margin-top: 20px;
  font-size: var(--step-small);
  color: var(--soft);
  line-height: 1.5;
}

.map-consent {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  min-height: 220px;
  margin-top: 48px;
  padding: 24px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}

.map-consent p {
  font-size: var(--step-small);
  line-height: 1.5;
}

.map-consent a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.22em;
  font-size: var(--step-small);
}

.map-consent__btn {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: 500 1rem / 1 "Switzer", system-ui, sans-serif;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}

.map-consent__btn:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .map-consent__btn:hover {
    background: var(--red);
  }
}

.map-consent iframe {
  display: block;
  width: 100%;
  filter: grayscale(1);
}

.contact-form .form-group + .form-group {
  margin-top: 12px;
}

.contact-form .form-control,
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-body) / 1.4 "Switzer", system-ui, sans-serif;
  box-shadow: none !important; /* taste-skill-ignore */
  transition: background-color 160ms ease;
}

.contact-form textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-form .form-control::placeholder,
.contact-form textarea::placeholder {
  color: var(--soft);
  opacity: 1;
}

.contact-form .form-control:focus,
.contact-form textarea:focus {
  background: #fff;
  outline: 3px solid var(--red);
  outline-offset: 0;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  font-size: var(--step-small);
  line-height: 1.45;
}

.form-consent input {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  accent-color: var(--red);
}

.form-consent a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.form-status {
  min-height: 0;
  margin: 12px 0 0;
  font-weight: 500;
}

.form-status.is-ok,
.form-status.is-error,
.form-status.is-pending {
  padding: 14px 18px;
}

.form-status.is-ok {
  background: var(--ink);
  color: var(--paper);
}

.form-status.is-error {
  background: var(--red);
  color: #fff;
}

.form-status.is-pending {
  background: var(--paper);
  color: var(--ink);
}

.contact-form button[type="submit"] {
  margin-top: 20px;
  min-height: 56px;
  padding: 0 32px;
  border: 0;
  border-radius: 0;
  background: var(--red);
  color: #fff;
  font: 500 var(--step-body) / 1 "Switzer", system-ui, sans-serif;
  text-transform: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}

.contact-form button[type="submit"]:active {
  transform: scale(0.97);
}

.contact-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: progress;
}

@media (hover: hover) and (pointer: fine) {
  .contact-form button[type="submit"]:hover {
    background: var(--red-deep);
  }
}

/* ---------- Footer: contact as the headline ---------- */
.site-foot {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(56px, 8vw, 120px);
  min-height: min(72svh, 640px);
  padding: 40px var(--m) 28px;
  background: var(--red);
  color: #fff;
}

.site-foot a {
  color: #fff;
}

.site-foot__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  font-size: var(--step-small);
  line-height: 1.5;
}

.site-foot__notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: min(100%, 58vw);
}

.site-foot__notes b {
  display: block;
  font-weight: 500;
  font-size: 1rem;
}

.site-foot__big {
  display: block;
  margin-top: auto;
  font-size: clamp(2.25rem, 6.4vw, 7.25rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.9;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.site-foot__big span {
  display: inline-block;
  transition: transform 300ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .site-foot__big:hover span {
    transform: translateX(0.02em) translateY(-0.03em);
  }
}

.site-foot__mail {
  display: block;
  margin-top: clamp(14px, 2vw, 28px);
  font-size: var(--step-lead);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.site-foot__ig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: -8px;
  vertical-align: middle;
  transition: transform 160ms var(--ease-out);
}

.site-foot__ig:active {
  transform: scale(0.92);
}

@media (hover: hover) and (pointer: fine) {
  .site-foot__ig:hover {
    transform: translateY(-2px);
  }
}

.site-foot__bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  font-size: var(--step-small);
  line-height: 1.55;
}

.site-foot__bottom > :nth-child(2) {
  text-align: center;
}

.site-foot__bottom > :nth-child(3) {
  text-align: right;
}

.site-foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.site-foot .link-button,
.site-foot__links a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.site-foot__credit {
  display: block;
  margin-top: 10px;
  opacity: 0.8;
}

.back-top {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  white-space: nowrap;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10001;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--ink);
  color: var(--paper);
}

.cookie-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px var(--m);
}

.cookie-banner__text {
  font-size: var(--step-small);
  line-height: 1.5;
  max-width: 70ch;
}

.cookie-banner__text a {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.cookie-banner__actions {
  display: flex;
  gap: 12px;
}

.cookie-btn {
  flex: 1 1 0;
  min-width: 120px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 1rem / 1 "Switzer", system-ui, sans-serif;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}

.cookie-btn:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .cookie-btn:hover {
    background: #fff;
  }
}

.cookie-btn--reject,
.cookie-btn--accept {
  background: var(--paper);
  color: var(--ink);
  border: 0;
}

@media (min-width: 768px) {
  .cookie-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
  }

  .cookie-banner__actions {
    flex: 0 0 auto;
  }

  .cookie-btn {
    flex: 0 0 auto;
  }
}

/* ---------- Tablet and phone ---------- */
@media (max-width: 1099px) {
  :root {
    --axis: 36vw;
  }

  .services {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .services__cell {
    min-height: 70svh;
  }

  .service-row {
    grid-template-columns: 1fr 1fr;
  }

  .service-row ul {
    grid-column: 1 / -1;
  }

  .where__table {
    grid-column: 6 / 13;
  }

  .where__now {
    grid-column: 6 / 13;
  }

  .where__photo {
    max-width: 30vw;
    grid-column: 1 / 5;
  }
}

@media (max-width: 899px) {
  :root {
    --axis: 0px;
    --head-h: 56px;
  }

  .mosaic {
    grid-template-columns: repeat(3, 1fr);
    height: clamp(220px, 36svh, 360px);
  }

  .c-pacioli {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
  }
  .c-red {
    grid-column: 3;
    grid-row: 1;
    padding: 0;
  }
  .c-summa {
    grid-column: 3;
    grid-row: 2;
  }
  .c-ink,
  .c-chiesa,
  .c-mani {
    display: none;
  }

  .c-red.status {
    padding: 14px;
    justify-content: flex-end;
  }

  .c-red .status__next,
  .c-red .status__phone {
    display: none;
  }

  .c-red .status__state {
    font-size: 1.0625rem;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .masthead__text {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 36px var(--m) 56px;
  }

  .display {
    font-size: min(11.4vw, 3.4rem);
    line-height: 0.95;
  }

  .masthead__lead {
    padding-right: 0;
  }

  .standfirst {
    font-size: 1.1875rem;
  }

  .actions .btn {
    width: 100%;
  }

  .on-axis {
    margin-left: 0;
  }

  .section {
    padding: 80px var(--m);
  }

  .studio,
  .crisi__grid,
  .values__grid,
  .contact__grid {
    display: block;
  }

  .studio__side {
    display: flex;
    flex-wrap: wrap;
    gap: 0 28px;
    padding: 0 0 36px;
  }

  .studio__side dd {
    margin-bottom: 12px;
  }

  .studio__side div {
    min-width: 0;
  }

  .studio__cols {
    grid-template-columns: 1fr;
  }

  .crisi__copy {
    padding: 0 0 48px;
  }

  .about {
    display: flex;
    flex-direction: column;
  }

  .about__facts {
    order: 2;
    display: grid;
    gap: 18px;
    margin-top: 44px;
  }

  .about__facts li {
    margin: 0;
  }

  .about__text p {
    font-size: 1.375rem;
  }

  .about__text p + p {
    font-size: 1.1875rem;
  }

  .values__photo {
    width: 60%;
    margin-bottom: 40px;
  }

  .values__list li {
    font-size: clamp(1.875rem, 9.4vw, 2.75rem);
  }

  .where__head span:first-child {
    padding-left: 0;
  }

  .where__grid {
    display: block;
  }

  .where__table,
  .where__table tbody {
    display: block;
  }

  .where__table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 12px 0;
  }

  .where__table th {
    grid-column: 1 / -1;
    width: auto;
    padding: 0;
    font-size: var(--step-small);
  }

  .where__table td {
    padding: 2px 0 0;
  }

  .where__table td[colspan] {
    grid-column: 1 / -1;
    text-align: left;
  }

  .where__table td[colspan] a {
    width: 100%;
    justify-content: space-between;
  }

  .where__table tbody + tbody {
    margin-top: 36px;
  }

  .where__table tbody + tbody tr:first-child > * {
    padding-top: 0;
  }

  .where__table tbody + tbody tr:first-child {
    padding-top: 12px;
  }

  .where__table td:not([colspan]):last-child {
    text-align: right;
  }

  .where__photo {
    max-width: 60%;
    margin: 40px 0 0 auto;
  }

  .where__now {
    margin-top: 20px;
  }

  .services__cell {
    min-height: 62svh;
    gap: 48px;
  }

  .services__foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 28px var(--m);
  }

  .service-row ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 14px;
  }

  .service-row li + li {
    margin: 0;
  }

  .service-row li:not(:last-child)::after {
    content: ",";
  }

  .contact__side {
    padding: 0 0 48px;
  }

  .site-foot {
    min-height: 0;
    gap: 64px;
    padding-top: 28px;
  }

  .site-foot__top {
    flex-direction: column;
    gap: 20px;
  }

  .site-foot__notes {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 14px;
  }

  .site-foot__big {
    font-size: 10.4vw;
  }

  .site-foot__bottom {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .site-foot__bottom > :nth-child(2),
  .site-foot__bottom > :nth-child(3) {
    text-align: left;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .c-red .status__next,
  .c-red .status__phone {
    display: block;
  }

  .c-red.status {
    padding: 20px;
  }

  .c-red .status__state {
    flex-direction: row;
    align-items: center;
    font-size: var(--step-lead);
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .c-pacioli img,
  .status.is-open .status__dot {
    animation: none;
  }

  .js .display .line > span,
  .js .masthead__sub,
  .js .masthead__lead > *,
  .js [data-reveal] {
    transform: none;
  }

  .js .display.is-in .line > span,
  .js [data-reveal].is-in,
  .js .masthead__sub.is-in,
  .js .masthead__lead.is-in > * {
    transition-duration: 300ms;
    transition-delay: 0ms;
  }

  .btn:active,
  .cookie-btn:active,
  .menu-toggle:active,
  .map-consent__btn:active,
  .contact-form button[type="submit"]:active {
    transform: none;
  }
}
