/* Dinosauri di Sasso — stile condiviso */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,500;0,600;0,700;1,500&family=Nunito+Sans:wght@400;600;700&display=swap');

:root {
  --bg: #f6f1e6;
  --bg-alt: #eee5d3;
  --card: #fffdf8;
  --text: #2c2620;
  --text-soft: #5c5346;
  --border: #e2d6bd;
  --accent: #bc5a34;
  --accent-soft: #e8c9ad;
  --moss: #5b7551;
  --shadow: 0 10px 30px -14px rgba(60, 45, 20, 0.35);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #211c16;
    --bg-alt: #29231b;
    --card: #2c2620;
    --text: #ecdfc9;
    --text-soft: #c7b89e;
    --border: #423a2c;
    --accent: #e08a56;
    --accent-soft: #4a3524;
    --moss: #8fae7f;
    --shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #211c16;
  --bg-alt: #29231b;
  --card: #2c2620;
  --text: #ecdfc9;
  --text-soft: #c7b89e;
  --border: #423a2c;
  --accent: #e08a56;
  --accent-soft: #4a3524;
  --moss: #8fae7f;
  --shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  font-size: 17px;
}

h1, h2, h3, .brand-name {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--text);
  line-height: 1.2;
}

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

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-emoji { font-size: 1.8rem; }

.brand-name {
  font-size: 1.35rem;
  font-weight: 600;
}

.brand-name small {
  display: block;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 700;
}

nav.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

nav.site-nav a {
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 8px;
}

nav.site-nav a:hover { background: var(--bg); color: var(--text); }
nav.site-nav a.active { background: var(--accent); color: #fffdf8; }

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Hero */
.hero {
  position: relative;
  padding: 64px 0 56px;
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: 2.6rem;
  margin: 0 0 14px;
}

.hero .lede {
  font-size: 1.12rem;
  color: var(--text-soft);
  max-width: 46ch;
}

.hero-photo {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }

.btn-row { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary { background: var(--accent); color: #fffdf8; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }

/* Stat strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 44px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.stat b {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  color: var(--accent);
}

.stat span {
  font-size: 0.82rem;
  color: var(--text-soft);
}

/* Sections */
section { padding: 54px 0; }
section.alt { background: var(--bg-alt); }

.section-head { max-width: 62ch; margin-bottom: 32px; }
.section-head .kicker {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--moss);
}
.section-head h2 { font-size: 1.9rem; margin: 6px 0 10px; }
.section-head p { color: var(--text-soft); margin: 0; }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.card img { aspect-ratio: 4/3; object-fit: cover; }
.card-body { padding: 18px 20px 22px; }
.card-body h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card-body p { margin: 0; color: var(--text-soft); font-size: 0.94rem; }

/* Timeline */
.timeline { position: relative; margin-top: 10px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 84px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}

.t-item {
  display: grid;
  grid-template-columns: 70px 30px 1fr;
  gap: 0 16px;
  margin-bottom: 40px;
  align-items: start;
}

.t-year {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.15rem;
  text-align: right;
  padding-top: 6px;
}

.t-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
  margin-top: 8px;
  justify-self: center;
}

.t-content h3 { margin: 0 0 6px; font-size: 1.1rem; }
.t-content p { margin: 0 0 14px; color: var(--text-soft); }
.t-content img {
  border-radius: 12px;
  border: 1px solid var(--border);
  max-width: 340px;
}

/* Prose */
.manifesto { max-width: 68ch; margin: 0 auto; text-align: left; }
.manifesto p:first-child { font-family: 'Fraunces', Georgia, serif; font-size: 1.25rem; font-style: italic; color: var(--text); }

.prose { max-width: 68ch; }
.prose p { margin: 0 0 18px; }
.prose h2 { margin: 40px 0 12px; font-size: 1.6rem; }
.prose blockquote {
  margin: 24px 0;
  padding: 4px 22px;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.figure { margin: 28px 0; }
.figure img { border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.figure figcaption { font-size: 0.85rem; color: var(--text-soft); margin-top: 8px; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery figure {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery img { aspect-ratio: 1/1; object-fit: cover; width: 100%; }
.gallery figcaption { padding: 12px 16px 16px; font-size: 0.88rem; color: var(--text-soft); }
.gallery figcaption strong { display: block; color: var(--text); font-size: 0.98rem; margin-bottom: 2px; }

.gallery-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.gallery-filters button {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.gallery-filters button.active { background: var(--accent); color: #fffdf8; border-color: var(--accent); }

/* Press table */
.press-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--border); }
.press-item {
  display: grid;
  grid-template-columns: 100px 140px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.press-item .p-year { font-family: 'Fraunces', serif; font-weight: 700; color: var(--accent); }
.press-item .p-type {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--moss);
  align-self: start;
  padding-top: 4px;
}
.press-item .p-body a { text-decoration: none; font-weight: 700; }
.press-item .p-body a:hover { text-decoration: underline; }
.press-item .p-body p.p-headline { font-weight: 700; margin: 0 0 4px; color: var(--text); }

.scan-link { margin-top: 10px !important; }
.scan-link a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700 !important;
  font-size: 0.88rem;
  color: var(--text) !important;
}
.scan-link a:hover { text-decoration: underline; }
.video-block { margin: 0 0 48px; }
.video-block:last-child { margin-bottom: 0; }
.video-block h3 { font-size: 1.3rem; margin: 0 0 14px; }
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #000;
  margin-bottom: 18px;
  display: block;
}
.video-embed .video-thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-embed .video-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  transition: background 0.15s ease;
}
.video-embed .video-thumb:hover::before { background: rgba(0, 0, 0, 0.4); }
.video-play {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(20, 15, 10, 0.75);
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  z-index: 1;
}
.video-caption { font-size: 0.85rem; color: var(--text-soft); margin: -8px 0 20px; }
.video-caption a { font-weight: 700; }

.scan-thumb {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.press-item .p-body p { margin: 4px 0 0; color: var(--text-soft); font-size: 0.94rem; }

/* Info blocks (visita page) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.info-card h3 { margin: 0 0 10px; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.info-card p { margin: 0; color: var(--text-soft); }
.info-card .fill-me {
  color: var(--accent);
  font-style: italic;
}

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 28px 0;
}
.callout p { margin: 0; }

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 36px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
footer.site-footer p { margin: 0; color: var(--text-soft); font-size: 0.88rem; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--text-soft); text-decoration: none; font-size: 0.88rem; font-weight: 600; }
.footer-nav a:hover { color: var(--accent); }

.footer-copyright {
  max-width: 1080px;
  margin: 18px auto 0;
  padding: 16px 20px 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* Responsive */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .press-item { grid-template-columns: 1fr; gap: 4px; }
  .timeline::before { left: 6px; }
  .t-item { grid-template-columns: 14px 1fr; }
  .t-year { grid-column: 1 / -1; text-align: left; padding-top: 0; }
  .t-dot { margin-top: 4px; }
}

@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2rem; }
}
