/* Inamuh — stile condiviso versioni B e C
   Colori e font ripresi dall'app (primary #07384a, accent #ff3f0e, Inter + Playfair Display) */

:root {
  --primary: #07384a;
  --primary-800: #042f40;
  --primary-900: #041e28;
  --primary-500: #076d90;
  --primary-100: #c3dfe9;
  --primary-50: #e8f4f8;
  --accent: #ff3f0e;
  --accent-600: #e02a00;
  --night: #0a0c13;
  --ink: #1b2430;
  --ink-soft: #55616e;
  --paper: #ffffff;
  --sand: #f7f5f1;
  --line: rgba(7, 56, 74, .12);
  --radius: 20px;
  --shadow: 0 18px 50px -20px rgba(4, 30, 40, .35);
  --spectrum: linear-gradient(90deg, #8a5bd0, #22b8e0, #4cbf5a, #ffd21a, #ff8a1a, #ff2a1a);
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; line-height: 1.15; color: var(--primary); letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.3rem; }
p { max-width: 62ch; }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--sand { background: var(--sand); }
.section--dark { background: var(--primary-900); color: #e9f1f4; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: rgba(233, 241, 244, .78); }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-soft); margin-top: 18px; }
.section--dark .lead { color: rgba(233, 241, 244, .78); }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center p { margin-inline: auto; }
.spectrum-bar { height: 3px; width: 72px; border-radius: 3px; background: var(--spectrum); margin-top: 22px; }
.center .spectrum-bar { margin-inline: auto; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; border: 1.5px solid transparent;
  font: 500 .98rem/1 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(255, 63, 14, .55); outline-offset: 3px;
}
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 10px 26px -10px rgba(255, 63, 14, .7); }
.btn--accent:hover { background: var(--accent-600); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-800); }
.btn--ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.btn--outline { border-color: var(--primary); color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  color: #fff;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.site-header.is-solid, .site-header.always-solid {
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  color: var(--primary);
  box-shadow: 0 1px 0 var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; letter-spacing: .32em; font-size: .95rem; text-transform: uppercase; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a:not(.btn) {
  text-decoration: none; font-size: .93rem; padding: 8px 12px; border-radius: 999px; opacity: .86;
  transition: opacity .15s, background .15s;
}
.nav a:not(.btn):hover { opacity: 1; background: rgba(127, 127, 127, .14); }
.nav a[aria-current="page"] { opacity: 1; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav .btn { padding: 10px 20px; font-size: .9rem; margin-left: 8px; }
.menu-toggle { display: none; background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; }
.menu-toggle svg { width: 26px; height: 26px; display: block; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); color: var(--primary);
    padding: 8px 20px 24px; box-shadow: 0 24px 40px -20px rgba(4, 30, 40, .4);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a:not(.btn) { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); opacity: 1; font-size: 1.02rem; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--accent); }
  .nav .btn { margin: 16px 0 0; }
  .site-header.menu-open { background: var(--paper); color: var(--primary); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(100svh, 860px);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 48px) 0 72px;
  background:
    radial-gradient(60% 70% at 78% 50%, rgba(34, 184, 224, .18), transparent 70%),
    radial-gradient(50% 60% at 15% 100%, rgba(255, 63, 14, .16), transparent 70%),
    linear-gradient(160deg, var(--primary-900) 0%, var(--primary) 70%, #0b4a63 100%);
  color: #fff;
}
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 32px; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: italic; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: rgba(255, 255, 255, .8); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-art { position: relative; justify-self: center; width: min(100%, 470px); aspect-ratio: 1; }
.hero-art img {
  width: 100%; height: 100%; object-fit: contain;
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.scroll-hint { position: absolute; bottom: 22px; left: 50%; translate: -50% 0; color: rgba(255, 255, 255, .5); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; }

@media (max-width: 860px) {
  .hero { min-height: 0; padding-bottom: 64px; }
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-art { order: -1; width: min(72%, 320px); margin-bottom: -10px; }
  .scroll-hint { display: none; }
}

/* ---------- Page hero (pagine interne versione C) ---------- */
.page-hero {
  padding: calc(var(--header-h) + 64px) 0 64px;
  background: linear-gradient(160deg, var(--primary-900), var(--primary));
  color: #fff; position: relative; overflow: hidden;
}
.page-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--spectrum); }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.2rem); }
.page-hero p { color: rgba(255, 255, 255, .8); margin-top: 16px; font-size: 1.1rem; }
.page-hero .eyebrow { color: #ff8a67; }

/* ---------- Griglie e card ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 980px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } .grid--5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } .grid--5 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: .98rem; }

/* le 5 aree dell'app, con le stesse icone della barra di navigazione */
.area { text-align: center; padding: 26px 16px; }
.area .ico {
  width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 20px;
  background: var(--primary-50); display: grid; place-items: center;
}
.area .ico i {
  display: block; width: 60px; height: 60px; background: var(--primary);
  -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat;
}
.area .ico.maestro { background: #fff; box-shadow: 0 8px 24px -10px rgba(4, 30, 40, .35); }
.area .ico.maestro img { width: 50px; height: 50px; }
.area h3 { font-family: var(--font-sans); font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; }
.area p { font-size: .88rem; margin-inline: auto; }

/* ---------- Split (testo + immagine) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split--reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--reverse > :first-child { order: 0; } }
.split p + p { margin-top: 14px; }

.checklist { list-style: none; margin-top: 22px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 12.5 10.5 17 18 8'/></svg>") center / 14px no-repeat;
}

/* cornice telefono con l'immagine hero dell'app */
.phone {
  width: min(64%, 250px); margin-inline: auto; padding: 9px; border-radius: 38px;
  background: linear-gradient(145deg, #1c2a33, #05090c);
  box-shadow: 0 40px 80px -30px rgba(4, 30, 40, .6), inset 0 0 0 2px rgba(255, 255, 255, .06);
}
.phone img { border-radius: 30px; width: 100%; aspect-ratio: 9 / 17; object-fit: cover; object-position: top; }

/* ---------- Passi ---------- */
.steps { list-style: none; counter-reset: step; display: grid; gap: 0; max-width: 820px; margin-inline: auto; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding-bottom: 40px; position: relative; }
.step:last-child { padding-bottom: 0; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; font: 400 1.35rem var(--font-serif); position: relative; z-index: 1;
}
.step::after { content: ""; position: absolute; left: 25px; top: 52px; bottom: 0; width: 2px; background: linear-gradient(var(--primary-100), transparent); }
.step:last-child::after { display: none; }
.step h3 { margin: 6px 0 8px; }
.step p { color: var(--ink-soft); }
@media (max-width: 520px) { .step { grid-template-columns: 48px 1fr; gap: 16px; } .step::before { width: 44px; height: 44px; } .step::after { left: 21px; top: 44px; } }

/* ---------- Percorsi ---------- */
.path { border-radius: var(--radius); padding: 26px; color: #fff; position: relative; overflow: hidden; min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; }
.path::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(4, 30, 40, .6) 100%); }
.path > * { position: relative; }
.path h3 { color: #fff; font-size: 1.3rem; }
.path p { color: rgba(255, 255, 255, .92); font-size: .93rem; margin-top: 8px; }
.path .meta { margin-top: 14px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }

/* ---------- Conoscenza ---------- */
.theme { border-radius: var(--radius); padding: 24px; color: #fff; display: flex; flex-direction: column; gap: 8px; min-height: 170px; position: relative; overflow: hidden; }
.theme::after { content: ""; position: absolute; width: 180px; height: 180px; right: -60px; bottom: -70px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.theme h3 { color: #fff; font-size: 1.25rem; }
.theme p { color: rgba(255, 255, 255, .88); font-size: .92rem; }

/* ---------- Livelli / stat ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; text-align: center; }
.stat b { display: block; font: 400 clamp(2.6rem, 6vw, 4rem)/1 var(--font-serif); color: #fff; }
.stat span { color: rgba(233, 241, 244, .75); font-size: .95rem; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Nota importante ---------- */
.note {
  border-left: 4px solid var(--accent); background: var(--sand); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 26px; max-width: 820px; margin-inline: auto; color: var(--ink-soft); font-size: .96rem;
}
.note strong { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); padding: 0 22px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 500; color: var(--primary); list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; color: var(--ink-soft); }

/* ---------- CTA finale ---------- */
.cta-band { text-align: center; }
.cta-band p { margin: 18px auto 0; }
.cta-band .hero-cta { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-900); color: rgba(233, 241, 244, .7); padding: 56px 0 32px; font-size: .92rem; }
.site-footer .top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.site-footer .brand { color: #fff; }
.site-footer p { max-width: 36ch; margin-top: 14px; }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .bottom { padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: .82rem; opacity: .8; }

/* ---------- Animazione d'ingresso (solo se JS attivo) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; } .js .reveal.d2 { transition-delay: .16s; } .js .reveal.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art img { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Icone dell'app (PNG tinte con mask, come nella barra di navigazione) ---------- */
.ico-pratiche    { --src: url('../img/icon-pratiche.png'); }
.ico-conoscenza  { --src: url('../img/icon-conoscenza.png'); }
.ico-teleconsulto{ --src: url('../img/icon-teleconsulto.png'); }
.ico-viaggio     { --src: url('../img/icon-viaggio.png'); }

/* ---------- Chip di revisione (solo per la fase di test del team: da rimuovere online) ---------- */
.review-chip {
  position: fixed; z-index: 60; left: 14px; bottom: 14px;
  background: rgba(4, 30, 40, .88); color: #fff; text-decoration: none;
  font-size: .78rem; padding: 8px 14px; border-radius: 999px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .5);
}
.review-chip:hover { background: var(--accent); }

.split h2 + p { margin-top: 16px; }

/* ---------- Hero chiaro (versione B): logo classico su fondo bianco ---------- */
.hero--light {
  color: var(--ink);
  background:
    radial-gradient(55% 60% at 80% 45%, rgba(34, 184, 224, .10), transparent 70%),
    radial-gradient(45% 55% at 92% 85%, rgba(255, 63, 14, .08), transparent 70%),
    radial-gradient(40% 50% at 70% 5%, rgba(138, 91, 208, .08), transparent 70%),
    #fff;
}
.hero--light h1 { color: var(--primary); }
.hero--light .lead { color: var(--ink-soft); }
.hero--light .eyebrow { color: var(--accent); }
.hero--light .hero-art img { animation: none; }
.hero--light .scroll-hint { color: rgba(7, 56, 74, .45); }
.hero--light .btn--ghost { border-color: var(--primary); color: var(--primary); }
.hero--light .btn--ghost:hover { background: var(--primary); color: #fff; }

/* ---------- Logotipo (scritta Inamuh) ---------- */
.brand--logo img { width: auto; height: 17px; }
.site-footer .brand--logo img { filter: brightness(0) invert(1); }
@media (max-width: 480px) { .brand--logo img { height: 14px; } }

/* ---------- Chi siamo, contatti, privacy ---------- */
.about { max-width: 68ch; margin: 0 auto; text-align: center; color: var(--ink-soft); }
.about p + p { margin-top: 14px; }
.contact-mail { margin-top: 18px; font-size: 1.1rem; }
.contact-mail a { color: #fff; }
.legal { max-width: 78ch; margin: 0 auto; padding: calc(var(--header-h) + 48px) 0 72px; }
.legal h1 { color: var(--primary); margin-bottom: 8px; }
.legal h2 { font-size: 1.25rem; margin: 32px 0 8px; color: var(--primary); }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { margin: 8px 0 0 1.2em; }
.legal .updated { font-size: .9rem; opacity: .8; }

/* Pagina Chi siamo, contatti e note legali nel footer */
.about-intro { max-width: 72ch; margin: 0 auto; text-align: center; }
.about-intro p { color: var(--ink-soft); }
.vm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 980px; margin: 0 auto; }
.vm-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.vm-card h3 { font-family: var(--font-serif); font-weight: 500; font-size: 1.6rem; color: var(--primary); margin-bottom: 12px; }
.vm-card p { color: var(--ink-soft); }
.team-card { max-width: 560px; margin: 0 auto; text-align: center; }
.team-card .role { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.team-card .name { font-family: var(--font-serif); font-size: 1.7rem; color: var(--primary); margin: 6px 0 14px; }
.team-card p { color: var(--ink-soft); }
.foot-links { list-style: none; display: grid; gap: 10px; align-content: start; text-align: right; }
.legal-notes { font-style: normal; margin-top: 22px; font-size: .85rem; line-height: 1.8; }
.legal-notes strong { color: #fff; font-weight: 600; }
.site-footer .top { align-items: flex-start; padding-bottom: 32px; }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
@media (max-width: 720px) { .vm-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .foot-links { text-align: left; } }
.legal h3 { font-size: 1.05rem; margin: 22px 0 6px; color: var(--primary); }
.legal p { margin-top: 10px; }
