/* ==========================================================================
   Simon Facchetti — portfolio
   Mobile first. Tokens from DESIGN.md (Inter in place of Super Sans VF).
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin-var-v20.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Arial resized to Inter's metrics, shown while Inter loads: no text jump on swap */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT");
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

:root {
  --color-midnight-wine: #421d24;
  --color-wine-hover: #5a2a33;
  --color-royal-violet: #714cb6;
  --color-lilac-mist: #d4c7ff;
  --color-deep-lagoon: #0c4243;
  --color-warm-parchment: #f2f0eb;
  --color-soft-mist: #e3e3e2;
  --color-ink-charcoal: #292827;
  --color-stone-gray: #666666;
  --color-paper-white: #ffffff;

  --font: "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --text-display: clamp(2.5rem, 1.55rem + 4.2vw, 4rem);      /* 40 → 64 */
  --text-heading-lg: clamp(2rem, 1.45rem + 2.4vw, 3.0625rem); /* 32 → 49 */
  --text-heading-sm: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); /* 22 → 28 */

  --radius-small: 8px;
  --radius-card: 16px;
  --radius-pill: 999px;

  --page-max: 1200px;
  --gutter: 20px;
  --section-gap: clamp(64px, 10vw, 96px);
  --header-h: 64px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */

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

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

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

body {
  margin: 0;
  background: var(--color-warm-parchment);
  color: var(--color-ink-charcoal);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 430;
  line-height: 1.5;
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--color-royal-violet);
  outline-offset: 3px;
  border-radius: 4px;
}
.hero :focus-visible,
.header:not(.is-scrolled) :focus-visible,
.band :focus-visible,
.footer :focus-visible { outline-color: #fff; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--page-max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: var(--radius-small);
  background: var(--color-midnight-wine);
  color: #fff;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Typography ---------- */

.h2 {
  font-size: var(--text-heading-lg);
  font-weight: 460;
  line-height: 1.04;
  letter-spacing: -0.027em;
  text-wrap: balance;
}
.h2--light { color: #fff; }

.h3 {
  font-size: var(--text-heading-sm);
  font-weight: 460;
  line-height: 1.14;
  letter-spacing: -0.022em;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.5;
  letter-spacing: -0.008em;
  color: var(--color-stone-gray);
  max-width: 34em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  font-weight: 540;
  color: var(--color-stone-gray);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-midnight-wine);
}
.eyebrow--light { color: rgba(255, 255, 255, 0.72); }
.eyebrow--light::before { background: var(--color-lilac-mist); }

.link {
  color: var(--color-royal-violet);
  font-weight: 460;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.link:hover,
.legal p .link { text-decoration-color: currentColor; }

.pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-lilac-mist);
  font-size: 0.8125rem;
  font-weight: 500;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-weight: 460;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn .icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease-out);
}
.btn:hover .icon { transform: translateX(3px); }

.btn--primary { background: var(--color-midnight-wine); color: #fff; }
.btn--primary:hover { background: var(--color-wine-hover); }

.btn--small {
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-small);
  font-size: 0.9375rem;
}

.btn--block { width: 100%; }

.btn--light { background: var(--color-warm-parchment); color: var(--color-midnight-wine); }
.btn--light:hover { background: #fff; }

.btn--outline-light {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-small);
  color: #fff;
  background: transparent;
}
.btn--outline-light:hover { background: rgba(255, 255, 255, 0.1); }

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

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  color: #fff;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease,
    -webkit-backdrop-filter 0.35s ease, backdrop-filter 0.35s ease;
}
.header.is-scrolled {
  color: var(--color-ink-charcoal);
  background: rgba(242, 240, 235, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--color-soft-mist);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.logo {
  font-size: 1.0625rem;
  font-weight: 540;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav { display: none; }
.nav__list { display: flex; gap: 32px; }
.nav a {
  font-weight: 460;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 1. Hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100lvh;
  padding-bottom: 40px;
  padding-bottom: calc(40px + (100lvh - 100svh));
  overflow: hidden;
  color: #fff;
  background: #6b4a3a;
  isolation: isolate;
}

.hero__media,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__media { z-index: -2; }
.hero__media img { object-fit: cover; object-position: center 35%; }

/* Keeps white text readable (WCAG AA) even on a very bright photo */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20, 12, 10, 0.5) 0%, rgba(20, 12, 10, 0) 22%),
    linear-gradient(0deg, rgba(20, 12, 10, 0.8) 0%, rgba(20, 12, 10, 0.62) 45%, rgba(20, 12, 10, 0.45) 70%, rgba(20, 12, 10, 0.3) 100%);
}

.hero__content { position: relative; z-index: 2; }

.hero__pill {
  margin-bottom: 20px;
  background: rgba(20, 12, 10, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hero__title {
  max-width: 14ch;
  font-size: var(--text-display);
  font-weight: 460;
  line-height: 1;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

/* Word-by-word reveal: each word sits in a clipping box */
.hero__title .word {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
  vertical-align: top;
}
.hero__title .word__inner { display: inline-block; }

.hero__lead {
  max-width: 32em;
  margin-top: 20px;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 28px;
}
.hero__note { font-size: 0.875rem; color: rgba(255, 255, 255, 0.75); }

/* Floating cards: .float (scroll) > .float__depth (mouse) > .float-card (entrance + sway) */
.hero__cards {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.float { position: absolute; will-change: transform; }

.float-card {
  padding: 8px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-ink-charcoal);
}
.float-card img { border-radius: 10px; }

.float-card__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 8px;
}
.float-card__dots,
.float-card__dots::before,
.float-card__dots::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d6d2cb;
}
.float-card__dots { position: relative; margin-left: 10px; }
.float-card__dots::before,
.float-card__dots::after { content: ""; position: absolute; top: 0; }
.float-card__dots::before { left: -10px; }
.float-card__dots::after { left: 10px; }
.float-card__url {
  margin-left: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.6875rem;
  color: var(--color-stone-gray);
}

/* On phones the cards stay smaller than the hero lead, so the always-visible lead remains the LCP element */
.float--a { top: calc(var(--header-h) + 20px); left: var(--gutter); width: 48vw; max-width: 300px; }
.float--b { top: calc(var(--header-h) + 84px); right: var(--gutter); width: 42vw; max-width: 260px; }
.float--c,
.float--d { display: none; }
.float-card--text { padding: 16px; width: 240px; }

/* Incoming-message card */
.float-card--msg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 270px;
  padding: 12px 16px 12px 12px;
}
.msg__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-lilac-mist);
}
.msg__avatar svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--color-ink-charcoal);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.msg__meta { font-size: 0.75rem; color: var(--color-stone-gray); }
.msg__text { font-size: 0.875rem; line-height: 1.4; }

/* Scroll cue (wide screens only, where the headline is centered) */
.hero__cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  transform: translateX(-50%);
}
.hero__cue-line {
  position: relative;
  width: 1px;
  height: 36px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.25);
}
.hero__cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateY(-100%);
}
@media (prefers-reduced-motion: no-preference) {
  .hero__cue-line::after { animation: cue 2.2s cubic-bezier(0.65, 0, 0.35, 1) 1.5s 2; }
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

.float-card__title { font-size: 0.9375rem; font-weight: 540; margin-bottom: 10px; }
.float-card__list { display: grid; gap: 6px; font-size: 0.875rem; }
.float-card__list li,
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.float-card__list li::before,
.checklist li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--color-lilac-mist) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m5.5 9.2 2.2 2.2 4.8-4.8' fill='none' stroke='%23292827' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

/* Small phones: keep the cards out of the title's way */
@media (max-height: 700px) and (max-width: 767px) {
  .float--b { display: none; }
  .float--a { width: 50vw; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-gap); }
.section--tight-top { padding-top: 0; }
.section--tight-bottom { padding-bottom: 0; }

.section__head { margin-bottom: 40px; max-width: 760px; }

/* ---------- 2. Lavori ---------- */

.works { display: grid; gap: 16px; }

.work {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--color-paper-white);
}

.work__media { display: block; overflow: hidden; background: var(--color-soft-mist); }
.work__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.work__media:hover img { transform: scale(1.025); }

.work__body { padding: 24px; }
.work__text { margin: 12px 0 20px; color: var(--color-stone-gray); max-width: 36em; }
.work__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

.work--slot {
  align-content: center;
  padding: 32px 24px;
  background: transparent;
  border: 1px dashed #c9c4bb;
}

/* ---------- 3. Cosa comprende ---------- */

.features { display: grid; gap: 16px; }

.feature {
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--color-paper-white);
}
.feature__icon {
  width: 24px;
  height: 24px;
  margin-bottom: 32px;
  fill: none;
  stroke: var(--color-ink-charcoal);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature__title { font-size: 1.1875rem; font-weight: 540; line-height: 1.3; margin-bottom: 8px; }
.feature p { color: var(--color-stone-gray); }

/* ---------- 4. Prezzi ---------- */

.pricing { display: grid; gap: 32px; }
.pricing__intro .lead { margin-top: 20px; }

.price-card {
  padding: 28px 24px 24px;
  border-radius: var(--radius-card);
  background: var(--color-paper-white);
  border: 1px solid var(--color-soft-mist);
}
.price-card__label { font-weight: 540; color: var(--color-stone-gray); }
.price-card__quote {
  margin: 8px 0 24px;
  font-size: var(--text-heading-lg);
  font-weight: 460;
  line-height: 1.04;
  letter-spacing: -0.027em;
}
.price-card .checklist + .btn { margin-top: 24px; }
.price-card__price {
  margin: 8px 0 24px;
  font-size: var(--text-display);
  font-weight: 460;
  line-height: 1;
  letter-spacing: -0.028em;
}
.price-card__from {
  font-size: 1.125rem;
  letter-spacing: 0;
  color: var(--color-stone-gray);
  vertical-align: 0.9em;
}

.checklist { display: grid; gap: 12px; }

.price-card__renewal {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 24px 0;
  padding-top: 20px;
  border-top: 1px solid var(--color-soft-mist);
  color: var(--color-stone-gray);
}
.price-card__renewal strong { color: var(--color-ink-charcoal); font-weight: 600; }
.price-card__renewal-note { width: 100%; font-size: 0.875rem; }

.price-extra {
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--color-paper-white);
  border: 1px solid var(--color-soft-mist);
}
.price-extra .h3 { margin-top: 8px; }
.price-extra__text { margin-top: 12px; color: var(--color-stone-gray); }
.price-extra__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-soft-mist);
}
.price-extra__foot strong { font-weight: 600; }

/* ---------- 5. Come funziona (Deep Lagoon band) ---------- */

.band {
  padding-block: var(--section-gap);
  background: var(--color-deep-lagoon);
  color: #fff;
  overflow: hidden;
}

.band__inner { display: grid; gap: 48px; }

.band__art {
  position: relative;
  height: 280px;
}
.pane {
  position: absolute;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.875rem;
  font-weight: 540;
  will-change: transform;
}
.pane--1 { left: 0; top: 0; width: 62%; height: 62%; background: rgba(212, 199, 255, 0.28); }
.pane--2 { left: 20%; top: 18%; width: 58%; height: 62%; background: rgba(242, 240, 235, 0.16); }
.pane--3 { right: 0; bottom: 0; width: 52%; height: 52%; background: rgba(255, 255, 255, 0.86); color: var(--color-deep-lagoon); }

.band__content .h2 { margin-bottom: 32px; }

.steps { margin-bottom: 36px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding-block: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.step__num {
  font-size: 0.875rem;
  font-weight: 540;
  font-variant-numeric: tabular-nums;
  color: var(--color-lilac-mist);
  padding-top: 3px;
}
.step__title { font-size: 1.1875rem; font-weight: 540; margin-bottom: 4px; }
.step p { color: rgba(255, 255, 255, 0.78); }

/* ---------- 6. Recensioni ---------- */

.reviews { display: grid; gap: 16px; }

.review {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--color-paper-white);
  border: 1px solid var(--color-soft-mist);
}

.review__quote {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 460;
  line-height: 1.4;
  letter-spacing: -0.008em;
  text-wrap: pretty;
}
/* Decorative opening quote mark; the empty alt text keeps screen readers quiet */
.review__quote::before {
  content: "\201C";
  content: "\201C" / "";
  display: block;
  height: 0.42em;
  margin-bottom: 16px;
  font-size: 4rem;
  line-height: 1;
  color: var(--color-lilac-mist);
}

.review--featured .review__quote {
  font-size: var(--text-heading-sm);
  line-height: 1.2;
  letter-spacing: -0.018em;
}

.review__author { display: flex; align-items: center; gap: 12px; }
.review__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-lilac-mist);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.review__who { display: grid; }
.review__name { font-size: 0.9375rem; font-weight: 540; }
.review__meta { font-size: 0.875rem; color: var(--color-stone-gray); }

.reviews__more { margin-top: 24px; }

/* ---------- 7. Chi sono ---------- */

.about { display: grid; gap: 32px; }
.about__photo {
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--color-soft-mist);
  max-width: 420px;
}
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__text .lead { margin: 20px 0 24px; }

/* ---------- 8. Domande frequenti ---------- */

.faq { display: grid; gap: 32px; }
.faq__intro .lead { margin-top: 20px; }

.faq__list {
  padding-inline: 20px;
  border-radius: var(--radius-card);
  background: var(--color-paper-white);
  border: 1px solid var(--color-soft-mist);
}
.faq__item + .faq__item { border-top: 1px solid var(--color-soft-mist); }

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding-block: 18px;
  font-size: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem); /* 19 → 22 */
  font-weight: 460;
  line-height: 1.3;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}
.faq__question::-webkit-details-marker { display: none; }

/* Plus that turns into a minus: the vertical bar rotates flat when open */
.faq__icon {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-soft-mist);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  margin: -0.75px 0 0 -6px;
  border-radius: 1px;
  background: var(--color-ink-charcoal);
  transition: transform 0.35s var(--ease-out);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__question:hover .faq__icon { border-color: var(--color-lilac-mist); }
.faq__item[open] .faq__icon { background: var(--color-lilac-mist); border-color: var(--color-lilac-mist); }
.faq__item[open] .faq__icon::after { transform: rotate(0deg); }

.faq__answer {
  max-width: 36em;
  padding-bottom: 24px;
  color: var(--color-stone-gray);
}
.faq__answer p + p { margin-top: 12px; }

/* Smooth open/close where the browser can animate to height: auto (Chromium today).
   Elsewhere the answer simply appears at once. */
@media (prefers-reduced-motion: no-preference) {
  @supports (interpolate-size: allow-keywords) {
    .faq__list { interpolate-size: allow-keywords; }
    .faq__item::details-content {
      block-size: 0;
      overflow-y: clip;
      opacity: 0;
      transition: block-size 0.4s var(--ease-out), opacity 0.3s ease, content-visibility 0.4s allow-discrete;
    }
    .faq__item[open]::details-content { block-size: auto; opacity: 1; }
  }
}

/* ---------- 9. Contatti + footer ---------- */

.footer {
  padding-block: var(--section-gap) 32px;
  background: var(--color-midnight-wine);
  color: #fff;
}
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer .btn:hover { text-decoration: none; }

.footer__cta { padding-bottom: 56px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.footer__lead {
  max-width: 30em;
  margin: 20px 0 28px;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.75);
}

.footer__cols { display: grid; gap: 32px; padding-block: 48px; }
.footer__heading { margin-bottom: 14px; font-size: 0.875rem; font-weight: 700; }
.footer__list { display: grid; gap: 12px; }
.footer__list,
.footer__text { font-size: 0.9375rem; color: rgba(255, 255, 255, 0.7); max-width: 28em; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Privacy policy / 404 ---------- */

.legal {
  max-width: 720px;
  padding-block: calc(var(--header-h) + 56px) var(--section-gap);
}
.legal__updated { margin: 16px 0 40px; font-size: 0.875rem; color: var(--color-stone-gray); }
.legal h2 {
  margin: 40px 0 12px;
  font-size: 1.375rem;
  font-weight: 460;
  letter-spacing: -0.014em;
}
.legal p + p { margin-top: 12px; }
.legal p:not(.eyebrow):not(.legal__updated):not(.lead) { color: #3d3b39; }

.notfound {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 20px;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 0;
}
.notfound .eyebrow { margin-bottom: 0; }

.footer--compact { padding-block: 0 32px; }
.footer--compact .footer__bottom { border-top: 0; }

/* ---------- Tablet ---------- */

@media (min-width: 768px) {
  :root { --gutter: 32px; }

  .hero { padding-bottom: 64px; padding-bottom: calc(64px + (100lvh - 100svh)); }
  .float--a { width: 34vw; top: calc(var(--header-h) + 32px); }
  .float--b { width: 30vw; top: calc(var(--header-h) + 120px); }


  .features { grid-template-columns: repeat(2, 1fr); }

  .work__body { padding: 32px; }
  .works { grid-template-columns: repeat(2, 1fr); }
  .work--featured { grid-column: 1 / -1; }
  /* When the "next project" card ends up alone on its row, let it fill it */
  .work--slot:nth-child(even) { grid-column: 1 / -1; }

  .reviews { grid-template-columns: repeat(2, 1fr); }
  .review--featured,
  .review--featured + .review:last-child { grid-column: 1 / -1; }
  .review { padding: 32px; }

  /* Photo on the right: the subject looks left, towards the text */
  .about { grid-template-columns: 7fr 5fr; align-items: center; gap: 56px; }
  .about__photo { order: 2; justify-self: end; }

  .faq__list { padding-inline: 32px; }
  .faq__answer { padding-right: 48px; }

  .footer__cols { grid-template-columns: 1fr 1.4fr 1fr; gap: 48px; }
}

/* ---------- Desktop ---------- */

@media (min-width: 1024px) {
  .nav { display: block; }

  .features { grid-template-columns: repeat(4, 1fr); }

  .work--featured { grid-template-columns: 7fr 5fr; }
  .work--featured .work__media img { height: 100%; aspect-ratio: auto; min-height: 420px; }
  .work--featured .work__body { align-self: end; padding: 40px; }

  .pricing { grid-template-columns: 1fr 440px; align-items: start; gap: 16px 64px; }
  .pricing__intro { position: sticky; top: calc(var(--header-h) + 40px); grid-row: span 2; }
  .price-extra { grid-column: 2; padding: 32px; }
  .price-card { padding: 36px 32px 32px; }

  .band__inner { grid-template-columns: 1fr 1fr; align-items: center; gap: 80px; }
  .band__art { height: 460px; }
  .pane { padding: 20px; font-size: 1rem; }

  /* Large quote on the left, two on the right; fewer cards still fill the row */
  .reviews { grid-template-columns: 7fr 5fr; }
  .review--featured,
  .review--featured + .review:last-child { grid-column: auto; }
  .review--featured { padding: 40px; }
  .review--featured .review__quote { font-size: 2.125rem; line-height: 1.18; }
  .review--featured:nth-last-child(3) { grid-row: span 2; }
  .review--featured:only-child { grid-column: 1 / -1; }

  .faq { grid-template-columns: 5fr 7fr; align-items: start; gap: 64px; }
  .faq__intro { position: sticky; top: calc(var(--header-h) + 40px); }
}

/* Wide: centered headline with cards floating on the margins, as in DESIGN.md */
@media (min-width: 1200px) {
  .hero { justify-content: center; padding-block: 120px 96px; }
  .hero__content { text-align: center; }
  .hero__title { max-width: 18ch; }
  .hero__title,
  .hero__lead { margin-inline: auto; }
  .hero__actions { flex-direction: column; justify-content: center; }

  .float--a { top: 20%; left: 3%; width: 20vw; max-width: 320px; }
  .float--b { top: auto; bottom: 14%; right: 3%; width: 19vw; max-width: 300px; }
  .float--c { display: block; top: 22%; right: 5%; }
  .float--d { display: block; bottom: 12%; left: 5%; }
  .hero__cue { display: flex; }
}

/* ---------- Animation start states ----------
   Only when JS is running and motion is allowed; main.js animates them in.
   The inline script in <head> removes .js after 3s if GSAP never loads. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-split],
  .js .hero__pill,
  .js .hero__actions,
  .js .float-card,
  .js .hero__cue > *,
  .js [data-reveal] { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { transition-duration: 0.01ms !important; }
}
