/* ============================================================
   ercole.ai — landing page
   Tema: chibi / pixel-armor. Palette oro + viola su navy.
   ============================================================ */

:root {
  /* Palette dal logo */
  --gold:        #F4B82E;
  --gold-bright: #FFD24A;
  --gold-deep:   #E1962A;
  --purple:      #7C5CD6;
  --purple-br:   #9A7CF0;
  --purple-soft: #C9B6F7;
  --navy:        #15132A;
  --navy-2:      #1E1B3A;
  --cream:       #F8EEDC;

  --bg:          #0E0C20;
  --bg-2:        #14122B;
  --surface:     rgba(255,255,255,0.04);
  --surface-2:   rgba(255,255,255,0.06);
  --border:      rgba(201,182,247,0.16);
  --border-str:  rgba(201,182,247,0.30);

  --text:        #ECE7FB;
  --text-dim:    #B3ABD4;
  --text-mute:   #837CA6;

  --grad-gp: linear-gradient(100deg, var(--gold-bright) 0%, var(--gold) 35%, var(--purple-br) 100%);
  --grad-pg: linear-gradient(135deg, var(--purple) 0%, var(--purple-br) 100%);

  --pixel: 'Press Start 2P', monospace;
  --sans:  'Outfit', system-ui, -apple-system, sans-serif;

  --radius: 20px;
  --radius-sm: 14px;
  --maxw: 1180px;
  --shadow: 0 24px 60px -20px rgba(0,0,0,0.6);
  --glow-gold: 0 0 40px rgba(244,184,46,0.35);
  --glow-purple: 0 0 50px rgba(124,92,214,0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Background fx ---------- */
#circuit-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}
.aurora {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 80vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 50% at 20% 20%, rgba(124,92,214,0.30), transparent 70%),
    radial-gradient(40% 50% at 80% 10%, rgba(244,184,46,0.22), transparent 70%),
    radial-gradient(50% 60% at 60% 50%, rgba(154,124,240,0.18), transparent 70%);
  filter: blur(20px);
  animation: auroraFloat 18s ease-in-out infinite alternate;
}
@keyframes auroraFloat {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(0,4%,0) scale(1.08); }
}

main, .nav, .footer { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-weight: 700;
  font-size: .95rem;
  padding: .8em 1.4em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s, border-color .25s;
  white-space: nowrap;
}
.btn-lg { font-size: 1.05rem; padding: .95em 1.7em; }
.btn-block { width: 100%; justify-content: center; }

.btn-primary {
  background: var(--grad-gp);
  color: #2A1C04;
  box-shadow: 0 10px 30px -8px rgba(244,184,46,0.5);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -8px rgba(244,184,46,0.65), var(--glow-purple); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-str);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--purple-br); background: var(--surface-2); }

.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  transition: background .3s, box-shadow .3s, padding .3s, border-color .3s;
  border-bottom: 1px solid transparent;
  z-index: 10;
}
.nav.scrolled {
  background: rgba(14,12,32,0.78);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px -20px #000;
  padding-top: .7rem; padding-bottom: .7rem;
}
.brand { display: flex; align-items: center; gap: .6rem; }
.brand-logo {
  width: 42px; height: 42px;
  filter: drop-shadow(0 4px 10px rgba(124,92,214,.5));
}
.brand-name {
  font-family: var(--pixel);
  font-size: .92rem;
  letter-spacing: -1px;
  color: var(--cream);
}
.brand-name .dot { color: var(--gold-bright); }

.nav-links { display: flex; gap: 1.6rem; }
.nav-links a {
  font-weight: 500; color: var(--text-dim);
  position: relative; padding: .2rem 0;
  transition: color .2s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -3px;
  width: 0; height: 2px; background: var(--grad-gp);
  transition: width .25s; border-radius: 2px;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta { display: flex; align-items: center; gap: .7rem; }

.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { width: 26px; height: 2.5px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(7rem, 14vh, 10rem) clamp(1rem, 4vw, 2.5rem) 3rem;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 600;
  color: var(--purple-soft);
  background: rgba(124,92,214,0.12);
  border: 1px solid var(--border-str);
  padding: .45rem .9rem; border-radius: 999px;
  margin-bottom: 1.4rem;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 0 rgba(244,184,46,.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(244,184,46,.6); }
  70% { box-shadow: 0 0 0 10px rgba(244,184,46,0); }
  100% { box-shadow: 0 0 0 0 rgba(244,184,46,0); }
}

.hero-title {
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -1.5px;
}
.grad {
  background: var(--grad-gp);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.hero-sub {
  margin: 1.5rem 0 2rem;
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 33em;
}
.hero-sub strong { color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-tasks {
  margin-top: 2rem; display: flex; align-items: center; gap: .6rem;
  font-size: .98rem; min-height: 1.6em; flex-wrap: wrap;
}
.tt-label { color: var(--text-mute); }
.typed { color: var(--gold-bright); font-weight: 600; }
.typed::after { content: '▌'; color: var(--purple-br); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Hero art */
.hero-art {
  position: relative;
  display: grid; place-items: center;
  min-height: 420px;
}
.hero-knight {
  width: min(94%, 420px);
  filter: drop-shadow(0 30px 50px rgba(0,0,0,.55));
  animation: bob 4.5s ease-in-out infinite;
  z-index: 2;
}
@keyframes bob {
  0%,100% { transform: translateY(0) rotate(-.5deg); }
  50%     { transform: translateY(-16px) rotate(.5deg); }
}
.hero-glow {
  position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(244,184,46,.35), rgba(124,92,214,.12) 60%, transparent 70%);
  filter: blur(30px); animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.15); opacity: 1; } }
.hero-ring {
  position: absolute; border-radius: 50%;
  border: 1.5px dashed rgba(201,182,247,.25);
}
.ring1 { width: 78%; aspect-ratio: 1; animation: spin 26s linear infinite; }
.ring2 { width: 100%; aspect-ratio: 1; border-style: dotted; border-color: rgba(244,184,46,.18); animation: spin 40s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.float-chip {
  position: absolute;
  font-size: .82rem; font-weight: 600;
  background: rgba(20,18,43,.9);
  border: 1px solid var(--border-str);
  padding: .5rem .8rem; border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  z-index: 3;
  animation: floaty 5s ease-in-out infinite;
}
.chip-a { top: 12%; left: -2%; animation-delay: .2s; }
.chip-b { bottom: 20%; right: -4%; animation-delay: 1.2s; }
.chip-c { bottom: 4%; left: 8%; animation-delay: 2.1s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Stats */
.stats {
  margin-top: 4.5rem;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  backdrop-filter: blur(6px);
}
.stat { text-align: center; }
.stat-num { font-family: var(--pixel); font-size: 1.7rem; color: var(--gold-bright); }
.stat-suf { font-family: var(--pixel); font-size: 1rem; color: var(--purple-br); }
.stat p { margin-top: .5rem; color: var(--text-mute); font-size: .88rem; }

/* ---------- SECTIONS ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) clamp(1rem, 4vw, 2.5rem);
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto 3.5rem; }
.kicker {
  font-family: var(--pixel); font-size: .68rem;
  color: var(--gold); letter-spacing: 1px;
  text-transform: uppercase;
}
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 800; letter-spacing: -1px;
  margin: 1rem 0 .8rem;
  line-height: 1.1;
}
.section-head p { color: var(--text-dim); font-size: 1.1rem; }

.grid { display: grid; gap: 1.4rem; }
.features-grid { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s, background .3s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% -20%, rgba(124,92,214,.18), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.card:hover { border-color: var(--border-str); box-shadow: var(--shadow); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card-ico {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  font-size: 1.7rem;
  border-radius: 16px;
  background: var(--grad-pg);
  box-shadow: var(--glow-purple);
  margin-bottom: 1.2rem;
}
.card h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.card p { color: var(--text-dim); font-size: .98rem; }

/* ---------- HOW ---------- */
.steps {
  display: flex; align-items: stretch; justify-content: center;
  gap: 0; flex-wrap: wrap;
}
.step {
  flex: 1 1 200px; max-width: 250px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem; text-align: center;
  transition: transform .3s, border-color .3s;
}
.step:hover { transform: translateY(-6px); border-color: var(--border-str); }
.step-no {
  font-family: var(--pixel); font-size: 1.3rem;
  color: transparent; background: var(--grad-gp);
  -webkit-background-clip: text; background-clip: text;
  margin-bottom: .8rem;
}
.step h3 { font-size: 1.12rem; margin-bottom: .4rem; }
.step p { color: var(--text-dim); font-size: .92rem; }
.step-link {
  align-self: center; width: 42px; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--purple-br));
  position: relative; flex: 0 0 auto;
}
.step-link::after {
  content: '▸'; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  color: var(--purple-br); font-size: .8rem;
}

/* ---------- MARQUEE ---------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  margin-bottom: 3.5rem;
}
.marquee-track {
  display: flex; gap: 1rem; width: max-content;
  animation: scrollx 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scrollx { to { transform: translateX(-50%); } }
.pill {
  font-weight: 600; font-size: 1rem;
  padding: .7rem 1.3rem; border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-str);
  white-space: nowrap;
}

/* Dual interface */
.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.dual-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  transition: transform .3s, border-color .3s;
}
.dual-card:hover { transform: translateY(-6px); border-color: var(--border-str); }
.dual-badge {
  display: inline-block;
  font-family: var(--pixel); font-size: .6rem;
  color: #2A1C04; background: var(--grad-gp);
  padding: .5rem .7rem; border-radius: 8px; margin-bottom: 1.1rem;
}
.dual-badge.alt { background: var(--grad-pg); color: #fff; }
.dual-card h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.dual-card > p { color: var(--text-dim); margin-bottom: 1.2rem; }

.ticks { list-style: none; display: grid; gap: .6rem; }
.ticks li { position: relative; padding-left: 1.8rem; color: var(--text-dim); font-size: .96rem; }
.ticks li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  width: 1.3rem; height: 1.3rem; display: grid; place-items: center;
  background: rgba(244,184,46,.16); color: var(--gold-bright);
  border-radius: 6px; font-size: .75rem; font-weight: 800;
}

/* ---------- PRICING ---------- */
.toggle {
  display: inline-flex; gap: .3rem; margin-top: 1.6rem;
  background: var(--surface); border: 1px solid var(--border);
  padding: .35rem; border-radius: 999px;
}
.toggle-opt {
  border: 0; background: none; cursor: pointer;
  color: var(--text-dim); font-weight: 600; font-family: var(--sans);
  padding: .55rem 1.2rem; border-radius: 999px; font-size: .95rem;
  transition: .25s; display: inline-flex; align-items: center; gap: .4rem;
}
.toggle-opt.active { background: var(--grad-gp); color: #2A1C04; }
.save { font-size: .7rem; background: rgba(124,92,214,.25); color: var(--purple-soft); padding: .15rem .4rem; border-radius: 6px; }
.toggle-opt.active .save { background: rgba(42,28,4,.2); color: #2A1C04; }

.price-grid { grid-template-columns: repeat(3, 1fr); align-items: start; }
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 1.9rem;
  position: relative;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.price-card:hover { transform: translateY(-6px); border-color: var(--border-str); }
.price-card.featured {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 30px 60px -25px rgba(244,184,46,.4);
  background: linear-gradient(180deg, rgba(244,184,46,.07), var(--surface));
}
.badge-pop {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  font-family: var(--pixel); font-size: .55rem;
  background: var(--grad-gp); color: #2A1C04;
  padding: .45rem .8rem; border-radius: 8px; white-space: nowrap;
}
.price-name { font-size: 1.4rem; }
.price-desc { color: var(--text-mute); font-size: .92rem; margin: .3rem 0 1.3rem; min-height: 2.6em; }
.price { display: flex; align-items: flex-start; gap: .15rem; margin-bottom: .3rem; }
.price .cur { font-size: 1.3rem; font-weight: 700; color: var(--text-dim); margin-top: .4rem; }
.price .amt { font-size: 3.2rem; font-weight: 800; line-height: 1; letter-spacing: -2px; }
.price .per { color: var(--text-mute); align-self: flex-end; margin-bottom: .5rem; font-size: .95rem; }
.price-credits { color: var(--gold-bright); font-weight: 600; margin-bottom: 1.4rem; font-size: .98rem; }
.price-card .btn { margin-bottom: 1.5rem; }
.price-foot { text-align: center; color: var(--text-mute); margin-top: 2.5rem; }
.price-foot a { color: var(--gold-bright); font-weight: 600; }

/* ---------- CTA FINAL ---------- */
.cta-final { max-width: var(--maxw); margin: 0 auto; padding: 2rem clamp(1rem,4vw,2.5rem) 5rem; }
.cta-box {
  position: relative; overflow: hidden;
  text-align: center;
  background:
    radial-gradient(80% 130% at 50% 0%, rgba(124,92,214,.35), transparent 60%),
    linear-gradient(180deg, var(--navy-2), var(--bg-2));
  border: 1px solid var(--border-str);
  border-radius: 30px;
  padding: clamp(2.5rem, 6vw, 4.5rem) 2rem;
}
.cta-knight {
  width: 110px; margin: 0 auto 1rem;
  filter: drop-shadow(0 12px 24px rgba(124,92,214,.6));
  animation: bob 4s ease-in-out infinite;
}
.cta-box h2 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -1px; line-height: 1.05; }
.cta-box p { color: var(--text-dim); max-width: 38em; margin: 1.2rem auto 2rem; font-size: 1.1rem; }

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(10,9,24,.6);
  padding: 3.5rem clamp(1rem,4vw,2.5rem) 2rem;
}
.foot-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem;
}
.foot-brand p { color: var(--text-mute); margin-top: .9rem; max-width: 26em; font-size: .95rem; }
.foot-col h4 { font-size: .95rem; margin-bottom: .9rem; color: var(--text); }
.foot-col a { display: block; color: var(--text-mute); padding: .25rem 0; transition: color .2s; font-size: .92rem; }
.foot-col a:hover { color: var(--gold-bright); }
.foot-bar {
  max-width: var(--maxw); margin: 2.5rem auto 0; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  color: var(--text-mute); font-size: .85rem;
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 920px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 1rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(14,12,32,.97); backdrop-filter: blur(14px);
    padding: 1.5rem clamp(1rem,4vw,2.5rem); border-bottom: 1px solid var(--border);
  }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions, .eyebrow, .hero-tasks { justify-content: center; }
  .hero-art { order: -1; min-height: 320px; }
  .features-grid, .price-grid { grid-template-columns: 1fr; }
  .dual { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .step-link { display: none; }
  .step { max-width: 100%; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .brand-name { font-size: .78rem; }
  .price .amt { font-size: 2.6rem; }
  .foot-grid { grid-template-columns: 1fr; }
  .stat-num { font-size: 1.3rem; }
}

/* ---------- Accessibility: reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
