/* Trafalgar — sito statico. Palette e reticolo presi dalla grafica dell'app. */

:root {
  --sea-950: #02121f;
  --sea-900: #041d30;
  --sea-800: #072b45;
  --sea-700: #0a3a5c;
  --sea-500: #1173b0;
  --sea-300: #4fb3e8;
  --grid: rgba(120, 200, 255, 0.13);
  --brass: #e0a33c;
  --brass-dim: #b9761f;
  --sail: #f4efe3;
  --ink: #e9f3fa;
  --muted: rgba(233, 243, 250, 0.72);
  --faint: rgba(233, 243, 250, 0.5);
  --line: rgba(120, 200, 255, 0.18);
  --card: rgba(255, 255, 255, 0.045);
  --radius: 16px;
  --serif: ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--sea-950);
  /* reticolo da carta nautica + bagliore sull'orizzonte */
  background-image:
    repeating-linear-gradient(to right, var(--grid) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(to bottom, var(--grid) 0 1px, transparent 1px 84px),
    radial-gradient(120% 70% at 50% -10%, var(--sea-700) 0%, var(--sea-900) 45%, var(--sea-950) 100%);
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
}

/* height: auto obbligatorio — gli attributi width/height dell'HTML servono a
   riservare lo spazio giusto durante il caricamento, ma senza questo l'altezza
   scritta nell'attributo vince e le schermate escono stirate. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--sea-300); text-decoration-color: rgba(79, 179, 232, 0.45); text-underline-offset: 3px; }
a:hover { color: #8ed2f5; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(4, 22, 37, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 62px;
  flex-wrap: wrap;
  padding-block: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--sail);
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }

/* wrap: in italiano "Caratteristiche" da sola basta a superare la larghezza di un
   telefono, e una riga di navigazione che non va a capo allarga tutta la pagina. */
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.94rem; min-width: 0; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--sail); }

.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang button {
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 11px;
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
}
.lang button + button { border-left: 1px solid var(--line); }
.lang button:hover { color: var(--sail); }
.lang button[aria-pressed="true"] { background: var(--brass); color: #22160a; font-weight: 600; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 6vw, 74px) 0 clamp(36px, 5vw, 64px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("hero-sea.jpg") center / cover no-repeat;
  opacity: 0.28;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 92%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 92%);
}
.hero > * { position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  border: 1px solid rgba(224, 163, 60, 0.4);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0 0 10px;
  color: #fff;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.55);
}

.tagline {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  color: var(--brass);
  margin: 0 0 20px;
  letter-spacing: 0.01em;
}

.lede { font-size: 1.06rem; color: var(--muted); max-width: 46ch; margin: 0 0 28px; }

.cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.badge-store {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: linear-gradient(180deg, #fdfaf3, #e8e0cf);
  color: #14202a;
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 20px 10px 16px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.badge-store:hover { color: #14202a; transform: translateY(-1px); }
.badge-store svg { width: 26px; height: 26px; flex: none; }
.badge-store small { display: block; font-size: 0.66rem; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; opacity: 0.72; }
.badge-store span { display: block; font-size: 1.06rem; line-height: 1.15; }
.badge-store.is-soon { background: transparent; color: var(--sail); border: 1px dashed rgba(224, 163, 60, 0.55); box-shadow: none; cursor: default; }
.badge-store.is-soon:hover { transform: none; }

.cta-note { font-size: 0.9rem; color: var(--faint); }

/* telefono */

.phone {
  position: relative;
  margin-inline: auto;
  width: min(280px, 78vw);
  border-radius: 40px;
  padding: 9px;
  background: linear-gradient(160deg, #2b3d4c, #0b1721 55%, #24333f);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.phone img { border-radius: 32px; width: 100%; }

/* ---------- fasce e sezioni ---------- */

section { padding-block: clamp(44px, 7vw, 80px); }

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin: 0 0 8px;
  color: var(--sail);
}
.section-lede { color: var(--muted); margin: 0 0 34px; max-width: 58ch; }

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.fact { background: rgba(4, 22, 37, 0.72); padding: 22px 16px; text-align: center; }
.fact b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1;
  color: var(--brass);
}
.fact span { font-size: 0.85rem; color: var(--muted); letter-spacing: 0.04em; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 {
  font-family: var(--serif);
  font-size: 1.22rem;
  margin: 0 0 8px;
  color: var(--sail);
}
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.card .glyph { font-size: 1.5rem; display: block; margin-bottom: 12px; color: var(--brass); opacity: 0.9; }

.rule-band {
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 115, 176, 0.14), transparent);
  text-align: center;
}
.rule-band h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  margin: 0 0 12px;
  color: #fff;
}
.rule-band p { margin: 0 auto; max-width: 54ch; color: var(--muted); }

/* galleria */

.shots {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--sea-500) transparent;
}
.shot { flex: 0 0 auto; width: 210px; scroll-snap-align: start; }
.shot img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  background: var(--sea-800);
}
.shot figcaption { margin-top: 10px; font-size: 0.88rem; color: var(--muted); }

/* ---------- supporto / privacy ---------- */

.page-head { padding: clamp(40px, 6vw, 70px) 0 10px; }
.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 6vw, 3rem);
  margin: 0 0 12px;
  color: #fff;
}
.page-head p { color: var(--muted); max-width: 58ch; margin: 0; }

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.contact .mail {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3.4vw, 1.6rem);
  color: var(--brass);
  text-decoration: none;
  word-break: break-word;
}
.contact .mail:hover { color: #f2c377; }
.contact p { margin: 0; color: var(--muted); flex: 1 1 260px; font-size: 0.96rem; }

details.faq {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
details.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 34px 16px 0;
  position: relative;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--sail);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brass);
  font-family: var(--sans);
  font-size: 1.3rem;
  line-height: 1;
}
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 0 0 18px; color: var(--muted); max-width: 66ch; }

.prose p { color: var(--muted); max-width: 68ch; }
.prose h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--sail);
  margin: 34px 0 8px;
}
.updated { font-size: 0.86rem; color: var(--faint); letter-spacing: 0.04em; }

.note-box {
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: 12px;
  background: var(--card);
  padding: 20px 22px;
}
.note-box h3 { font-family: var(--serif); margin: 0 0 8px; color: var(--sail); font-size: 1.1rem; }
.note-box p, .note-box li { color: var(--muted); }
.note-box ul { margin: 0; padding-left: 20px; }
.note-box li { margin-bottom: 4px; }

.btn {
  display: inline-block;
  background: var(--brass);
  color: #22160a;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  padding: 11px 22px;
}
.btn:hover { background: #f0b556; color: #22160a; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  background: rgba(2, 14, 24, 0.6);
  font-size: 0.9rem;
  color: var(--faint);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; }
.site-footer nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--sail); }
.site-footer .credits { flex-basis: 100%; margin: 0; font-size: 0.82rem; }

/* ---------- responsive ---------- */

/* Uno screenshot di iPhone è alto più del doppio della sua larghezza: su un
   portatile va legato all'altezza della finestra, o da solo spinge il titolo
   sotto la prima schermata. */
@media (min-width: 861px) {
  .phone { width: min(280px, 28vh); }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header .wrap { min-height: 0; }
  .brand { margin-right: 0; }
  .site-nav { order: 3; flex-basis: 100%; justify-content: center; gap: 14px; }
  .shot { width: 168px; }
}
