/* APP-ARE public site chrome — palette invariata */
:root {
  --bg: #0B1220;
  --card: #141E2E;
  --line: #243044;
  --accent: #3B82F6;
  --accent2: #10B981;
  --text: #F8FAFC;
  --muted: #94A3B8;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

.site-wordmark {
  font-weight: 800;
  letter-spacing: .14em;
  font-size: .95rem;
  text-transform: uppercase;
  color: var(--text);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(36, 48, 68, .8);
  background: rgba(11, 18, 32, .88);
  backdrop-filter: blur(14px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 0;
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 calc(2rem + var(--safe-b));
  color: var(--muted);
  font-size: .78rem;
}

.site-footer-grid {
  display: grid;
  gap: 1.5rem;
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

@media (min-width: 640px) {
  .site-footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.site-footer-links {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.site-footer-links a:hover { color: var(--text); }

.site-page {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.site-page.mesh {
  background:
    radial-gradient(ellipse 90% 60% at 10% -15%, rgba(59, 130, 246, .22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 5%, rgba(16, 185, 129, .12), transparent 50%),
    var(--bg);
}

.site-card {
  background: linear-gradient(160deg, rgba(20, 30, 46, .95), rgba(20, 30, 46, .55));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.site-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .45rem; }
.site-card p { font-size: .88rem; color: var(--muted); }

/* Hero split + device mockup */
.hero-split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding: 3rem 0 2.5rem;
}

@media (min-width: 900px) {
  .hero-split {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }
  .hero-split .hero-actions { justify-content: flex-start; }
  .hero-split .hero-stats {
    margin-inline: 0;
    max-width: none;
  }
}


.hero-mockup-wrap {
  display: flex;
  justify-content: center;
  padding: 0 .5rem;
}

.device-frame {
  width: min(300px, 88vw);
  border-radius: 2rem;
  border: 2px solid var(--line);
  background: linear-gradient(165deg, #1a2738, #0f1728);
  padding: .75rem;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(59, 130, 246, .08),
    inset 0 1px 0 rgba(255, 255, 255, .04);
  animation: floatDevice 6s ease-in-out infinite;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

@keyframes floatDevice {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .device-frame { animation: none; }
  .process-timeline::after { animation: none; height: calc(100% - 1rem); }
  .mock-pdf-line { animation: none; }
}

.device-notch {
  width: 32%;
  max-width: 5.5rem;
  height: .5rem;
  margin: 0 auto .65rem;
  border-radius: 999px;
  background: #0b1220;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4);
}

.mock-pdf {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, .22);
  background: linear-gradient(180deg, rgba(26, 39, 56, .95), rgba(20, 30, 46, .98));
  padding: 1rem 1rem .85rem;
  min-height: 248px;
  overflow: hidden;
}

.mock-pdf-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  align-self: flex-start;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6ee7b7;
  background: rgba(16, 185, 129, .14);
  border: 1px solid rgba(16, 185, 129, .35);
  padding: .35rem .65rem;
  border-radius: 999px;
  margin-bottom: .85rem;
  line-height: 1;
}

.mock-pdf-badge svg {
  width: .75rem;
  height: .75rem;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
}

.mock-pdf-title {
  font-size: .9rem;
  font-weight: 700;
  margin: 0 0 .65rem;
  color: var(--text);
  line-height: 1.3;
}

.mock-pdf-lines {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin-bottom: .5rem;
}

.mock-pdf-line {
  height: .5rem;
  width: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(148, 163, 184, .12) 25%, rgba(148, 163, 184, .22) 50%, rgba(148, 163, 184, .12) 75%);
  background-size: 200% 100%;
  animation: mockLineShimmer 2.4s ease-in-out infinite;
}

.mock-pdf-line.short { width: 58%; }
.mock-pdf-line.mid { width: 78%; }

@keyframes mockLineShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.mock-pdf-hash-wrap {
  margin-top: auto;
  padding-top: .75rem;
  overflow: hidden;
  border-radius: 6px;
  max-width: 100%;
}

.mock-pdf-hash {
  margin: 0;
  font-size: .55rem;
  line-height: 1.5;
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  color: #64748b;
  filter: blur(2.5px);
  user-select: none;
  word-break: break-all;
  overflow: hidden;
  max-height: 2.4em;
}

.mock-pdf-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .35rem .75rem;
  margin-top: .65rem;
  padding-top: .65rem;
  border-top: 1px solid rgba(36, 48, 68, .8);
  font-size: .6rem;
  color: var(--muted);
  line-height: 1.35;
}

.mock-pdf-meta span {
  white-space: nowrap;
}

/* Animated timeline — linea centrata sui pallini */
.process-timeline {
  --tl-dot: 1.125rem;
  --tl-gap: 1rem;
  --tl-track: calc(var(--tl-gap) + var(--tl-dot) / 2);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: calc(var(--tl-track) + var(--tl-dot) / 2 + var(--tl-gap));
}

.process-timeline::before {
  content: "";
  position: absolute;
  left: calc(var(--tl-track) - 1px);
  top: .5rem;
  bottom: .5rem;
  width: 2px;
  background: var(--line);
  z-index: 0;
}

.process-timeline::after {
  content: "";
  position: absolute;
  left: calc(var(--tl-track) - 1px);
  top: .5rem;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  animation: timelineProgress 8s ease-in-out infinite;
  z-index: 0;
  border-radius: 1px;
}

@keyframes timelineProgress {
  0% { height: 0; opacity: .6; }
  45% { height: calc(100% - 1rem); opacity: 1; }
  100% { height: calc(100% - 1rem); opacity: .85; }
}

.timeline-step {
  position: relative;
  padding: 1rem 0;
}

.timeline-dot {
  position: absolute;
  left: calc(-1 * (var(--tl-gap) + var(--tl-dot)));
  top: 1.2rem;
  width: var(--tl-dot);
  height: var(--tl-dot);
  border-radius: 999px;
  background: var(--card);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .12);
  z-index: 1;
}

.timeline-step h4 { font-size: .92rem; font-weight: 700; margin-bottom: .2rem; }
.timeline-step p { font-size: .82rem; color: var(--muted); }

/* Trust / shield grid */
.trust-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .trust-grid { grid-template-columns: 1fr 1fr; }
}

.trust-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(20, 30, 46, .55);
}

.trust-icon {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  color: #93c5fd;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trust-item h3 { font-size: .95rem; font-weight: 700; margin-bottom: .25rem; }
.trust-item p { font-size: .84rem; color: var(--muted); }

/* Verify mockup browser */
.verify-mock {
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: rgba(15, 23, 42, .8);
}

.verify-mock-bar {
  display: flex;
  gap: .35rem;
  padding: .55rem .75rem;
  background: rgba(20, 30, 46, .9);
  border-bottom: 1px solid var(--line);
}

.verify-mock-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  background: #334155;
}

.verify-mock-dot:first-child { background: #f87171; }
.verify-mock-dot:nth-child(2) { background: #fbbf24; }
.verify-mock-dot:nth-child(3) { background: #34d399; }

.verify-mock-body {
  padding: 1.25rem;
  text-align: center;
}

.verify-mock-check {
  width: 3rem;
  height: 3rem;
  margin: 0 auto .75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(16, 185, 129, .15);
  border: 1px solid rgba(16, 185, 129, .35);
  color: #34d399;
}

.verify-mock-check svg {
  width: 1.35rem;
  height: 1.35rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.use-tag {
  display: inline-flex;
  align-items: center;
  padding: .55rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: .8rem;
  color: #CBD5E1;
  background: rgba(20, 30, 46, .5);
  margin: .25rem .25rem 0 0;
}

.icon-card svg { display: block; }

.skeleton-pub {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
  animation: shimmerPub 1.2s infinite;
  border-radius: 8px;
}

@keyframes shimmerPub {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Mobile: header, menu, layout ───────────────────────────────────────── */

.menu-icon {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

.menu-icon-close { display: none; }

.menu-btn.is-open .menu-icon-open { display: none; }
.menu-btn.is-open .menu-icon-close { display: block; }

.menu-close svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.mobile-drawer-cta {
  display: none;
  flex-direction: column;
  gap: .65rem;
  padding: 1rem 1rem calc(1rem + var(--safe-b));
  margin-top: auto;
  border-top: 1px solid rgba(36, 48, 68, .65);
  background: rgba(11, 18, 32, .55);
}

.mobile-drawer-cta .btn {
  width: 100%;
  min-height: 3rem;
  font-size: .9rem;
}

@media (max-width: 899px) {
  .wrap {
    width: min(1120px, 100% - 1.25rem);
  }

  .nav {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .nav-inner {
    padding: .6rem 0;
    gap: .5rem;
  }

  .nav-reserved-desktop {
    display: none !important;
  }

  .nav-cta {
    margin-left: auto;
    gap: 0;
  }

  .menu-btn {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-backdrop {
    z-index: 200;
  }

  .mobile-drawer {
    z-index: 201;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-right: none;
    box-shadow: none;
    transform: translateX(100%);
    padding-top: calc(.75rem + env(safe-area-inset-top, 0px));
    padding-bottom: 0;
  }

  html[dir="rtl"] .mobile-drawer {
    left: 0;
    right: 0;
    border-left: none;
    transform: translateX(-100%);
    box-shadow: none;
  }

  .mobile-drawer.open {
    transform: translateX(0);
  }

  html[dir="rtl"] .mobile-drawer.open {
    transform: translateX(0);
  }

  .mobile-drawer-head {
    padding: .35rem 1rem 1rem;
  }

  .mobile-drawer-nav a {
    min-height: 3rem;
    padding: .95rem 1.1rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    border-radius: 12px;
  }

  .mobile-drawer-cta {
    display: flex;
  }

  .hero-split {
    padding: 1.5rem 0 2rem;
    gap: 1.75rem;
    text-align: center;
  }

  .hero-split .hero-copy {
    order: 2;
  }

  .hero-mockup-wrap {
    order: 1;
    padding: 0;
  }

  .hero-split .badge {
    font-size: .62rem;
    margin-bottom: .85rem;
  }

  .hero-split h1 {
    font-size: clamp(1.65rem, 8.5vw, 2.35rem) !important;
    line-height: 1.12 !important;
  }

  .hero-split .hero-lead {
    font-size: .95rem !important;
    margin-top: .85rem !important;
    max-width: none !important;
  }

  .hero-split .hero-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.35rem !important;
  }

  .hero-split .hero-actions .btn {
    width: 100%;
    min-height: 3rem;
    font-size: .88rem;
  }

  .hero-split .hero-stats {
    margin-top: 1.5rem !important;
    gap: .5rem;
    max-width: none;
  }

  .hero-split .stat {
    padding: .75rem .45rem;
  }

  .hero-split .stat strong {
    font-size: 1rem;
  }

  .device-frame {
    width: min(260px, 78vw);
  }

  section,
  .hero-split {
    scroll-margin-top: 4.5rem;
  }

  section {
    padding: 2.25rem 0;
  }

  .section-title {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
  }

  .section-sub {
    font-size: .9rem;
    margin-bottom: 1.5rem;
  }

  .process-timeline {
    --tl-dot: 1rem;
    --tl-gap: .85rem;
  }

  .timeline-step {
    padding: .85rem 0;
  }

  .timeline-dot {
    top: 1.1rem;
  }

  .trust-item {
    padding: 1rem;
  }

  .grid-2 .btn {
    width: 100%;
  }

  .use-tag {
    font-size: .76rem;
    padding: .5rem .75rem;
  }

  .cta-band {
    padding: 1.5rem 1rem;
    margin-top: 1.5rem;
  }

  .cta-band .btn {
    width: 100%;
    min-height: 3rem;
  }

  body.site-page {
    padding-bottom: var(--safe-b);
    overflow-x: hidden;
  }

  .footer-grid {
    text-align: center;
  }

  .footer-links {
    align-items: center;
  }
}

@media (max-width: 380px) {
  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }
}
