﻿/* LinePilot — sito vetrina. Palette dai loghi: #f2f2f2 (chiaro) + #fab31c (ambra) su fondo scuro. */

/* Sfondo come il pannello chat (frontend/index.html: --panel #161b22 + riflesso ambra). */
:root {
  --bg: #161b22;
  --bg-alt: #1c232d;
  --surface: #222b37;
  --border: #2f3947;
  --text: #e7edf3;
  --text-dim: #8a97a6;
  --accent: #fab31c;
  --accent-dark: #d99a0e;
  --radius: 14px;
  --maxw: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 176, 32, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { line-height: 1.2; font-weight: 700; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; text-align: center; }
.accent { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(22, 27, 34, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--text); text-decoration: none; font-size: 1.5rem; font-weight: 600;
}
.nav-brand strong { color: var(--accent); }
.nav-logo { height: 52px; width: 52px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-block;
  background: var(--accent); color: #0e1116 !important;
  font-weight: 600; text-decoration: none;
  padding: 12px 26px; border-radius: 999px;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-dark); }
.btn-ghost {
  background: transparent; color: var(--text) !important;
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--text-dim); }
.btn-small { padding: 8px 18px; font-size: 0.9rem; }
.btn-large { padding: 16px 36px; font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 60px; }
.hero-grid {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 48px; align-items: center;
}
.eyebrow {
  color: var(--accent); font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; font-size: 0.85rem; margin-bottom: 12px;
}
.hero h1 { font-size: 2.9rem; margin-bottom: 20px; }
.lead { font-size: 1.15rem; color: var(--text-dim); margin-bottom: 28px; }
.lead strong { color: var(--text); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; list-style: none; }
.hero-badges li {
  background: var(--surface); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 999px;
  font-size: 0.85rem; color: var(--text-dim);
}
.hero-logo { text-align: center; }
.hero-logo img { width: 100%; max-width: 380px; filter: drop-shadow(0 0 40px rgba(250, 179, 28, 0.15)); }
/* Mascotte animata + wordmark SVG (sostituiscono il logo statico quando il JS carica l'SVG) */
.hero-logo #avatar { max-width: 330px; margin: 0 auto; }
.hero-wordmark[hidden] { display: none; }
img.hero-wordmark { max-width: 400px; margin-top: -52px; filter: none; }

/* ---------- Esempio chat (carosello a fade) ---------- */
.example { padding: 40px 0 70px; }
.demo-rotator { display: grid; }
.demo-slide {
  grid-area: 1 / 1;
  opacity: 0; visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.demo-slide.active { opacity: 1; visibility: visible; }
.demo-dots { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.demo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: none; padding: 0; cursor: pointer;
  background: var(--border); transition: background 0.2s;
}
.demo-dot:hover { background: var(--text-dim); }
.demo-dot.active { background: var(--accent); }
/* Messaggi demo: replica fedele dello stile della chat (frontend/index.html). */
.chat-demo {
  max-width: 760px; margin: 0 auto 24px;
  display: flex; flex-direction: column; gap: 18px;
  --mono: ui-monospace, "Cascadia Code", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --amber-dim: #7a5512;
  --red: #ff4d4d;
  --steel: #3a4757;
}
.dmsg { display: flex; gap: 13px; max-width: 95%; }
.dmsg.user { max-width: 70%; align-self: flex-end; flex-direction: row-reverse; }
.dmsg .body { min-width: 0; }
.dmsg .av {
  flex: 0 0 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 600; font-size: 12px;
}
.dmsg.user .av { background: #15233b; border: 1px solid #2b4c80; color: #84b4ff; }
.dmsg.ai .av { background: var(--bg); border: 1px solid var(--amber-dim); color: var(--accent); }
.dmsg .meta {
  font-family: var(--mono); font-size: 10px; color: var(--text-dim);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px;
}
.dmsg.user .meta { text-align: right; color: #9bc1ff; }
.dmsg .bubble {
  padding: 14px 16px; border-radius: 12px;
  font-size: 15px; line-height: 1.55; overflow-wrap: break-word;
}
.dmsg.user .bubble { background: #1f6feb; color: #fff; border-bottom-right-radius: 4px; }
.dmsg.ai .bubble { background: var(--bg-alt); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.dmsg .bubble p { margin-bottom: 11px; }
.dmsg .bubble p:last-child { margin-bottom: 0; }
.dmsg .bubble b { color: var(--text); font-weight: 700; }
.dmsg .bubble code {
  font-family: var(--mono); font-size: 13px; color: var(--accent);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 5px;
}
.dmsg .md-h {
  font-size: 13px; color: var(--accent); letter-spacing: 0.04em;
  text-transform: uppercase; font-weight: 700; margin: 6px 0 9px;
}
.dmsg ul.dots { list-style: none; display: flex; flex-direction: column; gap: 7px; margin: 4px 0 12px; }
.dmsg ul.dots li { position: relative; padding-left: 18px; font-size: 14.5px; line-height: 1.5; }
.dmsg ul.dots li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.dmsg ol.chat-steps { list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 9px; margin: 4px 0 13px; }
.dmsg ol.chat-steps li { counter-increment: s; position: relative; padding-left: 34px; font-size: 14.5px; line-height: 1.5; }
.dmsg ol.chat-steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--accent);
  border: 1px solid var(--amber-dim); border-radius: 6px;
  width: 24px; height: 24px; display: grid; place-items: center;
}
.io-head {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px;
}
.io-read {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
  font-family: var(--mono); font-size: 12.5px; color: var(--text-dim);
}
.io-read .dotled { width: 9px; height: 9px; border-radius: 50%; background: var(--steel); flex: 0 0 auto; }
.io-read .tag { color: #c79136; font-weight: 600; }
.io-read .val { margin-left: auto; color: var(--red); font-weight: 600; letter-spacing: 0.08em; }
.notice {
  display: flex; gap: 11px; align-items: flex-start;
  background: rgba(255, 176, 32, 0.07); border-left: 3px solid var(--accent);
  border-radius: 6px; padding: 11px 13px; font-size: 13.5px; line-height: 1.5;
  margin-bottom: 11px;
}
.sources {
  margin-top: 14px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
.src-h {
  font-family: var(--mono); color: var(--accent); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; font-size: 10.5px; margin-bottom: 9px;
}
.doclink {
  display: flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 600; font-size: 13px;
  font-family: var(--mono); padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.doclink:last-child { border-bottom: none; }
.doclink svg { flex: 0 0 auto; opacity: 0.85; }
.doclink .pg { margin-left: auto; color: var(--text-dim); font-weight: 400; white-space: nowrap; }
.example-caption {
  text-align: center; color: var(--text-dim);
  max-width: 640px; margin: 0 auto;
}
.example-caption strong { color: var(--text); }

/* ---------- Sezioni ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-intro {
  text-align: center; color: var(--text-dim);
  max-width: 640px; margin: -0.5rem auto 2.5rem;
}

/* ---------- Card ---------- */
.cards { display: grid; gap: 22px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
}
.card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 0.95rem; }
.card em, .card strong { color: var(--text); }

/* ---------- Passi ---------- */
.steps {
  list-style: none; max-width: 720px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 28px;
}
.steps li { display: flex; gap: 20px; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #0e1116;
  font-weight: 700; font-size: 1.2rem; border-radius: 50%;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--text-dim); }

/* ---------- Stack ---------- */
.stack-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  max-width: 860px; margin: 0 auto;
}
.stack-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  color: var(--text); font-weight: 600;
}
.stack-item span {
  display: block; font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent); margin-bottom: 4px;
}

/* ---------- Contatti ---------- */
.contact-inner { text-align: center; }
.contact-logo { height: 90px; margin-bottom: 18px; }
.contact-form { max-width: 640px; margin: 0 auto; text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label {
  display: block; margin-bottom: 16px;
  font-size: 0.85rem; font-weight: 600; color: var(--text-dim);
}
.contact-form input, .contact-form textarea {
  display: block; width: 100%; margin-top: 6px;
  background: var(--bg); color: var(--text);
  border: 1px solid #3a4757; border-radius: 11px;
  padding: 11px 13px; font-size: 0.95rem; font-family: inherit;
  transition: border-color 0.2s; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent);
}
.contact-form button { display: block; margin: 8px auto 0; border: none; cursor: pointer; font-size: 1rem; }
.contact-form button:disabled { opacity: 0.6; cursor: default; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { text-align: center; margin-top: 14px; font-size: 0.95rem; min-height: 1.4em; }
.form-status.ok { color: #34d27b; }
.form-status.err { color: #ff4d4d; }
.form-alt { text-align: center; margin-top: 10px; font-size: 0.85rem; color: var(--text-dim); }
.form-alt a { color: var(--accent); text-decoration: none; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 30px; }
.footer-brand strong { color: var(--accent); }
.site-footer p { color: var(--text-dim); font-size: 0.85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-cta, .hero-badges { justify-content: center; }
  .hero-logo { order: -1; }
  .hero-logo img { max-width: 260px; }
  .hero h1 { font-size: 2.2rem; }
  .cards-3, .stack-grid { grid-template-columns: 1fr 1fr; }
  .nav-links a:not(.btn) { display: none; }
}
@media (max-width: 560px) {
  .cards-3, .stack-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 50px; }
}
