/* Gleam of Hope — bare-bones rebuild (no Webflow) */

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

:root {
  --white: #fff;
  --black: #000;
  --bg: #fff;
  --panel: #ececec;
}

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

body {
  background-color: var(--bg);
  color: var(--black);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 32px;
}

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

/* ---- Header / footer ---- */
.header-footer {
  background-color: var(--panel);
  position: relative;
  box-shadow: 0 -2px 4px #0003;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
  padding: 16px;
}

.logo-center { height: 100%; width: auto; }

.header-footer a {
  color: var(--black);
  text-decoration: none;
}
.header-footer a:hover { text-decoration: underline; }

/* ---- Intro ---- */
.intro {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 16px;
}

.div-block { position: relative; }

.heading {
  text-align: center;
  min-height: 100px;
  margin: 18px 0;
  font-family: Bitter, serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 42px;
}

.bonbon.title {
  height: 60px;
  width: auto;
  position: absolute;
  top: -40px;                                 /* perched on the first card's top edge, peeking over a little */
  left: 64px;
  z-index: 4;                                 /* sits on top of the card */
  pointer-events: none;                       /* clicks pass through to the card */
  transform-origin: 50% 100%;                 /* sway from the base, like a pendulum */
  animation: bonbon-sway 2.6s ease-in-out infinite;
}

/* Title mascot: subtle back-and-forth sway (Webflow a-10: rotate -4deg <-> 4deg). */
@keyframes bonbon-sway {
  0%, 100% { transform: rotate(-4deg); }
  50%      { transform: rotate(4deg); }
}

/* ---- Card stack ---- */
/* Extra top padding leaves room for the swaying title bonbon above the cards. */
.card-section { padding: 88px 16px 200px; }

.card-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 540px;
  margin: 0 auto;
  position: relative;
}

.card-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin-bottom: -60px;
  cursor: pointer;
  transition: transform .35s ease, margin .35s ease;
}

.card-container.v1 { transform: rotate(3deg); }
.card-container.v2 { transform: rotate(-3deg); }

.card {
  position: relative;
  border: 5px solid var(--white);
  border-radius: 10px;
  padding: 70px 24px 24px;
  overflow: hidden;
  box-shadow: 0 -4px 16px #0003;
}

.card.romantic      { background-color: #e59090; }
.card.friendship    { background-color: #f9dd7a; }
.card.selflove      { background-color: #b3e8b0; }
.card.situationship { background-color: #8cb4e8; }

.card-title {
  height: 32px;
  width: auto;
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.card-image {
  display: block;
  height: 200px;
  width: auto;
  margin: 0 auto;
  transition: height .35s ease, margin .35s ease;
}

/* ---- Open / close ---- */
/* The content height animates smoothly via the grid row (0fr -> 1fr). */
.card-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s ease;
}

.card-content {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity .35s ease;
}

/* Open: rotate upright, stop overlapping, and reveal the content.
   No width change (grows downward only) and no z-index change (stays on its
   natural layer, so cards in front keep overlapping it). */
.card-container.open {
  transform: rotate(0);
  margin-bottom: 0;
  cursor: default;
}

.card-container.open .card-body { grid-template-rows: 1fr; }
.card-container.open .card-content { opacity: 1; }
.card-container.open .card-image { height: 240px; margin-bottom: 8px; }

/* When open, the header (title + image) acts as a close target. */
.card-container.open .card-title,
.card-container.open .card-image { cursor: pointer; }

/* ---- Card text content ---- */
.card-content .verse {
  font-family: Bitter, serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 40px;
  margin: 8px 0 28px;
}

.card-content p { margin: 0 0 20px; }

.card-content .image-2 {
  float: left;
  height: 150px;
  width: auto;
  margin: 0 16px 8px 0;
  transform: rotate(-20deg);
}

.card-content .image-3 {
  float: right;
  height: 150px;
  width: auto;
  margin: 0 0 8px 16px;
  transform: rotate(20deg);
}
.card-content .image-3.rose { height: 200px; }

.chat-cta {
  clear: both;
  display: inline-block;
  margin-top: 16px;
  padding: 8px 20px;
  color: var(--black);
  background-color: var(--white);
  border-radius: 4px;
  text-decoration: none;
  box-shadow: 0 4px 8px #0003;
}
.chat-cta:hover { background-color: #f3f3f3; }

/* ---- Back button ---- */
.back-btn {
  position: fixed;
  bottom: 16px;
  left: 16px;
  width: 72px;
  height: 72px;
  border: none;
  border-radius: 100px;
  background-color: var(--white);
  box-shadow: 0 4px 8px #0003;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 5;
}
.back-btn img { width: 32px; height: 32px; }
.back-btn.is-visible { opacity: 1; pointer-events: auto; }

/* ---- Responsive ---- */
@media screen and (max-width: 479px) {
  .heading {
    min-height: 120px;
    padding: 0 10px;
    font-size: 32px;
    line-height: 40px;
  }
  .card { padding: 70px 16px 16px; }
  .back-btn { width: 56px; height: 56px; }
}

/* Respect users who prefer reduced motion: drop the mascot sway. */
@media (prefers-reduced-motion: reduce) {
  .bonbon.title { animation: none; }
}
