/* =========================================================
   matteogabriele.it
   Colori: carta da modello, inchiostro, metro da sarto
   ========================================================= */

:root {
  --carta: #F3F5F7;        /* sfondo: carta da cartamodello */
  --foglio: #FFFFFF;       /* superfici */
  --inchiostro: #15233F;   /* testo e blocchi scuri */
  --grafite: #556079;      /* testo secondario */
  --linea: #CBD3DE;        /* righe, tratteggi */
  --metro: #F4C430;        /* giallo metro da sarto: accento */
  --metro-scuro: #D9A800;

  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --carta: #0E1729;
    --foglio: #15213A;
    --inchiostro: #E9EDF4;
    --grafite: #A3AEC4;
    --linea: #2D3B58;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--carta);
  color: var(--inchiostro);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--metro);
  color: #15233F;
  padding: 8px 14px;
  z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Testi comuni ---------- */

.eyebrow {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--grafite);
  margin-bottom: 18px;
}

h2 {
  font-family: var(--f-display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.08;
  letter-spacing: -.01em;
  max-width: 20ch;
}

h3 {
  font-family: var(--f-display);
  font-stretch: 100%;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.25;
}

/* ---------- Pulsanti ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  background: var(--metro);
  color: #15233F;
  font-family: var(--f-display);
  font-stretch: 105%;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  border: 2px solid var(--metro);
  border-radius: var(--radius);
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--metro-scuro); border-color: var(--metro-scuro); transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--inchiostro);
  border-color: var(--inchiostro);
}
.btn--ghost:hover { background: var(--inchiostro); color: var(--carta); border-color: var(--inchiostro); }

.btn--small { min-height: 42px; padding: 0 18px; font-size: 15px; }

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

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--carta) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linea);
}

.top__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--inchiostro);
  color: var(--metro);
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: 16px;
  border-radius: var(--radius);
  /* bordo inferiore a tacche, come il metro */
  box-shadow: inset 0 -6px 0 var(--metro);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand__text strong {
  font-family: var(--f-display);
  font-stretch: 110%;
  font-weight: 800;
  font-size: 17px;
  color: var(--inchiostro);
}
.brand__text span {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--grafite);
}

.nav { display: flex; gap: 28px; }
.nav a {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--metro); }

.lang {
  display: flex;
  border: 1.5px solid var(--inchiostro);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 600;
}
.lang a {
  padding: 8px 10px;
  text-decoration: none;
  line-height: 1;
}
.lang a[aria-current="true"] { background: var(--inchiostro); color: var(--carta); }
.lang a:not([aria-current="true"]):hover { background: var(--metro); color: #15233F; }

/* ---------- Hero ---------- */

.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero__title {
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(40px, 7.4vw, 88px);
  line-height: .98;
  letter-spacing: -.02em;
}

/* Il metro da sarto: elemento firma */
.tape {
  position: relative;
  margin: 28px 0 30px;
  margin-right: calc(-1 * clamp(32px, 5vw, 72px));
  transform: rotate(-1.2deg);
  transform-origin: left center;
}

.tape::before {
  /* la linguetta metallica in testa al metro */
  content: "";
  position: absolute;
  left: -10px;
  top: -3px;
  width: 14px;
  height: 50px;
  background: var(--inchiostro);
  border-radius: 2px 0 0 2px;
  z-index: 1;
}

.tape__body {
  position: relative;
  height: 44px;
  overflow: hidden;
  background:
    /* tacca lunga ogni 10 unità */
    repeating-linear-gradient(90deg, transparent 0 79px, #15233F 79px 80px) 0 0 / 100% 18px no-repeat,
    /* tacca media ogni 5 unità */
    repeating-linear-gradient(90deg, transparent 0 39px, #15233F 39px 40px) 0 0 / 100% 12px no-repeat,
    /* millimetri */
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(21,35,63,.7) 7px 8px) 0 0 / 100% 7px no-repeat,
    var(--metro);
  box-shadow: 0 6px 14px -8px rgba(21,35,63,.45);
  animation: srotola 1.3s cubic-bezier(.2,.7,.2,1) .2s both;
}

.tape__nums {
  position: absolute;
  left: 40px;
  bottom: 5px;
  display: flex;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 12px;
  color: #15233F;
  white-space: nowrap;
}
.tape__nums span { width: 80px; text-align: center; flex: none; }

@keyframes srotola {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

.lead {
  font-size: clamp(18px, 1.6vw, 20px);
  max-width: 34em;
  color: var(--inchiostro);
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.note {
  margin-top: 14px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--grafite);
}

/* La scheda misure */
.sheet {
  position: relative;
  padding: 28px 26px 24px;
  background-color: var(--foglio);
  background-image:
    linear-gradient(var(--linea) 1px, transparent 1px),
    linear-gradient(90deg, var(--linea) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  border: 1.5px solid var(--inchiostro);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--inchiostro);
}

.sheet__label {
  display: inline-block;
  padding: 4px 10px;
  background: var(--inchiostro);
  color: var(--carta);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.sheet__rows { margin: 0; }
.sheet__rows > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 0;
  background: var(--foglio);
}
.sheet__rows dt {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--grafite);
  white-space: nowrap;
}
.sheet__rows dd {
  order: 2;
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  text-align: right;
}
.sheet__rows > div::after {
  /* puntini di guida tra voce e valore */
  content: "";
  order: 1;
  flex: 1;
  border-bottom: 2px dotted var(--linea);
  transform: translateY(-4px);
  min-width: 16px;
}

.sheet__foot {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--foglio);
  border-left: 4px solid var(--metro);
  font-size: 14px;
  line-height: 1.5;
  color: var(--grafite);
}

/* ---------- Sezioni ---------- */

.section { padding: clamp(64px, 9vw, 120px) 0; }

.section__head { margin-bottom: clamp(36px, 5vw, 56px); }

.section__intro {
  margin-top: 18px;
  max-width: 40em;
  color: var(--grafite);
  font-size: 18px;
}

/* Servizi: schede con bordo tratteggiato, come una linea di taglio */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 26px 22px;
  background: var(--foglio);
  border: 1.5px dashed var(--grafite);
  border-radius: var(--radius);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-style: solid; border-color: var(--inchiostro); transform: translateY(-2px); }
.card h3 { margin-bottom: 10px; }
.card h3::before {
  content: "";
  display: block;
  width: 28px;
  height: 6px;
  margin-bottom: 18px;
  background: var(--metro);
}
.card p { font-size: 15px; color: var(--grafite); }

/* Metodo: blocco scuro */
.section--ink {
  background: #15233F;
  color: #F3F5F7;
}
.section--ink .eyebrow { color: #A3AEC4; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 2px solid var(--metro);
}

.step {
  position: relative;
  padding: 28px 24px 8px 0;
}
.step + .step { padding-left: 24px; border-left: 1px solid rgba(243,245,247,.18); }

.step__n {
  display: block;
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: 64px;
  line-height: 1;
  color: var(--metro);
  margin-bottom: 18px;
}
.step h3 { margin-bottom: 10px; color: #FFFFFF; }
.step p { font-size: 15px; color: #C3CBDA; }

/* Elenco con spunte */
.why {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.why .section__head { margin-bottom: 0; }

.why__list { list-style: none; margin: 0; padding: 0; }
.why__list li {
  padding: 20px 0 20px 40px;
  border-bottom: 1px solid var(--linea);
  position: relative;
  color: var(--grafite);
}
.why__list li:first-child { border-top: 1px solid var(--linea); }
.why__list li::before {
  /* piccolo segno di spunta in giallo metro */
  content: "";
  position: absolute;
  left: 4px;
  top: 27px;
  width: 16px;
  height: 9px;
  border-left: 3px solid var(--metro-scuro);
  border-bottom: 3px solid var(--metro-scuro);
  transform: rotate(-45deg);
}
.why__list strong { color: var(--inchiostro); display: block; font-size: 18px; margin-bottom: 2px; }

/* FAQ */
.section--soft { background: var(--foglio); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }

.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.faq .section__head { margin-bottom: 0; }

.faq__list details { border-bottom: 1px solid var(--linea); }
.faq__list details:first-child { border-top: 1px solid var(--linea); }

.faq__list summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 44px 20px 0;
  position: relative;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 19px;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--metro);
  color: #15233F;
  font-family: var(--f-mono);
  font-size: 18px;
  transition: transform .2s ease;
}
.faq__list details[open] summary::after { content: "–"; }
.faq__list details p { padding: 0 44px 22px 0; color: var(--grafite); }

/* ---------- Contatti ---------- */

.contact {
  padding: clamp(72px, 10vw, 132px) 0;
  background: var(--metro);
  color: #15233F;
}
.contact .eyebrow { color: #15233F; opacity: .75; }
.contact h2 {
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(32px, 5.6vw, 64px);
  max-width: 16ch;
}
.contact__text { margin-top: 18px; font-size: 19px; max-width: 34em; }

.contact__ways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
  max-width: 860px;
}

.way {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 26px;
  background: #15233F;
  color: #F3F5F7;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform .15s ease, box-shadow .15s ease;
}
.way:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 #F3F5F7; }
.way__label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--metro);
}
.way__value {
  font-family: var(--f-display);
  font-stretch: 110%;
  font-weight: 800;
  font-size: clamp(20px, 2.6vw, 28px);
  overflow-wrap: anywhere;
}

.contact__hours { margin-top: 22px; font-size: 15px; }

.contact :focus-visible { outline-color: #15233F; }

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

.foot {
  padding: 28px 0;
  background: #15233F;
  color: #A3AEC4;
  font-family: var(--f-mono);
  font-size: 13px;
}
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
}

@media (max-width: 860px) {
  .hero__grid, .why, .faq { grid-template-columns: 1fr; }
  .why .section__head, .faq .section__head { margin-bottom: 8px; }
  .tape { margin-right: calc(-1 * var(--gutter)); }
  .sheet { margin-right: 8px; }
  .nav { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand__mark, .brand__text span { display: none; }
  .top__inner { gap: 12px; }
  .cards, .steps, .contact__ways { grid-template-columns: 1fr; }
  .step, .step + .step { padding-left: 0; border-left: 0; }
  .step { border-bottom: 1px solid rgba(243,245,247,.18); padding-bottom: 24px; }
  .cta .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
