:root {
  --ink: #07131f;
  --navy: #0e2438;
  --card: #173049;
  --gold: #c6a15b;
  --gold-deep: #b88a3d;
  --paper: #f6f1e7;
  --paper-ink: #172033;
  --muted: #d9d0c3;
  --line: rgba(230, 201, 138, 0.35);
  --danger: #ffb4a8;
  --ok: #b7e3c5;
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --sans: Outfit, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
button, input, select, textarea { font: inherit; color: inherit; }
.skip {
  position: absolute; left: 12px; top: -40px; background: var(--gold); color: var(--ink);
  padding: 8px 12px; z-index: 9;
}
.skip:focus { top: 12px; }
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 22px;
  background: rgba(7, 19, 31, 0.75) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.92rem; }
.brand img { width: 36px; height: 36px; }
nav { display: flex; gap: 18px; align-items: center; }
nav a { color: var(--paper); text-decoration: none; font-size: 1rem; }
nav a:hover, nav a:focus-visible { color: var(--gold); }
.tools { display: flex; gap: 8px; align-items: center; }
.tools button, .menu-btn {
  background: transparent; border: 1px solid var(--line); color: var(--paper);
  min-width: 44px; min-height: 44px; border-radius: 999px; cursor: pointer;
}
.tools button[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.cartlink {
  color: var(--ink); background: var(--gold); text-decoration: none;
  padding: 10px 14px; border-radius: 999px; font-weight: 600; min-height: 44px;
}
.menu-btn { display: none; }
.hero { position: relative; min-height: 92vh; display: grid; align-items: end; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,19,31,0.15), rgba(7,19,31,0.88)); }
.hero-copy { position: relative; z-index: 1; padding: 8vh 7vw 10vh; max-width: 920px; }
.eyebrow { letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-size: 0.82rem; margin: 0 0 12px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; line-height: 0.95; margin: 0; }
h1 { font-size: clamp(4.2rem, 12vw, 8.4rem); }
h2 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
h3 { font-size: 2rem; line-height: 1.1; }
.lead { font-size: clamp(1.25rem, 2vw, 1.6rem); max-width: 36rem; color: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--ink); text-decoration: none; font-weight: 650;
  border: 0; border-radius: 999px; padding: 14px 22px; min-height: 48px; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--paper); border: 1px solid var(--gold); }
.wrap { padding: 72px 7vw; position: relative; z-index: 2; }
.light { background: var(--paper); color: var(--paper-ink); }
.light a { color: #8a5a12; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 28px; }
.card {
  background: var(--card); color: var(--paper); border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
}
.light .card { background: white; color: var(--paper-ink); border-color: rgba(28,20,12,0.08); }
.card .pad, .pad { padding: 18px 18px 22px; }
.card img { width: 100%; height: 220px; object-fit: cover; }
.price { font-family: var(--serif); font-size: 2rem; margin: 8px 0; }
.kicker { color: var(--gold-deep); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.78rem; }
.light .kicker { color: #8a5a12; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.num { font-family: var(--serif); font-size: 4rem; color: var(--gold); line-height: 1; }
.seal-row { display: grid; grid-template-columns: 280px 1fr; gap: 36px; align-items: center; }
.sealpic { width: min(320px, 100%); border-radius: 50%; }
.warn { border-left: 3px solid var(--gold); padding-left: 14px; }
.stack { display: grid; gap: 12px; max-width: 640px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
label { display: grid; gap: 6px; font-size: 1rem; }
input, select, textarea {
  background: #0c1b2c; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px;
}
.light input, .light select, .light textarea { background: white; color: var(--paper-ink); border-color: #ddd; }
textarea { min-height: 96px; }
.hp { position: absolute; left: -9999px; }
.split { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; }
.sheet { max-width: 860px; margin: 0 auto; padding: 48px 22px 80px; }
.legal p, .legal li { max-width: 68ch; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.foot { padding: 36px 7vw 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.98rem; position: relative; z-index: 2; }
.foot a { color: var(--gold); }
.foot nav { flex-wrap: wrap; margin: 12px 0; }
.msg { padding: 12px 14px; border-radius: 12px; background: #102033; }
.msg.bad { color: var(--danger); }
.msg.good { color: var(--ok); }
code { word-break: break-all; color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
/* Le voci di navigazione sono nove: sotto i 1180px non ci stanno piu' accanto
   al marchio e ai pulsanti, e comprimerle significa testo su due righe e
   pagina che scorre in orizzontale. Si passa al menu a tendina prima di
   arrivare a quel punto, non dopo. */
@media (max-width: 1180px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--ink); padding: 12px 22px 18px; flex-direction: column; align-items: flex-start; border-bottom: 1px solid var(--line); }
  nav.open { display: flex; }
}
@media (max-width: 860px) {
  .three, .seal-row { grid-template-columns: 1fr; }
  h1 { font-size: clamp(3.4rem, 18vw, 5rem); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ===== SFONDO BANNER + EFFETTO ACQUARIO ===== */
.banner-bg {
  position: fixed; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  background-repeat: no-repeat; background-attachment: fixed;
  filter: saturate(1.1) contrast(1.05);
}
.banner-overlay {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(circle at center, rgba(7,19,31,0.35) 0%, rgba(7,19,31,0.92) 70%, rgba(7,19,31,1) 100%);
}
.aquarium {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}
/* Qui c'è solo la geometria della bolla. L'aspetto finale (gradiente,
   bordo, alone, doppia animazione) è ridefinito più sotto nel blocco
   BDC-BANNER-V2: la cascata è voluta, non una svista. */
.bubble {
  position: absolute; bottom: -80px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255,255,255,0.18), inset 0 0 8px rgba(255,255,255,0.35);
  animation: bubble-rise linear infinite;
  opacity: 0;
}
@keyframes bubble-rise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.7; }
  80% { opacity: 0.7; }
  100% { transform: translateY(-130vh) translateX(var(--drift)); opacity: 0; }
}
.seal-hero {
  position: relative; z-index: 2;
  text-align: center;
  padding: 70px 7vw 40px;
}
.seal-hero img.seal-big {
  width: min(380px, 85vw);
  height: auto;
  border-radius: 50%;
  border: 4px solid var(--gold);
  box-shadow: 0 30px 90px rgba(0,0,0,0.55), 0 0 0 12px rgba(198,161,91,0.15);
  filter: drop-shadow(0 25px 50px rgba(0,0,0,0.4));
}
.seal-label {
  margin-top: 16px;
  font-family: var(--serif);
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.ticker-wrap { overflow: hidden; position: relative; background: var(--navy); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 24px 0; position: relative; z-index: 2; }
.ticker-track { display: flex; gap: 32px; animation: ticker 20s linear infinite; }
.ticker-card { flex: 0 0 auto; width: 220px; text-align: center; }
.ticker-card img { width: 100%; height: 140px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 8px; }
.ticker-info strong { display: block; font-family: var(--serif); font-size: 1rem; color: var(--gold); margin-bottom: 4px; }
.ticker-info span { font-size: 0.85rem; color: var(--muted); }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.goods-wrap { padding: 56px 7vw; position: relative; z-index: 2; }
.goods-wrap h2 { font-family: var(--serif); text-align: center; font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 8px; color: var(--paper); }
.goods-wrap p { text-align: center; color: var(--muted); margin-bottom: 40px; }
.grid-magic { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; position: relative; z-index: 2; }
.card.magic { background: var(--card); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; position: relative; z-index: 2; }
.card.magic img { width: 100%; height: 260px; object-fit: cover; }
.card.magic .pad { padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 10px; }
.card.magic .badge { display: inline-block; background: var(--gold); color: var(--ink); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; align-self: flex-start; }
.card.magic h3 { font-family: var(--serif); font-size: 1.5rem; margin: 0; color: var(--paper); }
.card.magic p { font-size: 0.95rem; color: var(--muted); line-height: 1.5; margin: 0; }
.card.magic .price { font-family: var(--serif); font-size: 1.75rem; color: var(--gold); margin-top: auto; }
@media (max-width: 768px) { .ticker-card { width: 160px; } .ticker-track { animation-duration: 14s; } }

/* ===== BDC-BANNER-V2 — banner su tutte le pagine =====
   Banner e bolle sono elementi fissi in z-index 0/1. Il contenuto deve stare
   sopra, altrimenti finisce dietro la velatura scura. Su index.html i blocchi
   hanno già z-index 2; qui si coprono le pagine interne. */
main { position: relative; z-index: 2; }

/* Pagine interne: il testo poggia direttamente sul banner. Senza una
   superficie opaca la leggibilità dipende dalla foto sottostante. */
main > .sheet {
  background: rgba(7, 19, 31, 0.78);
  -webkit-backdrop-filter: blur(8px) saturate(1.05);
  backdrop-filter: blur(8px) saturate(1.05);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-top: 28px;
  margin-bottom: 48px;
}

/* L'immagine sta qui e non in 50 attributi style: un solo punto da cambiare.
   background-attachment: fixed su un elemento già position:fixed non serve
   e su iOS produce compositing instabile: si annulla. */
.banner-bg {
  background-image: url('/media/banner.jpg');
  background-attachment: scroll;
}

/* Bolle: gradiente radiale per il riflesso speculare, bordo freddo, alone
   interno asimmetrico. Costo: nessuna immagine, solo CSS. */
.bubble {
  background:
    radial-gradient(circle at 32% 26%,
      rgba(255, 255, 255, 0.90) 0%,
      rgba(255, 255, 255, 0.42) 10%,
      rgba(255, 255, 255, 0.08) 34%,
      rgba(255, 255, 255, 0.02) 62%,
      rgba(198, 234, 255, 0.14) 100%);
  border: 1px solid rgba(198, 234, 255, 0.38);
  box-shadow:
    inset -3px -5px 12px rgba(120, 200, 255, 0.22),
    inset 3px 4px 10px rgba(255, 255, 255, 0.32),
    0 0 16px rgba(120, 200, 255, 0.20);
  animation: bubble-rise linear infinite, bubble-sway ease-in-out infinite alternate;
}
@keyframes bubble-sway {
  from { margin-left: -7px; }
  to { margin-left: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .bubble { animation: none; opacity: 0; }
  .ticker-track { animation: none; }
}
/* ===== BDC-OCEAN — sfondo dinamico (WebGL) =====
   Il canvas sta fra la velatura del banner e le bolle, nello stesso livello
   z-index 1 e DOPO la velatura nel documento: aggiunge luce (caustiche, fasci,
   bolle) senza coprire la fotografia.
   Se il WebGL non è disponibile, se l'utente ha chiesto meno movimento
   (?ocean=off, prefers-reduced-motion, Save-Data) o se il frame rate non
   regge, ocean.js scrive data-ocean="off" sul <html> e resta la pagina di
   prima: foto, velatura, bolle CSS. */
.ocean {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
html:not([data-ocean="on"]) .ocean { display: none; }
@media print { .ocean { display: none; } }
