/* Landing pubblica di portalepostale.it: stessi token di src/styles.scss. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/landing/fonts/inter-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('/landing/fonts/fraunces-latin.woff2') format('woff2');
}

:root {
  --primary: #2f5bff;
  --primary-600: #1e44f0;
  --primary-700: #1734c7;
  --primary-300: #85a8ff;
  --primary-soft: #eef3ff;
  --success: #13b981;
  --navy: #0c1230;
  --navy-2: #0a0f28;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #0f1729;
  --text-soft: #5b6478;
  --text-muted: #97a0b5;
  --border: #e7ebf3;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(20, 30, 80, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 30, 80, 0.18);
  --hero: linear-gradient(160deg, #1734c7, #2f5bff 55%, #4f7dff);
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--primary-300); outline-offset: 3px; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface);
  font-weight: 700;
}
.skip:focus { top: 12px; }

/* ── Bottoni ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-white { background: #fff; color: var(--primary-700); box-shadow: 0 8px 24px rgba(10, 20, 80, 0.22); }
.btn-white:hover { box-shadow: 0 12px 30px rgba(10, 20, 80, 0.3); }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.btn-ghost-light { color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); }

/* ── Testata ─────────────────────────────────────────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.top.is-stuck { background: var(--navy); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 76px; }
.brand img { width: 150px; }
.nav { display: flex; gap: 26px; font-size: 14.5px; font-weight: 600; color: rgba(255, 255, 255, 0.86); }
.nav a:hover { color: #fff; }
.top-actions { display: flex; align-items: center; gap: 8px; }

/* La testata è sovrapposta all'apertura: il fondo blu parte da sopra. */
.top { margin-bottom: -76px; }

/* ── Apertura ────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 136px 0 96px;
  background: var(--hero);
  color: #fff;
}
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.hero::before { width: 560px; height: 560px; right: -180px; top: -160px; }
.hero::after { width: 380px; height: 380px; left: -160px; bottom: -200px; }

.hero-in {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 56px;
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 18px 0 18px;
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.lead { max-width: 560px; font-size: 18px; color: rgba(255, 255, 255, 0.9); }
.lead strong { color: #fff; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points li::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18) url("data:image/svg+xml,%3Csvg 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'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.partner {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 34px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
.partner img { height: 38px; width: auto; border-radius: 6px; }

/* Anteprima illustrativa dell'app */
.hero-visual { position: relative; }
.mock {
  padding: 24px;
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.5deg);
}
.mock-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mock-kind { font-size: 13px; font-weight: 800; color: var(--primary); }
.mock-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-700);
  font-size: 12px;
  font-weight: 700;
}
.mock-title { margin-top: 12px; font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.2; }
.mock-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--text-soft); }
.mock-meta b { color: var(--text); }
.mock-steps { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.mock-steps li {
  position: relative;
  padding-left: 32px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.mock-steps li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--surface);
}
.mock-steps li.done { color: var(--text); }
.mock-steps li.done::before {
  border-color: var(--success);
  background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.mock-steps li.now { color: var(--primary-700); }
.mock-steps li.now::before { border-color: var(--primary); box-shadow: 0 0 0 5px var(--primary-soft); }
/* ── Sezioni ─────────────────────────────────────────────── */
.section { padding: 96px 0; }
.section-alt { background: var(--bg); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 {
  margin-top: 10px;
  font-family: var(--display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.section-head p { margin-top: 14px; font-size: 17px; color: var(--text-soft); }

.kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}
.ic {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Come funziona */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0; padding: 0; list-style: none; }
.step {
  position: relative;
  padding: 30px 26px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.step .ic { color: var(--primary); width: 30px; height: 30px; }
.step-n {
  position: absolute;
  top: 22px;
  right: 24px;
  font-family: var(--display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary-soft);
}
.step h3, .feature h3 { margin: 16px 0 8px; font-size: 18px; font-weight: 800; }
.step p, .feature p { color: var(--text-soft); font-size: 15px; }

/* Servizi */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.service:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.service h3 { font-size: 18px; font-weight: 800; color: var(--primary-700); }
.service p { margin-top: 8px; font-size: 15px; color: var(--text-soft); }
.service-main {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
  border: 0;
  background: var(--hero);
  color: #fff;
}
.service-main h3 { font-family: var(--display); font-size: 28px; color: #fff; }
.service-main p { color: rgba(255, 255, 255, 0.88); font-size: 16px; }

/* Vantaggi */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature { padding: 4px 4px 0; }
.feature .ic {
  box-sizing: content-box;
  padding: 12px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

/* FAQ */
.faq-in .section-head { margin-bottom: 36px; }
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: box-shadow 0.15s ease;
}
.faq details[open] { box-shadow: var(--shadow); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 20px;
  font-weight: 600;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--text-soft); font-size: 15.5px; }

/* Chiusura */
.final { padding: 88px 0; background: var(--hero); color: #fff; text-align: center; }
.final h2 {
  max-width: 760px;
  margin: 0 auto;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.12;
}
.final p { margin-top: 14px; font-size: 17px; color: rgba(255, 255, 255, 0.88); }
.final .hero-ctas { justify-content: center; }

/* Piè di pagina */
.foot { padding: 48px 0 28px; background: var(--navy-2); color: rgba(255, 255, 255, 0.72); font-size: 14px; }
.foot-in { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.foot-brand img { width: 130px; margin-bottom: 14px; }
.foot-brand a { color: #fff; font-weight: 600; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot-links a:hover, .link-btn:hover { color: #fff; }
.link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.foot-copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 980px) {
  .nav { display: none; }
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { max-width: 460px; margin: 10px auto 30px; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .service-main { grid-row: auto; grid-column: span 2; min-height: 0; }
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .top-in { height: 64px; }
  .top { margin-bottom: -64px; }
  .brand img { width: 120px; }
  .top-actions { gap: 2px; }
  .top-actions .btn { padding: 9px 14px; font-size: 13.5px; }
  .top-actions .btn-ghost-light { padding-inline: 10px; }
  .hero { padding: 104px 0 72px; }
  .lead { font-size: 16.5px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .section { padding: 72px 0; }
  .steps, .services, .features { grid-template-columns: minmax(0, 1fr); }
  .service-main { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .service { transition: none; }
}
