/* ── BASE.CSS ── Stili condivisi tra index.html e BeforeAI.html ──

   Richiede shared.css linkato PRIMA di questo file.
   Contiene: token famiglia A, body, wrapper, topbar, sezioni,
   chapter-break, timeline, ai-block, quote, footer, cookie banner.
*/

/* ── TOKEN FAMIGLIA A ── */
:root {
  --mid:   #1A1A1A;
  --line:  #2A2A2A;
  --cream: #F2EDE4;
  --steel: #8FA3B1;
  --muted: #555555;
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: 'IBM Plex Mono', monospace;
}

/* ── WRAPPER ── */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 60px 0 76px;
  position: relative;
}

/* Banda verticale continua — rust → steel lungo tutto lo scroll */
.wrap::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(to bottom,
    var(--rust) 0%,
    var(--rust) 55%,
    var(--steel) 100%
  );
}

/* ── TOP BAR ── */
.topbar {
  padding: 36px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 56px;
}
.corner-tl {
  width: 20px; height: 20px;
  border-top: 1px solid var(--muted);
  border-left: 1px solid var(--muted);
}
.serial {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── SECTION ── */
.section { margin-bottom: 52px; }

.section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.section-label {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.section-line { flex: 1; height: 1px; background: var(--line); }

/* ── CHAPTER BREAK ── */
.chapter-break {
  position: relative;
  margin: 72px -60px 72px -76px;
  padding: 36px 60px 36px 76px;
  background: var(--mid);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.chapter-break::before {
  content: attr(data-n);
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: 120px;
  line-height: 1;
  color: var(--rust);
  opacity: 0.07;
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
}
.chapter-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cream);
  line-height: 1;
}
.chapter-title span { color: var(--rust); }
.chapter-desc {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}
.chapter-rule { flex: 1; height: 1px; background: var(--line); max-width: 120px; }

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; gap: 30px; }

.tl-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: start;
  position: relative;
}
.tl-item::before {
  content: '◆';
  position: absolute;
  left: 90px; top: 3px;
  font-size: 7px;
  color: var(--rust);
}

.tl-range {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding-top: 4px;
  text-align: right;
}
.tl-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: 36px;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-transform: uppercase;
  line-height: 1;
}
.tl-desc {
  margin-top: 6px;
  font-size: 12px;
  color: var(--steel);
  line-height: 1.6;
}

/* ── CONTACTS ── index.html e BeforeAI.html */
.contacts { display: flex; flex-direction: column; gap: 7px; font-size: 12px; }
.contacts .row { display: flex; gap: 14px; }
.contacts .lbl { color: var(--rust); min-width: 42px; }
.contacts .val { color: var(--cream); }
.contacts a { color: var(--cream); text-decoration: none; }
.contacts a:hover { color: var(--rust); }

/* ── BEFORE AI LINK ── */
.before-ai-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--mid);
  border-left: 3px solid var(--rust);
  padding: 18px 28px;
  text-decoration: none;
  transition: background 0.2s;
}
.before-ai-link:hover { background: #222; }
.before-ai-link .arrow {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rust);
}
.before-ai-link .link-title {
  display: block;
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cream);
}
.before-ai-link .link-sub {
  display: block;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

/* ── AI BLOCK ── */
.ai-block {
  background: var(--mid);
  border-left: 3px solid var(--rust);
  padding: 36px 40px;
  margin-bottom: 50px;
  position: relative;
}
.ai-block::before {
  content: 'NOTE DI SISTEMA';
  position: absolute;
  top: -10px; left: 30px;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--rust);
  background: var(--mid);
  padding: 0 8px;
  text-transform: uppercase;
}
.ai-text {
  font-family: 'Gloock', serif;
  font-size: 15px;
  font-style: italic;
  color: var(--cream);
  line-height: 1.85;
}
.ai-signature {
  margin-top: 20px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}
.ai-signature span { color: var(--rust); }

/* ── QUOTE ── */
.quote {
  border-top: 1px solid var(--line);
  padding-top: 36px;
  font-family: 'Gloock', serif;
  font-size: 16px;
  font-style: italic;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* ── FOOTER ── */
.page-footer {
  margin-top: 40px;
  padding-bottom: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}
.page-footer a {
  cursor: pointer;
  color: var(--rust);
  text-decoration: none;
}
.page-footer a:hover { text-decoration: underline; }

.corner-br-wrap {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 60px;
}
.corner-br {
  width: 20px; height: 20px;
  border-bottom: 1px solid var(--muted);
  border-right: 1px solid var(--muted);
}

/* ── COOKIE BANNER ── */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #111111;
  border-top: 1px solid var(--rust);
  z-index: 9999;
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  transform: translateY(0);
  transition: transform 0.4s ease;
}
#cookie-banner.hidden { transform: translateY(110%); }

.cookie-text { flex: 1; min-width: 260px; }
.cookie-text strong {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--cream);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cookie-text p { font-size: 11px; color: var(--steel); line-height: 1.6; }
.cookie-text a { color: var(--rust); text-decoration: none; }
.cookie-text a:hover { text-decoration: underline; }

.cookie-toggles { display: flex; flex-direction: column; gap: 10px; min-width: 200px; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.toggle-row .t-label { color: var(--steel); }

.switch { position: relative; width: 34px; height: 18px; flex-shrink: 0; }
.switch input { display: none; }
.slider {
  position: absolute;
  inset: 0;
  background: var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s;
}
.slider::after {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 14px; height: 14px;
  background: var(--muted);
  border-radius: 1px;
  transition: transform 0.2s, background 0.2s;
}
.switch input:checked + .slider { background: var(--rust); }
.switch input:checked + .slider::after { transform: translateX(16px); background: var(--cream); }
.switch input:disabled + .slider { cursor: not-allowed; opacity: 0.5; }

.cookie-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-cookie {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 9px 22px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-cookie:hover { opacity: 0.8; }
.btn-accept { background: var(--rust); color: var(--cream); }
.btn-save { background: transparent; border: 1px solid var(--line); color: var(--steel); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .wrap { padding: 0 24px 0 36px; }
  .chapter-break { margin: 56px -24px 56px -36px; padding: 28px 24px 28px 36px; }
  .header { grid-template-columns: 1fr; }
  .photo-wrap img { max-width: 180px; }
  .page-footer { flex-direction: column; gap: 10px; }
}

@media print {
  .chapter-break { background: #f0f0f0; }
}
