/* ============================================================
   Ducato — marketing site
   Palette: warm ink / obsidian / gold / parchment (coin & mint)
   ============================================================ */
:root {
  --ink: #0b0a08;
  --ink-2: #100e0a;
  --obsidian: #17140f;
  --obsidian-2: #1f1b14;
  --gold: #d4a017;
  --gold-hi: #e9c766;
  --parchment: #f3eee3;
  --muted: #a39a86;
  --line: rgba(233, 199, 102, 0.14);
  --in: #4fd08a;
  --out: #e8896f;

  --maxw: 1160px;
  --r: 16px;

  --display: "Playfair Display", Georgia, serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--gold-hi); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 4px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 56px);
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: padding .3s ease, border-color .3s ease, background .3s ease;
}
.nav.is-scrolled { padding-top: 12px; padding-bottom: 12px; border-bottom-color: var(--line); }

.wordmark { display: inline-flex; align-items: center; gap: 12px; }
.wordmark__mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  font-family: var(--display); font-weight: 700; font-size: 18px;
  color: var(--gold-hi);
  background: var(--obsidian);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.5);
}
.wordmark__text { font-family: var(--mono); letter-spacing: 0.34em; font-size: 14px; }

.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { color: var(--muted); font-size: 15px; transition: color .2s ease; }
.nav__links a:hover { color: var(--parchment); }

.btn { border-radius: 999px; padding: 9px 18px; font-weight: 500; transition: transform .15s ease, background .2s ease; }
.btn--ghost { border: 1px solid var(--gold); color: var(--gold-hi) !important; }
.btn--ghost:hover { background: rgba(212,160,23,.12); transform: translateY(-1px); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden; /* contiene il guilloché che ruota, niente overflow di pagina */
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 40px;
  padding: clamp(48px, 8vw, 110px) clamp(20px, 5vw, 56px) clamp(40px, 6vw, 80px);
}
.hero__engraving {
  position: absolute; inset: 0; z-index: 0;
  display: grid; place-items: center; pointer-events: none;
  overflow: hidden;
}
.hero__engraving svg {
  width: min(760px, 92vw); height: auto; opacity: .5;
  filter: drop-shadow(0 0 40px rgba(212,160,23,.12));
  transform: translateX(18%);
}
#guilloche path { fill: none; stroke: var(--gold); stroke-width: .5; opacity: .5; }

.hero__copy { position: relative; z-index: 2; min-width: 0; }
.hero__device, .card, .vault__text { min-width: 0; }
.hero__title {
  font-size: clamp(44px, 7vw, 82px);
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.hero__lede { color: var(--muted); font-size: clamp(17px, 1.4vw, 20px); max-width: 30em; margin-bottom: 32px; }

.cta { display: flex; flex-wrap: wrap; gap: 14px; }
.cta--center { justify-content: center; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px 12px 16px; border-radius: 14px;
  background: var(--parchment); color: var(--ink);
  transition: transform .15s ease, box-shadow .2s ease;
}
.store:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(233,199,102,.5); }
/* coming soon: non interattivo, tono spento */
.store--soon { background: transparent; color: var(--muted); border: 1px solid var(--line); cursor: default; }
.store--soon svg { fill: var(--muted); }
.store--soon:hover { transform: none; box-shadow: none; }
.store--soon small { opacity: .8; }
.store svg { width: 26px; height: 26px; fill: var(--ink); flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.15; font-weight: 600; font-size: 17px; }
.store small { font-size: 11px; font-weight: 500; opacity: .7; }
.cta__note { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 16px; letter-spacing: .04em; }

/* ---------- phone mockup ---------- */
.hero__device { position: relative; z-index: 2; display: grid; place-items: center; }
.phone {
  position: relative;
  width: min(300px, 78vw); aspect-ratio: 300 / 620;
  background: linear-gradient(160deg, #2a251c, #0d0b08);
  border-radius: 46px; padding: 10px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(233,199,102,.18), inset 0 0 0 2px rgba(0,0,0,.6);
}
.phone__notch { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 108px; height: 26px; background: #000; border-radius: 0 0 16px 16px; z-index: 3; }
.phone__screen {
  height: 100%; border-radius: 38px; background: var(--ink);
  padding: 40px 18px 18px; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
}
.app-hello { color: var(--muted); font-size: 12px; margin: 0; }
.app-label { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.app-balance { font-family: var(--display); font-weight: 600; font-size: 34px; color: var(--gold-hi); font-variant-numeric: tabular-nums; margin: -2px 0 4px; }
.app-pills { display: flex; gap: 8px; }
.app-pill { flex: 1; font-size: 11px; font-variant-numeric: tabular-nums; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--obsidian); }
.app-pill--in { color: var(--in); }
.app-pill--out { color: var(--out); }
.app-accounts { display: flex; gap: 8px; }
.app-acc { flex: 1; display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--obsidian); }
.app-acc b { color: var(--parchment); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot--gold { background: var(--gold); } .dot--blue { background: #0ea5e9; }

.app-donut { position: relative; align-self: center; width: 116px; height: 116px; margin: 2px 0; }
.app-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.app-donut .ring { fill: none; stroke: var(--obsidian-2); stroke-width: 12; }
.app-donut .seg { fill: none; stroke-width: 12; stroke-linecap: butt; stroke-dasharray: 289; }
.app-donut .s1 { stroke: var(--gold); stroke-dashoffset: 173; }           /* 40% */
.app-donut .s2 { stroke: #8b5cf6; stroke-dashoffset: 231; transform-origin: center; transform: rotate(144deg); } /* 20% */
.app-donut .s3 { stroke: #0ea5e9; stroke-dashoffset: 246; transform-origin: center; transform: rotate(216deg); } /* 15% */
.app-donut__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; }
.app-donut__center small { font-family: var(--mono); font-size: 8px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.app-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.app-rows li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--obsidian); }
.ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 13px; flex: none; }
.ic--food { background: rgba(249,115,22,.18); color: #f97316; }
.ic--sub { background: rgba(20,184,166,.18); color: #14b8a6; }
.ic--pay { background: rgba(16,185,129,.18); color: #10b981; }
.app-row__t { display: flex; flex-direction: column; font-size: 12px; flex: 1; }
.app-row__t small { color: var(--muted); font-size: 10px; }
.app-row__a { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.app-row__a.in { color: var(--in); } .app-row__a.out { color: var(--out); }

/* ---------- creed / thesis ---------- */
.creed { text-align: center; padding: clamp(56px, 9vw, 120px) clamp(20px, 5vw, 56px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.creed__line { font-family: var(--display); font-size: clamp(30px, 5.5vw, 62px); display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .5em; }
.creed__line span { position: relative; padding: 0 .1em; }
.creed__line span + span::before { content: "·"; position: absolute; left: -0.45em; color: var(--gold); }
.creed__sub { color: var(--muted); margin-top: 20px; font-size: clamp(16px, 1.4vw, 19px); max-width: 34em; margin-inline: auto; }

/* ---------- features ---------- */
.features { max-width: var(--maxw); margin: 0 auto; padding: clamp(64px, 9vw, 130px) clamp(20px, 5vw, 56px); }
.section-head { max-width: 20em; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; padding: 30px 26px 28px; border-radius: var(--r);
  background: linear-gradient(180deg, var(--obsidian), var(--ink-2));
  border: 1px solid var(--line);
  overflow: hidden;
}
.card::after { /* reeded top edge, like a coin's milled rim */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 2px, transparent 2px 6px);
  opacity: .5;
}
.card__seal { display: block; width: 34px; height: 34px; margin-bottom: 18px; border-radius: 50%; border: 1px solid var(--gold); position: relative; }
.card__seal::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px dashed rgba(233,199,102,.55); }
.card h3 { font-size: 22px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }

/* ---------- vault ---------- */
.vault { max-width: var(--maxw); margin: 0 auto; padding: clamp(40px,6vw,80px) clamp(20px, 5vw, 56px); display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.vault__text h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 20px; }
.vault__text p { color: var(--muted); margin-bottom: 24px; max-width: 32em; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 8px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }
.vault__mark { position: relative; display: grid; place-items: center; }
.vault__mark img { border-radius: 28px; box-shadow: 0 30px 60px -25px rgba(0,0,0,.9); position: relative; z-index: 1; }
.vault__reeded { position: absolute; width: 250px; height: 250px; border-radius: 50%; background: repeating-conic-gradient(var(--gold) 0deg 1.4deg, transparent 1.4deg 6deg); opacity: .18; }

/* ---------- closing ---------- */
.closing { text-align: center; padding: clamp(60px, 9vw, 120px) clamp(20px, 5vw, 56px); }
.closing h2 { font-size: clamp(32px, 5vw, 58px); margin-bottom: 34px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 40px clamp(20px, 5vw, 56px); display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; justify-content: space-between; }
.foot__brand { display: inline-flex; align-items: center; gap: 12px; }
.foot__links { display: flex; gap: 24px; }
.foot__links a { color: var(--muted); font-size: 14px; }
.foot__links a:hover { color: var(--parchment); }
.foot__legal { width: 100%; color: var(--muted); font-size: 12.5px; font-family: var(--mono); letter-spacing: .02em; }

/* ---------- legal page ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 40px) 96px; }
.legal h1 { font-size: clamp(38px, 6vw, 60px); margin-bottom: 10px; }
.legal__meta { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 32px; }
.legal__tldr { background: linear-gradient(180deg, var(--obsidian), var(--ink-2)); border: 1px solid var(--gold); border-radius: var(--r); padding: 22px 24px; margin-bottom: 44px; }
.legal__tldr strong { color: var(--gold-hi); }
.legal h2 { font-size: 24px; margin: 40px 0 12px; padding-top: 8px; }
.legal h2 .num { font-family: var(--mono); font-size: 13px; color: var(--gold); margin-right: 12px; vertical-align: middle; }
.legal p, .legal li { color: var(--muted); }
.legal p { margin-bottom: 14px; }
.legal ul { margin: 0 0 14px; padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; }
.legal__back { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 40px; }
.legal__back:hover { color: var(--parchment); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 8px; text-align: left; padding-top: 40px; }
  .hero__device { order: -1; margin-bottom: 20px; }
  .hero__engraving svg { transform: none; opacity: .32; }
  .grid { grid-template-columns: 1fr 1fr; }
  .vault { grid-template-columns: 1fr; }
  .vault__mark { order: -1; }
}
@media (max-width: 640px) {
  .nav { padding-left: 16px; padding-right: 16px; }
  .nav__links { gap: 12px; }
  .nav__links a:not(.btn) { display: none; }
  .wordmark__text { letter-spacing: .18em; font-size: 13px; }
  .btn--ghost { padding: 8px 13px; font-size: 14px; }
  .grid { grid-template-columns: 1fr; }
  .foot { flex-direction: column; align-items: flex-start; }
  /* mobile: nessun blocco di testo più largo del viewport */
  .hero__lede, .creed__sub, .vault__text p, .section-head { max-width: 100%; }
}
@media (max-width: 380px) {
  .wordmark__text { display: none; } /* schermi molto stretti: solo il conio D */
}
