/* ============================================================
   MR JINN — Antonio Giannetti · Dubai Real Estate
   Shared editorial dark-mode design system
   ============================================================ */

:root {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --line: rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.22);
  --text-primary: #efe9dd;   /* warm off-white — headings */
  --text-body: #b7b0a3;      /* readable warm grey — body */
  --text-muted: #837c70;
  --gold: #c79a55;
  --gold-bright: #e3c489;
  --font-display: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  --shadow-text: 0 2px 30px rgba(0,0,0,0.9), 0 1px 4px rgba(0,0,0,0.8);
  --maxw: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: auto; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.01em;
  overflow-x: clip;
}
::selection { background: var(--gold); color: #000; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* lang visibility helper (no-JS fallback shows IT) */
[data-lang-it], [data-lang-en] { display: none; }
html[lang="it"] [data-lang-it] { display: revert; }
html[lang="en"] [data-lang-en] { display: revert; }

/* ---------- Shared type ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-bright);
  font-weight: 500;
}
.display-xl {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 8rem);
  line-height: 0.94;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.display-lg {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.5vw, 5.2rem);
  line-height: 0.98;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}
.display-md {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.05;
  color: var(--text-primary);
}
.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.6;
  color: var(--text-body);
  font-weight: 300;
  max-width: 46ch;
}
.italic { font-style: italic; }
.gold { color: var(--gold-bright); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.4rem, 5vw, 4rem); }
.section { padding: clamp(5rem, 12vh, 11rem) 0; position: relative; }
.section--tight { padding: clamp(3.5rem, 8vh, 7rem) 0; }
.rule { height: 1px; background: var(--line); border: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  padding: 1.3rem 0;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), padding 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(14px);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.26em;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  white-space: nowrap;
}
.brand .brand-sub { font-weight: 300; font-size: 0.66rem; letter-spacing: 0.3em; color: var(--text-muted); text-transform: uppercase; }
.nav-links { list-style: none; display: flex; align-items: center; gap: clamp(0.85rem, 1.5vw, 1.7rem); }
.nav-links a {
  text-decoration: none;
  color: var(--text-body);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
  transition: color 0.3s var(--ease);
  position: relative;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text-primary); }
.nav-links a.is-active::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1px; background: var(--gold);
}
/* Il gruppo a destra (toggle IT/EN + pillole lingua) non deve mai comprimersi:
   se la barra si affolla, i flessibili sono brand e nav-links, non lo switch.
   Senza flex-shrink:0 le pillole lingua si restringono sotto il loro contenuto
   e una voce (es. cinese full-width) va a capo o l'araba finisce schiacciata
   al bordo: e il caso per cui dalla home root non si raggiungeva l'arabo. */
.nav-right { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; white-space: nowrap; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  overflow: hidden;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  font-weight: 500;
}
.lang-toggle button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  text-transform: uppercase;
  font-family: var(--font-body);
  transition: color 0.25s, background 0.25s;
}
.lang-toggle button.is-active { background: var(--gold-bright); color: #000; }
.nav-cta {
  border: 1px solid var(--gold);
  color: var(--gold-bright) !important;
  padding: 0.55rem 1.15rem;
  border-radius: 100px;
  transition: background 0.35s var(--ease), color 0.35s var(--ease) !important;
}
.nav-cta:hover { background: var(--gold-bright); color: #000 !important; }
.brand { position: relative; z-index: 210; }
.nav-toggle { display: none; position: relative; z-index: 210; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 24px; height: 1.5px; background: var(--text-primary); border-radius: 2px; transition: 0.3s var(--ease); }
.nav-close-li { display: none; }

@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center;
    background: #050505; padding: 2rem;
    gap: 1.8rem; transform: translateX(100%); transition: transform 0.5s var(--ease); z-index: 150;
    cursor: pointer; /* abilita il tap-to-close sullo sfondo anche su iOS Safari */
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { font-size: 1.05rem; white-space: normal; text-align: center; }
  .nav-links .nav-cta { font-size: 0.82rem; padding: 0.75rem 1.4rem; }
  /* keep header bar (logo + close) above the open menu, blend off so the X is clearly visible */
  body.nav-open .site-header { mix-blend-mode: normal; }
  body.nav-open .nav-toggle span { background: var(--text-primary); }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  /* Open menu: hide the hamburger, show a clear dedicated close (X) inside the panel */
  body.nav-open .nav-toggle { opacity: 0; pointer-events: none; }
  .nav-close-li { display: block; position: absolute; top: 0.9rem; right: 1.1rem; margin: 0; }
  .nav-close {
    background: none; border: 0; color: var(--gold-bright);
    font-size: 2.6rem; line-height: 1; cursor: pointer;
    padding: 0.2rem 0.7rem; font-family: inherit; transition: color 0.2s var(--ease);
  }
  .nav-close:hover, .nav-close:focus-visible { color: var(--text-primary); }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(9rem, 20vh, 14rem) 0 clamp(3rem, 7vh, 6rem); position: relative; }
.page-hero .eyebrow { margin-bottom: 1.4rem; display: inline-block; }
.page-hero .lede { margin-top: 1.8rem; }

/* ---------- Burj scrub hero (Home only) ---------- */
.hero-pin { position: relative; height: 260vh; width: 100%; background: #000; }
.hero-sticky { position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden; background: #000; }
.hero-canvas-wrap { position: absolute; inset: 0; z-index: 1; clip-path: circle(0% at 50% 50%); will-change: clip-path; }
#hero-canvas { width: 100%; height: 100%; display: block; }
.hero-vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(to bottom, #000 0%, rgba(0,0,0,0) 24%, rgba(0,0,0,0) 58%, rgba(0,0,0,0.65) 84%, #000 100%),
    linear-gradient(to right, #000 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 82%, #000 100%),
    radial-gradient(135% 115% at 50% 40%, rgba(0,0,0,0) 52%, rgba(0,0,0,0.6) 100%);
}
.hero-copy {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: clamp(3rem, 12vh, 8rem);
  padding: 0 clamp(1.4rem, 5vw, 4rem); will-change: transform, opacity;
}
.hero-copy .eyebrow { margin-bottom: 1.4rem; display: inline-block; }
.hero-claim {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.2rem, 11vw, 11rem);
  line-height: 0.9;
  color: var(--text-primary);
  text-shadow: var(--shadow-text);
  max-width: 16ch;
}
.hero-claim .italic { font-weight: 300; }
.hero-tagline { margin-top: 1.6rem; max-width: 34ch; font-size: clamp(1rem, 1.4vw, 1.25rem); color: var(--text-body); text-shadow: 0 1px 14px rgba(0,0,0,0.8); }
.scroll-indicator {
  position: absolute; z-index: 3; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem; color: var(--text-muted);
}
.scroll-indicator span { font-size: 0.62rem; letter-spacing: 0.32em; text-transform: uppercase; }
.scroll-arrow { width: 1px; height: 42px; background: linear-gradient(to bottom, var(--gold-bright), transparent); animation: scrollPulse 2.2s ease-in-out infinite; }
@keyframes scrollPulse { 0%,100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- Editorial: claim / manifesto ---------- */
.statement { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 4.2vw, 4rem); line-height: 1.16; color: var(--text-primary); max-width: 20ch; letter-spacing: -0.005em; }
.statement .gold { font-style: italic; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.split--label-text { grid-template-columns: 0.4fr 1fr; }
@media (max-width: 820px) { .split, .split--label-text { grid-template-columns: 1fr; gap: 1.6rem; } }
/* Telefono in orizzontale: testo di nuovo accanto all'immagine, non impilato sotto */
@media (max-width: 820px) and (orientation: landscape) {
  .split { grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 4vw, 2.6rem); align-items: center; }
  .split--label-text { grid-template-columns: 0.4fr 1fr; }
}
.section-index { font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-muted); }

/* ---------- Pillars (Il metodo) ---------- */
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 3rem; }
@media (max-width: 720px) { .pillars { grid-template-columns: 1fr; } }
.pillar { background: var(--bg); padding: clamp(1.8rem, 3.5vw, 3rem); transition: background 0.4s var(--ease); }
.pillar:hover { background: var(--bg-soft); }
.pillar-num { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; color: var(--gold-bright); }
.pillar h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2.1rem); color: var(--text-primary); margin: 1rem 0 0.7rem; line-height: 1.1; }
.pillar p { font-size: 0.98rem; color: var(--text-body); max-width: 38ch; }

/* ---------- Project cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.5vw, 2rem); margin-top: 3rem; }
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--line); background: var(--bg-soft); overflow: hidden; transition: border-color 0.4s var(--ease), transform 0.5s var(--ease); display: flex; flex-direction: column; }
.card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.card-media { aspect-ratio: 4/3; background: linear-gradient(135deg, #161616, #0a0a0a); position: relative; overflow: hidden; }
.card-media .placeholder-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; text-align: center; padding: 1rem; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card-status { font-size: 0.64rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-bright); }
.card h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; color: var(--text-primary); line-height: 1.05; }
.card-meta { font-size: 0.82rem; color: var(--text-muted); letter-spacing: 0.02em; }
.card-meta .ph { color: var(--gold); font-style: italic; }

/* ---------- Image gallery / carousel ---------- */
.gallery { position: absolute; inset: 0; overflow: hidden; background: #0a0a0a; }
.gallery-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s var(--ease); }
.gallery-img.is-active { opacity: 1; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.45); background: rgba(0,0,0,0.42); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; line-height: 1; padding-bottom: 2px;
  opacity: 0; transition: opacity 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.card:hover .gallery-arrow, .gallery:focus-within .gallery-arrow { opacity: 1; }
.gallery-arrow:hover { background: var(--gold-bright); color: #000; border-color: var(--gold-bright); }
.gallery-arrow.prev { left: 0.7rem; }
.gallery-arrow.next { right: 0.7rem; }
.gallery-dots { position: absolute; bottom: 0.8rem; left: 0; right: 0; z-index: 4; display: flex; justify-content: center; gap: 0.4rem; }
.gallery-dot { width: 6px; height: 6px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,0.5); cursor: pointer; transition: background 0.3s var(--ease), width 0.3s var(--ease); }
.gallery-dot.is-active { background: var(--gold-bright); width: 18px; border-radius: 3px; }
.gallery-count { position: absolute; top: 0.8rem; right: 0.8rem; z-index: 4; font-size: 0.64rem; letter-spacing: 0.1em; color: #fff; background: rgba(0,0,0,0.45); padding: 0.2rem 0.55rem; border-radius: 100px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@media (hover: none) { .gallery-arrow { opacity: 1; background: rgba(0,0,0,0.35); } }

/* ---------- Project detail modal ---------- */
.card.is-clickable { cursor: pointer; }
.card-more { display: inline-block; margin-top: 0.9rem; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-bright); transition: letter-spacing 0.3s var(--ease); }
.card:hover .card-more { letter-spacing: 0.28em; }

.proj-ov {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: clamp(0.8rem, 4vw, 3rem);
  opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
.proj-ov.open { opacity: 1; visibility: visible; }
.proj-modal {
  background: #0c0c0c; border: 1px solid var(--line); border-radius: 4px;
  max-width: 860px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative;
  transform: translateY(18px) scale(0.99); transition: transform 0.5s var(--ease);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.22) transparent;
}
.proj-modal::-webkit-scrollbar { width: 8px; }
.proj-modal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }
.proj-modal::-webkit-scrollbar-track { background: transparent; }
.proj-ov.open .proj-modal { transform: none; }
.pm-close {
  position: absolute; top: 0.9rem; right: 0.9rem; z-index: 6;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: rgba(0,0,0,0.5); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.pm-close:hover { background: var(--gold-bright); color: #000; border-color: var(--gold-bright); }
.pm-gallery { position: relative; height: clamp(220px, 40vh, 440px); background: #0a0a0a; overflow: hidden; }
.pm-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(28px) brightness(0.42); transform: scale(1.12); }
.pm-main { position: absolute; inset: 0; z-index: 1; }
.pm-main img { width: 100%; height: 100%; object-fit: contain; }
.pm-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.45);
  background: rgba(0,0,0,0.45); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.pm-nav:hover { background: var(--gold-bright); color: #000; border-color: var(--gold-bright); }
.pm-nav.prev { left: 1rem; } .pm-nav.next { right: 1rem; }
.pm-count { position: absolute; bottom: 1rem; right: 1rem; z-index: 4; font-size: 0.64rem; letter-spacing: 0.1em; color: #fff; background: rgba(0,0,0,0.5); padding: 0.25rem 0.6rem; border-radius: 100px; }
.pm-thumbs { position: absolute; bottom: 1rem; left: 1rem; z-index: 4; display: flex; gap: 0.4rem; }
.pm-thumbs img { width: 48px; height: 34px; object-fit: cover; border-radius: 2px; opacity: 0.5; cursor: pointer; border: 1px solid transparent; transition: opacity 0.3s, border-color 0.3s; }
.pm-thumbs img.on { opacity: 1; border-color: var(--gold-bright); }
@media (max-width: 600px) { .pm-thumbs { display: none; } }
.pm-body { padding: clamp(1.6rem, 4vw, 2.8rem); }
.pm-body .card-status { color: var(--gold-bright); }
.pm-name { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.9rem, 4vw, 3rem); color: var(--text-primary); line-height: 1.04; margin-top: 0.5rem; }
.pm-sub { color: var(--text-muted); font-size: 0.92rem; margin-top: 0.35rem; }
.pm-body .rule { margin: 1.5rem 0; }
.pm-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem 1.6rem; margin-bottom: 1.8rem; }
@media (max-width: 540px) { .pm-facts { grid-template-columns: 1fr; } }
.pm-facts .fk { display: block; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.25rem; }
.pm-facts .fv { display: block; color: var(--text-primary); font-size: 0.98rem; line-height: 1.45; }
.pm-desc { color: var(--text-body); line-height: 1.7; }
.pm-disc { font-size: 0.72rem; color: var(--text-muted); line-height: 1.6; margin-top: 1.6rem; }

/* ---------- Stats / counters ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 4rem); margin-top: 3rem; }
@media (max-width: 760px) { .stats-grid { grid-template-columns: 1fr; gap: 2.5rem; text-align: left; } }
/* Alcune griglie hanno grid-template inline (per il desktop) che batte le media query.
   Su mobile forza 1 colonna a prescindere, così non sforano il viewport. */
@media (max-width: 600px) {
  .stats-grid, .pillars, .cards { grid-template-columns: 1fr !important; }
}
.stat { display: flex; flex-direction: column; }
.stat-number { font-family: var(--font-display); font-weight: 300; font-size: clamp(3.2rem, 7vw, 6rem); line-height: 1; color: var(--text-primary); }
.stat-number .stat-suffix { font-style: italic; font-size: 0.42em; color: var(--gold-bright); margin-left: 0.1em; }
.stat-label { margin-top: 0.9rem; font-size: 0.96rem; color: var(--text-body); max-width: 32ch; }
.stat-key { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.8rem; }

/* ---------- Article reading layout ---------- */
.article-page { max-width: 720px; margin: 0 auto; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; align-items: center; margin: 1.6rem 0 0; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.article-meta .num { color: var(--gold-bright); }
.article-body { margin-top: 2.5rem; }
.article-body p { font-size: 1.12rem; line-height: 1.75; color: var(--text-body); margin-bottom: 1.5rem; }
.article-body h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--text-primary); margin: 2.8rem 0 1.2rem; line-height: 1.15; }
.article-body em { color: var(--text-primary); font-style: italic; }
.article-body strong { color: var(--text-primary); font-weight: 500; }
.article-body hr { border: 0; height: 1px; background: var(--line); margin: 2.5rem 0; }
.article-body a { color: var(--gold-bright); text-underline-offset: 3px; }
.back-link { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); text-decoration: none; transition: color 0.3s var(--ease); }
.back-link:hover { color: var(--gold-bright); }
.article-signoff { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; color: var(--text-primary); margin-top: 1rem; }
.article-cta { margin-top: 3rem; padding: 2rem; border: 1px solid var(--line); background: var(--bg-soft); }

/* ---------- Process steps ---------- */
.steps { margin-top: 3rem; border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 0.18fr 0.42fr 1fr; gap: 1.5rem; align-items: baseline; padding: 1.9rem 0; border-bottom: 1px solid var(--line); }
.step .step-num { font-family: var(--font-display); font-style: italic; font-size: 1.8rem; color: var(--gold-bright); }
.step h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 2.4vw, 2rem); color: var(--text-primary); line-height: 1.05; }
.step p { font-size: 0.96rem; color: var(--text-body); }
@media (max-width: 760px) { .step { grid-template-columns: 0.2fr 1fr; } .step p { grid-column: 2; } }

/* ---------- Article list (Dispatch) ---------- */
.articles { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.article-row { display: grid; grid-template-columns: 0.25fr 1fr 0.2fr; gap: 1.5rem; align-items: baseline; padding: 1.8rem 0; border-bottom: 1px solid var(--line); transition: padding 0.4s var(--ease); text-decoration: none; }
.article-row:hover { padding-left: 0.6rem; }
.article-row:hover h3 { color: var(--gold-bright); }
.article-date { font-size: 0.74rem; letter-spacing: 0.12em; color: var(--text-muted); text-transform: uppercase; }
.article-row h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 2rem); color: var(--text-primary); transition: color 0.3s var(--ease); line-height: 1.1; }
.article-row p { font-size: 0.92rem; color: var(--text-body); margin-top: 0.4rem; max-width: 60ch; }
.article-arrow { justify-self: end; color: var(--gold); }
@media (max-width: 720px) { .article-row { grid-template-columns: 1fr; gap: 0.4rem; } .article-arrow { display: none; } }

/* ---------- Buttons / CTA ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 1rem 2.1rem; border-radius: 100px;
  font-family: var(--font-body); font-size: 0.76rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500;
  text-decoration: none; cursor: pointer; border: 1px solid var(--gold);
  color: var(--gold-bright); background: transparent;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), gap 0.4s var(--ease);
}
.btn:hover { background: var(--gold-bright); color: #000; gap: 1.1rem; }
.btn--solid { background: var(--gold-bright); color: #000; }
.btn--solid:hover { background: var(--gold); }
.btn--ghost { border-color: var(--line-strong); color: var(--text-primary); }
.btn--ghost:hover { background: var(--text-primary); color: #000; }
.btn .arrow { transition: transform 0.4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }

.cta-band { text-align: center; }
.cta-band .statement { max-width: 24ch; margin: 0 auto 0.6rem; }
.cta-band .cta-row { justify-content: center; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1.5rem; margin-top: 2.5rem; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
.field input, .field textarea, .field select {
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text-primary);
  padding: 0.9rem 1rem; font-family: var(--font-body); font-size: 0.95rem; border-radius: 4px;
  transition: border-color 0.3s var(--ease); width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); }
.field textarea { min-height: 130px; resize: vertical; }
.newsletter-box { border: 1px solid var(--line); padding: clamp(1.8rem, 4vw, 3rem); background: var(--bg-soft); }
.nl-form { display: flex; gap: 0.7rem; margin-top: 1.4rem; flex-wrap: wrap; justify-content: center; }
.nl-form input[type="email"] { flex: 1; min-width: 220px; background: var(--bg); border: 1px solid var(--line); color: var(--text-primary); padding: 0.95rem 1.2rem; font-family: var(--font-body); font-size: 0.95rem; border-radius: 100px; }
.nl-form input[type="email"]::placeholder { color: var(--text-muted); }
.nl-form input[type="email"]:focus { outline: none; border-color: var(--gold); }
.nl-form .btn { white-space: nowrap; }
.nl-msg { width: 100%; margin: 0.6rem 0 0; font-size: 0.85rem; text-align: center; }
.nl-msg.ok { color: var(--gold-bright); }
.nl-msg.err { color: #e0907f; }

/* ---------- Newsletter popup ---------- */
.nl-pop { position: fixed; inset: 0; z-index: 1100; display: none; align-items: center; justify-content: center; padding: clamp(1rem, 4vw, 2rem); background: rgba(0,0,0,0.82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.nl-pop.open { display: flex; }
.nl-pop-card { position: relative; background: #0c0c0c; border: 1px solid var(--line-strong); border-radius: 6px; max-width: 460px; width: 100%; padding: clamp(2rem, 5vw, 3rem); text-align: center; max-height: 90vh; overflow-y: auto; box-shadow: 0 30px 90px rgba(0,0,0,0.6); }
.nl-pop.open .nl-pop-card { animation: nlPopIn 0.45s var(--ease) both; will-change: transform; }
@keyframes nlPopIn { from { transform: translateY(24px) scale(0.985); } to { transform: none; } }
.nl-pop-close { position: absolute; top: 0.5rem; right: 0.5rem; width: 42px; height: 42px; border: 0; background: none; color: var(--text-muted); font-size: 1.9rem; line-height: 1; cursor: pointer; transition: color 0.2s var(--ease); }
.nl-pop-close:hover { color: var(--gold-bright); }
.nl-pop .eyebrow { display: inline-block; margin-bottom: 1rem; }
.nl-pop h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--text-primary); line-height: 1.12; margin-bottom: 0.7rem; }
.nl-pop-card > p { color: var(--text-body); font-size: 0.95rem; line-height: 1.55; margin-bottom: 1.4rem; }
.nl-pop form { display: flex; flex-direction: column; gap: 0.8rem; text-align: left; }
.nl-pop input[type="email"] { background: var(--bg); border: 1px solid var(--line); color: var(--text-primary); padding: 0.9rem 1.2rem; border-radius: 100px; font-family: var(--font-body); font-size: 0.95rem; text-align: center; }
.nl-pop input[type="email"]:focus { outline: none; border-color: var(--gold); }
.nl-pop input[type="email"]::placeholder { color: var(--text-muted); }
.nl-consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.74rem; color: var(--text-muted); line-height: 1.5; }
.nl-consent input { margin-top: 0.15rem; accent-color: var(--gold-bright); flex-shrink: 0; }
.nl-consent a { color: var(--gold-bright); text-underline-offset: 2px; }
.nl-pop button[type="submit"] { width: 100%; justify-content: center; margin-top: 0.2rem; }
.nl-pop .nl-fine { font-size: 0.7rem; color: var(--text-muted); text-align: center; margin: 0.2rem 0 0; }
@media (max-width: 430px) {
  .nl-pop { padding: 0.8rem; }
  .nl-pop-card { padding: 2rem 1.4rem; }
  .nl-pop h3 { font-size: 1.45rem; }
  .nl-pop-card > p { font-size: 0.9rem; }
}

/* ---------- Contact channels ---------- */
.channels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 2rem; }
.channel { background: var(--bg); padding: 1.5rem; text-decoration: none; transition: background 0.35s var(--ease); }
.channel:hover { background: var(--bg-soft); }
.channel .k { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted); }
.channel .v { font-family: var(--font-display); font-size: 1.3rem; color: var(--text-primary); margin-top: 0.3rem; }
@media (max-width: 600px) { .channels { grid-template-columns: 1fr; } }

/* ---------- About portrait ---------- */
.portrait { aspect-ratio: 3/4; background: linear-gradient(160deg, #1a1a1a, #070707); border: 1px solid var(--line); position: relative; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.20); transform-origin: 50% 66%; }
.portrait .placeholder-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; text-align: center; padding: 2rem; }

/* ---------- Placeholder flag ---------- */
.ph-flag { display: inline-block; font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: #000; background: var(--gold-bright); padding: 0.15rem 0.5rem; border-radius: 3px; vertical-align: middle; }

/* ---------- Footer ---------- */
.site-footer { background: #141414; border-top: 1px solid var(--line); padding: clamp(3rem, 7vh, 5rem) 0 2.5rem; }
.footer-top { display: grid; grid-template-columns: 1fr auto; gap: 2.5rem; align-items: start; }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; gap: 2rem; } }
.footer-social { display: flex; gap: 0.8rem; justify-self: end; }
.footer-social a { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; color: var(--text-body); transition: color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease); }
.footer-social a:hover { color: #000; background: var(--gold-bright); border-color: var(--gold-bright); transform: translateY(-2px); }
.footer-social svg { width: 20px; height: 20px; display: block; }
@media (max-width: 760px) { .footer-social { justify-self: start; } }
.footer-brand .display-md { margin-bottom: 0.8rem; }
.footer-col h4 { font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a { text-decoration: none; color: var(--text-body); font-size: 0.92rem; transition: color 0.3s var(--ease); }
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: clamp(2.5rem, 6vh, 4rem); padding-top: 2rem; border-top: 1px solid var(--line); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--text-muted); }
.footer-disclaimer { max-width: 60ch; font-size: 0.72rem; color: var(--text-muted); line-height: 1.6; margin-top: 1rem; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-reveal="left"] { transform: translateX(-50px); }
.reveal[data-reveal="right"] { transform: translateX(50px); }
.reveal[data-reveal="scale"] { transform: scale(0.94); }
.reveal.is-visible[data-reveal] { transform: none; }
/* Mobile: i reveal orizzontali (translateX ±50px) sforano il viewport stretto → usa lo spostamento verticale */
@media (max-width: 820px) {
  .reveal[data-reveal="left"], .reveal[data-reveal="right"] { transform: translateY(34px); }
}
.reveal-stagger > * { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal-stagger.is-visible > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none; }
  .scroll-arrow { animation: none; }
}

/* ---------- Loader (home) ---------- */
#loader { position: fixed; inset: 0; z-index: 1000; background: #000; display: flex; align-items: center; justify-content: center; transition: opacity 0.8s ease, visibility 0.8s ease; }
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; width: min(380px, 70vw); }
.loader-brand { font-weight: 500; letter-spacing: 0.5em; font-size: 0.74rem; color: var(--gold-bright); margin-bottom: 1.6rem; padding-left: 0.5em; }
.loader-track { height: 1px; width: 100%; background: rgba(255,255,255,0.12); overflow: hidden; }
#loader-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width 0.2s ease; }
#loader-percent { margin-top: 1rem; font-size: 0.7rem; letter-spacing: 0.3em; color: var(--text-muted); }

/* ============================================================
   Switch lingua verso una versione dedicata (es. da IT a 中文,
   o da zh a IT). Vale per la radice e per le pagine zh.
   ============================================================ */
.lang-alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  transition: color 0.25s, border-color 0.25s;
  /* La pillola lingua non va mai a capo ne si comprime: senza questi, una voce
     a glifi larghi (il cinese full-width) si spezza su due righe dentro la
     pillola e il gruppo si deforma. nowrap + shrink:0 la tengono intera.
     min-height allinea cinese e arabo alla stessa forma del toggle IT/EN. */
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 1.55rem;
  line-height: 1;
}
.lang-alt + .lang-alt { margin-left: 0.1rem; }
.lang-alt:hover { color: var(--gold-bright); border-color: var(--gold); }

/* ============================================================
   Lingua dedicata: Cinese semplificato (zh-Hans), pagine /zh/.
   Solo override tipografici per i caratteri CJK. Nessuna risorsa
   esterna (niente Google Fonts): PingFang SC e il San Francisco
   cinese di Apple; fallback di sistema su ogni piattaforma.
   Le pagine IT/EN non sono toccate (restano su Inter).
   ------------------------------------------------------------
   Quando arrivera /ar/ (arabo), aggiungere un blocco gemello
   html[lang="ar"] con il proprio stack e [dir="rtl"]; questo
   blocco zh non va replicato a mano per ogni lingua: e isolato
   dal selettore di lingua, non da una classe globale.
   ============================================================ */
html[lang="zh-Hans"],
html[lang="zh-Hans"] body {
  --font-display: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
}
/* Il cinese non ha corsivo tipografico: l'accento oro resta solo colore,
   senza inclinazione (un corsivo sintetico sui caratteri CJK e sgradevole). */
html[lang="zh-Hans"] .italic { font-style: normal; }
/* I caratteri CJK non reggono il letter-spacing largo pensato per il
   latino: lo azzero su occhielli, brand e voci di menu della zh. */
html[lang="zh-Hans"] .eyebrow,
html[lang="zh-Hans"] .brand,
html[lang="zh-Hans"] .brand .brand-sub,
html[lang="zh-Hans"] .nav-links a,
html[lang="zh-Hans"] .section-index {
  letter-spacing: 0.04em;
}
html[lang="zh-Hans"] .nav-links a { text-transform: none; }
/* I display CJK reggono un peso leggermente piu pieno e una interlinea
   un filo piu aperta del latino compresso. */
html[lang="zh-Hans"] .display-xl,
html[lang="zh-Hans"] .display-lg,
html[lang="zh-Hans"] .display-md { line-height: 1.15; letter-spacing: 0; }

/* ============================================================
   Lingua dedicata: Arabo standard moderno (ar), pagine /ar/, RTL.
   Gemello del blocco zh: solo font stack arabo e correzioni fisiche
   dove il layout pensato per il latino si rompe in RTL. Nessuna
   risorsa esterna (niente Google Fonts: Inter copre il latino, non
   l'arabo; i glifi arabi vengono dal font di sistema, San Francisco
   arabo su Apple, Segoe UI su Windows, Noto come fallback). Il
   design non si rifa: ritocchi chirurgici. Le pagine IT/EN e zh non
   sono toccate. dir="rtl" e sull'<html> dei file /ar/: lo specchiamento
   del flusso lo fa il browser; qui solo i punti che restano cablati.
   ============================================================ */
html[lang="ar"],
html[lang="ar"] body {
  --font-display: -apple-system, BlinkMacSystemFont, "SF Arabic", "Geeza Pro", "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Arabic", "Geeza Pro", "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, sans-serif;
}
/* L'arabo non ha corsivo tipografico: l'accento oro resta solo colore,
   senza inclinazione (un corsivo sintetico sui glifi arabi e sgradevole). */
html[lang="ar"] .italic { font-style: normal; }
/* L'arabo e una scrittura corsiva connessa: il letter-spacing largo pensato
   per il latino maiuscolo spezza la legatura tra le lettere e rende il testo
   illeggibile. Lo azzero su occhielli, brand, voci di menu e indici di sezione.
   text-transform: uppercase non ha effetto sui glifi arabi, lo normalizzo. */
html[lang="ar"] .eyebrow,
html[lang="ar"] .brand,
html[lang="ar"] .brand .brand-sub,
html[lang="ar"] .nav-links a,
html[lang="ar"] .section-index,
html[lang="ar"] .card-status {
  letter-spacing: 0.02em;
}
html[lang="ar"] .eyebrow,
html[lang="ar"] .nav-links a { text-transform: none; }
/* I display in arabo reggono una interlinea un filo piu aperta del latino
   compresso (le forme con sotto/sopralinea hanno bisogno di respiro) E vanno
   rimpiccioliti: i clamp display sono tarati sul latino italiano; lo script
   arabo e piu largo e piu alto (legature, sopra/sottolinea) e alle stesse
   dimensioni esplode, taglia in cima e si sovrappone al testo sotto. Qui
   ogni display arabo scende a ~60-70% del latino, con interlinea piu aperta.
   Solo dimensione e interlinea: il design non cambia. */
html[lang="ar"] .display-xl {
  font-size: clamp(1.9rem, 5.2vw, 5.2rem);
  line-height: 1.18;
  letter-spacing: 0;
}
html[lang="ar"] .display-lg {
  font-size: clamp(1.85rem, 3.9vw, 3.7rem);
  line-height: 1.2;
  letter-spacing: 0;
}
html[lang="ar"] .display-md {
  font-size: clamp(1.5rem, 2.4vw, 2.3rem);
  line-height: 1.25;
  letter-spacing: 0;
}
/* Hero della home (.hero-claim): a clamp(...,11vw,11rem) in arabo riempie tutto
   il viewport, esce dal bordo alto e copre la tagline. Lo porto a ~60% con
   interlinea aperta cosi le due righe arabe stanno nel terzo basso senza tagli;
   tolgo il max-width in ch (la misura in ch del latino non vale per l'arabo). */
html[lang="ar"] .hero-claim {
  font-size: clamp(2rem, 6.2vw, 6.2rem);
  line-height: 1.16;
  max-width: none;
}

/* --- Correzioni fisiche RTL (left/right cablati che il browser non specchia) --- */
/* Sottolineatura della voce di menu attiva: ancorata a destra in RTL. */
html[dir="rtl"] .nav-links a.is-active::after { left: auto; right: 0; }
/* Freccia dei bottoni: nei testi arabi e gia "←" (la mette Cyrano nel markup).
   Su hover il latino la spinge a destra (+4px); in RTL deve andare a sinistra. */
html[dir="rtl"] .btn:hover .arrow { transform: translateX(-4px); }
/* Hover della riga articolo: il rientro va dal lato di lettura (destra) in RTL. */
html[dir="rtl"] .article-row:hover { padding-left: 0; padding-right: 0.6rem; }
/* Menu mobile a tendina (stesso breakpoint del menu: max-width 1024px):
   in RTL entra dal lato sinistro, non destro; la X di chiusura si sposta
   sul lato opposto. Il pannello aperto e a tutto schermo e centrato, quindi
   la X e l'unico ancoraggio fisico da specchiare. */
@media (max-width: 1024px) {
  html[dir="rtl"] .nav-links { transform: translateX(-100%); }
  html[dir="rtl"] .nav-links.is-open { transform: translateX(0); }
  html[dir="rtl"] .nav-close-li { right: auto; left: 1.1rem; }
}
