/* Home page hero: five shortcut cards (index.php).
 * A native horizontal swipe row (CSS scroll-snap): on a phone the next card
 * peeks in from the right so people know to swipe; on desktop one card shows
 * at a time with dots and prev/next arrows. hero-cards.js adds the dots,
 * arrows and the gentle auto-advance. Without JavaScript the cards still
 * swipe/scroll and every link works. */

.hero-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;          /* lets the row scroll inside the hero grid instead of stretching it */
}

.hero-cards__track {
  position: relative;    /* card.offsetLeft is measured from here */
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hero-cards__track::-webkit-scrollbar { display: none; }

.hero-card {
  flex: 0 0 86%;         /* a slice of the next card shows: "swipe me" */
  min-width: 0;
  min-height: 230px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .2s ease;
}
.hero-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;  /* inside the card: the scroll row would clip an outer outline */
}
@media (hover: hover) {
  .hero-card:hover { transform: translateY(-2px); }
  .hero-card:hover .hero-card__go { transform: translateX(4px); }
}

.hero-card__icon {
  width: 38px;
  height: 38px;
  margin-bottom: 1rem;
  color: var(--accent);
  flex: none;
}
.hero-card__title { font-size: 1.4rem; margin: 0 0 .4em; letter-spacing: -.02em; }
.hero-card__desc  { margin: 0 0 1em; color: var(--ink-muted); font-size: .92rem; }
.hero-card__go {
  margin-top: auto;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 700;
  color: var(--accent);
  transition: transform .2s ease;
}

/* Dots + arrows ---------------------------------------------------------- */
.hero-cards__controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.hero-cards__dots { display: flex; }
.hero-cards__dots button {
  position: relative;
  width: 22px;           /* comfortable tap target; the visible dot is the ::before */
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hero-cards__dots button::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .3);
  transform: translate(-50%, -50%);
  transition: width .2s ease, background-color .2s ease;
}
.hero-cards__dots button.is-active::before { width: 20px; background: var(--accent); }
.hero-cards__dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }

.hero-cards__arrows { display: none; gap: 8px; }
.hero-cards__arrow {
  width: 36px; height: 36px; padding: 0 0 3px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  font-size: 1.4rem; line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.hero-cards__arrow:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hero-cards__arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Desktop: one card at a time, arrows visible. */
@media (min-width: 860px) {
  .hero-card { flex-basis: 100%; }
  .hero-cards__arrows { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-card, .hero-card__go, .hero-cards__dots button::before, .hero-cards__arrow { transition: none; }
}
