/* Demo publica: Carta digital */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 208, 157, 0.28), transparent 46%),
    radial-gradient(circle at 86% 0%, rgba(180, 126, 102, 0.2), transparent 40%),
    #f7efe6;
  color: #3f2d22;
  font-family: "Nunito", "Segoe UI", sans-serif;
  line-height: 1.6;
}

h1,
h2,
h3,
.letter-paper {
  font-family: "Fraunces", Georgia, serif;
}

.hero-envelope {
  padding: 1.4rem 1rem 2rem;
}

.hero-envelope__inner {
  width: min(920px, 100%);
  margin: 0 auto;
  text-align: center;
}

.hero-envelope__kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
  color: #8b5e43;
}

.envelope-card {
  position: relative;
  margin: 1rem auto 1.15rem;
  width: min(420px, 100%);
  padding-top: 110px;
}

.envelope-card__flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(150deg, #bf8d67, #9f6f4e);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 12px 26px rgba(78, 52, 35, 0.24);
}

.envelope-card__paper {
  position: relative;
  margin: 0 auto;
  width: calc(100% - 28px);
  background: #fffaf0;
  border: 1px solid rgba(141, 101, 72, 0.26);
  border-radius: 0 0 14px 14px;
  padding: 1.3rem 1rem 1.15rem;
  box-shadow: 0 9px 22px rgba(88, 60, 42, 0.17);
}

.envelope-card__to {
  margin: 0;
  font-size: 1.4rem;
  color: #6c3f2b;
}

.envelope-card__from {
  margin: 0.45rem 0 0;
  color: #8a634b;
  font-weight: 700;
}

.hero-envelope h1 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 3rem);
  color: #5a3524;
}

.hero-envelope__subtitle {
  margin: 0.7rem auto 1.2rem;
  max-width: 36ch;
  color: #714f3c;
}

.btn-soft,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 44px;
  padding: 0.58rem 1.25rem;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-soft {
  background: #9f5e3e;
  color: #fff8f0;
  border: 1px solid #864b2f;
}

.btn-soft:hover,
.btn-soft:focus-visible {
  background: #87462d;
  transform: translateY(-1px);
}

.page-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 0 0.95rem 1.6rem;
  display: grid;
  gap: 1rem;
}

.letter-block,
.memories-brief,
.saved-lines,
.final-note {
  background: #fffaf2;
  border: 1px solid rgba(128, 88, 61, 0.2);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(84, 53, 36, 0.12);
}

.letter-block {
  padding: 1rem;
}

.letter-paper {
  margin: 0;
  background:
    linear-gradient(rgba(192, 158, 126, 0.06) 1px, transparent 1px) 0 0 / 100% 2rem,
    #fffdf8;
  border: 1px solid rgba(135, 96, 68, 0.18);
  border-radius: 14px;
  padding: clamp(1.1rem, 4vw, 1.8rem);
  font-size: clamp(1.04rem, 4vw, 1.2rem);
  color: #463123;
}

.letter-paper p {
  margin: 0.8rem 0 0;
}

.letter-paper__opening,
.letter-paper__closing {
  margin-top: 0;
  font-weight: 700;
}

.letter-paper__signature {
  font-size: 1.35rem;
  color: #7e4a31;
  font-weight: 700;
}

.memories-brief {
  padding: 1rem;
}

.section-head__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
  color: #8f644b;
}

.section-head h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.25rem, 4.9vw, 1.8rem);
  color: #5f3b29;
}

.memories-brief__grid {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.75rem;
}

.memory-card {
  background: #fffef9;
  border: 1px solid rgba(130, 93, 65, 0.2);
  border-radius: 14px;
  padding: 0.5rem;
}

.memory-card img {
  display: block;
  width: 100%;
  height: 158px;
  object-fit: cover;
  border-radius: 10px;
}

.memory-card h3 {
  margin: 0.6rem 0 0;
  color: #68402d;
  font-size: 1.08rem;
}

.memory-card p {
  margin: 0.3rem 0 0;
  color: #7b5a47;
  font-size: 0.96rem;
}

.saved-lines {
  padding: 1rem;
  display: grid;
  gap: 0.62rem;
}

.saved-lines__item {
  margin: 0;
  padding: 0.72rem 0.8rem;
  border-radius: 10px;
  background: linear-gradient(140deg, #ffe7b8, #fddf9d);
  color: #633e2b;
  font-weight: 700;
}

.final-note {
  padding: 1.1rem 1rem;
  text-align: center;
  background: linear-gradient(160deg, #fffaf1, #fff4e4);
}

.final-note__text {
  margin: 0;
  color: #5d3e2c;
  font-size: clamp(1rem, 4vw, 1.2rem);
}

.final-note__signature {
  margin: 0.45rem 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.7rem;
  color: #9a5b3b;
}

.letter-footer {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 0 0.95rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-align: center;
  color: #7a5c4a;
}

.letter-footer p {
  margin: 0;
  font-size: 0.88rem;
}

.btn-outline {
  border: 1px solid rgba(129, 89, 62, 0.35);
  color: #5f3b29;
  background: transparent;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: rgba(159, 94, 62, 0.1);
  transform: translateY(-1px);
}

@media (min-width: 760px) {
  .hero-envelope {
    padding: 2.2rem 1.4rem 2.6rem;
  }

  .page-shell {
    padding: 0 1.3rem 2rem;
  }

  .memories-brief__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .memory-card img {
    height: 170px;
  }

  .saved-lines {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .letter-footer {
    flex-direction: row;
    justify-content: space-between;
  }
}
