/* Stile fumetto – Firmacopie Lucca Comics & Games 2026 */
:root {
  --ink: #111;
  --paper: #fffdf5;
  --yellow: #ffd400;
  --red: #e63946;
  --blue: #1d6fd8;
  --green: #2a9d4b;
  --grey: #8a8a8a;
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --border: 4px solid var(--ink);
  --title: "Bangers", "Impact", system-ui, sans-serif;
  --body: "Comic Neue", "Comic Sans MS", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
  background-color: var(--yellow);
  /* retino (halftone) */
  background-image: radial-gradient(rgba(0, 0, 0, 0.16) 1.6px, transparent 1.8px);
  background-size: 14px 14px;
  min-height: 100vh;
}

a { color: var(--blue); }

h1, h2, h3, .title {
  font-family: var(--title);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1.05;
}

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

/* ---------- header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: var(--border);
  box-shadow: 0 6px 0 var(--ink);
  margin-bottom: 40px;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo-slot {
  width: 150px;
  height: 64px;
  flex: none;
  display: grid;
  place-items: center;
}
.logo-slot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.site-header h1 { font-size: clamp(26px, 4.4vw, 44px); }
.site-header .kicker { font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; }

/* segnaposto per immagini non ancora caricate */
.placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px;
  font-family: var(--title);
  font-size: 18px;
  letter-spacing: 0.05em;
  color: #555;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,.06) 0 10px, transparent 10px 20px),
    #f3efe0;
  border: 3px dashed #555;
}

/* ---------- vignette / pannelli ---------- */
.panel {
  background: var(--paper);
  border: var(--border);
  box-shadow: var(--shadow);
  position: relative;
}

.hero-title {
  text-align: center;
  margin: 0 0 36px;
}
.hero-title h2 {
  display: inline-block;
  font-size: clamp(34px, 6vw, 64px);
  color: var(--paper);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-2deg);
}
.hero-title p { font-weight: 700; font-size: 20px; margin: 10px 0 0; }

/* ---------- griglia autori ---------- */
.author-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 32px;
  padding-bottom: 60px;
}
.author-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.author-card:nth-child(odd) { transform: rotate(-1deg); }
.author-card:nth-child(even) { transform: rotate(1deg); }
.author-card:hover, .author-card:focus-visible {
  transform: rotate(0) translate(-3px, -3px);
  box-shadow: 10px 10px 0 var(--ink);
  outline: none;
}
.author-card .photo {
  aspect-ratio: 4 / 5;
  border-bottom: var(--border);
  overflow: hidden;
  background: #eee;
}
.author-card .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-card .body { padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.author-card h3 { font-size: 36px; }
.author-card .meta { font-weight: 700; }
.author-card .cta { margin-top: auto; }

.price-burst {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  font-family: var(--title);
  font-size: 26px;
  color: var(--ink);
  background: var(--red);
  clip-path: polygon(50% 0%, 61% 18%, 82% 8%, 80% 30%, 100% 36%, 86% 52%, 100% 68%, 79% 72%, 82% 94%, 61% 84%, 50% 100%, 39% 84%, 18% 94%, 21% 72%, 0% 68%, 14% 52%, 0% 36%, 20% 30%, 18% 8%, 39% 18%);
  z-index: 2;
}
.price-burst span {
  background: var(--yellow);
  width: 82%;
  height: 82%;
  display: grid;
  place-items: center;
  clip-path: inherit;
  transform: rotate(-8deg);
}

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--title);
  font-size: 24px;
  letter-spacing: 0.06em;
  padding: 10px 22px;
  border: var(--border);
  border-radius: 0;
  background: var(--red);
  color: var(--paper);
  text-shadow: 2px 2px 0 var(--ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; }
.btn[disabled] { background: #bbb; cursor: not-allowed; transform: none; box-shadow: var(--shadow-sm); }
.btn.secondary { background: var(--paper); color: var(--ink); text-shadow: none; }
.btn.blue { background: var(--blue); }
.btn.block { width: 100%; }

/* ---------- fumetto (speech bubble) ---------- */
.bubble {
  position: relative;
  background: var(--paper);
  border: var(--border);
  border-radius: 28px;
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}
.bubble::after {
  content: "";
  position: absolute;
  left: 42px;
  bottom: -26px;
  border-width: 26px 22px 0 0;
  border-style: solid;
  border-color: var(--ink) transparent transparent;
}
.bubble::before {
  content: "";
  position: absolute;
  left: 46px;
  bottom: -17px;
  border-width: 18px 15px 0 0;
  border-style: solid;
  border-color: var(--paper) transparent transparent;
  z-index: 1;
}
.bubble ul { margin: 8px 0 0; padding-left: 22px; }
.bubble li { margin: 4px 0; }

.caption {
  display: inline-block;
  background: var(--yellow);
  border: 3px solid var(--ink);
  padding: 4px 10px;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- pagina autore ---------- */
.back { display: inline-block; margin-bottom: 20px; font-family: var(--title); font-size: 22px; color: var(--ink); text-decoration: none; }
.back:hover { text-decoration: underline; }

.author-hero {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 44px;
}
.author-hero .photo { aspect-ratio: 4 / 5; overflow: hidden; transform: rotate(-2deg); }
.author-hero .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-hero h2 { font-size: clamp(44px, 7vw, 76px); text-shadow: 3px 3px 0 var(--paper); }
.author-hero .price { font-family: var(--title); font-size: 34px; color: var(--red); -webkit-text-stroke: 1px var(--ink); margin: 4px 0 20px; }
.note {
  margin-top: 36px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-left: 12px solid var(--blue);
  padding: 10px 14px;
  font-weight: 700;
}

.days { display: grid; gap: 28px; padding-bottom: 60px; }
.day h3 { font-size: 34px; margin-bottom: 12px; }
.day h3 span { background: var(--ink); color: var(--yellow); padding: 2px 12px; display: inline-block; transform: skew(-8deg); }
.day-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }

.slot { padding: 18px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.slot .period { font-family: var(--title); font-size: 30px; }
.slot .count { font-weight: 700; }
.meter { height: 18px; border: 3px solid var(--ink); background: #fff; }
.meter > div { height: 100%; background: var(--green); transition: width 0.4s ease; }
.meter.low > div { background: var(--red); }
.slot .hint { font-size: 15px; color: #444; min-height: 1.2em; }

.slot.soldout { background: #eee; }
.stamp {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  font-family: var(--title);
  font-size: 46px;
  color: var(--red);
  border: 5px solid var(--red);
  padding: 2px 16px;
  background: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  white-space: nowrap;
}

/* ---------- email ---------- */
.email-box { max-width: 640px; margin: 0 auto 40px; padding: 18px 20px; display: grid; gap: 8px; }
.email-box label { font-family: var(--title); font-size: 26px; letter-spacing: 0.04em; }
.email-box input {
  font: inherit;
  font-size: 20px;
  padding: 10px 12px;
  border: var(--border);
  background: #fff;
  width: 100%;
  min-width: 0;
}
.email-box input:focus { outline: 4px solid var(--blue); outline-offset: 2px; }
.email-box input.invalid { border-color: var(--red); background: #ffecec; }
.email-box p { margin: 0; font-size: 16px; }
.email-box .hint-id { margin-bottom: 10px; }

/* ---------- banner / toast ---------- */
.banner {
  margin: 0 0 28px;
  padding: 14px 18px;
  text-align: center;
  font-family: var(--title);
  font-size: 26px;
  background: var(--blue);
  color: var(--paper);
  text-shadow: 2px 2px 0 var(--ink);
}
.banner[hidden] { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  font-weight: 700;
  z-index: 60;
}
.toast[hidden] { display: none; }

/* ---------- modale di attesa ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 212, 0, 0.92) 0 8deg, rgba(255, 235, 120, 0.92) 8deg 16deg);
}
.modal[hidden] { display: none; }
.modal .panel { max-width: 520px; width: 100%; padding: 28px 24px; text-align: center; }
.modal h2 { font-size: clamp(38px, 8vw, 56px); color: var(--red); -webkit-text-stroke: 1.5px var(--ink); margin-bottom: 10px; }
.modal p { margin: 10px 0; }
.modal .big { font-family: var(--title); font-size: 34px; }
.modal .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

.dots { display: flex; gap: 10px; justify-content: center; margin: 16px 0; }
.dots i { width: 18px; height: 18px; background: var(--ink); border-radius: 50%; animation: bounce 0.9s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0.5); } 40% { transform: scale(1); } }

.loading { text-align: center; font-family: var(--title); font-size: 30px; padding: 40px 0; }

.site-footer { text-align: center; padding: 24px 16px 40px; font-size: 14px; font-weight: 700; }

@media (max-width: 700px) {
  body { font-size: 17px; }
  .site-header .wrap { flex-wrap: wrap; gap: 10px; }
  .logo-slot { width: 120px; height: 52px; }
  .author-hero { grid-template-columns: 1fr; }
  .author-hero .photo { max-width: 260px; }
  .price-burst { width: 88px; height: 88px; font-size: 22px; top: -14px; right: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
