/* =========================================================
   Design system — stile minimale Bandcamp / Gumroad
   Un solo foglio di stile condiviso da tutte le pagine del sito.
   ========================================================= */

:root{
  --bg:#ffffff;
  --surface:#f7f6f3;
  --surface-2:#f0eee8;
  --ink:#141312;
  --muted:#6f6b64;
  --faint:#9a958c;
  --line:#e8e4dc;
  --accent:#1da0c3;
  --accent-ink:#ffffff;
  --accent-soft:#e4f4f8;
  --contrast-bg:#141312;
  --contrast-ink:#ffffff;
  --radius-sm:10px;
  --radius-md:16px;
  --radius-lg:24px;
  --shadow-sm:0 2px 10px rgba(20,19,18,.05);
  --shadow-md:0 18px 40px rgba(20,19,18,.08);
  --maxw:1080px;
  --font-body:'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-display:'Space Grotesk', var(--font-body);
}

/* ---------- dark theme ---------- */
[data-theme="dark"]{
  --bg:#131211;
  --surface:#1c1b18;
  --surface-2:#242220;
  --ink:#f3f1ec;
  --muted:#aca79e;
  --faint:#78736a;
  --line:rgba(243,241,236,.12);
  --accent:#3fc4e0;
  --accent-ink:#08181b;
  --accent-soft:rgba(63,196,224,.16);
  --contrast-bg:#050505;
  --contrast-ink:#ffffff;
  --shadow-sm:0 4px 16px rgba(0,0,0,.35);
  --shadow-md:0 22px 54px rgba(0,0,0,.5);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  transition:background .2s ease, color .2s ease;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3,h4{ font-family:var(--font-display); letter-spacing:-.02em; line-height:1.08; margin:0; }
p{ margin:0; }
ul{ margin:0; padding:0; list-style:none; }

.container{ width:min(calc(100% - 40px), var(--maxw)); margin:0 auto; }

/* ---------- header ---------- */
.site-header{
  position:sticky; top:0; z-index:30;
  background:color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  min-height:72px; gap:20px;
}
.brand{ display:flex; align-items:center; gap:12px; font-weight:700; font-family:var(--font-display); font-size:1.05rem; }
.brand img{
  width:38px; height:38px; object-fit:cover; border-radius:10px;
  border:1px solid var(--line);
}
.nav-links{ display:flex; gap:28px; font-size:.95rem; color:var(--muted); }
.nav-links a:hover{ color:var(--ink); }
.nav-actions{ display:flex; align-items:center; gap:10px; }

.theme-toggle{
  width:42px; height:42px; border-radius:50%; border:1px solid var(--line);
  background:var(--surface); color:var(--ink); cursor:pointer;
  display:grid; place-items:center; font-size:1.05rem; line-height:1;
  transition:.15s ease;
}
.theme-toggle:hover{ border-color:var(--accent); color:var(--accent); }

/* ---------- language switcher ---------- */
.lang-switcher{ position:relative; }
.lang-btn{
  width:42px; height:42px; border-radius:50%; border:1px solid var(--line);
  background:var(--surface); cursor:pointer;
  display:grid; place-items:center; font-size:1.15rem; line-height:1;
  transition:.15s ease;
}
.lang-btn:hover{ border-color:var(--accent); }
.lang-menu{
  position:absolute; top:calc(100% + 8px); right:0; z-index:40;
  background:var(--surface); border:1px solid var(--line); border-radius:14px;
  box-shadow:var(--shadow-md); padding:6px; min-width:168px;
  display:flex; flex-direction:column; gap:2px;
  opacity:0; visibility:hidden; transform:translateY(-6px);
  transition:.15s ease;
}
.lang-switcher.open .lang-menu{ opacity:1; visibility:visible; transform:translateY(0); }
.lang-option{
  display:flex; align-items:center; gap:10px; width:100%;
  padding:9px 10px; border-radius:9px; border:none; background:transparent;
  color:var(--ink); font-family:inherit; font-size:.9rem; font-weight:600;
  text-align:left; cursor:pointer; transition:.12s ease;
}
.lang-option:hover{ background:var(--surface-2); }
.lang-option.active{ background:var(--accent-soft); color:var(--accent); }
.lang-flag{ font-size:1.1rem; line-height:1; }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 22px; border-radius:999px; font-weight:700; font-size:.95rem;
  border:1px solid transparent; cursor:pointer; transition:.15s ease;
}
.btn-primary{ background:var(--contrast-bg); color:var(--contrast-ink); }
.btn-primary:hover{ filter:brightness(1.2); transform:translateY(-1px); }
.btn-outline{ background:transparent; border-color:var(--line); color:var(--ink); }
.btn-outline:hover{ border-color:var(--ink); }
.btn-accent{ background:var(--accent); color:var(--accent-ink); }
.btn-accent:hover{ filter:brightness(.94); transform:translateY(-1px); }

/* ---------- hero ---------- */
.hero{ padding:clamp(56px,9vw,104px) 0 48px; }
.kicker{
  display:inline-flex; align-items:center; gap:8px;
  font-size:.82rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--accent); margin-bottom:16px;
}
.hero h1{ font-size:clamp(2.4rem,5.4vw,4rem); max-width:16ch; }
.hero p.lead{
  margin-top:18px; color:var(--muted); font-size:1.08rem; max-width:56ch;
}

/* ---------- section head ---------- */
.section{ padding:44px 0; }
.section-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:20px;
  margin-bottom:28px; border-bottom:1px solid var(--line); padding-bottom:20px;
}
.section-head h2{ font-size:clamp(1.6rem,3vw,2.2rem); }
.section-head p{ color:var(--muted); margin-top:6px; }

/* ---------- product grid ---------- */
.product-grid{
  display:grid; grid-template-columns:repeat(3,1fr); gap:22px;
}
.product-card{
  display:flex; flex-direction:column;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  overflow:hidden;
  transition:.18s ease;
}
a.product-card:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow-md);
  border-color:#d8d3c8;
}
.product-card .art{
  position:relative;
  aspect-ratio:1/1; width:100%; overflow:hidden; background:#101010;
  border-bottom:1px solid var(--line);
}
.product-card .art img{ width:100%; height:100%; object-fit:cover; }
.price-badge{
  position:absolute; top:14px; right:14px; z-index:2;
  padding:7px 13px; border-radius:999px; font-weight:700; font-size:.85rem;
  background:rgba(20,19,18,.85); color:#fff; backdrop-filter:blur(6px);
}
.product-card .art.placeholder-art{
  display:grid; place-items:center; color:var(--faint);
  font-size:2.4rem; font-family:var(--font-display); background:var(--surface-2);
}
.product-info{ padding:20px 22px 24px; display:flex; flex-direction:column; gap:10px; flex:1; }
.product-info h3{ font-size:1.15rem; }
.product-info p{ color:var(--muted); font-size:.93rem; }
.tag{
  align-self:flex-start; margin-top:auto;
  padding:6px 12px; border-radius:999px; font-size:.78rem; font-weight:700;
  background:var(--accent-soft); color:#0d6b80; letter-spacing:.01em;
}
.tag-row{ display:flex; flex-wrap:wrap; gap:8px; margin-top:auto; }
.tag-row .tag{ margin-top:0; }
.product-card.placeholder{ opacity:.75; }
.product-card.placeholder .product-info p{ color:var(--faint); }

/* ---------- about / info ---------- */
.about-grid{ display:grid; grid-template-columns:1.1fr .9fr; gap:32px; align-items:start; }
.about-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg);
  padding:26px;
}
.about-card h3{ font-size:1.05rem; margin-bottom:8px; }
.about-card p{ color:var(--muted); font-size:.95rem; }

/* ---------- contact form ---------- */
.contact-form{
  display:grid; gap:18px; max-width:560px;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg);
  padding:28px;
}
.form-row{ display:grid; gap:8px; }
.form-row label{ font-size:.88rem; font-weight:700; color:var(--muted); }
.form-row input, .form-row textarea{
  font:inherit; font-size:.96rem; color:var(--ink); background:var(--bg);
  border:1px solid var(--line); border-radius:var(--radius-sm); padding:12px 14px;
  resize:vertical; transition:.15s ease;
}
.form-row input:focus, .form-row textarea:focus{
  outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft);
}
.contact-form .btn{ justify-self:start; }
.form-status{ font-size:.9rem; margin:0; min-height:1.2em; }
.form-status.ok{ color:#1a8a4a; }
[data-theme="dark"] .form-status.ok{ color:#4fd487; }
.form-status.err{ color:#c0392b; }
[data-theme="dark"] .form-status.err{ color:#ff8a75; }

/* ---------- footer ---------- */
footer{ padding:36px 0 56px; }
.footer-row{
  border-top:1px solid var(--line); padding-top:22px;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:14px;
  color:var(--muted); font-size:.9rem;
}
.footer-row a{ color:var(--ink); font-weight:600; }
.footer-row a:hover{ color:var(--accent); }

/* ---------- product detail page ---------- */
.product-hero{ padding:clamp(48px,8vw,88px) 0 40px; }
.product-hero-grid{ display:grid; grid-template-columns:1.05fr .95fr; gap:36px; align-items:center; }
.cover-frame{
  border:1px solid var(--line); border-radius:var(--radius-lg); overflow:hidden;
  background:#0c0c0c; box-shadow:var(--shadow-md); aspect-ratio:1/1;
}
.cover-frame img{ width:100%; height:100%; object-fit:cover; }
.back-link{ display:inline-flex; align-items:center; gap:8px; color:var(--muted); font-size:.9rem; margin-bottom:18px; }
.back-link:hover{ color:var(--ink); }
.meta-row{ display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; }
.meta-row span{
  padding:9px 14px; border-radius:999px; background:var(--surface); border:1px solid var(--line);
  font-size:.88rem; color:var(--muted);
}
.btn-row{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:26px; }
.note-text{ color:var(--muted); font-size:.85rem; margin-top:12px; }
.price{ font-family:var(--font-display); font-weight:700; font-size:1.4rem; }
.price small{ font-family:var(--font-body); font-weight:500; color:var(--muted); font-size:.85rem; }

/* ---------- callout (visible delivery info) ---------- */
.callout{
  margin-top:20px; padding:18px 20px; border-radius:var(--radius-md);
  background:var(--accent-soft); border:1px solid rgba(29,160,195,.28);
  font-size:.93rem; color:var(--ink); display:flex; gap:12px; align-items:flex-start;
}
.callout .callout-icon{
  flex:none; width:26px; height:26px; border-radius:50%; background:var(--accent);
  color:#fff; display:grid; place-items:center; font-size:.85rem; font-weight:700;
}
.callout strong{ color:var(--ink); }
.callout p{ color:var(--ink); }
.callout p{ margin:0; }

/* ---------- checkout / pre-payment instructions page ---------- */
.step-list{ display:grid; gap:16px; counter-reset:step; }
.step-card{
  display:flex; gap:18px; align-items:flex-start;
  border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface);
  padding:22px 24px;
}
.step-num{
  flex:none; width:36px; height:36px; border-radius:50%; background:var(--contrast-bg); color:var(--contrast-ink);
  display:grid; place-items:center; font-family:var(--font-display); font-weight:700;
}
.step-card h3{ font-size:1.05rem; margin-bottom:6px; }
.step-card p{ color:var(--muted); font-size:.94rem; }
.step-card code, .step-card strong.highlight{
  display:inline-block; margin-top:6px; padding:6px 10px; border-radius:8px;
  background:var(--surface-2); border:1px solid var(--line); font-family:var(--font-display);
  font-weight:600; color:var(--ink);
}
.feature-list{ display:grid; gap:16px; }
.feature-item{
  border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface);
  padding:22px 24px;
}
.feature-item h3{ font-size:1.1rem; margin-bottom:8px; }
.feature-item p{ color:var(--muted); font-size:.95rem; }
.feature-item ul{ margin-top:10px; display:grid; gap:6px; }
.feature-item li{ color:var(--muted); font-size:.92rem; padding-left:16px; position:relative; }
.feature-item li::before{
  content:''; position:absolute; left:0; top:.6em; width:6px; height:6px; border-radius:50%;
  background:var(--accent);
}
.photo-strip{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.photo-strip figure{
  margin:0; border-radius:var(--radius-md); overflow:hidden; border:1px solid var(--line);
  aspect-ratio:4/5; background:#0c0c0c;
}
.photo-strip img{ width:100%; height:100%; object-fit:cover; }

/* ---------- product video embed ---------- */
.video-embed{
  position:relative; width:100%; max-width:920px; margin:0 auto;
  aspect-ratio:16/9; border-radius:var(--radius-lg); overflow:hidden;
  border:1px solid var(--line); background:#111; box-shadow:var(--shadow-md);
}
.video-embed iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }

/* ---------- screenshot gallery (auto-rotating, real product UI) ---------- */
.gallery-window{
  position:relative; border-radius:var(--radius-lg); overflow:hidden;
  border:1px solid var(--line); background:#111; box-shadow:var(--shadow-md);
}
.gallery-window .bar{
  position:relative; z-index:2; display:flex; gap:7px; padding:14px 18px;
  background:#1a1a1a; border-bottom:1px solid rgba(255,255,255,.06);
}
.gallery-window .bar span{ width:11px; height:11px; border-radius:50%; background:#3a3a3a; }
.gallery-stage{ position:relative; aspect-ratio:16/10; background:#111; }
.gallery-slide{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity .7s ease; padding:26px;
}
.gallery-slide.active{ opacity:1; z-index:1; }
.gallery-slide img{ max-width:100%; max-height:100%; object-fit:contain; }
.gallery-arrow{
  position:absolute; top:50%; transform:translateY(-50%); z-index:3;
  width:44px; height:44px; border-radius:50%; border:1px solid rgba(255,255,255,.25);
  background:rgba(10,10,10,.55); color:#fff; display:grid; place-items:center; cursor:pointer;
  font-size:1.2rem; line-height:1; backdrop-filter:blur(6px); transition:.15s ease;
}
.gallery-arrow:hover{ background:rgba(10,10,10,.8); }
.gallery-arrow.prev{ left:16px; }
.gallery-arrow.next{ right:16px; }
.gallery-caption{ padding:24px 26px; background:var(--surface); border-top:1px solid var(--line); min-height:1px; }
.gallery-caption h3{ font-size:1.2rem; margin-bottom:8px; }
.gallery-caption p{ color:var(--muted); font-size:.96rem; max-width:66ch; margin:0; }
.gallery-dots{ display:flex; gap:8px; margin-top:16px; justify-content:center; }
.gallery-dot{
  width:9px; height:9px; border-radius:999px; background:var(--line); border:none; cursor:pointer;
  padding:0; transition:.2s ease;
}
.gallery-dot.active{ background:var(--accent); width:24px; }
@media (max-width:640px){
  .gallery-arrow{ width:36px; height:36px; font-size:1rem; }
  .gallery-caption{ padding:18px; }
}
.cta-band{
  background:var(--contrast-bg); color:var(--contrast-ink); border-radius:var(--radius-lg);
  padding:clamp(28px,5vw,48px); display:flex; align-items:center; justify-content:space-between;
  gap:24px; flex-wrap:wrap;
}
.cta-band h2{ font-size:clamp(1.5rem,3vw,2.1rem); color:var(--contrast-ink); max-width:26ch; }
.cta-band p{ color:rgba(255,255,255,.7); margin-top:8px; max-width:44ch; }
.cta-band .btn-outline{ border-color:rgba(255,255,255,.3); color:#fff; }
.cta-band .btn-outline:hover{ border-color:#fff; }

/* ---------- checkout (two-column purchase page) ---------- */
.checkout-grid{
  display:grid; grid-template-columns:1fr 340px; gap:44px; align-items:start;
}
.checkout-form{ display:grid; gap:26px; }
.checkout-form > h2{ font-size:clamp(1.35rem,2.6vw,1.7rem); }

.field{ display:grid; gap:8px; }
.field label{ font-size:.88rem; font-weight:700; color:var(--muted); }
.field input, .field select{
  font:inherit; font-size:.96rem; color:var(--ink); background:var(--bg);
  border:1px solid var(--line); border-radius:var(--radius-sm); padding:12px 14px;
  transition:.15s ease;
}
.field select{ appearance:none; cursor:pointer;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'><path d='M5 7l5 5 5-5' stroke='%236f6b64' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat:no-repeat; background-position:right 14px center; padding-right:36px;
}
.field input:focus, .field select:focus{
  outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft);
}
.field-hint{ font-size:.82rem; color:var(--faint); }

.payment-card .field{ padding-top:2px; }

.payment-section{ display:grid; gap:12px; padding-top:22px; border-top:1px solid var(--line); }
.payment-section > h3{ font-size:.82rem; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:2px; }

.payment-option{
  display:flex; align-items:center; gap:16px;
  border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface);
  padding:18px 20px; transition:.15s ease;
}
.payment-option:hover{ border-color:var(--accent); transform:translateY(-1px); box-shadow:var(--shadow-sm); }
.payment-badge{
  flex:none; padding:8px 14px; border-radius:999px; font-weight:800; font-size:.8rem; letter-spacing:.01em;
}
.payment-badge--paypal{ background:#003087; color:#fff; }
.payment-badge--bandcamp{ background:var(--accent); color:var(--accent-ink); }
.payment-badge--kofi{ background:#13C3FF; color:#0a2e3d; }
.payment-option-text{ display:flex; flex-direction:column; gap:3px; flex:1; }
.payment-option-text strong{ font-size:1rem; color:var(--ink); }
.payment-option-text span{ font-size:.86rem; color:var(--muted); }
.payment-option-arrow{ flex:none; color:var(--faint); font-size:1.2rem; transition:.15s ease; }
.payment-option:hover .payment-option-arrow{ color:var(--accent); transform:translateX(3px); }

.payment-card{
  border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface);
  padding:20px 22px; display:grid; gap:14px;
}
.payment-card-head{ display:flex; align-items:center; gap:16px; }
.payment-instructions{ font-size:.87rem; color:var(--muted); line-height:1.55; margin:0; }
.payment-card .payment-note{ margin:0; }
.payment-card-cta{ justify-self:start; }

.payment-note{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin:-2px 0 4px; padding:11px 14px; border-radius:var(--radius-sm);
  background:var(--accent-soft); font-size:.85rem; color:var(--ink);
}
.payment-note code{
  font-family:var(--font-display); font-weight:700; background:var(--bg);
  border:1px solid var(--line); border-radius:6px; padding:3px 8px;
}
.copy-btn{
  border:1px solid var(--line); background:var(--bg); color:var(--ink);
  border-radius:999px; padding:5px 12px; font-size:.78rem; font-weight:700; cursor:pointer;
  transition:.15s ease; margin-left:auto;
}
.copy-btn:hover{ border-color:var(--accent); color:var(--accent); }

.delivery-note{ font-size:.85rem; color:var(--muted); line-height:1.65; }
.help-note{ font-size:.85rem; color:var(--faint); }
.help-note a{ color:var(--accent); font-weight:600; }

.checkout-summary{ position:sticky; top:96px; }
.summary-card{
  border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface);
  padding:22px; display:grid; gap:14px;
}
.summary-thumb{
  border-radius:var(--radius-md); overflow:hidden; border:1px solid var(--line);
  background:#0c0c0c; aspect-ratio:1/1;
}
.summary-thumb img{ width:100%; height:100%; object-fit:cover; }
.summary-card h3{ font-size:1.02rem; }
.summary-card .tag{ align-self:flex-start; }
.summary-rows{ display:grid; gap:8px; padding-top:12px; border-top:1px solid var(--line); }
.summary-row{ display:flex; justify-content:space-between; font-size:.92rem; color:var(--muted); }
.summary-row.summary-total{ color:var(--ink); font-weight:700; font-size:1.02rem; padding-top:10px; border-top:1px dashed var(--line); }
.summary-footnote{ font-size:.8rem; color:var(--faint); }

/* ---------- responsive ---------- */
@media (max-width:900px){
  .product-grid{ grid-template-columns:repeat(2,1fr); }
  .about-grid, .product-hero-grid{ grid-template-columns:1fr; }
  .photo-strip{ grid-template-columns:repeat(3,1fr); gap:10px; }
  .nav-links{ display:none; }
  .checkout-grid{ grid-template-columns:1fr; }
  .checkout-summary{ position:static; order:-1; }
}
@media (max-width:560px){
  .product-grid{ grid-template-columns:1fr; }
  .photo-strip{ grid-template-columns:1fr 1fr; }
  .cta-band{ flex-direction:column; align-items:flex-start; }
}
