/* ============================================================================
   RE WIN — stile condiviso (landing + pagine legali)
   Nessuna risorsa esterna: font di sistema, nessun CDN, nessun tracker.
   → zero cookie → nessun banner di consenso da gestire.
   Palette allineata a lib/shared/theme/app_theme.dart
   ============================================================================ */

:root {
  --red-50:  #FADBD8;
  --red-100: #F5C6C0;
  --red-500: #C0392B;   /* main brand */
  --red-600: #A73225;
  --red-700: #922B21;

  --ink:     #1F1F1F;
  --ink-700: #3D3D3D;   /* antracite */
  --ink-500: #6B6B6B;
  --ink-400: #8A8A8A;

  --line:    #E6E4E1;
  --bg:      #FFFFFF;
  --bg-soft: #FBF9F8;
  --bg-warm: #F5F1EF;

  --radius:  14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(31,31,31,.04), 0 8px 24px rgba(31,31,31,.06);
  --shadow-lg: 0 2px 4px rgba(31,31,31,.05), 0 24px 60px rgba(31,31,31,.12);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --wrap: 1140px;
}

/* Se un giorno self-hosti Inter, metti i .woff2 in site/fonts/ e togli il commento.
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700; font-display: swap;
}
*/

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-700);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--red-600); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ─── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 20px;
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: var(--ink-700); font-size: 14px; font-weight: 500;
  text-decoration: none;
}
.nav a:hover { color: var(--red-500); text-decoration: none; }

/* ─── Wordmark (SEGNAPOSTO — sostituire col logo RE WIN definitivo) ───────── */

.wordmark { display: inline-flex; align-items: center; gap: 11px; }
.wordmark svg { display: block; flex: none; }
.wordmark-text {
  font-size: 21px; font-weight: 800; letter-spacing: -0.4px;
  color: var(--ink); white-space: nowrap;
}
.wordmark-text em { font-style: normal; color: var(--red-500); }
.wordmark--lg .wordmark-text { font-size: 28px; }
.wordmark--inv .wordmark-text { color: #fff; }
.wordmark--inv .wordmark-text em { color: #fff; opacity: .85; }

/* ─── Bottoni ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 11px;
  font-size: 15px; font-weight: 600; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--red-500); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--red-600); }
.btn-ghost { background: #fff; color: var(--ink-700); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-400); }
.btn-lg { padding: 16px 26px; font-size: 16px; }

/* Badge store (segnaposto: sostituire con i badge ufficiali) */
.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 11px 18px; border-radius: 11px;
  background: var(--ink); color: #fff;
  text-decoration: none; min-width: 186px;
  transition: transform .12s ease, opacity .12s ease;
}
.store-badge:hover { text-decoration: none; transform: translateY(-1px); opacity: .92; }
.store-badge svg { flex: none; }
.store-badge span { display: block; line-height: 1.25; }
.store-badge .sb-small { font-size: 10px; opacity: .75; letter-spacing: .3px; }
.store-badge .sb-big { font-size: 15px; font-weight: 600; }
.store-badge[data-placeholder="1"] { position: relative; }
.store-badge[data-placeholder="1"]::after {
  content: "link da inserire";
  position: absolute; top: -9px; right: -6px;
  background: var(--red-50); color: var(--red-700);
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 5px;
  border: 1px solid var(--red-100);
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 88% -8%, var(--red-50) 0%, transparent 62%),
    linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 56px; align-items: center;
  padding-top: 84px; padding-bottom: 84px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase;
  color: var(--red-600); background: var(--red-50);
  padding: 7px 13px; border-radius: 100px; margin-bottom: 22px;
}
.hero h1 {
  margin: 0 0 20px; color: var(--ink);
  font-size: clamp(34px, 4.6vw, 56px); font-weight: 800;
  line-height: 1.08; letter-spacing: -1.4px;
}
.hero h1 em { font-style: normal; color: var(--red-500); }
.hero .lead {
  font-size: 18px; color: var(--ink-500); margin: 0 0 30px; max-width: 48ch;
}
.hero-actions { display: flex; flex-direction: column; gap: 16px; }
.hero-note { font-size: 13px; color: var(--ink-400); }

/* ─── Mockup telefono (CSS puro) ──────────────────────────────────────────── */

.phone-stack { position: relative; display: flex; justify-content: center; }
.phone {
  width: 268px; aspect-ratio: 9 / 19.5;
  background: #111; border-radius: 38px; padding: 9px;
  box-shadow: var(--shadow-lg);
  position: relative; flex: none;
}
.phone::before {
  content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 24px; background: #111; border-radius: 100px; z-index: 3;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 30px; overflow: hidden;
  background: var(--bg-warm); position: relative;
  display: flex; align-items: center; justify-content: center;
}
/* Lo screenshot riempie lo schermo del mockup senza deformarsi. */
.phone-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone--back {
  position: absolute; left: 50%; top: 26px;
  transform: translateX(-72%) rotate(-7deg) scale(.9);
  z-index: 0; opacity: .55; filter: blur(.4px);
}
.phone--front { z-index: 2; }

/* ─── Segnaposto immagine ─────────────────────────────────────────────────── */

.ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 18px;
  background:
    repeating-linear-gradient(45deg, #EDE9E6 0 10px, #F4F1EF 10px 20px);
  border: 1px dashed #CFC9C4; border-radius: 10px;
  color: var(--ink-400);
}
.ph strong { color: var(--ink-500); font-size: 12px; font-weight: 700; letter-spacing: .4px; }
.ph span { font-size: 11px; }
.ph--photo { aspect-ratio: 3 / 2; height: auto; border-radius: var(--radius); }

/* ─── Sezioni ─────────────────────────────────────────────────────────────── */

.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin: 0 0 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section h2 {
  margin: 0 0 14px; color: var(--ink);
  font-size: clamp(26px, 3vw, 38px); font-weight: 800;
  letter-spacing: -.9px; line-height: 1.15;
}
.section .sub { font-size: 17px; color: var(--ink-500); margin: 0; }

/* ─── Passi ───────────────────────────────────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 26px; box-shadow: var(--shadow);
}
.step-n {
  width: 38px; height: 38px; border-radius: 11px; margin-bottom: 16px;
  background: var(--red-50); color: var(--red-600);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.step h3 { margin: 0 0 8px; font-size: 17px; color: var(--ink); font-weight: 700; }
.step p { margin: 0; font-size: 14.5px; color: var(--ink-500); }

/* ─── Feature ─────────────────────────────────────────────────────────────── */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  padding: 28px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line);
}
.feature-ico {
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: 15px;
  background: var(--red-500); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.feature h3 { margin: 0 0 7px; font-size: 16.5px; color: var(--ink); font-weight: 700; }
.feature p { margin: 0; font-size: 14.5px; color: var(--ink-500); }

/* ─── Split (immagine + testo) ────────────────────────────────────────────── */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split--rev .split-media { order: 2; }

/* ─── Galleria screenshot ─────────────────────────────────────────────────── */

.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.shot {
  border-radius: 20px; overflow: hidden; background: #111; padding: 7px;
  box-shadow: var(--shadow);
}
.shot-inner { border-radius: 15px; overflow: hidden; aspect-ratio: 9/19.5; background: var(--bg-warm); }
.shot-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Foto a piena larghezza (es. agenti) */
.photo { width: 100%; aspect-ratio: 3/2; object-fit: cover;
         border-radius: var(--radius); display: block; }

/* Griglia di screenshot incorniciati (con scritte già dentro l'immagine) */
.shotgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
            max-width: 940px; margin: 0 auto; }
.shotgrid img { width: 100%; height: auto; display: block; border-radius: 20px;
                box-shadow: 0 22px 54px -30px rgba(0,0,0,.5); }
@media (max-width: 820px) { .shotgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .shotgrid { grid-template-columns: 1fr; max-width: 320px; } }

/* ─── CTA agenzie ─────────────────────────────────────────────────────────── */

.cta-band {
  background: linear-gradient(135deg, var(--red-600) 0%, var(--red-700) 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 56px;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center;
}
.cta-band h2 { color: #fff; margin: 0 0 12px; font-size: clamp(24px, 2.6vw, 34px); }
.cta-band p { margin: 0; color: rgba(255,255,255,.86); font-size: 16.5px; }
.cta-band .btn-ghost { background: #fff; border-color: #fff; color: var(--red-700); }
.cta-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--ink); color: rgba(255,255,255,.62);
  padding: 60px 0 34px; margin-top: 0; font-size: 14px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px;
  padding-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.site-footer h4 {
  color: #fff; font-size: 12px; letter-spacing: .9px; text-transform: uppercase;
  margin: 0 0 16px; font-weight: 700;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(255,255,255,.62); }
.site-footer a:hover { color: #fff; }
.footer-legal {
  padding-top: 26px; font-size: 12.5px; color: rgba(255,255,255,.42);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-addr { font-style: normal; line-height: 1.85; }

/* ─── Pagine legali ───────────────────────────────────────────────────────── */

.legal { padding: 60px 0 90px; }
.legal-wrap { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.legal h1 {
  font-size: clamp(28px, 3.6vw, 40px); color: var(--ink); font-weight: 800;
  letter-spacing: -1px; margin: 0 0 10px; line-height: 1.15;
}
.legal .meta {
  font-size: 13.5px; color: var(--ink-400); margin: 0 0 40px;
  padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.legal h2 {
  font-size: 22px; color: var(--ink); font-weight: 700; letter-spacing: -.4px;
  margin: 44px 0 14px; padding-top: 6px;
}
.legal h3 {
  font-size: 16.5px; color: var(--ink); font-weight: 700;
  margin: 28px 0 10px;
}
.legal p, .legal li { font-size: 15.5px; color: var(--ink-700); }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 8px; }

.legal table {
  width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px;
}
.legal th, .legal td {
  border: 1px solid var(--line); padding: 11px 13px; text-align: left;
  vertical-align: top;
}
.legal th { background: var(--bg-warm); font-weight: 700; color: var(--ink); }
.table-scroll { overflow-x: auto; }

.callout {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-left: 3px solid var(--red-500);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px; margin: 24px 0;
}
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.todo {
  background: #FFF8E1; border: 1px dashed #E0B33C; border-radius: 6px;
  color: #7A5A00; font-size: 13px; font-weight: 700;
  padding: 2px 7px; display: inline-block;
}

.toc {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 26px; margin: 0 0 40px;
}
.toc h4 { margin: 0 0 12px; font-size: 12px; letter-spacing: .8px;
  text-transform: uppercase; color: var(--ink-400); font-weight: 700; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; font-size: 14.5px; }

/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 940px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 46px; padding-top: 58px; padding-bottom: 58px; }
  .steps, .features { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .split--rev .split-media { order: 0; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .cta-band { grid-template-columns: 1fr; padding: 38px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .nav { display: none; }
  .phone--back { display: none; }
}
@media (max-width: 520px) {
  .shots { grid-template-columns: 1fr; }
  .section { padding: 58px 0; }
}
