html {
  scroll-behavior: smooth;
}

/* ==========================
   ESTILO GERAL DO SITE
   ========================== */

body.tf-body {
  font-family: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #2f2f2f;
  min-height: 100vh;
  overflow-x: hidden;
  background: radial-gradient(circle at top, #eaf4ff 0, #d3e5ff 30%, #f9fbff 65%, #ffffff 100%);
}

.tf-title {
  font-family: 'Playfair Display', serif;
}

.nav-blur {
  backdrop-filter: saturate(180%) blur(10px);
  background: rgba(255, 255, 255, 0.78);
}

.soft-glow {
  text-shadow: 0 2px 18px rgba(199,146,43,0.25);
}

.btn {
  border-radius: 16px;
  padding: 12px 22px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.22s ease;
}

.btn-gold {
  background: linear-gradient(180deg, #C7922B 0%, #B78122 100%);
  color: #fff;
  box-shadow: 0 6px 22px rgba(199,146,43,0.24);
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(199,146,43,0.32);
}

.btn-outline {
  border: 1px solid #E8C77E;
  color: #C7922B;
  background: rgba(255,255,255,0.85);
}

.btn-outline:hover {
  background: #FDF7F3;
  box-shadow: 0 8px 24px rgba(232,199,126,0.24);
  transform: translateY(-1px);
}

.card {
  border-radius: 18px;
  border: 1px solid rgba(232,199,126,0.7);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 6px 18px rgba(184,134,11,0.10);
}

section {
  scroll-margin-top: 90px;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.show {
  animation: fadeInUp 0.9s ease forwards;
}

.contact-email {
  margin-top: 10px;
  display: block;
}

/* Papoilas animadas com CSS (movimento suave) */
.poppy {
  position: fixed;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: contain;
  width: 260px;
  height: 520px;
  transform-origin: bottom center;
}

.poppy-1 {
  left: -40px;
  background-image: url('papoila1.png');
  animation: sway1 12s ease-in-out infinite alternate;
}

.poppy-2 {
  left: 50%;
  transform: translateX(-50%);
  background-image: url('papoila2.png');
  animation: sway2 14s ease-in-out infinite alternate;
}

.poppy-3 {
  right: -40px;
  background-image: url('papoila3.png');
  animation: sway3 11s ease-in-out infinite alternate;
}

@keyframes sway1 {
  0%   { transform: rotate(0deg); }
  50%  { transform: rotate(-2deg) translateX(-4px); }
  100% { transform: rotate(1.5deg) translateX(3px); }
}

@keyframes sway2 {
  0%   { transform: translateX(-50%) rotate(0deg); }
  50%  { transform: translateX(-50%) rotate(2deg) translateX(3px); }
  100% { transform: translateX(-50%) rotate(-1.5deg) translateX(-3px); }
}

@keyframes sway3 {
  0%   { transform: rotate(0deg); }
  50%  { transform: rotate(2deg) translateX(4px); }
  100% { transform: rotate(-1.5deg) translateX(-3px); }
}

/* ==========================
   ESTILO DA PÁGINA DO DIÁRIO
   ========================== */

/* Aplica-se só às páginas cujo <body> tem class="diary-page" */
body.diary-page {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #2b2440;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(180deg, #FDF7F1 0%, #E9F0FF 80%);
}

/* Conteúdo principal do diário */
.diary-main {
  max-width: 820px;
  margin: 110px auto 56px;
  padding: 0 16px 40px;
}

/* Intro do diário */
.diary-intro {
  margin-bottom: 32px;
}

.diary-intro h1 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 10px;
  color: #2b2440;
}

.diary-intro p {
  font-size: 1.02rem;
  line-height: 1.8;
  margin: 0 0 10px;
}

/* Tag “Diário da Queda e da Cura” */
.diary-label {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: #92002b;
}

/* Lista de textos */
.diary-entries {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 28px;
}

/* Cabeçalho de cada texto */
.diary-entry-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
  margin: 4px 0 8px;
  color: #2b2440;
}

.diary-subtitle {
  font-size: 0.95rem;
  font-style: italic;
  opacity: 0.85;
  margin: 0 0 4px;
}

.diary-meta {
  font-size: 0.85rem;
  color: #7b6f88;
  margin: 0 0 14px;
}

/* Corpo do texto */
.diary-content p {
  font-size: 1.02rem;
  line-height: 1.8;
  margin: 0 0 16px;
}

/* Primeira letra em destaque no primeiro parágrafo */
.diary-content p:first-of-type::first-letter {
  font-size: 2.4rem;
  font-weight: 600;
  float: left;
  line-height: 1;
  padding-right: 6px;
  color: #92002b;
}

/* Negritos/itálicos em tom mais profundo */
.diary-content em,
.diary-content strong {
  color: #5a365c;
}

/* Assinatura no final do texto */
.diary-signature {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed rgba(146, 0, 43, 0.25);
  font-size: 0.9rem;
  color: #7b6f88;
  font-style: italic;
  text-align: right;
}

/* Linha entre textos */
.diary-divider {
  border: none;
  border-top: 1px solid rgba(146, 0, 43, 0.20);
  margin: 4px 0 0;
}

/* Responsivo para telemóvel */
@media (max-width: 768px) {
  .diary-main {
    margin-top: 96px;
    padding: 0 14px 32px;
  }

  .diary-intro h1 {
    font-size: 1.7rem;
  }

  .diary-entry-header h2 {
    font-size: 1.4rem;
  }

  .diary-content p {
    font-size: 1rem;
  }
}
