/* ==========================================================================
   REZALOGY — site.css
   Layout and components. Tokens live in brand.css and are only consumed here.
   No framework, no build step.

   Editorial pass: the page is built from rules, numbers and white space.
   Plated chrome surfaces are reserved for ONE element (the guide panel) so the
   metal stays an event instead of a background texture.
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */

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

* { margin: 0; }

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

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--step-0);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- Structure ------------------------------------------------------------ */

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.container--narrow { width: min(100% - 2.5rem, var(--container-narrow)); }

.section { padding-block: var(--section-y); position: relative; }

/* The header is sticky, so anything an anchor can land on has to reserve its
   height — otherwise the heading you jumped to sits underneath the header. */
:target,
[id]:is(section, h1, h2, h3, h4) {
  scroll-margin-top: calc(var(--header-h) + var(--s-4));
}

.section--panel { background: var(--panel); }

/* --- Watermark ------------------------------------------------------------

   A reusable blind-emboss: any PNG, always the same opacity and the same
   treatment, so the effect stays a system instead of a one-off on the hero.

   To add one:  <img class="watermark watermark--right" src="/img/FILE.png"
                     alt="" aria-hidden="true">
   inside a container carrying .has-watermark.

   Per-instance overrides go through the custom properties, never by
   redeclaring opacity — that is what keeps every mark on the page identical:
       style="--wm-size: 40vw; --wm-top: 20%"
   -------------------------------------------------------------------------- */

.has-watermark { position: relative; overflow: hidden; }

/* A positioned element paints above its static siblings even at z-index 0, so
   without this every watermark would sit ON TOP of the section's text. Lifting
   the siblings here means a new watermark can never be added wrong. */
.has-watermark > *:not(.watermark) { position: relative; z-index: 1; }

.watermark {
  position: absolute;
  top: var(--wm-top, 50%);
  width: var(--wm-size, min(46vw, 560px));
  max-width: none;
  opacity: var(--wm-opacity, 0.06);
  transform: translateY(-50%) rotate(var(--wm-rotate, 0deg));
  z-index: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.watermark--right  { right: var(--wm-offset, -6vw); }
.watermark--left   { left: var(--wm-offset, -10vw); }
.watermark--center {
  left: 50%;
  transform: translate(-50%, -50%) rotate(var(--wm-rotate, 0deg));
}

/* Narrow screens: bigger and fainter, so it reads as paper texture instead of
   a picture competing with the text sitting on top of it. */
@media (max-width: 900px) {
  .watermark {
    --wm-size: 78vw;
    --wm-opacity: 0.045;
    --wm-offset: -26vw;
  }
}

/* A watermark is decoration. If someone has asked for less motion they have
   usually also asked for less noise, but this one is static — so it stays.
   It is dropped only for print, where a 6% grey is just wasted toner. */
@media print {
  .watermark { display: none; }
}

.rule {
  height: 1px;
  border: 0;
  background: var(--grad-rule);
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--red);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Present to screen readers, absent on screen. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Type utilities ------------------------------------------------------- */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: var(--tracking-display);
}

/* Chrome text. The plain colour is declared FIRST as the fallback: if
   background-clip: text is unsupported the text stays visible instead of
   turning transparent. */
.chrome {
  color: var(--chrome-mid);
  background: var(--grad-chrome-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.10));
}

.chrome--h { background-image: var(--grad-chrome-text-h); }

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .chrome, .chrome--h {
    color: var(--chrome-mid);
    -webkit-text-fill-color: var(--chrome-mid);
  }
}

.label {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  font-weight: 500;
  color: var(--text-muted);
}

.lead {
  font-size: var(--step-1);
  color: var(--text-dim);
  font-weight: 300;
  max-width: var(--measure);
  line-height: 1.6;
}

.prose { max-width: var(--measure); color: var(--text-dim); }
.prose p + p { margin-top: var(--s-4); }
.prose strong { color: var(--text); font-weight: 500; }

.accent { color: var(--red); font-style: italic; }

/* Inside a .chrome heading the parent sets -webkit-text-fill-color:transparent,
   which children inherit — so the accent has to re-declare its fill or it comes
   out silver like everything else. */
.chrome .accent {
  color: var(--red);
  -webkit-text-fill-color: var(--red);
  background: none;
  filter: none;
}

/* --- Editorial section head ----------------------------------------------- */

/* Numbered eyebrow with a rule running to the right edge. This one pattern is
   what makes the page read as a publication rather than a product page. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

.eyebrow__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--red);
  letter-spacing: 0.08em;
  flex: none;
}

.eyebrow__text {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  font-weight: 500;
  color: var(--text-muted);
  flex: none;
}

.eyebrow::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: linear-gradient(90deg, var(--hairline-strong), transparent);
}

.head { margin-bottom: var(--s-7); }

.head__title {
  font-size: var(--step-3);
  /* 34ch clears the longest one-line heading in use (32.8ch measured in
     Instrument Serif at this size). Anything under it stays on one line;
     anything longer breaks evenly thanks to text-wrap: balance. */
  max-width: 34ch;
  text-wrap: balance;
}

.head__lead { margin-top: var(--s-5); }

.head--split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--s-7);
  align-items: end;
}

@media (max-width: 860px) {
  .head--split { grid-template-columns: 1fr; gap: var(--s-4); align-items: start; }
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
  position: relative;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Filled gold. Text is --ink, never white: white on --red is 2.16:1 and fails. */
.btn--primary {
  background: var(--red);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255, 122, 130, 0.5) inset;
}
.btn--primary:hover { box-shadow: 0 0 0 1px #FF7A82 inset, 0 10px 30px -14px var(--red-glow); }

/* Outline, not a plate. Editorial pages do not stack metal boxes. */
.btn--ghost {
  color: var(--text);
  border: 1px solid var(--hairline-strong);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--chrome-shadow); background: rgba(255, 255, 255, 0.03); }

.btn__arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* Inline text link with a red underline that grows on hover. */
.link {
  color: var(--text);
  position: relative;
  padding-bottom: 3px;
  font-weight: 400;
}
.link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.link:hover::after, .link:focus-visible::after { transform: scaleX(1); }

/* --- Header --------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(5, 6, 10, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

/* Mark + wordmark. Tracking matches the engraved wordmark in the brand asset. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

/* The mark is 640x500, not square: fix the height and let the width follow,
   otherwise a square box squashes it. */
.brand__mark {
  height: 30px;
  width: auto;
  flex: none;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
  /* the tracking adds a trailing gap; pull it back so the lockup looks centred */
  margin-right: -0.2em;
}

.nav { display: flex; align-items: center; gap: var(--s-5); }

.nav a {
  font-size: var(--step--1);
  color: var(--text-dim);
  transition: color var(--dur) var(--ease);
}
.nav a:hover { color: var(--text); }

.header .btn { padding: 0.6rem 1.15rem; }

/* --- Mobile menu ------------------------------------------------------
   Below 940px .nav disappears entirely, so this hamburger + off-canvas
   panel is the only way to reach Servizi/Metodo/Risorse/Chi sono on a
   phone — it is not decorative, it is the nav. */

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  flex: none;
}

.menu-btn__bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-dim);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), background var(--dur) var(--ease);
}

.menu-btn:hover .menu-btn__bar { background: var(--text); }

.menu-btn[aria-expanded="true"] .menu-btn__bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bar:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-btn__bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Off-canvas panel. Hidden via opacity + visibility rather than display,
   so the close transition can run and visibility:hidden pulls the links
   out of the tab order for free when the panel is closed. */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  padding: var(--s-6) var(--s-5);
  background: var(--ink);
  border-top: 1px solid var(--hairline);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.mobile-nav__list { display: flex; flex-direction: column; gap: var(--s-4); }

.mobile-nav__list a {
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--text-dim);
}

.mobile-nav__list a[aria-current="page"] { color: var(--text); }

@media (max-width: 940px) {
  .nav { display: none; }
  .header .btn--primary { display: none; }
  .menu-btn { display: inline-flex; }
}

@media (min-width: 941px) {
  .menu-btn { display: none; }
  .mobile-nav { display: none; }
}

/* --- Hero -------------------------------------------------------------
   Full-bleed photograph with the copy floated over it, the way the
   reference poster does it — the image is the hero, not an illustration
   next to it. The gold photo already carries its own dark stone ground
   (sampled to match --ink almost exactly), so a soft scrim is all that's
   needed to keep the copy legible; the edges are never cropped hard, they
   fade into the page colour. A vertical brand mark on the far right edge
   is the one flourish borrowed straight from the reference: wide-set,
   upright letters, the way a gallery wall label reads. It's decorative
   only (aria-hidden — the brand name is already in the header for
   assistive tech) and only shows once there is enough width to spare.
   ------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 88vh, 860px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 18% center;
}

/* Scrim: fades to --ink along the right edge (where the copy sits) and
   along the top/bottom, so the photo reads as part of the page rather
   than a hard-edged rectangle dropped onto it. */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 32%, rgba(27, 25, 23, 0.6) 58%, var(--ink) 96%),
    linear-gradient(0deg, var(--ink), transparent 14%, transparent 86%, var(--ink));
}

.hero__vertical {
  position: absolute;
  top: var(--s-6);
  right: var(--s-4);
  z-index: 2;
  writing-mode: vertical-lr;
  text-orientation: upright;
  font-family: var(--font-display);
  font-size: var(--step-0);
  letter-spacing: 0.5em;
  color: var(--chrome-mid);
  opacity: 0.45;
  pointer-events: none;
  display: none;
}

@media (min-width: 1240px) {
  .hero__vertical { display: block; }
}

.hero__copy {
  position: relative;
  z-index: 1;
  max-width: 46ch;
  margin-left: auto;
  padding-block: var(--s-7);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: var(--s-5);
}

.hero__dot {
  width: 6px; height: 6px;
  flex: none;
  margin-top: 0.6em;
  border-radius: 50%;
  background: var(--red);
}

.hero__title {
  font-size: var(--step-4);
  max-width: 13ch;
  margin-bottom: var(--s-6);
  text-wrap: balance;
}

.hero__lead { margin-bottom: var(--s-6); max-width: 44ch; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}

.hero__note {
  margin-top: var(--s-5);
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* Below ~900px a full-bleed section crops the (landscape) photo down to a
   sliver — an aspect-locked banner stacked above the copy keeps the whole
   subject in frame instead of fighting a portrait crop. */
@media (max-width: 900px) {
  .hero { display: block; min-height: 0; }

  .hero__bg {
    position: relative;
    inset: auto;
    aspect-ratio: 4 / 3;
    width: 100%;
  }
  .hero__bg img { object-position: 30% 40%; }
  .hero__bg::after {
    background: linear-gradient(0deg, var(--ink) 0%, transparent 22%, transparent 78%, rgba(27, 25, 23, 0.3) 100%);
  }

  .hero__copy {
    max-width: 100%;
    margin-left: 0;
    padding-block: var(--s-6) 0;
  }
}

/* --- Metrics -------------------------------------------------------------- */

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border-block: 1px solid var(--hairline);
}

.metric {
  background: var(--ink);
  padding: var(--s-6) var(--s-4);
}

.metric__value {
  font-family: var(--font-display);
  font-size: var(--step-4);
  line-height: 1;
}

.metric__body {
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--hairline);
  font-size: var(--step--1);
  color: var(--text-dim);
  line-height: 1.6;
}

.metric__src {
  margin-top: var(--s-3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --- Services: an index, not a card grid ---------------------------------- */

.services { border-top: 1px solid var(--hairline-strong); }

.service {
  display: grid;
  grid-template-columns: 3.5rem minmax(12rem, 19rem) minmax(0, 1fr);
  gap: var(--s-4);
  align-items: baseline;
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--hairline);
  transition: background var(--dur) var(--ease);
}

.service:hover { background: rgba(255, 255, 255, 0.018); }

.service__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.service__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  letter-spacing: var(--tracking-display);
  line-height: 1.15;
}

.service__body {
  font-size: var(--step--1);
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 62ch;
}

@media (max-width: 820px) {
  .service {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: var(--s-2) var(--s-3);
    padding-block: var(--s-4);
  }
  .service__body { grid-column: 2; margin-top: var(--s-1); }
}

/* --- Method (pillars) ----------------------------------------------------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--s-6) var(--s-5);
  counter-reset: pillar;
}

.pillar {
  padding-top: var(--s-4);
  border-top: 1px solid var(--hairline-strong);
  position: relative;
}

.pillar::before {
  counter-increment: pillar;
  content: "0" counter(pillar);
  position: absolute;
  top: var(--s-4);
  right: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pillar__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  letter-spacing: var(--tracking-display);
}

.pillar__body {
  margin-top: var(--s-3);
  font-size: var(--step--1);
  color: var(--text-dim);
  line-height: 1.7;
}

/* --- Guide teaser: the one plated surface on the page --------------------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--s-7);
  align-items: center;
}

@media (max-width: 920px) {
  .feature { grid-template-columns: 1fr; gap: var(--s-6); }
}

.plate {
  position: relative;
  border-radius: var(--radius);
  background: var(--grad-plate);
  padding: var(--s-6) var(--s-5);
  isolation: isolate;
}

.plate::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-bezel);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.toc-preview { display: grid; gap: 1rem; }

.toc-preview li {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  font-size: var(--step--1);
  color: var(--text-dim);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hairline);
}
.toc-preview li:last-child { border-bottom: 0; padding-bottom: 0; }

.toc-preview span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  flex: none;
}

/* --- Cases ---------------------------------------------------------------- */

.cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: var(--s-6) var(--s-7);
}

.case { padding-top: var(--s-4); border-top: 1px solid var(--hairline-strong); }

.case__name {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  letter-spacing: var(--tracking-display);
}

.case__meta {
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.case__body {
  margin-top: var(--s-4);
  font-size: var(--step--1);
  color: var(--text-dim);
  line-height: 1.7;
}

.case__lesson {
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--hairline);
  color: var(--text);
  font-style: italic;
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.3;
}

/* Editorial note, set as a marginal rather than a coloured alert box. */
.notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  padding-left: var(--s-4);
  border-left: 1px solid var(--red);
  font-size: var(--step--1);
  color: var(--text-dim);
  margin-bottom: var(--s-7);
  max-width: 64ch;
  line-height: 1.65;
}

.notice__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  padding-top: 0.25em;
}

@media (max-width: 620px) {
  .notice { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* --- Final CTA ------------------------------------------------------------ */

.cta { position: relative; text-align: center; }

.cta__title {
  font-size: var(--step-4);
  margin-inline: auto;
  max-width: 28ch;
  text-wrap: balance;
}

.cta__lead { margin: var(--s-5) auto var(--s-6); text-align: center; max-width: 50ch; }

.cta__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-3); }

.cta .eyebrow { justify-content: center; }
.cta .eyebrow::after { display: none; }

/* --- Footer --------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--hairline);
  padding-block: var(--s-7) var(--s-5);
  font-size: var(--step--1);
  color: var(--text-muted);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: var(--s-6) var(--s-5);
  padding-bottom: var(--s-7);
}

@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

.footer h3 {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--s-4);
}

.footer li + li { margin-top: 0.6rem; }
.footer a { transition: color var(--dur) var(--ease); }
.footer a:hover { color: var(--text); }

.footer__legal {
  border-top: 1px solid var(--hairline);
  padding-top: var(--s-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  justify-content: space-between;
}

.footer__legal address { font-style: normal; }

/* --- Reveal on scroll (IntersectionObserver, no library) ------------------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* --- Services page --------------------------------------------------------
   Same system as the home index, one level deeper: each service gets what it
   delivers and — the part nobody publishes — when it is the wrong thing to buy.
   -------------------------------------------------------------------------- */

.page-head { padding-block: clamp(3.5rem, 2.5rem + 5vw, 6.5rem) 0; }

.page-head__title {
  font-size: var(--step-4);
  max-width: 24ch;
  margin-bottom: var(--s-5);
  text-wrap: balance;
}

/* Jump links to the three families. */
.anchors {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--hairline);
}

.anchors a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  font-size: var(--step--1);
  color: var(--text-dim);
  transition: color var(--dur) var(--ease);
}
.anchors a:hover { color: var(--text); }

.anchors span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--red);
}

.family { margin-bottom: var(--s-6); }

.family__title {
  font-size: var(--step-3);
  max-width: 34ch;
  text-wrap: balance;
}

.family__lead { margin-top: var(--s-4); }

.svc {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 17rem) minmax(0, 1fr);
  gap: var(--s-3) var(--s-5);
  padding-block: var(--s-6);
  border-top: 1px solid var(--hairline);
}

.svc:first-of-type { border-top-color: var(--hairline-strong); }

.svc__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding-top: 0.6em;
}

.svc__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  letter-spacing: var(--tracking-display);
  line-height: 1.15;
}

.svc__what {
  margin-top: var(--s-3);
  font-size: var(--step--1);
  color: var(--text-dim);
  line-height: 1.65;
}

.svc__body > * + * { margin-top: var(--s-4); }

.svc__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--s-2);
}

.svc__deliver { display: grid; gap: 0.55rem; }

.svc__deliver li {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  font-size: var(--step--1);
  color: var(--text-dim);
  line-height: 1.6;
}

.svc__deliver li::before {
  content: "—";
  color: var(--chrome-shadow);
}

/* The honest half. Marked with the one accent colour, because it is the part
   that earns trust. */
.svc__not {
  padding-left: var(--s-4);
  border-left: 1px solid var(--red);
  font-size: var(--step--1);
  color: var(--text-dim);
  line-height: 1.6;
}

.svc__not strong { color: var(--text); font-weight: 500; }

@media (max-width: 900px) {
  .svc {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: var(--s-3);
    padding-block: var(--s-5);
  }
  .svc__body { grid-column: 2; }
  .svc__num { padding-top: 0.35em; }
}

/* --- Portrait (chi-siamo intro) -------------------------------------------- */

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.72fr);
  gap: var(--s-7);
  align-items: start;
}

@media (max-width: 860px) {
  .intro-grid { grid-template-columns: 1fr; gap: var(--s-6); }
}

.portrait {
  position: relative;
  isolation: isolate;
  max-width: 320px;
  margin-inline: auto;
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 860px) {
  .portrait { max-width: 220px; }
}

/* Same polished-bezel border as .plate, so the photo reads as one more
   chrome-edged surface rather than a dropped-in snapshot. */
.portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-bezel);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.portrait__cap {
  margin-top: var(--s-3);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--text-muted);
}

/* --- Forms (contatti) ------------------------------------------------------ */

.form { display: grid; gap: var(--s-4); max-width: 46rem; }

.field { display: grid; gap: 0.5rem; }

.field__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--text-muted);
}

.field input,
.field textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--text);
  font: inherit;
  font-size: var(--step--1);
  line-height: 1.5;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.field textarea { resize: vertical; min-height: 9rem; }

.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  background: var(--panel);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.form__foot {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.form__note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.form__status {
  display: none;
  font-size: var(--step--1);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  line-height: 1.6;
}

.form__status[data-state="ok"] {
  display: block;
  color: var(--text);
  border-color: var(--hairline-strong);
  background: var(--panel-2);
}

.form__status[data-state="err"] {
  display: block;
  color: var(--red);
  border-color: var(--red);
  background: var(--panel-2);
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* Honeypot — hidden from sighted users and screen readers, catches bots that
   fill every field. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Cookie consent banner --------------------------------------------------
   Opt-in only: injected by consent.js when no stored choice exists yet.
   Analytics never runs until "Accetta" is clicked. Reuses the .plate bezel
   system so it reads as part of the site, not a bolted-on widget. */

.cookie-banner {
  position: fixed;
  left: var(--s-4);
  right: var(--s-4);
  bottom: var(--s-4);
  z-index: 200;
  max-width: 860px;
  margin: 0 auto;
  border-radius: var(--radius);
  background: var(--grad-plate);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  isolation: isolate;
  animation: cookie-banner-in var(--dur) var(--ease);
}

.cookie-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-bezel);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.cookie-banner__inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
}

.cookie-banner__text {
  color: var(--text-dim);
  font-size: var(--step--1);
  line-height: 1.6;
  margin: 0;
  flex: 1 1 380px;
}

.cookie-banner__actions {
  position: relative;
  display: flex;
  gap: var(--s-2);
  flex: none;
}

@keyframes cookie-banner-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
  .cookie-banner { left: var(--s-3); right: var(--s-3); bottom: var(--s-3); }
  .cookie-banner__inner { padding: var(--s-4); }
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions .btn { flex: 1; justify-content: center; }
}

@media print {
  .cookie-banner { display: none; }
}
