:root {
  --font-heading: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-md: 10px;
  --radius-lg: 20px;
  --radius-full: 999px;
}

[data-theme='dark'] {
  --bg: #10131a;
  --bg-alt: #14181f;
  --surface: #181c24;
  --surface-raised: #20242e;
  --border: #2a3038;
  --text: #eef1f5;
  --text-secondary: #9aa4b2;
  --text-tertiary: #6b7480;
  --accent: #f0b25c;
  --accent-strong: #e8a33d;
  --coral: #e2664c;
  --sage: #7fa876;
  --teal: #4fa3a0;
  --contrast: #1a1206;
  --glow: rgba(240, 178, 92, 0.25);
}

[data-theme='light'] {
  --bg: #faf7f2;
  --bg-alt: #f3ede2;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --border: #e4ddd0;
  --text: #201c16;
  --text-secondary: #5c564a;
  --text-tertiary: #8a8375;
  --accent: #b5762a;
  --accent-strong: #9c651f;
  --coral: #c94f36;
  --sage: #4f7a46;
  --teal: #2f7d7a;
  --contrast: #fffaf0;
  --glow: rgba(181, 118, 42, 0.15);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background .3s var(--ease-out), color .3s var(--ease-out);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; }

[data-i18n-en], [data-i18n-it] { display: none !important; }
html[lang='en'] [data-i18n-en] { display: revert !important; }
html[lang='it'] [data-i18n-it] { display: revert !important; }
html[lang='en'] [data-i18n-en].inline { display: inline !important; }
html[lang='it'] [data-i18n-it].inline { display: inline !important; }
html[lang='en'] [data-i18n-en].flex { display: flex !important; }
html[lang='it'] [data-i18n-it].flex { display: flex !important; }
html[lang='en'] [data-i18n-en].block { display: block !important; }
html[lang='it'] [data-i18n-it].block { display: block !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* header */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 700; font-size: 18px; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 28px; margin-left: 32px; font-size: 14px; color: var(--text-secondary); flex: 1; }
.nav-links a { text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--accent); }
.nav-toggles { display: flex; gap: 8px; align-items: center; }
.toggle-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.toggle-btn:hover { border-color: var(--accent); color: var(--accent); }
.cta {
  background: var(--accent);
  color: var(--contrast);
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px var(--glow); }

/* hero */
.hero {
  position: relative;
  padding: 96px 0 64px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(circle at 20% 20%, var(--glow), transparent 45%),
    radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--coral) 18%, transparent), transparent 40%);
  animation: drift 18s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes drift {
  from { transform: translate(0,0) scale(1); }
  to { transform: translate(-3%, 2%) scale(1.05); }
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero h1 { font-size: 52px; line-height: 1.05; margin-bottom: 20px; }
.hero .lede { font-size: 18px; color: var(--text-secondary); line-height: 1.6; max-width: 46ch; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-secondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-full);
  padding: 10px 22px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  transition: border-color .2s;
}
.btn-secondary:hover { border-color: var(--accent); }

.hero-mark { display: flex; justify-content: center; }
.hero-mark svg { width: 100%; max-width: 380px; }

.spark-ring { animation: spin 22s linear infinite; transform-origin: 512px 512px; }
.spark-ring.reverse { animation-direction: reverse; animation-duration: 30s; }
@keyframes spin { to { transform: rotate(360deg); } }
.spark-core { animation: pulse 2.4s ease-in-out infinite; transform-origin: 512px 512px; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.15); opacity: 1; } }

/* sections */
section { padding: 88px 0; position: relative; }
.section-head { max-width: 620px; margin: 0 auto 48px; text-align: center; }
.section-head .kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); display: block; margin-bottom: 10px; }
.section-head h2 { font-size: 34px; margin-bottom: 14px; }
.section-head p { color: var(--text-secondary); font-size: 16px; line-height: 1.6; }

.grid-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .25s var(--ease-out), border-color .25s;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.feature-icon { width: 44px; height: 44px; margin-bottom: 16px; }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* product preview */
.preview-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  overflow: hidden;
}
.preview-card svg { width: 100%; display: block; }
.preview-card h3 { font-size: 15px; margin: 14px 2px 2px; }
.preview-card p.caption { font-size: 13px; color: var(--text-tertiary); margin: 4px 2px 0; }

.chart-line { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 2.4s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.kanban-card { animation: floatUp .6s var(--ease-out) both; }
.kanban-card:nth-child(2) { animation-delay: .1s; }
.kanban-card:nth-child(3) { animation-delay: .2s; }
@keyframes floatUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.dot-pulse { animation: pulse 2s ease-in-out infinite; }

/* download */
.download-panel {
  background: linear-gradient(135deg, var(--surface), var(--surface-raised));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
}
.platform-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.platform-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: all .2s;
}
.platform-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.platform-btn svg { width: 20px; height: 20px; }
.version-note { margin-top: 16px; font-size: 12px; color: var(--text-tertiary); }

/* docs */
.docs-list { display: grid; gap: 14px; }
.doc-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}
.doc-item h3 { font-size: 15px; margin-bottom: 6px; }
.doc-item p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* footer */
footer.site {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  background: var(--bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 700; margin-bottom: 12px; }
.footer-brand img { width: 24px; height: 24px; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-tertiary); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; color: var(--text-secondary); text-decoration: none; margin-bottom: 10px; }
.footer-col a:hover { color: var(--accent); }
.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.8;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-legal .company-block p { margin: 0; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-mark { order: -1; max-width: 260px; margin: 0 auto; }
  .hero h1 { font-size: 36px; }
  .nav-links { display: none; }
  .grid-features { grid-template-columns: 1fr; }
  .preview-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; }
}
