/* =====================================================================
   Deopolis — sito vetrina. Tema "Bronzo & Egeo" (stessa identità del gioco).
   Cinzel (titoli epigrafici) · Spectral (corpo, "leggi un mito") · sans di
   sistema per dati/controlli. Palette da DeopolisTheme.cs.
   ===================================================================== */

:root {
  --gold:       #B5891E;   /* oro antico — azioni */
  --gold-lift:  #CBA13A;
  --aegean:     #1B3A5B;   /* blu egeo profondo — chrome/sezione scura */
  --aegean-deep:#0F2A44;
  --terracotta: #B85C3B;   /* accento figura-rossa */
  --bronze:     #C9BCA0;   /* linee */
  --stone:      #F0ECE1;   /* fondo pietra/pergamena */
  --paper:      #FBF9F3;   /* carta chiara — card */
  --ink:        #2B2A26;   /* nero caldo — testo */
  --ink-soft:   #5B5445;
  --ink-mute:   #6A6558;
  --light:      #F3ECD9;   /* avorio su fondi scuri */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: 'Spectral', Georgia, serif;
  --display: 'Cinzel', Georgia, serif;
  --wrap: 1140px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; } /* le ancore non finiscono sotto la navbar sticky */

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--stone);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--display); letter-spacing: .03em; line-height: 1.08; }

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

img, svg { max-width: 100%; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--gold); color: #241a05; padding: .6rem 1rem; border-radius: 0 0 .4rem 0;
  font-family: var(--sans); font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; text-decoration: none;
  padding: .74rem 1.5rem; border-radius: .5rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .12s var(--ease);
}
.btn:focus-visible { outline: 3px solid var(--gold-lift); outline-offset: 2px; }
.btn-gold { background: var(--gold); color: #241a05; box-shadow: 0 6px 16px rgba(181,137,30,.35); }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(181,137,30,.45); }
.btn-ghost { background: rgba(243,236,217,.08); color: var(--light); border-color: rgba(243,236,217,.5); }
.btn-ghost:hover { background: rgba(243,236,217,.16); }
.btn-line { background: transparent; color: var(--aegean); border-color: var(--aegean); }
.btn-line:hover { background: rgba(27,58,91,.06); }

/* ---------- Eyebrow (inscrizione) ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--sans); text-transform: uppercase; letter-spacing: .22em;
  font-size: .72rem; font-weight: 600; color: var(--terracotta); margin: 0 0 .9rem;
}
.eyebrow::before { content: ""; width: 30px; height: 2px; background: var(--gold); display: inline-block; }
.eyebrow-light { color: #E7C877; }
.eyebrow-light::before { background: var(--gold-lift); }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(240,236,225,.86); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--gold);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--aegean); }
.brand-mark { color: var(--gold); flex: 0 0 auto; }
.brand-word { font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: .06em; color: var(--aegean); }
.nav-menu { display: flex; align-items: center; gap: 1.6rem; }
.nav-menu a { font-family: var(--sans); font-weight: 500; font-size: .96rem; text-decoration: none; color: var(--ink); }
.nav-menu a:not(.btn):hover { color: var(--gold); }
.nav-cta { padding: .5rem 1.05rem; }
.nav-toggle { display: none; }

/* ---------- Hero: alba sul colonnato ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: clamp(520px, 82vh, 760px);
  display: flex; align-items: center;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,20,34,.82) 0%, rgba(8,20,34,.55) 44%, rgba(8,20,34,.08) 82%);
}
.hero-inner { position: relative; color: var(--light); }
.hero-title {
  font-weight: 700; margin: 0 0 .8rem; color: #FBF6E9;
  font-size: clamp(3rem, 9vw, 6rem); text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.hero-tagline {
  font-size: clamp(1.05rem, 2.3vw, 1.35rem); line-height: 1.55;
  margin: 0 0 1.7rem; color: #EEE4CF; max-width: 46ch;
}
.hero-tagline strong { color: #F6DFA6; font-weight: 600; }
.hero-cta { display: flex; gap: .85rem; flex-wrap: wrap; }
.hero-note { font-family: var(--sans); font-size: .84rem; color: #CFC3A6; margin: 1.1rem 0 0; letter-spacing: .02em; }

/* ---------- Sezioni ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--paper); border-block: 1px solid var(--bronze); }
.section-title { font-weight: 600; font-size: clamp(1.7rem, 3.6vw, 2.5rem); color: var(--aegean); margin: 0 0 .6rem; }
.section-lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 60ch; margin: 0 0 2.6rem; }

/* ---------- Colonnato (4 pilastri) — la firma ---------- */
.colonnade {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; align-items: stretch;
}
.column { position: relative; display: flex; flex-direction: column; padding-top: 14px; }
/* capitello: architrave sottile che poggia su ogni colonna */
.column-cap { display: block; height: 10px; background: var(--gold); border-radius: 3px 3px 0 0; margin: 0 6px; box-shadow: 0 1px 0 rgba(181,137,30,.4); }
.column-body {
  flex: 1; background: var(--paper); border: 1px solid var(--bronze); border-top: none;
  border-radius: 0 0 4px 4px; padding: 1.5rem 1.35rem 1.7rem;
  /* scanalature del fusto: sottili righe verticali */
  background-image: repeating-linear-gradient(90deg, rgba(201,188,160,.0) 0 22px, rgba(201,188,160,.22) 22px 23px);
}
.column .ico { width: 34px; height: 34px; color: var(--gold); margin-bottom: .7rem; }
.column h3 { font-size: 1.1rem; font-weight: 600; color: var(--aegean); margin: 0 0 .5rem; }
.column p { font-size: .98rem; line-height: 1.5; color: var(--ink-soft); margin: 0; }
/* stilobate: la base di pietra su cui poggia il colonnato */
.stylobate { height: 14px; background: linear-gradient(var(--bronze), #b8ab8c); border-radius: 3px; margin-top: -1px; box-shadow: 0 8px 20px rgba(43,42,38,.12); }

/* ---------- Vetrina / gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
.shot { margin: 0; }
.shot-frame {
  aspect-ratio: 16 / 9; border-radius: 10px; border: 1px solid var(--bronze);
  position: relative; overflow: hidden; box-shadow: 0 10px 26px rgba(12,33,56,.12);
  background: var(--stone);
}
.shot-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-frame::after {
  content: "Anteprima"; position: absolute; top: 12px; left: 12px; z-index: 1;
  font-family: var(--sans); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--light); background: rgba(15,42,68,.7); padding: .25rem .55rem; border-radius: 999px;
}
.shot figcaption { font-size: .96rem; color: var(--ink-soft); margin-top: .7rem; }
.gallery-note { font-family: var(--sans); font-size: .84rem; color: var(--ink-mute); margin: 1.4rem 0 0; font-style: italic; }

/* ---------- Perché Deopolis: manifesto egeo (sezione scura, la "firma" contrasto) ---------- */
.creed { background: var(--aegean-deep); color: var(--light); }
.creed .eyebrow-light { color: #E7C877; }
.creed-title { color: #F6EBD3; margin-bottom: 2.4rem; }
.tenets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.tenet-rule { display: block; width: 46px; height: 3px; background: var(--gold); margin-bottom: 1rem; border-radius: 2px; }
.tenet h3 { font-size: 1.2rem; font-weight: 600; color: #F6EBD3; margin: 0 0 .55rem; }
.tenet p { font-size: 1rem; line-height: 1.55; color: #D7CDB6; margin: 0; }

/* ---------- Alpha ---------- */
.alpha-inner { display: grid; grid-template-columns: 1.3fr .9fr; gap: 2.6rem; align-items: center; }
.alpha-card { background: var(--paper); border: 1px solid var(--bronze); border-left: 4px solid var(--gold); border-radius: 10px; padding: 1.5rem 1.6rem; }
.ticklist { list-style: none; margin: 0; padding: 0; }
.ticklist li { position: relative; padding-left: 1.9rem; margin: .7rem 0; font-size: 1rem; color: var(--ink-soft); }
.ticklist li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 1.15rem; height: .65rem;
  border-left: 2.5px solid var(--gold); border-bottom: 2.5px solid var(--gold);
  transform: rotate(-45deg);
}

/* ---------- Footer ---------- */
.footer { background: var(--aegean); color: var(--light); padding: 2.6rem 0 1.6rem; }
.footer a { color: #E7C877; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 1.4rem; border-bottom: 1px solid rgba(243,236,217,.18); }
.footer-brand .brand-word { color: #F6EBD3; }
.footer-brand p { font-size: .95rem; color: #C9BCA0; max-width: 40ch; margin: .4rem 0 0; }
.footer-links { display: flex; gap: 1.4rem; align-items: center; font-family: var(--sans); font-size: .95rem; }
.footer-base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.1rem; font-family: var(--sans); font-size: .84rem; color: #C9BCA0; }

/* ---------- Reveal all'ingresso (progressive enhancement) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .colonnade { grid-template-columns: repeat(2, 1fr); }
  .tenets { grid-template-columns: 1fr; gap: 1.4rem; }
  .alpha-inner { grid-template-columns: 1fr; gap: 1.8rem; }
}
@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 40px; background: none; border: 1px solid var(--bronze); border-radius: .4rem; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; width: 22px; margin-inline: auto; background: var(--aegean); transition: transform .2s var(--ease), opacity .2s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--stone); border-bottom: 2px solid var(--gold);
    /* chiuso: fuori dal flusso E dal tab-order (visibility), non solo clippato */
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height .28s var(--ease), visibility .28s var(--ease);
  }
  .nav-menu.open { max-height: 380px; visibility: visible; }
  .nav-menu a { padding: .95rem 20px; border-top: 1px solid var(--bronze); }
  .nav-cta { margin: .8rem 20px 1.1rem; padding: .7rem 1rem; }
  .gallery { grid-template-columns: 1fr; }
  .colonnade { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* ---------- Pagina 404 (evita <style> inline → CSP senza 'unsafe-inline') ---------- */
.nf { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem; background: var(--aegean-deep); color: var(--light); }
.nf h1 { font-size: clamp(3rem, 12vw, 6rem); color: #F6EBD3; margin: 0; }
.nf p { color: #D7CDB6; font-size: 1.15rem; max-width: 40ch; margin: 1rem auto 1.8rem; }
.nf .eyebrow-light { justify-content: center; }
