/* ─── THE PHILOSOPHY PAGE ────────────────────────────────────── */


/* ─── DIVIDER ────────────────────────────────────────────────── */

.divider-line {
  width: 110px;
  height: 1px;
  background: rgba(243, 239, 232, 0.18);
  margin: 0 auto;
  position: relative;
}

.divider-line::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: rgba(243, 239, 232, 0.45);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ─── PAGE BACKGROUND ────────────────────────────────────────── */

.phil-page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(10,7,4,0.52), rgba(10,7,4,0.52)),
    url('../../the-philosophy/A124166.jpg') center/cover no-repeat;
  pointer-events: none;
}

/* ─── STACKING CARDS ─────────────────────────────────────────── */

.stack-section {
  position: relative;
  z-index: 1;
  padding-top: 80px;
  padding-bottom: 100px;
}

.stack-cards {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

.card-wrapper {
  width: 100%;
  perspective: 800px;
  margin-bottom: 40px;
}

.card-wrapper:last-child {
  margin-bottom: 0;
}

.card {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  background: rgba(15, 10, 5, 0.24);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(243, 239, 232, 0.16);
  border-radius: var(--radius-lg);
  padding: 28px 24px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--cream);
}

/* ─── HERO CARD ──────────────────────────────────────────────── */

.phil-hero-card {
  justify-content: flex-end;
}

.card.phil-hero-card {
  height: 300px;
}

.phil-hero-title {
  margin: 0 0 14px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2.8rem, 10vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--cream);
  text-shadow: 0 2px 28px rgba(0,0,0,0.7);
}

.phil-hero-sub {
  margin: 0 0 28px;
  font-family: var(--font-title);
  font-size: clamp(1.05rem, 3.5vw, 1.3rem);
  color: var(--cream);
  font-style: italic;
  font-weight: 400;
  max-width: 560px;
  line-height: 1.55;
  text-shadow: 0 1px 14px rgba(0,0,0,0.65);
}

.phil-hero-ornament {
  padding-top: 4px;
}

/* ─── ANIMAL CARDS ───────────────────────────────────────────── */

.phil-card-animal {
  position: absolute;
  top: 65px;
  right: 32px;
  width: 74px;
  height: 74px;
  object-fit: contain;
  opacity: 1;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.4));
  pointer-events: none;
}

.phil-card-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.phil-card-number,
.phil-card-sep,
.phil-card-page {
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream);
}

.phil-card-name {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--cream);
  text-shadow: 0 1px 18px rgba(0,0,0,0.6);
}

.phil-card-subtitle {
  margin: 0 0 14px;
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 3.5vw, 1.25rem);
  color: rgba(243, 239, 232, 0.95);
  line-height: 1.3;
}

.phil-card-desc {
  margin: 0 0 24px;
  font-family: var(--font-title);
  font-size: clamp(0.95rem, 2.8vw, 1.08rem);
  color: rgba(243, 239, 232, 0.95);
  line-height: 1.65;
  max-width: 520px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.phil-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(243, 239, 232, 0.80);
  border-bottom: 1px solid rgba(243, 239, 232, 0.35);
  padding-bottom: 2px;
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
}

.phil-card-link:hover {
  gap: 14px;
  color: var(--cream);
}

/* ─── BOTTOM CTA ─────────────────────────────────────────────── */

.legend-cta {
  position: relative;
  z-index: 1;
  padding: 80px 24px 100px;
  text-align: center;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.legend-cta p {
  margin: 0 0 32px;
  font-family: var(--font-title);
  font-size: clamp(1.3rem, 5vw, 2.1rem);
  font-style: italic;
  max-width: 560px;
  line-height: 1.4;
  color: var(--cream);
}

.btn-outline-light {
  display: inline-block;
  padding: 16px 44px;
  border: 1px solid rgba(243, 239, 232, 0.70);
  border-radius: 4px;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.24s, background 0.24s;
}

.btn-outline-light:hover {
  border-color: rgba(243, 239, 232, 1);
  background: rgba(243, 239, 232, 0.06);
}

/* ─── MOBILE — visibilità testi ──────────────────────────────── */

@media (max-width: 767px) {
  .card { height: 460px; }
  .card.phil-hero-card { height: 300px; }

  .phil-hero-title  { font-size: clamp(2.4rem, 9vw, 4rem); font-weight: 400; }
  .phil-hero-sub    { font-size: clamp(1.15rem, 4.2vw, 1.4rem); font-weight: 400; }

  .phil-card-number,
  .phil-card-sep,
  .phil-card-page   { font-size: 0.82rem; letter-spacing: 0.24em; }

  .phil-card-name   { font-size: clamp(2rem, 7.5vw, 3rem); font-weight: 400; }
  .phil-card-subtitle { font-size: clamp(1.12rem, 4vw, 1.3rem); font-weight: 400; }
  .phil-card-desc   { font-size: clamp(1rem, 3.5vw, 1.15rem); font-weight: 400; }
  .phil-card-link   { font-size: 0.82rem; letter-spacing: 0.16em; }

  .legend-cta p     { font-size: clamp(1.4rem, 5.5vw, 2rem); font-weight: 400; }
  .btn-outline-light { font-size: 0.88rem; }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */

@media (min-width: 768px) {
  .stack-section {
    padding-top: 100px;
  }

  .stack-cards {
    padding: 0 32px;
    max-width: 780px;
  }

  .card {
    height: 540px;
    padding: 44px 52px 48px;
  }

  .card.phil-hero-card {
    height: 380px;
  }

  .phil-card-animal {
    width: 120px;
    height: 120px;
    top: 80px;
    right: 56px;
  }
}

@media (min-width: 1100px) {
  .card {
    height: 560px;
  }

  .card.phil-hero-card {
    height: 400px;
  }

  .phil-card-animal {
    width: 132px;
    height: 132px;
  }
}

/* ─── HERO CARD SEPARATA DALLO STACK (2026-10-13) ────────────── */

.card-wrapper.phil-hero-wrapper {
  margin-bottom: 72px;
}

@media (min-width: 768px) {
  .card-wrapper.phil-hero-wrapper {
    margin-bottom: 120px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   CARD ANIMALI — "pagina di libro araldico" (2026-10-13)
   crema pieno, filetto dorato, stemma centrato, testo completo
═══════════════════════════════════════════════════════════════ */

.card:not(.phil-hero-card) {
  --gold: #A88A5B;
  height: auto;
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 28px 44px;
  align-items: center;
  text-align: center;
  background: var(--cream);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(168, 138, 91, 0.55);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  color: var(--dark-brown);
}

/* filetto interno sottile, come la cornice di una pagina */
.card:not(.phil-hero-card)::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(168, 138, 91, 0.35);
  border-radius: 3px;
  pointer-events: none;
}

.card:not(.phil-hero-card) .phil-card-animal {
  position: static;
  width: 96px;
  height: auto;
  margin: 0 auto 22px;
  filter: drop-shadow(0 6px 14px rgba(42, 33, 27, 0.18));
}

.card:not(.phil-hero-card) .phil-card-meta {
  justify-content: center;
  margin-bottom: 10px;
}

.card:not(.phil-hero-card) .phil-card-number,
.card:not(.phil-hero-card) .phil-card-sep,
.card:not(.phil-hero-card) .phil-card-page {
  color: var(--gold);
}

.card:not(.phil-hero-card) .phil-card-name {
  color: var(--dark-brown);
  text-shadow: none;
  margin-bottom: 6px;
}

.card:not(.phil-hero-card) .phil-card-subtitle {
  color: var(--brown);
  margin-bottom: 0;
}

/* piccolo ornamento dorato tra sottotitolo e testo */
.card:not(.phil-hero-card) .phil-card-subtitle::after {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  margin: 18px auto 18px;
  background: var(--gold);
  transform: rotate(45deg);
}

.card:not(.phil-hero-card) .phil-card-desc {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  max-width: 460px;
  margin: 0 auto 26px;
  color: rgba(42, 33, 27, 0.86);
}

.card:not(.phil-hero-card) .phil-card-link {
  color: var(--brown);
  border-bottom-color: rgba(168, 138, 91, 0.6);
}

.card:not(.phil-hero-card) .phil-card-link:hover {
  color: var(--dark-brown);
}

@media (max-width: 767px) {
  .card:not(.phil-hero-card) { height: auto; }
}

@media (min-width: 768px) {
  .card:not(.phil-hero-card) {
    height: auto;
    padding: 52px 64px 56px;
  }
  .card:not(.phil-hero-card) .phil-card-animal {
    width: 120px;
    height: auto;
  }
}

@media (min-width: 1100px) {
  .card:not(.phil-hero-card) { height: auto; }
  .card:not(.phil-hero-card) .phil-card-animal { width: 124px; height: auto; }
}
