/* ============================================================
   MandaDueRighe — Design system
   Tema scuro · accenti viola · Geist / Geist Mono
   ============================================================ */

:root {
  --bg: #07070f;
  --bg-alt: #0d0d1a;
  --surface: #111124;
  --surface-hi: #171732;
  --border: #1f1f3a;
  --border-hi: #2f2f55;
  --text: #f5f3ff;
  --text-2: #d8d4ff;
  --text-muted: #6b6b8a;
  --accent: #a78bfa;
  --accent-2: #8b5cf6;
  --accent-glow: #c4b5fd;
  --accent-fg: #07070f;

  --maxw: 1100px;
  --pad-x: 56px;
  --radius: 12px;
  --radius-sm: 8px;

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.mono { font-family: var(--mono); }
.tabular { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* ---------- Aurora background ---------- */
.aurora { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora::before, .aurora::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(80px);
}
.aurora::before {
  width: 720px; height: 720px; left: -12%; top: -16%;
  background: radial-gradient(circle, rgba(167,139,250,0.28) 0%, transparent 60%);
  animation: aurora 18s ease-in-out infinite;
}
.aurora::after {
  width: 600px; height: 600px; right: -10%; bottom: -14%;
  background: radial-gradient(circle, rgba(167,139,250,0.18) 0%, transparent 60%);
  animation: aurora 22s ease-in-out infinite reverse;
}
@keyframes aurora {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(40px,-30px) scale(1.1); }
}

@keyframes pulse {
  0%,100% { opacity: 1; box-shadow: 0 0 8px currentColor; }
  50%     { opacity: .55; box-shadow: 0 0 18px currentColor; }
}
.pulse { animation: pulse 2s ease-in-out infinite; }

/* Reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .aurora::before, .aurora::after, .pulse { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Layout ---------- */
.page { position: relative; z-index: 2; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); width: 100%; }
section { position: relative; }

/* ---------- Logo ---------- */
.logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 22px rgba(167,139,250,0.5);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo > span { width: 14px; height: 2px; background: #fff; box-shadow: 0 4px 0 #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand__name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
.brand__tag { display: block; margin-top: 3px; }

/* ---------- Micro label ---------- */
.micro {
  font: 500 10.5px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.micro--accent { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 44px;
  padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  font: 500 14px/1 var(--sans); color: var(--text);
  background: var(--surface); cursor: pointer; text-decoration: none;
  transition: all .15s ease; white-space: nowrap;
}
.btn:hover { background: var(--surface-hi); border-color: var(--border-hi); }
.btn--primary {
  background: var(--accent); border-color: var(--accent);
  color: var(--accent-fg); font-weight: 600;
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 0 24px rgba(167,139,250,0.45); }
.btn--sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn--lg { height: 52px; padding: 0 26px; font-size: 15px; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Inputs ---------- */
.input, .textarea {
  height: 44px; padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font: 400 14px/1.4 var(--sans);
  outline: none; transition: all .15s; width: 100%;
}
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(167,139,250,0.15);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- Source wall (fonti) ---------- */
.source-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(208px, 1fr));
  gap: 10px;
}
.source {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 14px 9px 9px; border: 1px solid var(--border);
  background: var(--surface); border-radius: 10px;
  font-size: 13px; color: var(--text-2); text-decoration: none; min-height: 48px;
  transition: border-color .15s, background .15s, color .15s, transform .15s;
}
.source:hover { border-color: var(--border-hi); background: var(--surface-hi); color: var(--text); transform: translateY(-1px); }
.source__ico {
  width: 28px; height: 28px; border-radius: 7px; background: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.source__ico img { width: 19px; height: 19px; object-fit: contain; display: block; }
.source__label { line-height: 1.25; }
.source-note {
  margin-top: 12px; padding: 14px 18px;
  border: 1px dashed var(--border-hi); border-radius: 10px;
  color: var(--text-muted); text-align: center;
  font: 500 11px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .06em;
}
.source-note strong { color: var(--accent); font-weight: 600; }

/* Categorized source groups */
.source-cat + .source-cat { margin-top: 30px; }
.source-cat__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}

/* ---------- Nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad-x);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,7,15,0.72); backdrop-filter: blur(8px);
}
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) {
  color: var(--text-2); font-size: 13.5px; text-decoration: none; font-weight: 400;
  transition: color .15s;
}
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__links a.is-active { color: var(--text); }
.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
  color: var(--text);
}
.nav__toggle svg { width: 22px; height: 22px; }

/* ---------- Section heading helpers ---------- */
.eyebrow-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 28px;
}
.muted { color: var(--text-muted); }
.accent { color: var(--accent); }
.dim { color: var(--text-muted); }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; margin: 0; }

.lead { color: var(--text-2); font-size: 19px; line-height: 1.5; }

/* Display headings — fluid */
.d1 { font-size: clamp(48px, 9vw, 128px); line-height: 0.95; letter-spacing: -0.045em; font-feature-settings: 'ss01'; }
.d2 { font-size: clamp(34px, 5.5vw, 72px); line-height: 1.02; letter-spacing: -0.03em; }
.d3 { font-size: clamp(28px, 4vw, 48px); line-height: 1.05; letter-spacing: -0.02em; }
.d4 { font-size: clamp(22px, 3vw, 32px); line-height: 1.1; letter-spacing: -0.02em; }
.grad {
  background: linear-gradient(120deg, var(--accent-glow) 0%, var(--accent) 60%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Stat strip ---------- */
.stats {
  display: flex; gap: 64px; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding-top: 28px;
}
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat__num { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }

/* ---------- Generic grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* Numbered steps */
.step { padding: 26px 24px; position: relative; }
.step__n {
  font: 600 13px/1 var(--mono); color: var(--accent-fg);
  background: var(--accent); border-radius: 6px; padding: 5px 8px;
  display: inline-block; letter-spacing: .02em;
}
.step__t { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 16px 0 0; }
.step p { color: var(--text-2); font-size: 14px; line-height: 1.55; margin: 10px 0 0; }

/* ---------- Flow infographic (4 step) ---------- */
.flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.flow__track {
  position: absolute; top: 35px; left: 12.5%; right: 12.5%; height: 2px; z-index: 0;
  background: repeating-linear-gradient(90deg, var(--accent) 0 7px, transparent 7px 20px);
  background-size: 20px 100%;
  opacity: .85;
  animation: flow-x 1s linear infinite;
}
.flow__track::before {
  content: ''; position: absolute; inset: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-hi) 15%, var(--border-hi) 85%, transparent);
  z-index: -1;
}
@keyframes flow-x { from { background-position-x: 0; } to { background-position-x: 20px; } }
@keyframes flow-y { from { background-position-y: 0; } to { background-position-y: 20px; } }

.flow__step { position: relative; z-index: 1; text-align: center; padding: 0 6px; }
.flow__node {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border-hi);
  display: flex; align-items: center; justify-content: center; position: relative;
  box-shadow: 0 0 0 7px var(--bg), 0 0 30px rgba(167,139,250,0.18);
}
.flow__node svg { width: 30px; height: 30px; color: var(--accent); }
.flow__node--out {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: var(--accent);
  box-shadow: 0 0 0 7px var(--bg), 0 0 36px rgba(167,139,250,0.5);
}
.flow__node--out svg { color: #fff; }
.flow__badge {
  position: absolute; top: -6px; right: -2px;
  background: var(--accent); color: var(--accent-fg);
  font: 600 11px/1 var(--mono); padding: 4px 6px; border-radius: 6px;
  box-shadow: 0 0 0 3px var(--bg);
}
.flow__node--out .flow__badge { background: #fff; color: var(--accent-2); }
.flow__body { margin-top: 20px; }
.flow__body h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.flow__body p { color: var(--text-2); font-size: 13.5px; line-height: 1.5; margin: 8px 0 0; }

@media (prefers-reduced-motion: reduce) { .flow__track { animation: none; } }

@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow__track {
    top: 0; bottom: 0; left: 35px; right: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--accent) 0 7px, transparent 7px 20px);
    background-size: 100% 20px;
    animation: flow-y 1s linear infinite;
  }
  .flow__track::before {
    inset: 0; width: 2px; height: auto;
    background: linear-gradient(180deg, transparent, var(--border-hi) 8%, var(--border-hi) 92%, transparent);
  }
  .flow__step {
    display: grid; grid-template-columns: 72px 1fr; gap: 20px;
    text-align: left; align-items: center; padding: 14px 0;
  }
  .flow__body { margin-top: 0; }
}

/* ---------- Feature columns (divided) ---------- */
.primitives { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.primitive { padding: 28px 32px; border-right: 1px solid var(--border); }
.primitive:last-child { border-right: 0; }
.primitive__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.primitive__num { font: 500 13px var(--mono); color: var(--accent); }
.primitive__title { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }
.primitive p { color: var(--text-2); font-size: 14.5px; line-height: 1.6; margin: 0; }

/* ---------- Quote / testimonial card ---------- */
.quote__role { color: var(--accent); margin-bottom: 24px; display: flex; align-items: center; gap: 6px; }
.quote__text {
  font-size: 20px; line-height: 1.4; font-weight: 500;
  margin: 0 0 28px; letter-spacing: -0.01em;
}
.quote__who { color: var(--text-muted); }

/* ---------- Before / after ---------- */
.ba { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; align-items: stretch; }
.ba__col { padding: 28px 32px; }
.ba__col--before { background: var(--surface); }
.ba__col--after  { background: linear-gradient(180deg, rgba(167,139,250,0.08), var(--surface) 70%); }
.ba__div { width: 1px; background: var(--border); }
.ba__label { margin-bottom: 18px; }
.ba__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ba__list li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.ba__list li::before { content: '─'; color: var(--text-muted); flex-shrink: 0; }
.ba__col--after .ba__list li::before { content: '→'; color: var(--accent); }

/* ---------- Checklist ---------- */
.check { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.check li { display: flex; gap: 12px; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.check li::before { content: '─'; color: var(--accent); flex-shrink: 0; }

/* ---------- Pricing ---------- */
.price { font-size: 64px; font-weight: 600; letter-spacing: -0.03em; }
.plan { padding: 32px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); position: relative; }
.plan--pro {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(167,139,250,0.08), var(--surface) 60%);
  box-shadow: 0 0 40px rgba(167,139,250,0.15);
}
.plan__badge {
  position: absolute; top: 16px; right: 16px; color: var(--accent-fg);
  background: var(--accent); padding: 4px 8px; border-radius: 4px;
}

/* ---------- FAQ (native details) ---------- */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 18px; font-weight: 500; letter-spacing: -0.01em; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 22px; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); font-size: 15px; line-height: 1.6; margin: 0 0 22px; max-width: 760px; }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center; position: relative; overflow: hidden;
  border-top: 1px solid var(--border); background: var(--bg-alt);
}
.cta-band__glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 30%, rgba(167,139,250,0.18), transparent 60%);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px var(--pad-x) 32px;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 40px; position: relative; z-index: 5; background: var(--bg);
}
.footer__cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col a, .footer__col span:not(.micro) { color: var(--text-2); font-size: 13px; text-decoration: none; }
.footer__col a:hover { color: var(--text); }
.footer__end { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* ---------- Section dividers / backgrounds ---------- */
.bg-alt { background: var(--bg-alt); }
.bdr-top { border-top: 1px solid var(--border); }
.bdr-bottom { border-bottom: 1px solid var(--border); }

/* ---------- Spacing utilities ---------- */
.sec { padding: 96px 0; }
.sec-lg { padding: 120px 0; }
.mt-s { margin-top: 16px; }
.mt-m { margin-top: 32px; }
.mt-l { margin-top: 56px; }
.center { text-align: center; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  :root { --pad-x: 22px; }

  .nav__links { gap: 18px; }
  .nav__links a:not(.btn) { display: none; }
  .nav__links .btn { display: inline-flex; }
  .nav__toggle { display: inline-flex; }

  /* mobile drawer */
  .nav__links.is-open {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }
  .nav__links.is-open a:not(.btn) {
    display: block; padding: 14px var(--pad-x); font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav__links.is-open .btn { margin: 12px var(--pad-x); }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .primitives { grid-template-columns: 1fr; }
  .primitive { border-right: 0; border-bottom: 1px solid var(--border); }
  .primitive:last-child { border-bottom: 0; }

  .ba { grid-template-columns: 1fr; }
  .ba__div { width: auto; height: 1px; }

  .stats { gap: 32px; }
  .footer { flex-direction: column; gap: 28px; }
  .footer__end { align-items: flex-start; }

  .sec { padding: 64px 0; }
  .sec-lg { padding: 80px 0; }
}

@media (max-width: 560px) {
  .stats { gap: 22px; }
  .stat { flex: 1 1 40%; }
  .grid-4 { grid-template-columns: 1fr; }
}
