/* ==========================================================================
   Follow the Light — custom.css
   Brand-specific rules that live outside Tailwind's utility classes.
   This file is written to be pasted as-is into
   WordPress → Appearance → Customize → Additional CSS.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-cream: #F7F3EC;
  --color-card: #EFE6D8;
  --color-rust: #C1603E;
  --color-rust-dark: #A84E32;
  --color-charcoal: #2A2723;
  --color-muted: #7A7369;
  --color-line: #E4DCCB;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-cream);
  color: var(--color-charcoal);
  font-family: 'Inter', sans-serif;
}

.font-serif {
  font-family: 'Fraunces', serif;
}

/* ---------- Eyebrow labels ("A SUNDAY SCHOOL COMPANION", "STORY 1", etc.) ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-rust);
  margin-bottom: 0.75rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.25rem;
  height: 1px;
  background: currentColor;
}
.eyebrow--center {
  justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-rust);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-rust-dark);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--color-charcoal);
  border: 1px solid var(--color-charcoal);
}
.btn-secondary:hover {
  background: var(--color-charcoal);
  color: #fff;
}

/* ---------- Cards / panels ---------- */
.card-panel {
  background: var(--color-card);
  border-radius: 16px;
}

.story-card {
  display: block;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.story-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -12px rgba(42, 39, 35, 0.18);
}
.story-card__art {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-rust);
  background: linear-gradient(155deg, #F3E6D8 0%, #ECE0CC 100%);
  position: relative;
  overflow: hidden;
}

.story-detail__art {
  height: 220px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-rust);
  background: linear-gradient(155deg, #F3E6D8 0%, #ECE0CC 100%);
  position: relative;
  overflow: hidden;
}

.story-art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Filter tabs (Stories page — reflects the real C.A.L.M. structure) ---------- */
.filter-tab {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-muted);
  border: 1px solid var(--color-line);
  background: #fff;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.filter-tab:hover {
  color: var(--color-charcoal);
}
.filter-tab--active {
  background: var(--color-rust);
  border-color: var(--color-rust);
  color: #fff;
}

/* ---------- Nav ---------- */
.nav-link {
  color: var(--color-charcoal);
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: var(--color-rust);
}
.nav-link--active {
  color: var(--color-rust);
}

/* ---------- Logo mark ---------- */
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #F3DCC4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-rust);
  flex-shrink: 0;
}

/* ---------- Inputs ---------- */
.input-field {
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  background: #fff;
  color: var(--color-charcoal);
  font-size: 0.9rem;
  width: 100%;
}
.input-field:focus {
  outline: none;
  border-color: var(--color-rust);
  box-shadow: 0 0 0 3px rgba(193, 96, 62, 0.15);
}

/* ---------- Thumbnail mosaic background ---------- */
.mosaic-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.mosaic-grid {
  position: absolute;
  inset: -2%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  transform: rotate(-1.5deg) scale(1.08);
}
.mosaic-tile {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
}
.mosaic-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mosaic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(247,243,236,0.94) 0%,
    rgba(247,243,236,0.88) 40%,
    rgba(247,243,236,0.94) 100%);
}
.mosaic-content {
  position: relative;
  z-index: 1;
}

/* ---------- "Explore the picture" hotspot markers ---------- */
.hotspot-marker {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--color-rust);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 12px rgba(42, 39, 35, 0.15);
  transition: transform 0.15s ease;
  animation: hotspot-pulse 2.2s ease-in-out infinite;
}
.hotspot-marker:hover,
.hotspot-marker--active {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--color-rust);
}
@keyframes hotspot-pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(42, 39, 35, 0.15), 0 0 0 0 rgba(193, 96, 62, 0.35); }
  50% { box-shadow: 0 4px 12px rgba(42, 39, 35, 0.15), 0 0 0 8px rgba(193, 96, 62, 0); }
}

/* ---------- Geography journey (scroll-reveal timeline) ---------- */
.geo-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.geo-step--visible {
  opacity: 1;
  transform: translateY(0);
}
.geo-step__marker {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--color-rust);
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Google Translate widget (keep it quiet & on-brand) ---------- */
#google_translate_element {
  display: flex;
  align-items: center;
}
#google_translate_element .goog-te-gadget {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.75rem !important;
  color: var(--color-muted) !important;
}
#google_translate_element .goog-te-gadget-simple {
  border: 1px solid var(--color-line) !important;
  border-radius: 999px !important;
  padding: 0.4rem 0.9rem !important;
  background: #fff !important;
}
.goog-te-banner-frame {
  display: none !important;
}
body {
  top: 0 !important;
}

/* ---------- Accessibility ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-rust);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Scrollbar for horizontal filter tab row on mobile ---------- */
.filter-scroll::-webkit-scrollbar {
  height: 4px;
}
.filter-scroll::-webkit-scrollbar-thumb {
  background: var(--color-line);
  border-radius: 999px;
}
