/* Palabras para el Corazón — identidad Montserrat + Playfair Display */
:root {
  --navy: #061427;
  --navy-soft: #0a2039;
  --blue: #103b67;
  --gold: #c79a45;
  --gold-light: #f2cc77;
  --paper: #f7f1e7;
  --paper-light: #fffaf2;
  --ink: #181818;
  --muted: #5d6874;
  --white: #ffffff;
  --line: rgba(12, 35, 60, 0.15);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Montserrat", Arial, sans-serif;
  --page-padding: clamp(1.25rem, 8vw, 9rem);
  --section-space: clamp(4.5rem, 9vw, 8rem);
  --shadow: 0 24px 60px rgba(3, 12, 24, 0.2);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
a {
  touch-action: manipulation;
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--navy);
}

.skip-link:focus {
  top: 1rem;
}

/* Encabezado */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  padding: 0 clamp(1.25rem, 5vw, 5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 20, 39, 0.95);
  color: var(--white);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  font-size: 0.86rem;
  font-weight: 600;
}

.site-header nav a:not(.nav-cta) {
  opacity: 0.84;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--gold-light);
  opacity: 1;
}

.nav-cta {
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
}

.nav-cta:hover {
  background: var(--gold-light);
}

.menu-button {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 0.4rem;
  background: transparent;
  color: var(--white);
  font: 600 0.85rem var(--sans);
}

/* Tipografía */
h1,
h2,
h3 {
  margin-top: 0;
  font-family: var(--serif);
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.65rem, 5.2vw, 5.15rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(2.15rem, 4vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h3 {
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: #9a6815;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero .eyebrow,
.path .eyebrow {
  color: var(--gold-light);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 6rem);
  min-height: calc(100vh - 78px);
  padding: clamp(3.5rem, 6vw, 6rem) var(--page-padding);
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 45%, rgba(199, 154, 69, 0.16), transparent 30%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 58%, var(--navy) 100%);
  color: var(--white);
}

.hero-copy {
  max-width: 760px;
}

.hero-text {
  max-width: 640px;
  color: #d9e0e8;
  font-size: clamp(0.98rem, 1.35vw, 1.1rem);
  line-height: 1.75;
}

.hero-scene {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-scene img {
  width: min(100%, 660px);
  height: auto;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

.hero-actions,
.book-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.small-note {
  margin-top: 1rem;
  color: #aeb9c7;
  font-size: 0.76rem;
}

/* Botones y foco */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.78rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-gold {
  background: var(--gold);
  color: var(--navy);
}

.button-gold:hover {
  background: var(--gold-light);
}

.button-ghost {
  border-color: rgba(255, 255, 255, 0.38);
  color: var(--white);
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
}

.button:focus-visible,
.menu-button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}

/* Secciones */
.section {
  padding: var(--section-space) var(--page-padding);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 3rem;
}

.section-heading h2,
.book-copy h2,
.community h2 {
  margin-bottom: 1rem;
}

.section-heading>p:last-child,
.book-copy>p,
.community-copy>p:last-child {
  max-width: 680px;
  color: var(--muted);
}

/* Oraciones */
.prayers {
  background: var(--paper-light);
}

.prayer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.prayer-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 530px;
  padding: 2.2rem;
  border: 1px solid var(--line);
  background: #fffdf8;
}

.prayer-card::before {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(199, 154, 69, 0.25);
  content: "";
  pointer-events: none;
}

.featured-card {
  border-color: var(--navy-soft);
  background: var(--navy-soft);
  color: var(--white);
  transform: translateY(-1.25rem);
}

.featured-card p {
  color: #d8e0e8;
}

.card-number {
  margin-bottom: 2.5rem;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 2rem;
}

.card-kicker {
  color: #93600c;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.prayer-card h3 {
  margin-bottom: 0.9rem;
  font-size: 1.7rem;
}

.prayer-card p:not(.card-kicker) {
  font-size: 1rem;
  line-height: 1.62;
}

.prayer-text {
  position: relative;
  transition: max-height 0.35s ease;
}

.js .prayer-text.is-collapsed {
  max-height: 15.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}

.prayer-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  margin-top: auto;
  padding-top: 1.25rem;
}

.prayer-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #8e5c0b;
  font: 700 0.74rem var(--sans);
  cursor: pointer;
}

.featured-card .prayer-action {
  color: var(--gold-light);
}

.prayer-action:hover {
  color: var(--blue);
}

.featured-card .prayer-action:hover {
  color: var(--white);
}

.prayer-action:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 4px;
}

/* Ebook */
.ebook {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(3rem, 9vw, 9rem);
  background: linear-gradient(180deg, var(--paper), #eee3d1);
}

.book-stage {
  position: relative;
  display: flex;
  justify-content: center;
}

.book-stage::before {
  position: absolute;
  bottom: -6%;
  width: 80%;
  height: 20%;
  border-radius: 50%;
  background: rgba(6, 20, 39, 0.28);
  content: "";
  filter: blur(30px);
}

.book-stage img {
  position: relative;
  width: min(100%, 410px);
  height: auto;
  box-shadow: -24px 30px 45px rgba(17, 33, 49, 0.28);
  transform: perspective(1000px) rotateY(7deg);
}

.book-subtitle {
  color: var(--blue) !important;
  font-family: var(--serif);
  font-size: 1.45rem !important;
  line-height: 1.4;
}

.book-list {
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.book-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.8rem;
  border-bottom: 1px solid var(--line);
}

.book-list li::before {
  position: absolute;
  left: 0;
  color: #93600c;
  content: "✦";
}

.book-list span {
  font-weight: 700;
}

.secure-note {
  color: var(--muted);
  font-size: 0.74rem;
}

/* Recorrido */
.path {
  background: var(--navy);
  color: var(--white);
}

.light-heading h2 {
  max-width: 700px;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.16);
}

.path-grid>div {
  padding: 2.4rem;
  background: var(--navy);
}

.path-grid strong {
  color: var(--gold-light);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.path-grid h3 {
  margin: 1.1rem 0 0.65rem;
  font-size: 1.7rem;
}

.path-grid p {
  color: #b8c3cf;
}

/* Comunidad */
.community {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: end;
  gap: clamp(3rem, 8vw, 8rem);
  background: var(--paper-light);
}

.social-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 0.45rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 600;
}

.social-links a:nth-child(odd) {
  padding-right: 1.25rem;
}

.social-links a:nth-child(even) {
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}

.social-links a:hover {
  color: #8e5c0b;
}

.social-name {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.social-name i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(16, 59, 103, 0.24);
  border-radius: 50%;
  color: var(--blue);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 700;
}

.social-links a>b {
  font-size: 0.78rem;
  font-weight: 500;
}

/* Pie */
footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem var(--page-padding);
  background: #04101f;
  color: #c9d1dc;
  font-size: 0.76rem;
}

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

.footer-brand>span:last-child {
  display: flex;
  flex-direction: column;
}

.footer-brand strong {
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.1rem;
}

.footer-brand small {
  font-size: 0.67rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

.footer-links a:hover {
  color: var(--gold-light);
}

footer>p {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 100;
  max-width: calc(100% - 2rem);
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 140%);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Animación progresiva */
.js .prayer-card {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.js .prayer-card:nth-child(2) {
  transition-delay: 0.12s;
}

.js .prayer-card:nth-child(3) {
  transition-delay: 0.24s;
}

.js .prayer-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js .prayer-card.is-visible:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 50px rgba(12, 35, 60, 0.14);
}

@media (max-width: 920px) {
  .site-header nav {
    position: absolute;
    top: 78px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    padding: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--navy);
  }

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

  .site-header nav a {
    padding: 0.5rem;
  }

  .menu-button {
    display: inline-flex;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 3rem;
    text-align: left;
  }

  .hero-scene {
    order: -1;
  }

  .hero-scene img {
    width: min(100%, 600px);
  }

  .prayer-grid,
  .ebook,
  .community,
  .path-grid {
    grid-template-columns: 1fr;
  }

  .prayer-card {
    min-height: auto;
  }

  .featured-card {
    transform: none;
  }

  .book-stage img {
    width: min(72vw, 360px);
  }

  footer {
    grid-template-columns: 1fr;
  }

  footer>p {
    grid-column: 1;
  }
}

@media (max-width: 560px) {
  html {
    scroll-padding-top: 78px;
  }

  .site-header {
    height: 70px;
    padding: 0 1rem;
  }

  .site-header nav {
    top: 70px;
  }

  .brand {
    max-width: 75%;
    font-size: 0.96rem;
    line-height: 1.2;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .hero {
    padding: 1.25rem 1.25rem 4rem;
  }

  .hero-scene {
    margin: 0 -1.25rem;
  }

  .hero-scene img {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 11vw, 2.85rem);
  }

  .hero-actions .button,
  .book-actions .button {
    width: 100%;
  }

  .section {
    padding: 4.5rem 1.25rem;
  }

  .section-heading h2,
  .book-copy h2,
  .community h2 {
    font-size: 2.25rem;
  }

  .prayer-card {
    padding: 1.7rem;
  }

  .prayer-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .social-links {
    grid-template-columns: 1fr;
  }

  .social-links a:nth-child(n) {
    padding: 1rem 0.2rem;
    border-left: 0;
  }

  .footer-links {
    display: grid;
    gap: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .prayer-text,
  .js .prayer-card,
  .js .prayer-card:nth-child(n),
  .js .prayer-card.is-visible,
  .js .prayer-card.is-visible:hover {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .toast {
    transition: none;
  }
}