:root {
  --bg: #0c0b09;
  --bg-soft: #171411;
  --panel: rgba(255, 248, 235, 0.05);
  --line: rgba(255, 241, 221, 0.12);
  --text: #f6efdf;
  --muted: #d2c2aa;
  --accent: #ba8b4a;
  --accent-2: #d7b078;
  --deep: #221812;
  --max-width: 1180px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(215, 176, 120, 0.13), transparent 26%),
    linear-gradient(180deg, #0a0908 0%, #13100d 52%, #0b0a08 100%);
}

body.page-inner {
  background:
    radial-gradient(circle at top right, rgba(215, 176, 120, 0.12), transparent 24%),
    linear-gradient(180deg, #0b0907 0%, #16120f 100%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
.brand span {
  font-family: "Cormorant Garamond", serif;
}

.site-header,
.hero,
.section,
.site-footer,
.inner-hero {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.brand img {
  width: 42px;
  height: auto;
}

.brand span {
  font-size: 1.5rem;
  letter-spacing: 0.16rem;
}

.site-nav {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.site-nav a {
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0.7rem;
  border-radius: 999px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--text);
}

.nav-toggle span + span {
  margin-top: 5px;
}

.hero,
.inner-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  padding: 3rem 0 3.5rem;
}

.hero {
  min-height: min(78vh, 760px);
}

.hero-home {
  background-image: linear-gradient(rgba(10, 8, 6, 0.35), rgba(10, 8, 6, 0.85));
}

.hero-crest {
  display: flex;
  justify-content: center;
}

.hero-crest img {
  width: min(420px, 100%);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
}

.eyebrow {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16rem;
  font-size: 0.8rem;
  color: var(--accent-2);
}

h1 {
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  line-height: 1;
  margin: 0 0 1.2rem;
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.25rem, 2.3vw, 1.8rem);
  line-height: 1.08;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: 0.7rem;
}

.value-card h3,
.person-card h3,
.symbol-card h3 {
  font-size: 1.51rem;
  font-variant-caps: small-caps;
  letter-spacing: 0.04rem;
}

.lead,
.section p,
.newsletter-copy p,
.value-card p,
.person-card p {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #1b1209;
  border-color: transparent;
  font-weight: 700;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.03);
}

.section {
  padding: 3rem 0;
}

.intro-grid,
.split-highlight,
.newsletter-section,
.two-columns,
.author-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.value-band,
.people-grid,
.symbol-grid,
.books-grid {
  display: grid;
  gap: 1rem;
}

.value-band {
  grid-template-columns: repeat(3, 1fr);
}

.value-band.value-band-4 {
  grid-template-columns: repeat(2, 1fr);
}

.people-grid {
  grid-template-columns: repeat(3, 1fr);
}

.books-grid {
  grid-template-columns: repeat(3, 1fr);
}

.books-grid-featured {
  grid-template-columns: repeat(2, 1fr);
}

.value-card,
.person-card,
.symbol-card,
.book-card,
.quote-block,
.newsletter-section,
.split-visual,
.inner-hero-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.value-card,
.person-card,
.symbol-card,
.book-card,
.quote-block {
  border-radius: 24px;
  padding: 1.35rem;
}

.person-card img,
.symbol-card img {
  height: 180px;
  margin: 0 auto 1rem;
  object-fit: contain;
}

.book-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.book-card .eyebrow {
  margin-bottom: 0.35rem;
}

.book-title {
  font-size: 1.575rem;
  line-height: 1.05;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.book-subtitle {
  margin-top: 0;
  margin-bottom: 1rem;
  font-style: italic;
  color: var(--text);
  font-size: 1.02rem;
}

.book-cover-image {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.book-cover-image-3d {
  aspect-ratio: auto;
  object-fit: contain;
  width: auto;
  max-width: 100%;
  max-height: 420px;
  margin: 0 auto;
  transform-origin: center bottom;
  transition: transform 260ms ease, filter 260ms ease, box-shadow 260ms ease;
  will-change: transform, filter;
  cursor: pointer;
}

.book-cover-image-3d:hover,
.book-cover-image-3d:focus-visible {
  transform: perspective(1200px) translateY(-8px) rotateX(5deg) rotateY(-10deg) scale(1.02);
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.42));
}

.value-card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.value-card-head h3 {
  margin: 0;
}

.ambito-icon {
  width: 80px;
  height: 80px;
  flex: none;
  object-fit: contain;
  border-radius: 16px;
  transform-origin: center bottom;
  transition: transform 260ms ease, filter 260ms ease;
  will-change: transform, filter;
  cursor: pointer;
}

.ambito-icon:hover,
.ambito-icon:focus-visible {
  transform: perspective(1200px) translateY(-8px) rotateX(5deg) rotateY(-10deg) scale(1.05);
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.42));
}

.book-cover-placeholder {
  min-height: 340px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(186, 139, 74, 0.15), rgba(34, 24, 18, 0.7)),
    radial-gradient(circle at top, rgba(215, 176, 120, 0.28), transparent 40%);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.2rem;
}

.book-cover-placeholder span {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  color: var(--text);
}

.book-cover-file {
  min-height: 340px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(186, 139, 74, 0.14), rgba(34, 24, 18, 0.88)),
    radial-gradient(circle at top, rgba(215, 176, 120, 0.25), transparent 42%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.4rem;
  gap: 0.6rem;
}

.file-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08rem;
}

.file-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.1rem;
  line-height: 1;
}

.file-subtitle {
  color: var(--muted);
}

.book-copy p {
  color: var(--muted);
  margin-bottom: 0;
}

.author-portrait {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  width: 20%;
  min-width: 140px;
  justify-self: center;
}

.author-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-copy {
  display: grid;
  align-content: center;
  gap: 0.6rem;
}

.author-portrait-compact {
  margin-bottom: 1.2rem;
}

.author-portrait-compact img {
  max-height: 280px;
}

.text-link {
  color: var(--accent-2);
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--text);
}

.split-visual,
.newsletter-section,
.inner-hero-panel {
  border-radius: 28px;
  overflow: hidden;
}

.split-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.newsletter-section {
  padding: 2rem;
  align-items: center;
}

.newsletter-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
}

.newsletter-form input {
  min-height: 50px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.newsletter-form input::placeholder {
  color: #aa9a83;
}

.inner-hero-panel {
  padding: 1.6rem;
}

.symbol-grid {
  grid-template-columns: repeat(3, 1fr);
}

.quote-block {
  font-style: italic;
}

.site-footer {
  padding: 2rem 0 3rem;
  color: var(--muted);
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .hero,
  .inner-hero,
  .intro-grid,
  .split-highlight,
  .newsletter-section,
  .two-columns,
  .author-section,
  .value-band,
  .people-grid,
  .symbol-grid,
  .books-grid {
    grid-template-columns: 1fr;
  }

  .books-grid-featured {
    grid-template-columns: 1fr;
  }

  .hero,
  .inner-hero {
    min-height: auto;
  }

  h1 {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    padding: 1rem;
    gap: 0.9rem;
    background: #14110e;
    border: 1px solid var(--line);
    border-radius: 22px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .newsletter-form {
    grid-template-columns: 1fr;
  }
}

/* Hover luminoso sulle card */
.value-card,
.book-card,
.symbol-card,
.person-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.value-card::before,
.book-card::before,
.symbol-card::before,
.person-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(215, 176, 120, 0.14),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.value-card:hover,
.book-card:hover,
.symbol-card:hover,
.person-card:hover {
  transform: translateY(-4px);
  border-color: rgba(215, 176, 120, 0.4);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

.value-card:hover::before,
.book-card:hover::before,
.symbol-card:hover::before,
.person-card:hover::before {
  opacity: 1;
}

/* Logo nel titolo hero con rotazione al passaggio del mouse */
.hero-title-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
}

.hero-title-row h1 {
  margin-bottom: 0;
}

.hero-logo {
  width: 200px;
  height: auto;
  flex: none;
  cursor: pointer;
  transition: transform 900ms ease;
}

.hero-logo:hover,
.hero-logo:focus-visible {
  transform: perspective(900px) rotateY(360deg);
}

@media (max-width: 760px) {
  .hero-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .hero-logo {
    width: 140px;
  }
}

/* Zoom out al passaggio del mouse sulle immagini senza altro effetto */
.brand img,
.hero-crest img,
.split-visual img,
.author-portrait img,
.symbol-card img {
  transition: transform 320ms ease;
  will-change: transform;
}

.brand:hover img,
.brand:focus-visible img,
.hero-crest img:hover,
.split-visual img:hover,
.author-portrait img:hover,
.symbol-card img:hover {
  transform: scale(0.93);
}
