/* =========================================================
   Fermich SRL — fermich.cloud
   Foglio di stile unico. Nessuna dipendenza esterna.
   ========================================================= */

:root {
  --ground:      #f5f3ee;
  --paper:       #ffffff;
  --deep:        #17332d;
  --deep-2:      #1f453d;
  --deep-3:      #24564a;
  --ink:         #14211e;
  --muted:       #5c6f68;
  --muted-2:     #7b8b85;
  --line:        #e2ded4;
  --line-soft:   #eeebe3;
  --accent:      #1e6c61;
  --accent-deep: #0f453d;
  --lime:        #cfe86b;
  --lime-soft:   #e8f5b8;
  --sand:        #efe9dc;
  --shadow-sm:   0 1px 2px rgba(18,48,42,.06), 0 4px 12px rgba(18,48,42,.05);
  --shadow-md:   0 2px 4px rgba(18,48,42,.05), 0 16px 44px rgba(18,48,42,.09);
  --radius:      14px;
  --radius-lg:   20px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    'Noto Sans', 'Liberation Sans', 'DejaVu Sans', Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { text-wrap: balance; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.mid { max-width: 920px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--lime); color: var(--deep);
  padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 700; z-index: 99;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------
   Intestazione
   --------------------------------------------------------- */
header.site { background: var(--deep); color: #eaf1ee; }

.bar {
  display: flex; align-items: center; gap: 20px;
  padding: 16px 0; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,.09);
}

/* Logo: area di rispetto pari all'altezza della F, larghezza minima 140 px */
.brand { display: block; text-decoration: none; flex: 0 0 auto; padding: 2px 0; }
.brand img { display: block; width: 176px; height: auto; }

.bar nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.bar nav a {
  color: #cbdad5; text-decoration: none; font-size: 14.5px;
  padding: 7px 12px; border-radius: 8px; white-space: nowrap;
}
.bar nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.bar nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.10); }

.langs { display: flex; align-items: center; gap: 2px; margin-left: 10px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.14); }
.langs a {
  font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: #8fa8a1; text-decoration: none; padding: 6px 8px; border-radius: 7px;
}
.langs a:hover { color: #fff; background: rgba(255,255,255,.08); }
.langs a[aria-current="true"] { color: var(--lime); background: rgba(207,232,107,.13); }

/* ---------------------------------------------------------
   Apertura
   --------------------------------------------------------- */
.hero { background: var(--deep); color: #eaf1ee; padding: 64px 0 76px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -180px; top: -140px;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(207,232,107,.14), rgba(207,232,107,0) 62%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }

.eyebrow {
  font-size: 11.5px; font-weight: 750; letter-spacing: .15em;
  text-transform: uppercase; color: var(--lime); margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(34px, 5.6vw, 58px);
  line-height: 1.04; letter-spacing: -.032em; font-weight: 800;
  margin: 0 0 22px; max-width: 19ch;
}
.hero p.lead {
  font-size: clamp(17.5px, 2.1vw, 21px); line-height: 1.55; color: #bed0cb;
  max-width: 60ch; margin: 0 0 32px;
}
.hero p.lead strong { color: #fff; font-weight: 650; }
.hero.slim { padding: 54px 0 60px; }
.hero.slim h1 { max-width: 22ch; }

.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.cta, .cta-ghost {
  display: inline-block; font-weight: 700; font-size: 15.5px; text-decoration: none;
  padding: 13px 26px; border-radius: 10px; transition: background .15s ease, color .15s ease;
}
.cta { background: var(--lime); color: var(--deep); }
.cta:hover { background: #ddf291; color: var(--deep); }
.cta-ghost { color: #dbe7e2; border: 1px solid rgba(255,255,255,.26); }
.cta-ghost:hover { color: #fff; background: rgba(255,255,255,.09); }
.cta-dark { background: var(--deep); color: #fff; }
.cta-dark:hover { background: var(--deep-2); color: #fff; }

/* i pulsanti non ereditano il colore dei link nelle sezioni scure */
section.dark .cta, .note .cta { color: var(--deep); }
section.dark .cta:hover, .note .cta:hover { color: var(--deep); }
section.dark .cta-ghost, .note .cta-ghost { color: #dbe7e2; }
section.dark .cta-ghost:hover, .note .cta-ghost:hover { color: #fff; }

/* striscia dati societari */
.facts { background: var(--deep-2); color: #c6d6d1; }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding: 0 24px; }
.facts .f { padding: 20px 0 22px; }
.facts .f + .f { padding-left: 24px; border-left: 1px solid rgba(255,255,255,.10); }
.facts dt { font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: #86a49b; margin-bottom: 5px; }
.facts dd { margin: 0; font-size: 14.5px; line-height: 1.45; color: #e2ece9; }

/* ---------------------------------------------------------
   Sezioni
   --------------------------------------------------------- */
section { padding: 78px 0; }
section.paper { background: var(--paper); }
section.sand  { background: var(--sand); }
section.dark  { background: var(--deep); color: #d7e4e0; }
section.tight { padding: 56px 0; }

h2 {
  font-size: clamp(25px, 3.2vw, 35px); line-height: 1.16;
  letter-spacing: -.024em; font-weight: 750; margin: 0 0 14px;
}
h3 { font-size: 18.5px; font-weight: 720; margin: 0 0 8px; letter-spacing: -.012em; line-height: 1.3; }
.sub { color: var(--muted); max-width: 64ch; margin-bottom: 44px; font-size: 17px; }
section.dark h2 { color: #fff; }
section.dark .sub { color: #a8bfb8; }
section.dark a { color: var(--lime); }
section.dark a:hover { color: #e6f7a8; }

.sec-head { max-width: 64ch; margin-bottom: 44px; }
.sec-head .sub { margin-bottom: 0; }

/* passi numerati */
.steps { display: grid; gap: 30px; grid-template-columns: repeat(3, 1fr); counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps > li { counter-increment: s; }
.steps > li::before {
  content: counter(s);
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-weight: 800; font-size: 14px; margin-bottom: 16px;
}
.steps p { color: var(--muted); margin: 0; font-size: 15.5px; line-height: 1.58; }
section.dark .steps > li::before { background: var(--lime); color: var(--deep); }
section.dark .steps h3 { color: #fff; }
section.dark .steps p { color: #a8bfb8; }

/* passi lunghi, verticali */
.steps-long { list-style: none; padding: 0; margin: 0; counter-reset: t; display: grid; gap: 0; }
.steps-long > li {
  counter-increment: t; display: grid; grid-template-columns: 52px 1fr; gap: 22px;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.steps-long > li:first-child { border-top: 0; padding-top: 0; }
.steps-long > li::before {
  content: counter(t, decimal-leading-zero);
  font-size: 13px; font-weight: 800; letter-spacing: .04em;
  color: var(--accent); padding-top: 4px;
}
.steps-long p { color: var(--muted); margin: 0; font-size: 16px; }

/* schede */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
section.paper .card { background: var(--ground); border-color: var(--line-soft); }
section.sand .card { background: var(--paper); border-color: #e4dcc9; }
.card p { color: var(--muted); margin: 0; font-size: 15.5px; line-height: 1.58; }
.card p + p { margin-top: 10px; }
section.dark .card { background: var(--deep-2); border-color: rgba(255,255,255,.10); }
section.dark .card h3 { color: #fff; }
section.dark .card p { color: #a8bfb8; }

.card.tick h3 { display: flex; align-items: baseline; gap: 10px; }
.card.tick h3::before {
  content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 2px;
  background: var(--lime); transform: translateY(-1px);
}

/* elenco puntato con segno */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; color: var(--muted); font-size: 15.5px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 9px; height: 9px; border-radius: 2px; background: var(--lime);
  box-shadow: 0 0 0 1px rgba(18,48,42,.10);
}
section.dark .ticks li { color: #a8bfb8; }

/* riquadro prodotto in evidenza */
.spot { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.spot .steps { grid-template-columns: 1fr; gap: 22px; }
.spot .steps > li { display: grid; grid-template-columns: 34px 1fr; column-gap: 16px; row-gap: 6px; align-items: start; }
.spot .steps > li::before { margin-bottom: 0; grid-row: 1; grid-column: 1; }
.spot .steps > li > * { grid-column: 2; }
.spot .steps > li > h3 { grid-row: 1; padding-top: 4px; }

/* mockup telefono */
.phone {
  background: #0d221e; border-radius: 26px; padding: 14px;
  box-shadow: var(--shadow-md); border: 1px solid rgba(255,255,255,.10);
  max-width: 360px; margin-left: auto;
}
.phone .screen { background: #ece5dd; border-radius: 16px; overflow: hidden; }
.phone .top {
  background: #075e54; color: #fff; padding: 11px 14px;
  display: flex; align-items: center; gap: 10px;
}
.phone .top .av {
  width: 30px; height: 30px; border-radius: 50%; background: #cfe8e2; color: #075e54;
  display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: 0 0 auto;
}
.phone .top b { font-size: 14px; font-weight: 650; display: block; line-height: 1.2; }
.phone .top small { font-size: 11px; opacity: .75; }
.phone .body { padding: 16px 12px 18px; display: grid; gap: 7px; }
.phone .bubble {
  background: #fff; border-radius: 4px 12px 12px 12px; padding: 10px 12px 6px;
  font-size: 13.5px; line-height: 1.5; color: #1f2c28;
  box-shadow: 0 1px 1px rgba(0,0,0,.12); max-width: 92%;
}
.phone .bubble .t { display: block; text-align: right; font-size: 10.5px; color: #8a9a94; margin-top: 3px; }
.phone .qr {
  background: #fff; border-radius: 8px; padding: 2px; max-width: 92%;
  box-shadow: 0 1px 1px rgba(0,0,0,.12);
}
.phone .qr span {
  display: block; text-align: center; color: #0a7cff;
  font-size: 13.5px; font-weight: 500; padding: 9px 8px;
}
.phone .qr span + span { border-top: 1px solid #edf0ef; }
.phone-note { font-size: 14px; color: var(--muted); margin: 18px 0 0; max-width: 46ch; }
section.dark .phone-note { color: #93aca5; }
.phone-cap { font-size: 11.5px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 14px; }
section.dark .phone-cap { color: #7d968f; }

/* riquadro citazione / richiamo */
.note {
  background: var(--deep-2); color: #cfdfda; border-radius: var(--radius-lg);
  padding: 34px 36px;
}
.note h2 { color: #fff; }
.note p { color: #b6cbc5; max-width: 62ch; }
.note strong { color: #fff; }
.note a { color: var(--lime); }
.note .btns { margin-top: 22px; }

.panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px 34px;
}
section.paper .panel { background: var(--ground); border-color: var(--line-soft); }

/* tabella */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 16px; }
.tbl th, .tbl td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl thead th {
  font-size: 11.5px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-2); border-bottom: 1px solid var(--ink);
}
.tbl td { color: var(--muted); }
.tbl td:first-child { color: var(--ink); font-weight: 600; }
.tbl tr:last-child td { border-bottom: 0; }

/* elenco dati societari */
.idlist { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.idlist .r { display: grid; grid-template-columns: 230px 1fr; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: 15.5px; }
.idlist .r:last-child { border-bottom: 0; }
.idlist dt { color: var(--muted); }
.idlist dd { margin: 0; font-weight: 600; }

/* blocchi sicurezza */
.blocks { display: grid; gap: 18px; }
.block {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 28px;
}
.block h3 { font-size: 17px; margin-bottom: 14px; }
.block .ticks li { font-size: 15px; }

/* domande frequenti */
.faq { display: grid; gap: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details[open] summary { color: var(--accent); }
.faq summary {
  cursor: pointer; list-style: none; padding: 19px 34px 19px 0; position: relative;
  font-weight: 650; font-size: 17px; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 17px;
  font-size: 21px; font-weight: 400; color: var(--muted-2); line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; color: var(--accent); }
.faq .a { padding: 0 34px 20px 0; color: var(--muted); font-size: 15.5px; max-width: 72ch; }

/* schermata prodotto */
figure.shot { margin: 0; }
figure.shot img {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow-md); background: var(--paper);
}
figure.shot figcaption { font-size: 14px; color: var(--muted); margin-top: 14px; max-width: 62ch; }

/* schede contatto */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-cards .card p { margin-bottom: 14px; }
.contact-cards .card a { font-weight: 600; font-size: 15px; word-break: break-word; }

/* ---------------------------------------------------------
   Pagine di testo
   --------------------------------------------------------- */
.doc { background: var(--paper); padding: 56px 0 84px; }
.doc h1 { font-size: clamp(28px, 4.2vw, 40px); letter-spacing: -.028em; margin: 0 0 8px; line-height: 1.1; }
.doc .updated { color: var(--muted-2); font-size: 14px; margin: 0 0 8px; }
.doc .doc-intro {
  font-size: 18px; color: var(--muted); border-left: 3px solid var(--lime);
  padding-left: 20px; margin: 30px 0 34px;
}
.doc h2 { font-size: 20px; margin: 38px 0 12px; letter-spacing: -.015em; }
.doc dl { margin: 0 0 16px; }
.doc dt { font-weight: 700; margin-top: 14px; }
.doc dd { margin: 0 0 4px; color: var(--muted); }
.doc ul { padding-left: 22px; margin: 0 0 16px; }
.doc li { margin-bottom: 8px; }
.doc-nav {
  border-top: 1px solid var(--line); margin-top: 48px; padding-top: 22px;
  display: flex; gap: 22px; flex-wrap: wrap; font-size: 15px;
}

/* ---------------------------------------------------------
   Chiusura
   --------------------------------------------------------- */
footer.site { background: var(--deep); color: #93aca5; padding: 54px 0 40px; font-size: 14.5px; }
footer.site a { color: #c3d4cf; text-decoration: none; }
footer.site a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; }
.foot-grid h4 {
  font-size: 11.5px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase;
  color: #7a948c; margin: 0 0 14px;
}
.foot-grid nav a { display: block; margin-bottom: 9px; }
.foot-grid .about p { line-height: 1.6; max-width: 40ch; }
.foot-brand { margin-bottom: 16px; }
.foot-brand img { display: block; width: 154px; height: auto; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,.10); margin-top: 40px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13.5px; color: #7a948c;
}
.foot-bottom p { margin: 0; }

/* ---------------------------------------------------------
   Adattamento
   --------------------------------------------------------- */
@media (max-width: 940px) {
  .spot { grid-template-columns: 1fr; gap: 40px; }
  .phone { margin: 0 auto; }
  .facts .wrap { grid-template-columns: repeat(2, 1fr); }
  .facts .f:nth-child(odd) { padding-left: 0; border-left: 0; }
  .facts .f:nth-child(3), .facts .f:nth-child(4) { border-top: 1px solid rgba(255,255,255,.10); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .foot-grid .about { grid-column: 1 / -1; }
  .contact-cards { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .brand img { width: 150px; }
  .steps, .cards, .cards.three { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .hero { padding: 48px 0 56px; }
  .bar { padding: 14px 0; }
  .bar nav { width: 100%; margin-left: 0; }
  .bar nav a { padding: 6px 10px; font-size: 14px; }
  .langs { margin-left: auto; }
  .idlist .r { grid-template-columns: 1fr; gap: 2px; }
  .note, .panel { padding: 26px 22px; }
  .steps-long > li { grid-template-columns: 40px 1fr; gap: 14px; }
  .tbl th, .tbl td { padding: 12px 10px; font-size: 14px; }
  .facts .wrap { grid-template-columns: 1fr; }
  .facts .f { padding-left: 0 !important; border-left: 0 !important; border-top: 1px solid rgba(255,255,255,.10); }
  .facts .f:first-child { border-top: 0; }
}

@media print {
  header.site, footer.site nav, .btns { display: none; }
  body { background: #fff; font-size: 12pt; }
}


/* ---------------------------------------------------------
   Momenti d'uso
   --------------------------------------------------------- */
.moments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 8px; }
.moments > div { padding: 0 28px; border-left: 2px solid var(--lime); }
.moments > div:first-child { padding-left: 0; border-left: 0; }
.moments h3 { font-size: 17px; margin-bottom: 10px; }
.moments p { color: var(--muted); font-size: 15.5px; margin: 0; }
section.dark .moments > div { border-left-color: rgba(207,232,107,.45); }
section.dark .moments h3 { color: #fff; }
section.dark .moments p { color: #a8bfb8; }

.kicker {
  margin: 40px 0 0; padding: 22px 26px;
  background: var(--lime-soft); border-radius: var(--radius);
  font-size: 18px; line-height: 1.5; font-weight: 600; color: var(--deep);
  max-width: 62ch;
}
section.dark .kicker { background: rgba(207,232,107,.12); color: #eaf6c4; }

@media (max-width: 860px) {
  .moments { grid-template-columns: 1fr; gap: 26px; }
  .moments > div { padding: 0 0 0 20px; border-left: 2px solid var(--lime); }
  .moments > div:first-child { padding-left: 20px; border-left: 2px solid var(--lime); }
}
