/* ==========================================================================
   Lendmates — landing styles
   Brand: #FFC400 (giallo ufficiale, single source of truth in src/theme.ts)
   ========================================================================== */

/* Quicksand 400/600/700 — gli stessi pesi caricati dall'app mobile (App.tsx) */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap');

:root {
  --brand: #FFC400;
  --brand-dark: #D4A800;
  --brand-soft: #FFF7DB;
  --ink: #1C1C1C;
  --ink-2: #4A4A4A;
  --muted: #717171;
  --line: #E9E9E9;
  --surface: #FAFAFA;
  --success: #2CBE6E;
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 20px rgba(0, 0, 0, .04);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, .10);
  --font: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.62;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 { line-height: 1.16; letter-spacing: -.015em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--tint { background: var(--surface); }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.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);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.header__logo img { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-weight: 700; font-size: .95rem; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }

/* ---------- Selettore lingua a bandierine ---------- */
.lang {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-left: 4px;
}
.lang__opt {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 7px; border-radius: 999px; line-height: 0;
  opacity: .38; filter: saturate(.25); transition: opacity .15s ease, filter .15s ease, background .15s ease;
}
.lang__opt:hover { opacity: .8; filter: saturate(.9); }
.lang__opt--on { opacity: 1; filter: none; background: var(--surface); cursor: default; }
.lang__flag { width: 21px; height: 15px; display: block; border-radius: 2px; }

@media (max-width: 760px) { .nav .nav__hide-sm { display: none; } }
@media (max-width: 520px) { .nav { gap: 16px; } }

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn--primary { background: var(--brand); color: var(--ink); box-shadow: 0 6px 18px rgba(255, 196, 0, .35); }
.btn--primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: #C9C9C9; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-soft); border: 1px solid #FFE9A3;
  color: #7A5C00; font-weight: 700; font-size: .82rem;
  padding: 7px 16px; border-radius: 999px; letter-spacing: .01em;
}
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-dark); }

/* ---------- Store badges (stato "in arrivo") ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.center .stores { justify-content: center; }
.store {
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff;
  padding: 11px 20px 11px 18px; border-radius: 14px;
  text-decoration: none; opacity: .55; cursor: default; position: relative;
}
.store svg { width: 24px; height: 24px; flex: none; fill: currentColor; }
.store__txt { display: flex; flex-direction: column; line-height: 1.15; }
.store__top { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.store__bot { font-size: 1.02rem; font-weight: 700; }
.stores__note { width: 100%; font-size: .85rem; color: var(--muted); margin: 4px 0 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 76px 0 84px; }
.hero::before {
  content: ''; position: absolute; inset: -220px 0 auto -10%;
  height: 620px; pointer-events: none;
  background: radial-gradient(60% 60% at 30% 45%, rgba(255, 196, 0, .30) 0%, rgba(255, 196, 0, 0) 70%);
}
.hero::after {
  content: ''; position: absolute; top: -180px; right: -140px; pointer-events: none;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 0, .22) 0%, rgba(255, 196, 0, 0) 68%);
}
/* il contenuto sta sopra gli aloni decorativi */
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { margin-top: 18px; }
.hero .lead { font-size: 1.22rem; }
.hero__points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.hero__points li { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; color: var(--ink-2); }
.hero__points svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--success); }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero .lead, .hero__points { margin-left: auto; margin-right: auto; }
  .hero__points li { justify-content: center; text-align: left; }
  .hero .stores { justify-content: center; }
}

/* ---------- Mockup app: ricostruzione fedele della schermata Esplora ---------- */
.phone-stage { display: flex; justify-content: center; }
.phone {
  width: 300px; aspect-ratio: 9 / 19; background: #fff;
  border: 10px solid #111; border-radius: 44px;
  box-shadow: var(--shadow-md); overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  font-size: 10px; line-height: 1.35;
}
.phone__notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 96px; height: 20px; background: #111; border-radius: 0 0 13px 13px; z-index: 5;
}
.phone__status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 18px 0; font-weight: 700; font-size: 9px; color: var(--ink);
}
.phone__status svg { height: 9px; width: auto; }
.phone__logo { display: flex; justify-content: center; padding: 8px 0 10px; }
.phone__logo img { height: 17px; width: auto; }

/* riga categorie a scorrimento */
.cats-row { display: flex; gap: 11px; padding: 0 12px 10px; overflow: hidden; }
.cat-item { flex: none; width: 46px; text-align: center; }
.cat-item__circle {
  width: 42px; height: 42px; margin: 0 auto 5px; border-radius: 50%;
  background: #FFF3D1; display: flex; align-items: center; justify-content: center;
}
.cat-item__circle svg { width: 20px; height: 20px; stroke: var(--brand-dark); fill: none; stroke-width: 1.8; }
.cat-item__label { font-size: 7.5px; font-weight: 600; color: var(--ink-2); line-height: 1.2; }

.zone-pill {
  display: inline-flex; align-items: center; gap: 5px; margin: 0 12px 12px;
  background: var(--surface); border-radius: 999px; padding: 6px 13px;
  font-size: 9px; font-weight: 600; color: var(--ink-2);
}
.zone-pill svg { width: 9px; height: 9px; fill: var(--ink-2); }

.sec-title { font-size: 14px; font-weight: 700; letter-spacing: -.01em; padding: 0 12px 8px; }

/* carosello orizzontale di card */
.pcards { display: flex; gap: 9px; padding: 0 12px 14px; overflow: hidden; }
.pcard {
  flex: none; width: 118px; background: #fff;
  border: 1px solid var(--line); border-radius: 13px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.pcard__img {
  position: relative; height: 96px;
  /* contain, non cover: sono illustrazioni, non foto — non vanno ritagliate.
     Con foto vere conviene tornare a cover. */
  background-color: #FFF6DC;
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.pcard__heart {
  position: absolute; top: 6px; right: 6px; width: 17px; height: 17px;
  border-radius: 50%; background: rgba(0,0,0,.42);
  display: flex; align-items: center; justify-content: center;
}
.pcard__heart svg { width: 9px; height: 9px; fill: none; stroke: #fff; stroke-width: 2; }
.pcard__heart--on svg { fill: #FF5A5F; stroke: #FF5A5F; }
.pcard__tags { position: absolute; left: 5px; bottom: 5px; display: flex; gap: 4px; }
.tag {
  display: inline-flex; align-items: center; gap: 3px; border-radius: 5px;
  padding: 2px 5px; font-size: 7px; font-weight: 700; color: #fff; white-space: nowrap;
}
.tag--sell { background: #2CBE6E; }
.tag--rent { background: var(--brand); color: var(--ink); }
.pcard__body { padding: 7px 8px 9px; }
.pcard__t { font-size: 9.5px; font-weight: 700; line-height: 1.25; margin-bottom: 4px; }
.pcard__p { font-size: 11px; font-weight: 700; }
.pcard__p span { font-size: 8.5px; font-weight: 600; color: var(--muted); }
.pcard__s { font-size: 8px; color: var(--muted); margin-top: 1px; }
.pcard__loc { display: flex; align-items: center; gap: 3px; font-size: 8px; color: var(--muted); margin-top: 3px; }
.pcard__loc svg { width: 7px; height: 7px; fill: var(--muted); flex: none; }

/* pulsante ricerca flottante */
.fab {
  position: absolute; right: 14px; bottom: 60px; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(90,90,90,.85);
  display: flex; align-items: center; justify-content: center;
}
.fab svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 2; }

/* tab bar flottante */
.tabbar {
  position: absolute; left: 14px; right: 14px; bottom: 14px; height: 42px;
  background: rgba(80,80,80,.88); backdrop-filter: blur(8px); border-radius: 999px;
  display: flex; align-items: center; justify-content: space-around;
}
.tabbar svg { width: 16px; height: 16px; stroke: rgba(255,255,255,.9); fill: none; stroke-width: 1.8; }
.tabbar .on svg { stroke: var(--brand); }
/* icona Esplora: il marchio vero dell'app, non un disegno */
.tabbar img { width: 17px; height: 17px; display: block; }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: 20px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .grid--4, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.card__icon {
  width: 46px; height: 46px; border-radius: 14px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px;
}

/* ---------- Steps ---------- */
.steps { counter-reset: s; display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); margin-top: 46px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-left: 62px; }
.step::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.15rem;
}
.step h3 { margin-bottom: .3em; }
.step p { color: var(--ink-2); font-size: .98rem; margin: 0; }

/* ---------- Tabs "flussi" ---------- */
.flows { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 46px; }
@media (max-width: 900px) { .flows { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .flows { grid-template-columns: 1fr; } }
.flow {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; background: #fff;
  box-shadow: var(--shadow-sm);
}
.flow__tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--brand-dark); margin-bottom: 10px;
}
.flow h3 { font-size: 1.28rem; }
.flow p { font-size: .95rem; color: var(--ink-2); margin: 0; }

/* ---------- Categorie ---------- */
.cats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 34px; }
.cat {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 10px 20px; font-weight: 700; font-size: .95rem; box-shadow: var(--shadow-sm);
}

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 44px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; font-weight: 700; font-size: 1.05rem;
  padding: 18px 40px 18px 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 700; color: var(--brand-dark); line-height: 1;
}
.faq details[open] summary::after { content: '\2013'; }
.faq details p { color: var(--ink-2); margin: 0 0 18px; font-size: 1rem; padding-right: 20px; }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(135deg, var(--brand) 0%, #FFD84D 100%);
  border-radius: 28px; padding: 60px 40px; text-align: center; margin: 0 auto;
}
.cta h2 { margin-bottom: .3em; }
.cta p { color: #5C4600; font-weight: 600; max-width: 52ch; margin-left: auto; margin-right: auto; }
.cta .store { background: #1C1C1C; opacity: .75; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 54px 0 40px; font-size: .93rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: 28px; } }
.footer__grid img { height: 26px; width: auto; margin-bottom: 12px; }
.footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-bottom: 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer a { text-decoration: none; color: var(--ink-2); font-weight: 600; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer__legal { margin: 34px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.6; }
.footer__legal strong { color: var(--ink-2); }
.footer__bottom {
  margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  color: var(--muted); font-size: .86rem;
}

/* ---------- Pagine di testo (legal / supporto) ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 64px 24px 88px; }
.doc h1 { font-size: clamp(1.9rem, 4.4vw, 2.6rem); }
.doc h2 { font-size: 1.4rem; margin-top: 2.2em; }
.doc h3 { font-size: 1.08rem; margin-top: 1.6em; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 1.2em; }
.doc li { margin-bottom: .5em; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1.6em; font-size: .92rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--surface); font-weight: 700; color: var(--ink); }
.doc a { color: #A37A00; font-weight: 700; }
.doc__meta { color: var(--muted); font-size: .9rem; margin-bottom: 2.4em; }
.callout {
  background: var(--brand-soft); border: 1px solid #FFE9A3; border-radius: var(--radius-sm);
  padding: 18px 20px; margin: 0 0 1.8em;
}
.callout p:last-child { margin-bottom: 0; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 24px; margin-bottom: 2.4em; }
.toc ol { margin: 0; padding-left: 20px; }
.toc a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
