/* ==========================================================================
   Love Counter — components.css
   Reusable UI: header/nav, buttons, cards, footer, accordion, chips, ads.
   ========================================================================== */

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--plum);
  border-bottom: 1px solid var(--rose);
  color: var(--text-on-dark);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(42, 17, 40, 0.4); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
}
.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex: none;
}
.brand__name {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand__name b { color: var(--rose); font-weight: 700; }
.site-footer .brand__name { color: var(--white); }

/* Primary menu */
.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav__menu-head { display: none; }
/* The in-drawer CTA is a mobile-only mirror of .nav__cta, so only one
   "Start Counting" button is ever visible at a time. */
.nav__menu-cta { display: none; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-pill);
  color: var(--text-on-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.96rem;
  background: transparent;
  border: 0;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__link:hover,
.nav__link:focus-visible { background: rgba(231, 71, 126, 0.18); color: var(--white); }
.nav__link[aria-current="page"] {
  color: var(--white);
  background: rgba(231, 71, 126, 0.28);
}
/* Drawer-only: the desktop bar stays text-first and has no room for icons. */
.nav__icon { display: none; width: 19px; height: 19px; flex: none; }

/* Actions */
.nav__actions { display: flex; align-items: center; gap: 0.75rem; }
.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(231, 71, 126, 0.16);
  border-radius: var(--radius-sm);
  place-items: center;
}
.nav__toggle-bars { position: relative; width: 22px; height: 16px; display: block; }
.nav__toggle-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav__toggle-bars span:nth-child(1) { top: 0; }
.nav__toggle-bars span:nth-child(2) { top: 7px; }
.nav__toggle-bars span:nth-child(3) { top: 14px; }
.nav__close { display: none; }
.nav__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42, 17, 40, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
  z-index: 98;
}
.nav__backdrop.is-open { opacity: 1; visibility: visible; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn__icon, .btn__arrow { width: 18px; height: 18px; flex: none; }
.btn--sm { padding: 0.55rem 1rem; font-size: 0.9rem; }

.btn--primary {
  background: linear-gradient(120deg, var(--rose), var(--rose-deep));
  color: var(--white);
  box-shadow: var(--shadow-rose);
}
.btn--primary:hover { color: var(--white); box-shadow: 0 14px 34px rgba(231, 71, 126, 0.38); }

.btn--secondary {
  background: var(--white);
  color: var(--rose-deep);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn--secondary:hover { color: var(--wine); border-color: var(--rose); }

.btn--on-dark {
  background: var(--white);
  color: var(--wine);
}
.btn--on-dark:hover { background: var(--rose-soft); color: var(--wine); }

.btn--ghost-dark {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}
.btn--ghost-dark:hover { background: rgba(255, 255, 255, 0.16); color: var(--white); }

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 2px;
}

/* ---------- Chips ---------- */
.chip {
  display: inline-block;
  /* Card bodies are column flexboxes, where a block-level chip would
     otherwise stretch into a full-width bar. */
  align-self: flex-start;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--rose-soft);
  color: var(--rose-deep);
}
.chip--gold {
  background: linear-gradient(120deg, var(--rose), var(--wine));
  color: var(--white);
}

/* ---------- Cards ---------- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--rose);
}
.card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--rose-mist);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.card__title { font-size: var(--fs-h4); line-height: 1.25; margin-top: 0.15rem; }
.card__title a { color: var(--text-heading); text-decoration: none; }
.card__title a:hover { color: var(--rose-deep); }
.card__text { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.card__meta { font-size: 0.82rem; color: var(--text-muted); margin-top: auto; padding-top: 0.5rem; }

/* ---------- Feature / step cards ---------- */
.feature {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--rose);
}
.feature h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.feature p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.feature__icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rose-soft), var(--rose-mist));
  color: var(--rose-deep);
  margin-bottom: 1rem;
}
.feature__icon svg { width: 26px; height: 26px; }

.section--bluegray { background: var(--rose-mist); }

.step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.85rem; }
.step__num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.step__icon { color: var(--wine); }
.step__icon svg { width: 26px; height: 26px; }
.step h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.step p { color: var(--text-muted); font-size: 0.93rem; margin: 0; }

/* ---------- Note block ---------- */
.note-block {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: linear-gradient(120deg, var(--rose-soft), var(--white));
  border: 1px solid var(--border);
  border-left: 5px solid var(--rose);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
}
.note-block__icon { color: var(--rose-deep); flex: none; }
.note-block__icon svg { width: 34px; height: 34px; }
.note-block__title { font-size: var(--fs-h4); margin-bottom: 0.35rem; }
.note-block p { margin: 0; color: var(--text-muted); }

/* ---------- Accordion (FAQ) ---------- */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 2rem); }
.accordion { display: flex; flex-direction: column; gap: 0.75rem; }
.accordion__item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.accordion__item:hover { border-color: var(--rose); }
.accordion__item h3 { margin: 0; font-size: 1rem; }
.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  padding: 1.05rem 1.25rem;
  background: transparent;
  border: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text-heading);
}
.accordion__icon { width: 20px; height: 20px; flex: none; transition: transform var(--dur) var(--ease); color: var(--rose-deep); }
.accordion__trigger[aria-expanded="true"] .accordion__icon { transform: rotate(45deg); }
.accordion__panel { padding: 0 1.25rem 1.15rem; }
.accordion__panel p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  background:
    radial-gradient(120% 120% at 10% -20%, rgba(231, 71, 126, 0.18), transparent 55%),
    linear-gradient(160deg, var(--plum) 0%, var(--plum-2) 70%, var(--wine) 150%);
  color: var(--text-on-dark);
  padding-block: clamp(2.5rem, 5vw, 4rem) 1.75rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(4, max-content);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer__brand-desc { margin-top: 0.9rem; color: var(--text-on-dark); opacity: 0.82; font-size: 0.92rem; }
.footer__heading {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 1rem;
}
.footer__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.flink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-on-dark);
  text-decoration: none;
  font-size: 0.92rem;
  opacity: 0.88;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.flink:hover { color: var(--rose); opacity: 1; }
.flink__icon { width: 17px; height: 17px; flex: none; }
.footer__bottom { padding-top: 1.5rem; }
.footer__copy { font-size: 0.88rem; color: var(--text-on-dark); opacity: 0.82; }
.footer__brand-link { color: var(--rose); text-decoration: none; font-weight: 600; }
.footer__brand-link:hover { color: var(--white); }
.footer__disclaimer {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-on-dark);
  opacity: 0.6;
  max-width: none;
}

/* ---------- Scroll to top ---------- */
.scroll-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: var(--white);
  box-shadow: var(--shadow-rose);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  z-index: 90;
}
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-3px); }
.scroll-top svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 7vw, 6rem); }
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__title { font-size: var(--fs-hero); margin-bottom: 1.1rem; }
.hero__lead { font-size: var(--fs-lead); color: var(--text-on-dark); margin-bottom: 1.75rem; max-width: 54ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero__trust {
  list-style: none;
  padding: 0;
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}
.hero__trust li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.9rem;
  color: var(--text-on-dark);
  opacity: 0.92;
}
.hero__trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: var(--rose);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(231, 71, 126, 0.2);
}
.hero__visual { position: relative; }
.hero__visual-inner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* ---------- Accuracy layout ---------- */
.accuracy-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.accuracy-layout__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* ---------- Reviews carousel ---------- */
.reviews__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.reviews__intro { max-width: 640px; }
.reviews__controls { display: flex; gap: 0.5rem; }
.rev-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--rose-deep);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.rev-btn:hover { background: var(--rose); color: var(--white); border-color: var(--rose); }
.rev-btn svg { width: 20px; height: 20px; }
.rev-btn__play { display: none; }
.rev-btn[aria-pressed="true"] .rev-btn__pause { display: none; }
.rev-btn[aria-pressed="true"] .rev-btn__play { display: block; }

.reviews__viewport { overflow: hidden; }
.reviews__track { display: flex; gap: 1.5rem; transition: transform 500ms var(--ease); }
.review-card {
  flex: 0 0 calc((100% - 3rem) / 3);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin: 0;
}
.review-card__stars { display: flex; gap: 0.15rem; color: var(--rose); margin-bottom: 0.9rem; }
.review-card__stars svg { width: 20px; height: 20px; }
.review-card__text {
  font-size: 0.98rem;
  color: var(--text-body);
  margin: 0 0 1.25rem;
  line-height: 1.6;
}
.review-card__person { display: flex; align-items: center; gap: 0.8rem; }
.review-card__avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--wine));
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  flex: none;
}
.review-card__name { display: block; font-weight: 600; color: var(--plum); font-size: 0.95rem; }
.review-card__role { display: block; font-size: 0.82rem; color: var(--text-muted); }

/* ---------- Final CTA ---------- */
.cta-final { text-align: center; }
.cta-final .section-title { color: var(--white); }
.cta-final p { margin-inline: auto; }
