/* Marastoni Casa
   Layout: blocco verde (header + logo spray) → indice crema con tre parole giganti → fasce alternate verde/crema;
   colonna unica allineata a sinistra, max 1240px. Palette di due soli colori: verde e crema. Gli accenti usano il colore del testo. */
:root {
  --verde: #283618;
  --crema: #FEFAE0;
  /* Nessun terzo colore: ogni accento prende il colore del testo su cui si trova */
  --ruggine: currentColor;
  --verde-70: rgba(40, 54, 24, .72);
  --verde-15: rgba(40, 54, 24, .16);
  --crema-70: rgba(254, 250, 224, .74);
  --crema-20: rgba(254, 250, 224, .22);
  --f-display: "Bricolage Grotesque", "Arial Rounded MT Bold", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Newsreader", Georgia, "Times New Roman", serif;
  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.7, 0, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.mc {
  margin: 0;
  background: var(--crema);
  color: var(--verde);
  font-family: var(--f-body);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
.mc img { max-width: 100%; height: auto; }
:where(.mc) a { color: inherit; }
.mc :focus-visible { outline: 2px solid var(--verde); outline-offset: 3px; }
.mc-hero :focus-visible, .mc-band--verde :focus-visible, .mc-footer :focus-visible,
.mc-header:not(.is-light) :focus-visible, .mc-password :focus-visible { outline-color: var(--crema); }
.mc-skip { position: absolute; left: -9999px; }
.mc-skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--crema); color: var(--verde); padding: 8px 14px; }

.mc-wrap {
  max-width: calc(var(--wrap) + 2 * var(--gut));
  margin-inline: auto;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
}

/* ---------- Tipografia ---------- */
.mc-h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: .95;
  letter-spacing: -.04em;
  margin: 0;
  text-wrap: balance;
}
.mc-h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0;
}
.mc-intro { font-size: 1.3rem; line-height: 1.5; max-width: 40ch; margin: 0; }
.mc-muted { color: var(--verde-70); }
.mc-band--verde .mc-muted { color: var(--crema-70); }

/* ---------- Bottoni e link ---------- */
.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1;
  padding: 16px 28px;
  border-radius: 999px;
  border: 1.5px solid var(--verde);
  background: var(--verde);
  color: var(--crema);
  text-decoration: none;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.mc-btn:hover { background: transparent; color: var(--verde); }
.mc-btn--crema { background: var(--crema); color: var(--verde); border-color: var(--crema); }
.mc-btn--crema:hover { background: transparent; color: var(--crema); }
.mc-btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.mc-btn--ghost:hover { background: var(--crema); color: var(--verde); border-color: var(--crema); }
.mc-link {
  font-family: var(--f-display);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: text-underline-offset .25s;
}
.mc-link:hover { text-underline-offset: 9px; }

/* ---------- Header ---------- */
body.mc::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--verde);
}
.mc-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--verde);
  color: var(--crema);
  transition: background .4s, color .4s, box-shadow .4s;
}
.mc-header.is-light { background: var(--crema); color: var(--verde); box-shadow: 0 1px 0 var(--verde-15); }
.mc-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.mc-header__logo { display: block; line-height: 0; flex: none; }
.mc-header__logo img { height: 42px; width: auto; display: block; }
.mc-header__logo .mc-logo-verde { display: none; }
.mc-header.is-light .mc-logo-verde { display: block; }
.mc-header.is-light .mc-logo-crema { display: none; }
.mc-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
.mc-nav a {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 2px no-repeat;
  padding-bottom: 4px;
  transition: background-size .3s var(--ease);
}
.mc-nav a:hover, .mc-nav a[aria-current="page"] { background-size: 100% 2px; }
.mc-cart-count { font-variant-numeric: tabular-nums; }
.mc-menu-btn {
  display: none;
  font: 600 1rem var(--f-display);
  color: inherit;
  background: none;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.mc-hero { background: var(--verde); color: var(--crema); padding-top: clamp(40px, 8vw, 112px); overflow: hidden; }
.mc-hero__logo { margin: 0; max-width: 900px; line-height: 0; }
.mc-hero__logo img { width: 100%; display: block; animation: mc-spray 1.7s cubic-bezier(.25, .7, .2, 1) .1s both; }
@keyframes mc-spray {
  from { clip-path: inset(0 100% 0 0); filter: blur(10px); opacity: .4; }
  55% { filter: blur(3px); opacity: 1; }
  to { clip-path: inset(0 0 0 0); filter: blur(0); opacity: 1; }
}
.mc-hero__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  margin-top: clamp(36px, 6vw, 72px);
  padding-bottom: clamp(40px, 6vw, 80px);
}
.mc-hero__lead {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}
.mc-hero__side { display: grid; gap: 24px; justify-items: start; }
.mc-hero__text { margin: 0; color: var(--crema-70); max-width: 44ch; }
.mc-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.mc-marquee { border-top: 1px solid var(--crema-20); overflow: hidden; padding-block: 18px; }
.mc-marquee__track { display: flex; width: max-content; animation: mc-scroll 48s linear infinite; }
.mc-marquee__group { display: flex; align-items: center; flex: none; }
.mc-marquee__item {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  letter-spacing: -.01em;
  color: currentColor;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.mc-marquee__item::after {
  content: "";
  width: .32em;
  height: .32em;
  border-radius: 50%;
  background: var(--crema-20);
  margin-inline: .9em;
}
.mc-marquee:hover .mc-marquee__track { animation-play-state: paused; }
@keyframes mc-scroll { to { transform: translateX(-50%); } }

/* ---------- Indice delle tre sezioni ---------- */
.mc-index { background: var(--crema); color: var(--verde); padding-block: clamp(56px, 8vw, 112px); overflow-x: clip; }
.mc-index__list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--verde); }
.mc-index__row {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 21rem);
  align-items: center;
  gap: 12px 32px;
  padding-block: clamp(22px, 3vw, 40px);
  border-bottom: 1.5px solid var(--verde);
  text-decoration: none;
  color: var(--verde);
  transition: color .35s;
}
.mc-index__row::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--gut));
  background: var(--verde);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .5s var(--ease);
  z-index: -1;
}
.mc-index__row:hover, .mc-index__row:focus-visible { color: var(--crema); }
.mc-index__row:hover::before, .mc-index__row:focus-visible::before { transform: scaleY(1); }
.mc-index__word {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.7rem, 9.6vw, 8.25rem);
  line-height: .92;
  letter-spacing: -.05em;
  transition: transform .5s var(--ease);
  min-width: 0;
  overflow-wrap: anywhere;
}
.mc-index__row:hover .mc-index__word { transform: translateX(.06em); }
.mc-index__desc { display: grid; gap: 10px; min-width: 0; }
.mc-index__desc p { margin: 0; }
.mc-index__more {
  font-family: var(--f-display);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ---------- Fasce ---------- */
.mc-band { padding-block: clamp(72px, 10vw, 144px); }
.mc-band--verde { background: var(--verde); color: var(--crema); }
.mc-band--crema { background: var(--crema); color: var(--verde); }
.mc-band--line { border-top: 1.5px solid var(--verde); }
.mc-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 6vw, 104px); align-items: start; }
.mc-split__head { display: grid; gap: 28px; justify-items: start; }
@media (min-width: 900px) { .mc-split__head { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 120px); } }

/* Schede prodotto solo testo */
.mc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 0 32px; }
.mc-card {
  display: grid;
  gap: 6px;
  align-content: start;
  padding-block: 18px 30px;
  border-top: 1.5px solid currentColor;
  text-decoration: none;
  color: inherit;
}
.mc-card__title { font-family: var(--f-display); font-weight: 600; font-size: 1.45rem; line-height: 1.15; letter-spacing: -.015em; transition: transform .3s var(--ease); }
.mc-card:hover .mc-card__title { transform: translateX(6px); }
.mc-card__meta { font-size: 1rem; color: var(--verde-70); }
.mc-card__price { font-family: var(--f-display); font-weight: 500; font-variant-numeric: tabular-nums; }

.mc-empty { border-top: 1.5px solid var(--verde); padding-top: 28px; display: grid; gap: 18px; max-width: 34rem; }
.mc-empty__title { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.05; letter-spacing: -.02em; margin: 0; }
.mc-empty p { margin: 0; }

/* Passaggi del restauro */
.mc-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.mc-steps li {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 18px;
  padding-block: 24px;
  border-top: 1px solid var(--crema-20);
  counter-increment: step;
}
.mc-steps li:last-child { border-bottom: 1px solid var(--crema-20); }
.mc-steps li::before {
  content: counter(step);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 2.2rem;
  line-height: 1;
  color: currentColor;
}
.mc-steps p { margin: 6px 0 0; color: var(--crema-70); max-width: 52ch; }

/* Configuratore mobili su misura */
.mc-config { display: grid; gap: 30px; }
.mc-config fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.mc-config legend { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; padding: 0; margin-bottom: 12px; }
.mc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mc-chip { position: relative; }
.mc-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mc-chip span {
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1rem;
  padding: 10px 18px;
  border: 1.5px solid var(--verde);
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.mc-chip input:hover + span { background: var(--verde-15); }
.mc-chip input:checked + span { background: var(--verde); color: var(--crema); }
.mc-chip input:focus-visible + span { outline: 2px solid var(--verde); outline-offset: 2px; }
.mc-range { color: var(--verde); }
.mc-config__result { border-top: 1.5px solid var(--verde); padding-top: 26px; display: grid; gap: 22px; justify-items: start; }
.mc-config__sentence {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  margin: 0;
  text-wrap: balance;
}
.mc-config__sentence b {
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: .07em;
  text-underline-offset: .12em;
}
.mc-config__sentence.is-swap { animation: mc-swap .45s var(--ease); }
@keyframes mc-swap { from { opacity: .2; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Moduli ---------- */
.mc-form { display: grid; gap: 22px; }
.mc-form__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.mc-field { display: grid; gap: 6px; min-width: 0; }
.mc-field label { font-family: var(--f-display); font-weight: 500; font-size: .95rem; }
.mc-field input, .mc-field textarea, .mc-field select, .mc-input {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid currentColor;
  border-radius: 0;
  padding: 10px 0;
  width: 100%;
  min-width: 0;
}
.mc-band--verde .mc-field input, .mc-band--verde .mc-field textarea { border-bottom-color: var(--crema-20); }
.mc-band--verde .mc-field input:focus, .mc-band--verde .mc-field textarea:focus { border-bottom-color: var(--crema); outline: none; }
.mc-field textarea { resize: vertical; min-height: 7.5rem; }
.mc-inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.mc-inline-form .mc-input { flex: 1 1 14rem; }
.mc-note { font-size: 1rem; margin: 0; }
.mc-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

/* ---------- Pagine interne ---------- */
.mc-page-head { padding-block: clamp(56px, 8vw, 112px) clamp(28px, 4vw, 48px); }
.mc-page-head .mc-h2 { font-size: clamp(2.8rem, 9vw, 7rem); }
.mc-page-head p { margin: 20px 0 0; }
.mc-rte { max-width: 65ch; }
.mc-rte > * + * { margin-top: 1em; }
.mc-product { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); padding-block: clamp(48px, 7vw, 96px); }
.mc-product__price { font-family: var(--f-display); font-size: 1.8rem; font-weight: 500; font-variant-numeric: tabular-nums; margin: 0; }
.mc-product__buy { display: grid; gap: 20px; align-content: start; }
.mc-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mc-table th, .mc-table td { text-align: left; padding: 16px 12px 16px 0; border-bottom: 1px solid var(--verde-15); vertical-align: top; }
.mc-table th { font-family: var(--f-display); font-weight: 600; font-size: .95rem; }
.mc-table-wrap { overflow-x: auto; }
.mc-qty { width: 4.5rem; }
.mc-pagination { display: flex; gap: 16px; margin-top: 40px; font-family: var(--f-display); }

/* ---------- Footer ---------- */
.mc-footer { background: var(--verde); color: var(--crema); padding-block: 48px; border-top: 1px solid var(--crema-20); }
.mc-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.mc-footer__logo img { height: 36px; width: auto; display: block; }
.mc-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; font-family: var(--f-display); }
.mc-footer a { text-decoration: none; }
.mc-footer a:hover { text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 5px; }
.mc-footer small { color: var(--crema-70); font-size: .95rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .mc-hero__body, .mc-split, .mc-product { grid-template-columns: minmax(0, 1fr); }
  .mc-index__row { grid-template-columns: minmax(0, 1fr); }
  .mc-menu-btn { display: inline-block; }
  .mc-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: calc(100vh - 100%);
    height: calc(100dvh - 100%);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--verde);
    color: var(--crema);
    border-top: 1px solid var(--crema-20);
  }
  .mc-header.is-light .mc-nav { background: var(--crema); color: var(--verde); border-top-color: var(--verde-15); }
  .mc-header { background-clip: padding-box; }
  .mc-header.is-open .mc-nav { display: block; }
  .mc-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 20px max(var(--gut), env(safe-area-inset-right, 0px)) 28px max(var(--gut), env(safe-area-inset-left, 0px));
  }
  .mc-nav a { font-size: 1.5rem; }
  .mc-header__logo img { height: 34px; }
}
@media (max-width: 560px) {
  .mc-form__row { grid-template-columns: minmax(0, 1fr); }
  .mc-hero__ctas .mc-btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mc *, .mc *::before, .mc *::after { animation: none !important; transition: none !important; }
  .mc-marquee__track { flex-wrap: wrap; width: auto; }
  .mc-marquee__group[aria-hidden="true"] { display: none; }
}

/* ---------- Aggiunte per il tema ---------- */
.mc-btn--outline { background: transparent; color: var(--verde); border-color: var(--verde); }
.mc-btn--outline:hover { background: var(--verde); color: var(--crema); }
.mc-btn[disabled] { opacity: .5; cursor: not-allowed; }
.mc-pad-b { padding-bottom: clamp(72px, 10vw, 144px); }
.mc-product__title { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.mc-product__crumb { margin: 0 0 18px; }
.mc-product__desc { margin-top: 32px; }
.mc-alert { margin: 0; font-family: var(--f-display); font-weight: 500; }
.mc-search { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; max-width: 40rem; margin-top: 28px; }
.mc-search .mc-input { flex: 1 1 14rem; }
.mc-results { list-style: none; margin: 40px 0 0; padding: 0; }
.mc-password { min-height: 100vh; display: grid; place-content: center; gap: 32px; background: var(--verde); color: var(--crema); text-align: left; padding-block: 48px; }
.mc-password__logo { width: min(640px, 100%); }
