/* SevenWeb - redesign comico, dark glass, animato */

:root {
  --bg: #0b0d0c;
  --bg-2: #0e1110;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-2: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f1f4f2;
  --muted: #9ba39f;
  --accent: #34c87e;
  --accent-2: #1f9d58;
  --blue: #4e86e0;
  --amber: #f5b14c;
  --accent-dim: rgba(52, 200, 126, 0.16);
  --green-glow: rgba(52, 200, 126, 0.22);
  --blue-glow: rgba(78, 134, 224, 0.16);
  --radius: 16px;
  --radius-lg: 22px;
  --max: 1080px;
  --display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Aurora shader WebGL ---------- */
#aurora-shader {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.55;
  pointer-events: none;
  display: block;
}

/* ---------- Aurora animata (fallback CSS) ---------- */
.aurora {
  position: fixed;
  inset: -20% -10% -10% -10%;
  z-index: -3;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.9;
}
.aurora span {
  position: absolute;
  display: block;
  border-radius: 50%;
  will-change: transform;
}
.aurora .a1 { width: 46vw; height: 46vw; left: 60%; top: -8%; background: radial-gradient(circle, var(--green-glow), transparent 65%); animation: drift1 24s ease-in-out infinite; }
.aurora .a2 { width: 40vw; height: 40vw; left: -6%; top: 55%; background: radial-gradient(circle, var(--blue-glow), transparent 65%); animation: drift2 30s ease-in-out infinite; }
.aurora .a3 { width: 30vw; height: 30vw; left: 30%; top: 25%; background: radial-gradient(circle, rgba(52,200,126,0.10), transparent 70%); animation: drift3 34s ease-in-out infinite; }

@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-8%, 10%) scale(1.15); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(10%, -8%) scale(1.1); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(6%, 6%) scale(0.9); } }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Navbar ---------- */
header {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 13, 12, 0.72);
}
nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.logo:hover { text-decoration: none; }
.logo span { color: var(--accent); }
.logo .logo-img { width: 34px; height: 34px; display: block; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4)); transition: transform 0.3s ease; }
.logo:hover .logo-img { transform: rotate(-8deg) scale(1.08); }

.nav-links { display: flex; align-items: center; gap: 22px; font-size: 0.92rem; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.kofi { color: var(--amber); }

.lang-toggle {
  font-family: var(--body);
  font-size: 0.78rem; font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: color 0.2s, border-color 0.2s;
}
.lang-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.lang-toggle b { color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.03;
  margin-bottom: 18px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero h1.grad { background: linear-gradient(105deg, var(--text) 45%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 520px; margin-bottom: 26px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }

/* gag canone - widget vetro ruotato (stile Stitch) */
.fee-widget {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  padding: 16px 20px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(52, 200, 126, 0.25);
  transform: rotate(2deg); transition: transform 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); cursor: default;
}
.fee-widget:hover { transform: rotate(0deg); }
.fee-widget .lbl { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 4px; }
.fee-widget .fee { font-family: var(--display); font-weight: 800; font-size: 2rem; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }
.fee-widget .fee-note { font-size: 0.8rem; color: var(--muted); font-style: italic; margin-top: 8px; }

.trust { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 0.8rem; color: var(--muted); }
.trust span { padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }

/* ---------- Mascotte SVG ---------- */
.mascot-wrap { display: flex; justify-content: center; align-items: center; }
.mascot { width: min(340px, 80%); height: auto; }
.mascot .body { transform-box: fill-box; transform-origin: center; animation: breathe 4.2s ease-in-out infinite; }
.mascot .eye { transform-box: fill-box; transform-origin: center; animation: blink 6s infinite; }
.mascot .spark { transform-box: fill-box; transform-origin: center; animation: twinkle 2.6s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: scale(1) translateY(0); } 50% { transform: scale(1.035) translateY(-4px); } }
@keyframes blink { 0%,92%,100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes twinkle { 0%,100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.4); opacity: 0.4; } }
.mascot-wrap:hover .body { animation-duration: 1.8s; }

/* ---------- Sezioni ---------- */
section { padding: 56px 0; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; }
.section-head p { color: var(--muted); margin-top: 6px; }

/* ---------- Filtri ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
  font-size: 0.82rem; font-weight: 600; color: var(--muted);
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s;
}
.chip:hover { color: var(--text); }
.chip.active { color: var(--bg); background: var(--accent); border-color: var(--accent); }

/* ---------- Grid & Card ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  transform-style: preserve-3d;
}
.card:hover { transform: translateY(-5px); border-color: rgba(52, 200, 126, 0.4); box-shadow: 0 18px 50px -20px rgba(52,200,126,0.35); }
.card.ghost { opacity: 0.6; border-style: dashed; }
.card.featured { border-color: rgba(52,200,126,0.35); background: linear-gradient(160deg, var(--accent-dim), var(--surface)); }
.card img.icon, .card .icon-badge { width: 60px; height: 60px; border-radius: 16px; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; }
.card h3 { font-family: var(--display); font-size: 1.25rem; margin-bottom: 6px; }
.card p { font-size: 0.94rem; color: var(--muted); margin-bottom: 16px; }

.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pill { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 9px; border-radius: 7px; background: var(--accent-dim); color: var(--accent); }
.pill.soon { background: rgba(255,255,255,0.08); color: var(--muted); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px;
  font-family: var(--body); font-weight: 600; font-size: 0.98rem;
  background: var(--accent); color: #08110b;
  border: none; cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 10px 30px -12px rgba(52,200,126,0.7);
}
.btn:hover { transform: scale(1.035); filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border-strong); box-shadow: none; }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn.kofi { background: var(--amber); color: #241603; box-shadow: 0 10px 30px -12px rgba(245,177,76,0.7); }

/* vapore caffe */
.steam { position: relative; display: inline-block; width: 16px; height: 16px; }
.steam i { position: absolute; bottom: 2px; width: 3px; height: 10px; border-radius: 3px; background: currentColor; opacity: 0; animation: steam 2.4s ease-in-out infinite; }
.steam i:nth-child(1){ left: 3px; animation-delay: 0s; }
.steam i:nth-child(2){ left: 8px; animation-delay: 0.5s; }
.steam i:nth-child(3){ left: 13px; animation-delay: 1s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(0) scaleY(0.6); } 40% { opacity: 0.7; } 100% { opacity: 0; transform: translateY(-12px) scaleY(1.2); } }

/* ---------- Ko-fi banner ---------- */
.donate-banner {
  margin: 24px 0; padding: 40px 28px; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: radial-gradient(circle at 50% 0%, rgba(245,177,76,0.14), transparent 60%), var(--surface);
  text-align: center;
}
.donate-banner h2 { font-family: var(--display); font-size: 1.8rem; margin-bottom: 8px; }
.donate-banner p { color: var(--muted); margin: 0 auto 20px; max-width: 500px; }

/* ---------- App page ---------- */
.app-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; padding: 64px 0 40px; }
.app-hero .app-icon { width: 120px; height: 120px; border-radius: 28px; }
.app-hero h1 { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -0.03em; }
.app-hero .tagline { color: var(--muted); font-size: 1.15rem; margin: 8px 0 16px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.feature { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color 0.2s, transform 0.2s; }
.feature:hover { border-color: rgba(52,200,126,0.35); transform: translateY(-3px); }
.feature .fi { font-size: 1.4rem; margin-bottom: 8px; }
.feature strong { display: block; font-family: var(--display); font-size: 1.05rem; margin-bottom: 4px; }
.feature span { font-size: 0.88rem; color: var(--muted); }

.download-box { padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: var(--surface); margin: 8px 0; }
.download-box .meta { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.download-box .note { color: var(--muted); font-size: 0.9rem; margin: 6px 0 18px; }
.download-box code { display: block; margin-top: 16px; padding: 14px; font-size: 0.75rem; word-break: break-all; background: rgba(0,0,0,0.4); border-radius: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }

.steps { counter-reset: step; list-style: none; }
.steps li { counter-increment: step; position: relative; padding-left: 42px; margin-bottom: 16px; color: var(--muted); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ---------- About ---------- */
.about-intro { font-size: 1.2rem; line-height: 1.7; max-width: 680px; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-top: 16px; }
.info-card h3 { font-family: var(--display); font-size: 1.15rem; margin-bottom: 6px; }
.info-card p { color: var(--muted); }

/* ---------- Footer ---------- */
footer { padding: 48px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.86rem; margin-top: 40px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- 404 ---------- */
.error-page { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 20px; padding: 60px 24px; }
.error-page .mascot { width: 220px; }
.error-page h1 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem); }

/* ---------- Ko-fi flottante ---------- */
.kofi-float {
  position: fixed; bottom: 20px; right: 20px; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 12px 12px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(245, 177, 76, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, background 0.3s ease;
}
.kofi-float:hover { transform: translateY(-4px); background: rgba(245, 177, 76, 0.12); text-decoration: none; }
.kofi-float .cup { width: 40px; height: 40px; border-radius: 50%; background: var(--amber); color: #241603; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: 0 0 15px rgba(245, 177, 76, 0.4); flex-shrink: 0; }
.kofi-float .txt { display: flex; flex-direction: column; line-height: 1.2; }
.kofi-float .txt .k1 { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--amber); }
.kofi-float .txt .k2 { font-size: 0.85rem; font-weight: 500; color: var(--text); }
@media (max-width: 560px) { .kofi-float .txt { display: none; } }

/* ---------- Ghost card progress ---------- */
.ghost-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ghost-tag { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,0.06); color: var(--muted); }
.progress { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.progress .bar { width: 100%; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.progress .bar span { display: block; height: 100%; border-radius: 999px; background: var(--surface-2); }
.progress .pct { display: block; text-align: right; margin-top: 8px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.blink-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ffb4ab; margin-right: 8px; animation: blinkdot 1.4s ease-in-out infinite; }
@keyframes blinkdot { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- About / profilo ---------- */
.role-line { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.about-manifesto { color: var(--muted); font-size: 1.02rem; line-height: 1.7; margin: 0 0 18px; max-width: 62ch; }
.about-manifesto strong { color: var(--text); font-weight: 600; }
.btn.linkedin { background: #0a66c2; color: #fff; border: 1px solid transparent; }
.btn.linkedin:hover { background: #0958a8; }
.btn.linkedin svg { width: 18px; height: 18px; margin-right: 8px; fill: currentColor; vertical-align: -3px; }
.btn.youtube { background: #c0392b; color: #fff; border: 1px solid transparent; }
.btn.youtube:hover { background: #a93226; }
.btn.youtube svg { width: 20px; height: 20px; margin-right: 8px; fill: currentColor; vertical-align: -4px; }
.btn.telegram { background: #2aabee; color: #fff; border: 1px solid transparent; }
.btn.telegram:hover { background: #1f97d6; }
.btn.telegram svg { width: 20px; height: 20px; margin-right: 8px; fill: currentColor; vertical-align: -4px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

/* box canale modellismo */
.channel { display: flex; gap: 22px; align-items: center; }
.channel-logo { width: 92px; height: 92px; border-radius: 18px; object-fit: contain; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); padding: 8px; flex-shrink: 0; }
.channel-body { flex: 1; min-width: 0; }
.channel-body h3 { margin: 0 0 2px; }
.channel-body .sub { color: var(--muted); font-size: 0.92rem; margin: 0 0 12px; }
.stats { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 14px; }
.stat b { display: block; font-family: var(--display); font-size: 1.35rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.stat span { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
@media (max-width: 560px) { .channel { flex-direction: column; align-items: flex-start; } }
.profile { display: flex; gap: 26px; align-items: flex-start; }
.profile-photo { width: 156px; height: 156px; border-radius: 20px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border-strong); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5); }
.profile-body { flex: 1; min-width: 0; }
@media (max-width: 640px) { .profile { flex-direction: column; align-items: center; } .profile-photo { width: 132px; height: 132px; } }

/* ---------- Confetti ---------- */
.confetti-piece { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 999; pointer-events: none; border-radius: 2px; will-change: transform; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .mascot-wrap { order: -1; margin-bottom: 12px; }
  .mascot { width: min(240px, 60%); }
}
@media (max-width: 560px) {
  .nav-links a:not(.kofi) { display: none; }
  .hero { padding: 56px 0 40px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aurora span, .mascot .body, .mascot .eye, .mascot .spark, .steam i, .blink-dot { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover { transform: none; }
}
