/* ============================================================================
   site.css · E-MIKE Apps (apps.e-mike.it)
   Stile: editoriale chiaro, tipografia protagonista, dettagli "engineered"
   (linee sottili, etichette monospace, indici), accento PER PRODOTTO.
   Dependency-free: nessun framework, nessun font esterno (solo Inversionz per
   il wordmark, caricato da font-logo.css). Vedi CLAUDE.md.
   ============================================================================ */

:root {
  --bg:        #F4F2EC;   /* off-white caldo (NON bianco: i bianchi delle card spiccano) */
  --bg-2:      #ECE9E1;   /* superficie alternata */
  --shadow-card:   0 1px 2px rgba(20,23,26,.04), 0 12px 30px -14px rgba(20,23,26,.16);
  --shadow-card-h: 0 2px 6px rgba(20,23,26,.06), 0 22px 48px -16px rgba(20,23,26,.22);
  --ink:       #16191C;   /* near-black, coerente con E-MIKE */
  --ink-soft:  #44494F;
  --muted:     #878D95;
  --line:      rgba(22,25,28,.13);
  --line-soft: rgba(22,25,28,.07);
  --accent:        #16996A;  /* verde E-MIKE = colore "casa" / default */
  --accent-strong: #0F8A5F;
  --accent-tint:   rgba(22,153,106,.10);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 14px;
}

/* Accenti per prodotto: si applicano via [data-accent="..."] su una sezione/pagina */
[data-accent="preventivi"] { --accent:#16996A; --accent-strong:#0F8A5F; --accent-tint:rgba(22,153,106,.10); }
[data-accent="costochef"]  { --accent:#E2611B; --accent-strong:#C9510F; --accent-tint:rgba(226,97,27,.10); }
[data-accent="sitiweb"]    { --accent:#2B59C3; --accent-strong:#1F47A6; --accent-tint:rgba(43,89,195,.10); }

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

body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 18px; line-height: 1.6;
  font-weight: 400; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }

/* ---- Wordmark E-MIKE Apps ------------------------------------------------ */
.wordmark { font-family: 'Inversionz', var(--mono); letter-spacing: .12em; line-height: 1; text-transform: lowercase; }

/* ---- Layout -------------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding: clamp(56px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.section--plain { border-top: 0; }

/* Etichetta "engineered": eyebrow monospace con indice */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 22px;
}
.eyebrow .idx { color: var(--accent); font-weight: 500; }
.eyebrow .bar { width: 26px; height: 1px; background: var(--line); }

h1,h2,h3,h4 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.04; margin: 0; }
.display { font-size: clamp(40px, 7.2vw, 86px); letter-spacing: -0.035em; line-height: .98; }
.h2 { font-size: clamp(28px, 4.4vw, 48px); }
.h3 { font-size: clamp(21px, 2.6vw, 28px); letter-spacing: -0.02em; }
.lead { font-size: clamp(18px, 2.2vw, 23px); color: var(--ink-soft); line-height: 1.55; max-width: 42ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* ---- Header -------------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; }
.brand .wordmark { font-size: 23px; color: var(--ink); }
.brand .tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; background: var(--ink); padding: 3px 7px; border-radius: 5px; transform: translateY(-2px);
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 15px; color: var(--ink-soft); position: relative; padding: 4px 0; }
.nav a::after { content:""; position:absolute; left:0; right:100%; bottom:0; height:1.5px; background: var(--accent); transition: right .25s ease; }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { right: 0; }
.nav .btn { padding: 9px 16px; }
.nav-toggle { display: none; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: var(--sans); font-size: 15px; font-weight: 500; line-height: 1;
  padding: 13px 22px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--accent { background: var(--accent); border-color: var(--accent); }
.btn--accent:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: transparent; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { padding-top: clamp(56px, 10vw, 120px); padding-bottom: clamp(40px, 7vw, 90px); }
.hero .meta {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 26px; display: flex; gap: 14px; flex-wrap: wrap;
}
.hero .meta b { color: var(--ink); font-weight: 500; }
.hero .display { max-width: 16ch; }
.hero .display em { font-style: normal; color: var(--accent); }
.hero .lead { margin: 28px 0 34px; font-size: clamp(19px, 2.3vw, 25px); max-width: 48ch; }

/* ---- HERO SCURO (contrasto + carattere tecnico) -------------------------- */
.hero-dark {
  position: relative; overflow: hidden;
  background: #14171A; color: #E7EDE9;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: clamp(72px, 12vw, 150px) 0 clamp(54px, 9vw, 108px);
}
.hero-dark::before { /* griglia tecnica sottile, sfumata */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(125% 95% at 18% -10%, #000 30%, transparent 76%);
          mask-image: radial-gradient(125% 95% at 18% -10%, #000 30%, transparent 76%);
}
.hero-dark::after { /* alone d'accento in alto a destra */
  content: ""; position: absolute; top: -30%; right: -10%; width: 50%; height: 130%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-dark .wrap { position: relative; z-index: 1; }
.hero-dark__eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; color: #818E87; margin: 0 0 24px; }
.hero-dark .display { color: #fff; max-width: 17ch; }
.hero-dark .display em { font-style: normal; color: var(--accent); }
.hero-dark .lead { color: #AAB4AD; max-width: 46ch; margin: 26px 0 34px; }
.btn--dark-ghost { background: transparent; color: #E7EDE9; border-color: rgba(255,255,255,.24); }
.btn--dark-ghost:hover { border-color: #fff; background: transparent; }

/* ---- OFFERTE: due "corsie" pari (App / Su misura) ------------------------ */
.offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 24px); }
.offer-card {
  display: flex; flex-direction: column; gap: 12px; padding: clamp(26px, 3.4vw, 42px);
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow-card);
  transition: border-color .2s ease, transform .18s ease, box-shadow .25s ease;
}
.offer-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow-card-h); }
.offer-card__tag { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.offer-card__tag::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--accent); }
.offer-card h2 { font-size: clamp(24px, 3.2vw, 34px); }
.offer-card p { color: var(--ink-soft); margin: 0; flex: 1; }
.offer-card__link { font-weight: 500; color: var(--accent-strong); display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.offer-card:hover .offer-card__link .arrow { transform: translateX(4px); }

/* ---- GRIGLIA APP compatta (scala a molti progetti) ----------------------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: clamp(14px, 2vw, 20px); margin-top: 26px; }
.app-card {
  display: flex; flex-direction: column; gap: 8px; min-height: 196px;
  padding: clamp(20px, 2.6vw, 28px); border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-card);
  transition: border-color .2s ease, transform .18s ease, box-shadow .25s ease;
}
.app-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow-card-h); }
.app-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-card__num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.app-card h3 { font-size: clamp(20px, 2.4vw, 25px); margin-top: 4px; }
.app-card p { color: var(--ink-soft); font-size: 15.5px; margin: 0; flex: 1; }
.app-card__link { font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.app-card__link .arrow { color: var(--accent); transition: transform .2s ease; }
.app-card:hover .app-card__link .arrow { transform: translateX(4px); }
.app-card--soon { color: var(--muted); }
.app-card--soon h3 { color: var(--ink-soft); }

/* ---- Mini-griglia (perché, compatta) ------------------------------------- */
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: clamp(22px, 3vw, 40px); margin-top: clamp(28px, 4vw, 44px); }
.mini-grid .n { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.mini-grid h3 { font-size: 17px; margin: 8px 0 6px; }
.mini-grid p { color: var(--ink-soft); font-size: 15px; margin: 0; }

/* ---- Catalogo app (index editoriale, scalabile) -------------------------- */
.catalog { display: flex; flex-direction: column; }
.app-item {
  display: grid; grid-template-columns: 1fr minmax(300px, 46%); gap: clamp(24px, 4vw, 56px);
  align-items: center; padding: clamp(34px, 5vw, 56px) 0; border-top: 1px solid var(--line);
}
.app-item:last-child { border-bottom: 1px solid var(--line); }
.app-item__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.app-num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 7px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.badge--live { color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-tint); }
.badge--soon .dot { background: var(--muted); }
.app-item__name { font-size: clamp(30px, 4.6vw, 52px); letter-spacing: -0.03em; line-height: 1; }
.app-item__name .wm { font-family: 'Inversionz', var(--mono); font-size: .62em; letter-spacing: .06em; }
.app-item__desc { font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft); margin: 16px 0 14px; max-width: 40ch; }
.app-item__for { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.app-item__for b { color: var(--ink); font-weight: 500; }
.app-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 16px; color: var(--ink); }
.app-link .arrow { color: var(--accent); transition: transform .2s ease; }
.app-item:hover .app-link .arrow { transform: translateX(4px); }
.app-link--soon { color: var(--muted); }

/* preview a destra dell'item (placeholder screenshot tinto d'accento) */
.app-prev {
  border-radius: var(--radius); border: 1px solid var(--line);
  background:
    linear-gradient(0deg, var(--accent-tint), var(--accent-tint)),
    var(--bg-2);
  aspect-ratio: 16/10; position: relative; overflow: hidden;
}
.app-prev::after {
  content: attr(data-label); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em;
  color: var(--ink-soft); line-height: 1.5;
}

/* ---- Placeholder screenshot (riusabile) ---------------------------------- */
.shot {
  position: relative; border-radius: var(--radius); border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(0deg, var(--accent-tint), var(--accent-tint)), var(--bg-2);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px;
}
.shot__label { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; max-width: 32ch; }
.shot__label b { color: var(--accent-strong); }
.shot--desktop { aspect-ratio: 16/10; }
.shot--mobile  { aspect-ratio: 1000/2000; max-width: 290px; border-radius: 30px; padding: 14px; border-width: 8px; border-style: solid; border-color: var(--ink); background: var(--bg-2); }
.shot--mobile .shot__label { background: var(--accent-tint); width: 100%; height: 100%; display:flex; align-items:center; justify-content:center; border-radius: 20px; }
.shot img { border-radius: inherit; }

/* ---- Coppia di card (sezione "Su misura") -------------------------------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); margin-top: clamp(40px, 6vw, 64px); }
.duo__card .feature__kicker { margin-bottom: 12px; }
.duo__card p { color: var(--ink-soft); }

/* ---- Blocchi editoriali (about / approccio) ------------------------------ */
.split { display: grid; grid-template-columns: minmax(0,0.9fr) minmax(0,1.1fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.stack > * + * { margin-top: 18px; }

.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.points li { padding: 26px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 52px 1fr; gap: 18px; }
.points li:last-child { border-bottom: 1px solid var(--line); }
.points .n { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 3px; }
.points h3 { margin-bottom: 8px; }
.points p { margin: 0; color: var(--ink-soft); font-size: 17px; }

/* ---- Feature rows (pagina prodotto) -------------------------------------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 70px); align-items: center; padding: clamp(40px, 6vw, 80px) 0; border-top: 1px solid var(--line); }
.feature:nth-child(even) .feature__media { order: -1; }
.feature__kicker { font-family: var(--mono); font-size: 12.5px; letter-spacing:.14em; text-transform: uppercase; color: var(--accent-strong); margin: 0 0 14px; }
.feature p { color: var(--ink-soft); }
.chiplist { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.chiplist li { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }

/* ---- "Cosa non è" -------------------------------------------------------- */
.notes { background: var(--bg-2); border-radius: var(--radius); padding: clamp(26px,4vw,44px); }
.notes ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.notes li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.notes li::before { content: "·"; color: var(--accent); }

/* ---- Spec/at-a-glance ---------------------------------------------------- */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.specs div { background: var(--bg); padding: 20px 22px; }
.specs dt { font-family: var(--mono); font-size: 11.5px; letter-spacing:.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.specs dd { margin: 0; font-size: 16px; }

/* ---- CTA band ------------------------------------------------------------ */
.cta { text-align: left; }
.cta .display { max-width: 14ch; }
.cta .lead { margin: 24px 0 32px; }

/* ---- Footer -------------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); padding: clamp(44px,6vw,72px) 0 40px; color: var(--ink-soft); }
.family { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 40px; }
.family a, .family span { background: var(--bg); padding: 18px 20px; display: block; }
.family .lab { font-family: var(--mono); font-size: 11px; letter-spacing:.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.family .nm { font-size: 16px; color: var(--ink); }
.family a:hover { background: var(--bg-2); }
.family .here .nm { color: var(--accent-strong); font-weight: 500; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; }
.foot-bottom .wordmark { font-size: 17px; color: var(--ink); }

/* ---- Reveal animation ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- Superfici scure (ritmo + chiusura pagina) --------------------------- */
.section--dark { background: #14171A; color: #E7EDE9; border-top-color: rgba(255,255,255,.08); }
.section--dark .eyebrow { color: #818E87; }
.section--dark .eyebrow .bar { background: rgba(255,255,255,.18); }
.section--dark .display, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .lead { color: #AAB4AD; }
.section--dark .muted, .section--dark .mono.muted { color: #7F8C85; }
.section--dark .btn--ghost { color: #E7EDE9; border-color: rgba(255,255,255,.24); }
.section--dark .btn--ghost:hover { border-color: #fff; background: transparent; }

/* Footer scuro: fa da "bookend" con l'hero in cima */
.site-foot { background: #14171A; color: #9AA49D; border-top-color: rgba(255,255,255,.08); }
.family { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.10); }
.family a, .family span { background: #191D20; }
.family a:hover { background: #21262B; }
.family .lab { color: #6F7A73; }
.family .nm { color: #E7EDE9; }
.family .here .nm { color: #34D27F; }
.foot-bottom { color: #8A938C; }
.foot-bottom .wordmark { color: #fff; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  body { font-size: 17px; }
  .nav { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--pad) 20px;
    transform: translateY(-130%); transition: transform .28s ease; }
  .nav.open { transform: none; }
  .nav a { padding: 14px 0; border-top: 1px solid var(--line-soft); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 12px; justify-content: center; }
  .nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; cursor: pointer; }
  .nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .2s; }
  .nav-toggle.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2){ opacity: 0; }
  .nav-toggle.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
  .app-item { grid-template-columns: 1fr; }
  .app-item__media { order: 2; }
  .duo { grid-template-columns: 1fr; }
  .offer-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature__media { order: 0; }
}
