/*
  Custody Landing Styles
  Lightweight, responsive, accessible.
*/
:root {
  --bg: #0f172a; /* slate-900 */
  --bg-alt: #111827; /* gray-900 */
  --card: #0b1222;
  --text: #e5e7eb; /* gray-200 */
  --muted: #9ca3af; /* gray-400 */
  --primary: #22c55e; /* emerald-500 */
  --primary-600: #16a34a; /* emerald-600 */
  --accent: #60a5fa; /* blue-400 */
  --danger: #ef4444;
  --ring: rgba(96,165,250,0.35);
  --maxw: 1100px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 20% 0%, #0b1222, var(--bg));
  color: var(--text);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 840px; }
.center { text-align: center; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 32px; }

.skip-link {
  position: absolute; left: -999px; top: -999px;
}
.skip-link:focus { left: 12px; top: 12px; background: #fff; color: #000; padding: 8px 12px; border-radius: 6px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15,23,42,0.7);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { color: #fff; font-weight: 700; letter-spacing: 0.4px; text-decoration: none; font-size: 1.05rem; margin-left:20px }
.nav ul { display: flex; align-items: center; }
.nav ul { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; }
.nav a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  height: 36px;             /* altezza uniforme dei link */
  padding: 0 10px;          /* padding verticale = 0, centratura via flex */
}
.nav a.btn {
  height: 38px;             /* bottone leggermente più alto ma centrato */
  padding: 0 14px;
  align-self: center;
}
.nav a { color: var(--text); text-decoration: none; opacity: 0.9; }
.nav a:hover { opacity: 1; }

.section { padding: 72px 0; }
.section-alt { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)); }
.headline { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.1; margin: 0 0 10px; letter-spacing: -0.02em; }
.subhead { font-size: clamp(1rem, 2.2vw, 1.18rem); color: var(--muted); margin: 0 0 20px; }

.grid-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: center; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.list-check { padding-left: 0; list-style: none; margin: 0 0 20px; }
.list-check li { position: relative; padding-left: 26px; margin: 8px 0; }
.list-check li:before { content: "✔"; position: absolute; left: 0; top: 0; color: var(--primary); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 10px; text-decoration: none; font-weight: 600; border: 1px solid transparent; cursor: pointer; transition: .15s ease-in-out; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #0a0f1f; padding: 14px 18px; }
.btn-primary:hover { background: var(--primary-600); }
.btn-ghost { color: var(--text); border-color: rgba(255,255,255,0.18); padding: 12px 16px; }
.btn-ghost:hover { border-color: rgba(255,255,255,0.35); }
.btn-sm { padding: 8px 12px; font-size: 0.92rem; }
.btn-block { width: 100%; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.hero {
  background: radial-gradient(800px 500px at 80% -10%, rgba(96,165,250,0.12), rgba(0,0,0,0)),
              radial-gradient(600px 400px at -10% 60%, rgba(34,197,94,0.16), rgba(0,0,0,0));
}
.hero-card {
  position: relative; min-height: 260px; border-radius: 16px; padding: 22px; background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
}
.badge { position: absolute; top: 14px; right: 14px; background: rgba(34,197,94,0.1); color: #bbf7d0; border: 1px solid rgba(34,197,94,0.3); padding: 6px 10px; border-radius: 999px; font-size: 12px; }
.badge-alt { top: auto; bottom: 14px; left: 14px; right: auto; background: rgba(96,165,250,0.1); color: #dbeafe; border-color: rgba(96,165,250,0.35); }
.vault { display: flex; align-items: center; gap: 16px; margin-top: 40px; }
.vault-lock { font-size: 52px; }
.vault-details { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card { background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 20px; }
.card h3 { margin-top: 0; margin-bottom: 8px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 20px 20px 20px 56px; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; }
.step-num { position: absolute; left: 16px; top: 18px; width: 28px; height: 28px; border-radius: 50%; background: rgba(96,165,250,0.18); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }

.pricing { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 14px 0 6px; }
.price-row { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); border: 1px solid rgba(255,255,255,0.08); padding: 14px 16px; border-radius: 12px; }
.price-row strong { font-size: 1.4rem; color: #fff; }

.list-dash { list-style: none; padding-left: 0; }
.list-dash li { position: relative; padding-left: 18px; margin: 8px 0; color: var(--muted); }
.list-dash li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

.muted { color: var(--muted); }
.tiny { font-size: 12px; }

.form { display: grid; gap: 12px; }
.form-row { display: grid; gap: 6px; }
label { font-weight: 600; font-size: 0.95rem; }
input, textarea { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: #fff; border-radius: 10px; padding: 12px 12px; font: inherit; }
input:focus, textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--ring); border-color: rgba(96,165,250,0.6); }

.cta { background: linear-gradient(180deg, rgba(34,197,94,0.08), rgba(34,197,94,0.02)); border-top: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.06); }

.site-footer { padding: 28px 0; background: rgba(0,0,0,0.35); border-top: 1px solid rgba(255,255,255,0.06); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.footer-links { display: flex; gap: 12px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: #fff; }
.disclaimer { color: var(--muted); font-size: 12.5px; }

/* News carousel */
.news-reel { overflow: hidden; position: relative; }
/* News reel: bordi sfumati per indicare scorrimento */
.news-reel::before,
.news-reel::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 28px; z-index: 1; pointer-events: none;
}
.news-reel::before { left: 0; background: linear-gradient(to right, rgba(0,0,0,0.55), rgba(0,0,0,0)); }
.news-reel::after  { right: 0; background: linear-gradient(to left,  rgba(0,0,0,0.55), rgba(0,0,0,0)); }
.news-track { display: flex; gap: 16px; will-change: transform; }
/* News items: narrower cards, image-dominant layout */
.news-item {
  flex: 0 0 300px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}
.news-item img {
  width: 100%;
  height: 220px;
  object-fit: contain; /* logos stay crisp */
  background: #0b1222;
}
.news-item > div { padding: 12px 14px 14px; }
.news-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }
.news-title { margin: 0; font-size: 1.02rem; }
.news-body { margin: 6px 0 0; color: var(--muted); font-size: 0.93rem; }

/* Market cap badges (compact, horizontal) */
.marketcap-section .market-cap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; width: 100%; }
.market-cap-item { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 14px 16px; }
.market-cap-title { margin: 0 0 4px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.market-cap-title span { font-size: 1rem; }
.market-cap-label { font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.market-cap-value { margin: 0; font-weight: 700; font-size: 1.15rem; color: #e5e7eb; }
.market-cap-update { color: var(--muted); }

/* Forza layout verticale per la griglia delle card nel blocco "Perché {{brand}}" */
.cards.cards-vertical {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: var(--space-lg, 1.25rem);
}

.cards.cards-vertical .card {
  width: 100%;
}

@media (max-width: 600px) {
  .marketcap-section .market-cap { grid-template-columns: 1fr; }
}

/* Sezione CTA compatta */
.section.cta { padding: 48px 0; }

/* Cal.com minimal: solo calendario e slot */
.cal-embed { max-width: 560px; margin: 0 auto; }
.cal-embed iframe {
  width: 100%;
  height: 420px;  /* più compatto: solo giorni e orari */
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
}

/* FAQ accordion (dark) */
.faq-list { margin-top: 1rem; }
details.faq {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  color: var(--text);
  overflow: hidden;
}
details.faq + details.faq { margin-top: 12px; }

details.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  outline: none;
  color: var(--text);
  background: transparent;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary:focus-visible { box-shadow: 0 0 0 3px var(--ring) inset; }
details.faq summary:hover { background: rgba(255,255,255,0.03); }

details.faq .chevron {
  margin-left: auto;
  width: 20px; height: 20px; flex: 0 0 20px;
  transition: transform .25s ease;
  background: no-repeat center/14px;
  /* chevron chiaro per dark UI */
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M6 9l6 6 6-6' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  opacity: .9;
}
details.faq[open] .chevron { transform: rotate(180deg); }

details.faq .faq-content {
  padding: 0 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
  overflow: hidden;
  height: 0; /* animata via JS */
  background: transparent;
}
details.faq .faq-content p,
details.faq .faq-content ul,
details.faq .faq-content ol { margin: 14px 0; }

/* Footer: rimuove qualsiasi blocco bianco forzando la trasparenza */
.site-footer,
.site-footer .container,
.site-footer .footer-inner,
.site-footer .footer-links,
.site-footer .disclaimer {
  background: transparent !important;
}
.site-footer * {
  box-shadow: none !important;
}
.site-footer hr { border-color: rgba(255,255,255,0.06); }

/* Problema: card scura, accento verticale, lista a griglia */
#problema { position: relative; }
#problema .problem-subhead { margin-top: 6px; }

#problema .problem-card {
  position: relative;
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
#problema .problem-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
#problema .problem-card::after {
  /* accento verticale a sinistra */
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, var(--danger), #f59e0b 50%, var(--accent));
  opacity: .9;
}

#problema .problem-list {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
@media (max-width: 900px) {
  #problema .problem-list { grid-template-columns: 1fr; }
}

#problema .problem-list li {
  position: relative;
  padding: 12px 12px 12px 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
}
#problema .problem-list li::before {
  content: "";
  position: absolute; left: 12px; top: 12px;
  width: 20px; height: 20px; opacity: .95;
  background: no-repeat center/20px;
  /* icona warning gialla */
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none'><path d='M12 9v4m0 4h.01M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

/* riduci “bianco” percepito nei blocchi scuri */
#problema .problem-list li:hover { background: rgba(255,255,255,0.045); border-color: rgba(255,255,255,0.09); }

/* Pulsanti: target touch minimo */
.btn { min-height: 44px; }

/* Header mobile: compatta e chiara. Mostra solo Pricing e Prenota */
@media (max-width: 768px) {
  .header-inner {
    height: auto !important;
    min-height: 56px;
    padding-block: 8px;
    margin-bottom: 0 !important;
    align-items: center;
  }
  .logo {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    padding: 0;
  }
  .nav, .nav ul { display: flex; align-items: center; }
  .nav a {
    display: inline-flex;
    align-items: center;
    height: auto !important;
    min-height: 36px;
    padding: 8px 10px;
    line-height: 1;
  }
  .nav a.btn {
    min-height: 40px;
    padding: 10px 14px;
  }
}

/* Mobile: mostra solo le voci con .keep-mobile */
@media (max-width: 768px) {
  .site-header .nav ul > li { display: none !important; }
  .site-header .nav ul > li.keep-mobile { display: inline-flex !important; }

  /* centratura link/bottone */
  .site-header .nav ul { align-items: center; gap: 8px; }
  .site-header .nav a { display: inline-flex; align-items: center; height: 34px; padding: 0 10px; line-height: 1; }
  .site-header .nav a.btn { height: 36px; padding: 0 12px; }
}

/* Desktop: mantieni allineamento verticale dei li (senza interferire col mobile) */
@media (min-width: 769px) {
  .site-header .nav li { display: flex; align-items: center; }
}

/* Offset ancore (header sticky) e respiro prima sezione */
[id] { scroll-margin-top: 80px; }
@media (max-width: 768px) { [id] { scroll-margin-top: 92px; } }
.site-header + main > .section:first-of-type { padding-top: 28px; }
@media (max-width: 768px) {
  .site-header { position: sticky; top: 0; z-index: 100; background: rgba(10,15,31,.6); backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid rgba(255,255,255,.06); }
  .site-header + main > .section:first-of-type { padding-top: 22px; }
}

/* Lettura mobile: spacing e line-height più ariosi */
@media (max-width: 600px) {
  .section { padding: 52px 0; }
  .headline { margin-bottom: 12px; line-height: 1.15; }
  .subhead { margin-top: 8px; margin-bottom: 16px; line-height: 1.5; }
  .section p { margin: 10px 0 14px; }
  br + br { display: none; } /* elimina buchi da <br><br> */
}

/* Hero: badge non sovrapposti e riga BTC·ETH stabile su mobile */
@media (max-width: 600px) {
  
  .grid-2 { gap: 18px; }
  .hero-card { padding-top: 14px; min-height: 0; }
  .hero-card .badge,
  .hero-card .badge-alt {
    position: static; inset: auto;
    display: inline-flex; margin: 0 8px 10px 0;
  }
  .vault { flex-wrap: wrap; gap: 10px 12px; margin-top: 14px; }
  .vault-lock { font-size: 40px; }
  .vault-details { line-height: 1.25; }
}

/* Spaziatura Hero su mobile: più respiro tra titolo, testo e CTA */
@media (max-width: 600px) {
  /* più spazio sotto l'header sticky, solo per il primo hero */
  .site-header + main > .section.hero { padding-top: 36px; }

  /* separazione verticale degli elementi del hero */
  .hero .grid-2 { gap: 22px; }
  .hero .headline { margin-bottom: 12px; }
  .hero .subhead { margin-bottom: 18px; }

  /* bottone "Perché CryptoZen" più distanziato dal testo */
  .hero .cta-row { margin-top: 22px; gap: 12px; }
}

/* FAQ dark leggibile (coerente col resto) */
details.faq { border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); }
details.faq summary { color: #e5e7eb; }
details.faq .faq-content { color: #cbd5e1; }

/* Mobile UX polish */
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .cta-row { gap: 10px; }
  .card { padding: 16px; }
  .price-row { padding: 12px 14px; }
  .news-item { min-width: 260px; max-width: 280px; flex: 0 0 auto; }
  .news-item img { aspect-ratio: 16/9; object-fit: cover; }

  /* FAQ: tocchi comodi e testo leggibile */
  details.faq summary { padding: 16px; font-size: 1rem; }
  details.faq .faq-content { padding: 0 16px; }

  /* Sezione “Problema”: meno “bianco”, gerarchia chiara */
  #problema .problem-card { padding: 16px; }
  #problema .problem-card::after { width: 3px; }
  #problema .problem-list { gap: 10px 12px; }
  #problema .problem-list li {
    padding-left: 36px;
    line-height: 1.4;
    background: rgba(255,255,255,0.025);
    border-color: rgba(255,255,255,0.07);
  }
  #problema .problem-list li::before {
    left: 10px; top: 10px; width: 18px; height: 18px; background-size: 18px;
  }

  /* Footer compatto e scuro */
  .site-footer { padding: 22px 0; background: transparent !important; }
  .site-footer .container,
  .site-footer .footer-inner,
  .site-footer .footer-links,
  .site-footer .disclaimer { background: transparent !important; }
}

/* Header: centratura verticale coerente (desktop + mobile) */
.site-header { line-height: normal; }
.header-inner {
  height: auto;              /* override del 64px fisso */
  min-height: 64px;
  padding: 8px 0;
  align-items: center;       /* già presente, esplicito */
}
.logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

/* Allinea perfettamente link e bottone nella nav */
.nav ul { display: flex; align-items: center; }
.nav li { display: flex; align-items: center; }
.nav a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  height: 36px;             /* altezza uniforme dei link */
  padding: 0 10px;          /* padding verticale = 0, centratura via flex */
}
.nav a.btn {
  height: 38px;             /* bottone leggermente più alto ma centrato */
  padding: 0 14px;
  align-self: center;
}

/* Mobile: header più compatta ma sempre centrata */
@media (max-width: 768px) {
  .header-inner {
    min-height: 52px;
    padding: 6px 0;
  }
  .nav a { height: 34px; }
  .nav a.btn { height: 36px; }
}

/* Safe-area iOS (se sticky) */
@supports (padding: max(0px)) {
  .site-header { padding-top: max(0px, env(safe-area-inset-top)); }
}

/* Related cities section */
.related-cities .links-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.related-cities .link-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #e5e7eb;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.related-cities .link-chip:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}
.related-cities h2 { margin-top: 0; }
