:root {
  --accent: #0d8f82;
  --accent-dark: #08756c;
  --accent-soft: #e6f4f2;
  --ink: #172332;
  --muted: #5b6b7a;
  --bg: #ffffff;
  --bg-soft: #f6f8f9;
  --border: #e4e9ec;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

/* Focus visibile da tastiera (accessibilità) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: .3rem;
}
.site-nav :focus-visible { outline-color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  .card:hover { transform: none; }
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a { color: var(--accent-dark); }

/* Nav */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--accent);
  border-bottom: 1px solid var(--accent-dark);
}
.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: .8rem;
  background: rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-mark svg { width: 17px; height: 17px; color: #fff; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.nav-links a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  padding: .4rem .8rem;
  border-radius: .55rem;
  transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.nav-links a:hover {
  color: #fff;
  background: rgba(255,255,255,.16);
}
.nav-links a.active {
  color: #fff;
  font-weight: 600;
  background: rgba(255,255,255,.24);
}
.nav-links a:active { transform: translateY(1px); }

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: .6rem;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  font-weight: 700;
  border-radius: .6rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: .65rem 1.3rem;
  font-size: .95rem;
  box-shadow: 0 1px 2px rgba(13,143,130,.15);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-large { padding: .9rem 1.9rem; font-size: 1.05rem; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
  padding: .9rem 1.7rem;
  font-size: 1rem;
}
.btn-ghost:hover { border-color: var(--muted); }
.btn-small { padding: .5rem 1rem; font-size: .88rem; }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--accent-dark);
    border-bottom: 1px solid var(--accent-dark);
    box-shadow: 0 8px 20px rgba(23,35,50,.18);
    padding: .25rem 1.5rem 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: .8rem .6rem;
    font-size: 1rem;
    border-radius: .5rem;
    border-top: 1px solid rgba(255,255,255,.15);
  }
  .nav-links a:first-child { border-top: none; }
}

/* Hero */
header.hero {
  padding: 3rem 0 4rem;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, var(--accent-soft) 0%, transparent 60%);
}
.hero-image {
  display: block;
  width: 100%;
  max-width: 880px;
  height: auto;
  margin: 0 auto 2.25rem;
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(23, 35, 50, .12);
}

/* Su smartphone l'immagine va da bordo a bordo */
@media (max-width: 600px) {
  .hero-image {
    max-width: none;
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    border-radius: 0;
    box-shadow: none;
  }
}
.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: .35rem .9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
h1.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 1.1rem;
  color: var(--ink);
}
.hero-lead {
  max-width: 38rem;
  margin: 0 auto 2.2rem;
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn .arrow { display: inline-block; transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Card "In evidenza" (home) */
section.featured { padding: 1.5rem 0 4.5rem; }
.featured .section-tag {
  display: block;
  text-align: center;
  margin-bottom: 1.1rem;
}
.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 280px) 1fr;
  gap: 2rem;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 12px 32px rgba(23, 35, 50, .09);
}
.featured-media {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--bg-soft);
}
.featured-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
}
.featured-body h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0;
}
.featured-body p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.5;
  margin: 0 0 .5rem;
}
.featured-more {
  text-align: center;
  margin-top: 1.75rem;
}

@media (max-width: 640px) {
  .featured-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 1.5rem;
  }
  .featured-media { max-width: 240px; margin: 0 auto; }
  .featured-body { align-items: center; }
}

/* Page header (non-home pages) */
header.page-header {
  padding: 3.5rem 0 3rem;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, var(--accent-soft) 0%, transparent 60%);
}
header.page-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 .8rem;
}
header.page-header p {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Sections */
section { padding: 4.5rem 0; }
section.soft { background: var(--bg-soft); }
section.compact { padding: 3rem 0; }
.section-head {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 3rem;
}
.section-tag {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: .6rem;
}
h2.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0 0 .8rem;
}
.section-desc {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.step {
  position: relative;
  padding-top: 3.2rem;
}
.step-number {
  position: absolute;
  top: 0; left: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}
.step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 .5rem;
}
.step p {
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 780px) {
  .steps { grid-template-columns: 1fr; gap: 2.2rem; }
}

/* Card grids (feature cards / resource cards) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card-grid.two-col { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(23,35,50,.10);
  border-color: var(--accent);
}
.card.placeholder:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}
.app-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 220px;
  background: var(--bg-soft);
  border-radius: .85rem;
  overflow: hidden;
  margin: 0 auto 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: .7rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 1.4rem; height: 1.4rem; }
.card-icon-img {
  display: block;
  width: 5.25rem;
  height: 5.25rem;
  border-radius: 1rem;
  object-fit: cover;
  margin-bottom: 1.1rem;
}
.card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 .5rem;
}
.card p {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}
.card .btn { margin-top: auto; align-self: flex-start; }
.card-meta {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: .2rem .6rem;
  border-radius: 999px;
  margin-bottom: .8rem;
}

@media (max-width: 780px) {
  .card-grid, .card-grid.two-col { grid-template-columns: 1fr; }
}

/* Griglia risorse: card centrate e di larghezza controllata */
#resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 400px));
  justify-content: center;
}
.more-soon {
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  margin: 2.75rem 0 0;
}
.resources-note {
  max-width: 46rem;
  margin: 2.5rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
}

/* Email contact card */
.card.contact-email {
  margin-bottom: 1.5rem;
  background: var(--accent-soft);
  border-color: transparent;
}
.card.contact-email p a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
}
.card.contact-email p a:hover { text-decoration: underline; }

/* Coming-soon placeholder card */
.card.placeholder {
  border-style: dashed;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: var(--muted);
}
.card.placeholder h3 { color: var(--muted); }

/* Ricerca risorse */
.resource-search {
  position: relative;
  max-width: 26rem;
  margin: 0 auto 2.5rem;
}
.resource-search .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: var(--muted);
  pointer-events: none;
}
.resource-search input {
  width: 100%;
  font: inherit;
  font-size: .98rem;
  color: var(--ink);
  padding: .8rem 1rem .8rem 2.7rem;
  border: 1px solid var(--border);
  border-radius: .7rem;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.resource-search input::placeholder { color: var(--muted); }
.resource-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.resource-search-empty {
  text-align: center;
  color: var(--muted);
  font-size: .98rem;
  margin: 0;
}

/* Plain bullet list (used inside cards) */
.list-plain {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.list-plain li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
}
.list-plain li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: .5rem;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* About / Chi sono */
.about {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.75rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  padding: 2.2rem;
}
.about-avatar {
  width: 4.6rem;
  height: 4.6rem;
  border-radius: .9rem;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 .3rem;
}
.about .role {
  color: var(--accent-dark);
  font-size: .92rem;
  font-weight: 600;
  margin-bottom: .8rem;
}
.about p.bio {
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.65;
  margin: 0 0 1rem;
}
.about a.social {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: .6rem;
  padding: .5rem 1rem;
}
.about a.social:hover { border-color: var(--muted); }
.about a.social svg { width: 1rem; height: 1rem; color: var(--accent-dark); }

@media (max-width: 560px) {
  .about { grid-template-columns: 1fr; text-align: center; }
  .about-avatar { margin: 0 auto; }
}

/* Privacy / info strip */
.privacy-strip {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem 1.75rem;
}
.privacy-strip svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--accent-dark);
  flex-shrink: 0;
  margin-top: .15rem;
}
.privacy-strip p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
}
.privacy-strip strong { color: var(--ink); }

/* Closing CTA */
section.closing { text-align: center; }
section.closing h2 { margin-bottom: .8rem; }
section.closing p { color: var(--muted); margin-bottom: 2rem; }

/* Legal / testo lungo (privacy) */
.legal { max-width: 44rem; margin: 0 auto; }
.legal h2 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
  margin: 2.4rem 0 .6rem;
}
.legal h2:first-of-type { margin-top: 0; }
.legal p,
.legal li {
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.7;
}
.legal p { margin: 0 0 1rem; }
.legal ul { padding-left: 1.2rem; margin: .4rem 0 1.2rem; }
.legal li { margin-bottom: .4rem; }
.legal strong { color: var(--ink); }
.legal a { color: var(--accent-dark); }
.legal .updated { font-size: .88rem; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .65rem;
  font-size: .85rem;
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }
