/* Ordeva - sito del progetto. HTML/CSS statico (Cloudflare Pages), nessun build.
   Tema unico chiaro, deliberato. Accento teal coerente col prodotto.
   Una sola scala di raggi (12px). Nessun trattino lungo nei testi. */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8f9;
  --bg-tint: #eaf2f4;
  --bg-ink: #0c141d;
  --ink: #0e1620;
  --ink-soft: #35404d;
  --muted: #5a6673;
  --line: #e1e6ea;
  --line-soft: #eef1f3;
  /* Palette del marchio: gradiente teal → verde acqua dell'icona dell'app */
  --accent: #0f6f92;
  --accent-deep: #0a5170;
  --accent-alt: #16a09a;
  --accent-tint: #e2eff2;
  --grad: linear-gradient(135deg, #14708f 0%, #17a29a 100%);
  /* Ombre tinte col blu del marchio, mai nero puro */
  --sh-sm: 0 1px 2px rgba(14,22,32,.05);
  --sh-md: 0 2px 6px rgba(14,22,32,.05), 0 14px 30px -16px rgba(10,81,112,.26);
  --sh-lg: 0 2px 8px rgba(14,22,32,.05), 0 44px 76px -34px rgba(10,81,112,.42);
  --r: 12px;
  --maxw: 1160px;
  --maxw-wide: 1280px;
  --pad-section: clamp(60px, 9vw, 112px);
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-text: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.022em; color: var(--ink); line-height: 1.14; text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--accent-tint); color: var(--accent-deep); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
/* L'header è sticky: gli ancoraggi devono fermarsi sotto, non sparirci dietro. */
[id] { scroll-margin-top: 92px; }

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

/* ── Header ──────────────────────────────────────────────────────────────── */
header.site {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,0.82); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
header.site .bar { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
header.site .brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display);
  font-weight: 700; font-size: 20px; letter-spacing: -0.025em; color: var(--ink); text-decoration: none; flex: none; }
header.site .brand img { width: 27px; height: 27px; }
header.site nav { display: flex; align-items: center; gap: 28px; }
header.site nav a { font-size: 14.5px; font-weight: 500; text-decoration: none; color: var(--ink-soft); white-space: nowrap; transition: color .15s ease; }
header.site nav a:hover { color: var(--accent); }
header.site nav a.nav-cta { background: var(--ink); color: #fff; padding: 9px 18px; border-radius: var(--r);
  box-shadow: var(--sh-sm); transition: background .15s ease, transform .12s ease; }
header.site nav a.nav-cta:hover { background: var(--accent-deep); }
header.site nav a.nav-cta:active { transform: translateY(1px); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer.site { background: var(--bg-ink); color: #aeb7c1; padding: 56px 0 40px; }
footer.site a { color: #aeb7c1; text-decoration: none; }
footer.site a:hover { color: #fff; }
.foot-grid { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.foot-brand .b { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.025em; color: #fff; }
.foot-brand .b img { width: 26px; height: 26px; }
.foot-brand p { font-size: 13.5px; margin: 10px 0 0; max-width: 32ch; line-height: 1.6; }
.foot-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #7d8894; margin: 0 0 14px; font-weight: 600; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin: 9px 0; font-size: 14px; }
.foot-legal { max-width: var(--maxw-wide); margin: 40px auto 0; padding: 22px 24px 0; border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px; color: #7d8894; display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ── Bottoni ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-text); font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: var(--r); text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .18s ease, border-color .15s ease, box-shadow .18s ease;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 1px 2px rgba(10,81,112,.28), 0 10px 22px -12px rgba(10,81,112,.55); }
.btn-primary:hover { box-shadow: 0 1px 2px rgba(10,81,112,.3), 0 14px 28px -12px rgba(10,81,112,.6); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(10,81,112,.3); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--sh-sm); }
.btn-ghost:hover { border-color: #c3d4dc; color: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost:active { transform: translateY(1px); }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 460px at 78% 8%, rgba(23,162,154,.13), transparent 62%),
    radial-gradient(900px 420px at 8% 0%, rgba(20,112,143,.14), transparent 60%),
    linear-gradient(180deg, var(--bg-tint), var(--bg) 74%);
  border-bottom: 1px solid var(--line-soft);
}
/* Griglia tenue dietro l'hero: dà profondità senza rumore. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(14,22,32,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,22,32,.028) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(120% 82% at 50% 0%, #000 32%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 82% at 50% 0%, #000 32%, transparent 78%);
}
.hero > * { position: relative; z-index: 1; }
.hero .inner { max-width: var(--maxw-wide); margin: 0 auto; padding: clamp(52px,7vw,84px) 24px clamp(52px,7vw,80px);
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 52px; align-items: center; }
.hero .eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 16px; }
.hero h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.65rem); margin: 0 0 18px; }
.hero p.sub { font-size: clamp(16px, 15px + .35vw, 18px); color: var(--ink-soft); max-width: 44ch; margin: 0 0 28px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .media { position: relative; }

/* Cornice schermata: bordo chiaro + luce interna in alto, come una finestra reale */
.frame { position: relative; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden;
  background: #fff; box-shadow: var(--sh-lg); }
.frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 0 1px rgba(10,81,112,.05); }
.frame img { width: 100%; }

/* ── Sezioni ─────────────────────────────────────────────────────────────── */
.section { padding: var(--pad-section) 0; }
.section + .section { border-top: 1px solid var(--line-soft); }
.section.tint { background: var(--bg-soft); border-top: 1px solid var(--line-soft); }
.section.dark { background: var(--bg-ink); color: #cfd6dd; border: 0; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark .fsplit .copy p, .section.dark .fsplit .copy li { color: #b4bec8; }
.section.dark .fsplit .copy li::before { background: #4ea6c6; }

.head { max-width: 60ch; margin: 0 0 clamp(36px, 5vw, 56px); }
.head .kicker { font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 12px; }
.head h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem); margin: 0 0 12px; }
.head p { font-size: 17px; color: var(--muted); margin: 0; }
.section.dark .head p { color: #9aa4ae; }
.head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ── Pilastri (fascia) ───────────────────────────────────────────────────── */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.pillars > div { padding: 0 26px; border-left: 1px solid var(--line); }
.pillars > div:first-child { border-left: 0; padding-left: 0; }
.pillars .rule { width: 30px; height: 3px; border-radius: 2px; background: var(--grad); margin-bottom: 16px; }
.pillars h3 { font-size: 16.5px; margin: 0 0 7px; }
.pillars p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ── Numeri (fascia di fiducia) ─────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stats > div { text-align: center; }
.stats .n { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.1rem, 1.5rem + 2vw, 3rem);
  line-height: 1; letter-spacing: -0.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats .l { margin: 10px 0 0; font-size: 14.5px; color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; gap: 32px 20px; } }

/* ── Download per sistema operativo ─────────────────────────────────────── */
.oslist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 860px; margin: 0 auto; }
.oslist a {
  display: block; text-align: center; text-decoration: none; padding: 22px 18px;
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--r);
  background: rgba(255,255,255,.04); transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.oslist a:hover { border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.07); transform: translateY(-2px); }
.oslist .os { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: #fff; }
.oslist .fmt { display: block; margin-top: 6px; font-size: 13px; color: #8d98a4; }
@media (max-width: 760px) { .oslist { grid-template-columns: 1fr; } }

/* ── Feature split (testo + schermata, alternato) ───────────────────────── */
.fsplit { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(36px, 6vw, 72px); align-items: center; }
.fsplit + .fsplit { margin-top: clamp(56px, 9vw, 104px); }
.fsplit.top { align-items: start; }
.fsplit.rev .copy { order: 2; }
.fsplit .copy .kicker { font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 12px; }
.fsplit .copy h2, .fsplit .copy h3 { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem); margin: 0 0 14px; line-height: 1.16; }
.fsplit .copy p { font-size: 16.5px; color: var(--ink-soft); margin: 0 0 18px; max-width: 46ch; }
.fsplit .copy ul { list-style: none; margin: 0; padding: 0; }
.fsplit .copy li { position: relative; padding: 6px 0 6px 26px; font-size: 15px; color: var(--ink-soft); }
.fsplit .copy li::before { content: ""; position: absolute; left: 0; top: 13px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }

/* ── Griglia di card funzioni ───────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r);
  padding: 26px; box-shadow: var(--sh-sm);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.section.tint .card { background: #fff; }
.card:hover { border-color: #cfdde3; transform: translateY(-3px); box-shadow: var(--sh-md); }
.card h3 { font-size: 17.5px; margin: 0 0 8px; }
.card p { margin: 0; font-size: 14.5px; color: var(--muted); }
.card .tag { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-deep); background: var(--accent-tint); border-radius: 6px; padding: 4px 9px; margin-bottom: 13px; }

/* ── Due colonne di elenchi ─────────────────────────────────────────────── */
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); }
.twocol .col h3 { font-size: 1.25rem; margin: 0 0 14px; }
.twocol .col p { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 14px; max-width: 44ch; }
.twocol .col ul { list-style: none; margin: 0; padding: 0; }
.twocol .col li { position: relative; padding: 8px 0 8px 24px; font-size: 15px; color: var(--ink-soft); border-top: 1px solid var(--line-soft); }
.twocol .col li:first-of-type { border-top: 0; }
.twocol .col li::before { content: ""; position: absolute; left: 0; top: 15px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
@media (max-width: 760px) { .twocol { grid-template-columns: 1fr; } }

/* Card con miniatura schermata */
.card .thumb { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.card .thumb img { width: 100%; display: block; }

/* Pagina: hero interno */
.page-hero { background: linear-gradient(180deg, var(--bg-tint), var(--bg)); border-bottom: 1px solid var(--line-soft); padding: clamp(48px, 7vw, 84px) 0; }
.page-hero .wrap-wide { max-width: 800px; }
.page-hero p.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 14px; }
.page-hero h1 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.7rem); margin: 0 0 16px; }
.page-hero p.sub { font-size: 18px; color: var(--ink-soft); margin: 0; max-width: 56ch; }

/* ── Galleria schermate ─────────────────────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 26px; }
.gallery figure { margin: 0; }
.gallery .frame { box-shadow: 0 1px 3px rgba(19,24,32,.06), 0 16px 34px -22px rgba(10,83,114,.24); }
.gallery figcaption { margin-top: 12px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.gallery figcaption b { color: var(--ink); font-weight: 600; }

/* ── Passi ───────────────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.steps > div { counter-increment: step; }
.steps > div .n { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: #fff;
  width: 34px; height: 34px; border-radius: 999px; background: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.steps > div .n::before { content: counter(step); }
.steps h3 { font-size: 17px; margin: 0 0 6px; }
.steps p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ── Integrazioni ───────────────────────────────────────────────────────── */
.integ { display: flex; flex-wrap: wrap; gap: 10px; }
.integ span { font-size: 14px; font-weight: 500; color: var(--ink-soft);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 9px 16px; }
.section.tint .integ span { background: var(--bg); }

/* ── FAQ (native details) ───────────────────────────────────────────────── */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-family: var(--font-display); font-weight: 600; font-size: 16.5px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 17px; font-size: 22px; color: var(--muted); font-weight: 400; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 0 22px; color: var(--ink-soft); font-size: 15.5px; max-width: 64ch; }

/* ── Banda CTA ───────────────────────────────────────────────────────────── */
.ctaband { background: var(--bg-ink); color: #fff; text-align: center; }
.ctaband h2 { color: #fff; font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); margin: 0 0 12px; }
.ctaband p { color: #c1c9d1; font-size: 17px; margin: 0 0 26px; }
.ctaband .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ctaband .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.3); }
.ctaband .btn-ghost:hover { border-color: #fff; color: #fff; }
.ctaband .plat { margin-top: 20px; font-size: 13px; color: #8a95a0; }

/* ── Reveal (progressive enhancement) ──────────────────────────────────────
   Contenuto visibile di default; lo stato nascosto vale solo con <html class="js">. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.16,1,.3,1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 940px) {
  .hero .inner { grid-template-columns: 1fr; gap: 32px; }
  .hero p.sub { max-width: none; }
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillars > div { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0; }
  .pillars > div:first-child, .pillars > div:nth-child(2) { border-top: 0; }
  .pillars > div:nth-child(odd) { padding-right: 18px; }
  .fsplit { grid-template-columns: 1fr; gap: 28px; }
  .fsplit.rev .copy { order: 0; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 620px) {
  header.site nav a.nav-link { display: none; }
  .pillars { grid-template-columns: 1fr; }
  .pillars > div:nth-child(2) { border-top: 1px solid var(--line); }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
}

/* ── Pagine documento (privacy, termini) ────────────────────────────────── */
.legal-main { padding: 48px 0 80px; }
.legal-main .container { max-width: 760px; }
.legal-main h1 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.3rem); margin: 0 0 8px; }
.legal-main h2 { font-size: 19px; margin: 34px 0 8px; }
.legal-main h3 { font-size: 16px; margin: 20px 0 6px; }
.meta { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.lead { font-size: 18px; color: var(--muted); }
.container code, .legal-main code {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-size: 0.9em;
}
.callout { background: var(--bg-tint); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--r); padding: 14px 16px; margin: 20px 0; font-size: 15px; }

/* ── Pagina di ritorno OAuth ────────────────────────────────────────────── */
.center-screen { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.center-screen h1 { font-size: 22px; margin: 0 0 8px; }
.center-screen .lead { font-size: 15px; max-width: 42ch; }
.center-screen .spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; margin-bottom: 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .center-screen .spinner { animation: none; } }
