/* ==========================================================================
   Pronto Soccorso Lazio — design system condiviso (index, privacy, tc)
   Palette derivata dall'icona dell'app: rosso segnale su bianco carta.
   ========================================================================== */

:root {
  --red: #d93a2b;
  --red-deep: #b02a1e;
  --red-soft: #fdeae7;
  --red-line: #f3cdc7;
  --ink: #231512;
  --ink-soft: #5c4f4b;
  --ink-faint: #8d7f7a;
  --paper: #fbf7f4;
  --card: #ffffff;
  --line: #ece2dd;
  --ok: #1e7d4f;
  --ok-soft: #e7f5ec;
  --font-display: "Bricolage Grotesque", "Avenir Next", sans-serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35, 21, 18, 0.05), 0 12px 32px -16px rgba(176, 42, 30, 0.18);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  /* carta con trama a croci sanitarie appena percettibile + alone caldo in alto */
  background-image:
    radial-gradient(ellipse 80% 40% at 50% -5%, rgba(217, 58, 43, 0.07), transparent),
    linear-gradient(var(--red-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--red-line) 1px, transparent 1px);
  background-size: 100% 100%, 56px 56px, 56px 56px;
  background-position: 0 0, 27px 21px, 27px 21px;
  background-blend-mode: normal, soft-light, soft-light;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* nastro rosso di segnalazione in cima alla pagina */
body::before {
  content: "";
  display: block;
  height: 5px;
  background: repeating-linear-gradient(135deg,
      var(--red) 0 14px,
      var(--red-deep) 14px 28px);
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem;
}

::selection {
  background: var(--red);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Tipografia
   -------------------------------------------------------------------------- */

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.1rem, 6vw, 3.1rem);
  font-weight: 800;
}

h1 .accent {
  color: var(--red);
}

p {
  color: var(--ink-soft);
}

a {
  color: var(--red);
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  margin: 1.25rem 0;
  border: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Landing — hero
   -------------------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: 1.5rem 0 1rem;
}

.hero .app-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: 0 10px 28px -10px rgba(176, 42, 30, 0.55);
  margin-bottom: 1.25rem;
}

.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid var(--red-line);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1rem;
}

.subtitle {
  color: var(--ink-soft);
  font-size: 1.1rem;
  max-width: 34rem;
  margin: 1rem auto 0;
}

/* --------------------------------------------------------------------------
   Landing — feature
   -------------------------------------------------------------------------- */

.features {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.feature-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--red-soft);
  border: 1px solid var(--red-line);
  color: var(--red-deep);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-text {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.feature-text strong {
  color: var(--ink);
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.1rem;
}

/* --------------------------------------------------------------------------
   Landing — avvisi e CTA
   -------------------------------------------------------------------------- */

.warning {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: #fff8ed;
  color: #5f4200;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  border: 1px solid #f1dcb2;
  border-left: 4px solid #e0a526;
}

.emergency {
  background: linear-gradient(150deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  text-align: center;
}

.emergency h3 {
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.emergency p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
}

.emergency-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0.25rem 0;
}

.cta-section {
  text-align: center;
  margin: 2rem 0 0.5rem;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  padding: 1rem 2.25rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 6px 20px -6px rgba(176, 42, 30, 0.6);
  margin-bottom: 1rem;
}

.download-btn:hover {
  background: var(--red-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -6px rgba(176, 42, 30, 0.65);
}

.download-btn svg {
  width: 22px;
  height: 22px;
}

.coming-soon {
  color: var(--ink-faint);
  font-size: 0.9rem;
  display: inline-block;
  margin: 0.25rem;
}

/* --------------------------------------------------------------------------
   Landing — sezioni informative e passi
   -------------------------------------------------------------------------- */

.info-section {
  margin: 0.5rem 0 1.75rem;
}

.info-section:last-child {
  margin-bottom: 0.5rem;
}

.info-section h2 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.info-section p {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 0.9rem;
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--red);
  border-bottom: 3px solid var(--red-soft);
  line-height: 1.3;
  flex-shrink: 0;
}

.steps strong {
  color: var(--ink);
}

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

.footer {
  text-align: center;
  margin-top: 2.5rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-link:hover {
  color: var(--red-deep);
  text-decoration: underline;
}

.contact {
  color: var(--ink-faint);
  font-size: 0.9rem;
}

.contact a {
  color: var(--red);
  text-decoration: none;
  font-weight: 500;
}

.contact a:hover {
  text-decoration: underline;
}

.legal-line {
  margin-top: 0.75rem;
  color: var(--ink-faint);
  font-size: 0.82rem;
}

.legal-line a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
}

.legal-line a:hover {
  color: var(--red);
}

/* --------------------------------------------------------------------------
   Pagine legali (privacy.html, tc.html)
   -------------------------------------------------------------------------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.back-link:hover {
  color: var(--red-deep);
}

.header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.header h1 {
  font-size: clamp(1.9rem, 5vw, 2.5rem);
}

.last-updated {
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.section {
  margin: 2rem 0;
}

.section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.85rem;
  padding-left: 0.85rem;
  border-left: 4px solid var(--red);
}

.section p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.section ul {
  margin: 0 0 1rem 1.5rem;
}

.section li {
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.highlight {
  background: var(--ok-soft);
  color: var(--ok);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  border: 1px solid #c8e6d3;
  border-left: 4px solid var(--ok);
  font-size: 0.95rem;
}

.highlight strong {
  color: #155e3b;
}

.contact-section {
  background: var(--red-soft);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 2rem 0;
  border: 1px solid var(--red-line);
}

.contact-section h3 {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.contact-section p {
  font-size: 0.95rem;
}

.contact-section a {
  color: var(--red-deep);
  text-decoration: none;
  font-weight: 600;
}

.contact-section a:hover {
  text-decoration: underline;
}

.disclaimer {
  background: var(--paper);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  border: 1px dashed var(--ink-faint);
  font-size: 0.93rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Animazione di ingresso (solo CSS, disattivata se l'utente lo preferisce)
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: reveal 0.6s cubic-bezier(0.22, 0.8, 0.3, 1) forwards;
  }

  .reveal:nth-child(2) { animation-delay: 0.08s; }
  .reveal:nth-child(3) { animation-delay: 0.16s; }
  .reveal:nth-child(4) { animation-delay: 0.24s; }

  @keyframes reveal {
    to {
      opacity: 1;
      transform: none;
    }
  }
}

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

@media (min-width: 640px) {
  .container {
    max-width: 640px;
    padding: 2rem;
  }

  .card {
    padding: 2.75rem 3rem;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: 2.5rem 0 1.5rem;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 780px;
  }

  .footer-links {
    gap: 3rem;
  }
}
