/* ============================================================
   Resolute Media · styles.css · v7.0
   Official brand palette (from the Resolute brand guide):
   ink #2F302A · paper #FBF9F0 · stone #C7C2B8
   ash #75726D · signal red #E53F3F
   Tokens live in the inline Tailwind config; this file holds
   texture, motion, and component CSS.
   ============================================================ */

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: #2F302A;
  color: #FBF9F0;
}

/* ---------- Print grain ---------- */
.noise {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Hero atmosphere ---------- */
.hero-glow {
  background:
    radial-gradient(55rem 38rem at 85% 8%, rgba(199, 194, 184, 0.55), transparent 62%),
    radial-gradient(46rem 34rem at 8% 92%, rgba(47, 48, 42, 0.05), transparent 60%);
}

/* ---------- Nav morph ---------- */
#nav.scrolled {
  background: rgba(251, 249, 240, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: rgba(66, 66, 69, 0.12);
}

/* ---------- Buttons: magnetic + sliding fill ---------- */
.btn-magnetic {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.btn-magnetic:hover {
  transform: scale(1.03);
}
.btn-magnetic:focus-visible {
  outline: 2px solid #E53F3F;
  outline-offset: 3px;
}
.btn-slide {
  position: absolute;
  inset: 0;
  background: #2F302A;
  transform: translateY(101%);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.btn-magnetic:hover .btn-slide {
  transform: translateY(0);
}

/* ---------- Pressed state (tap feedback) ---------- */
.btn-magnetic:active {
  transform: scale(0.96);
}
.btn-magnetic:active .btn-slide {
  transform: translateY(0);
}
.lift:active {
  transform: translateY(1px);
}

/* ---------- Link lift ---------- */
.lift {
  transition: transform 0.25s ease, color 0.25s ease;
}
.lift:hover {
  transform: translateY(-1px);
}

/* ---------- Card hover ---------- */
.card {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.4s ease, box-shadow 0.4s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 48, 42, 0.3);
  box-shadow: 0 18px 40px -24px rgba(47, 48, 42, 0.3);
}

/* ---------- 01 Diagnose: shuffling question cards ---------- */
.shuffle-card {
  position: absolute;
  left: 0;
  right: 0;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  background: #FFFFFF;
  border: 1px solid rgba(47, 48, 42, 0.12);
  color: #2F302A;
  font-size: 0.78rem;
  line-height: 1.35;
  transition: transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.6s ease;
}
.shuffle-card[data-pos="0"] { transform: translateY(0) scale(1); opacity: 1; z-index: 3; border-color: rgba(229, 63, 63, 0.55); }
.shuffle-card[data-pos="1"] { transform: translateY(3.1rem) scale(0.96); opacity: 0.6; z-index: 2; }
.shuffle-card[data-pos="2"] { transform: translateY(6rem) scale(0.92); opacity: 0.32; z-index: 1; }

/* ---------- 02 Produce: live feed ---------- */
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #E53F3F;
  display: inline-block;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.chip {
  padding: 0.42rem 0.85rem;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1px solid rgba(47, 48, 42, 0.15);
  font-size: 0.74rem;
  font-weight: 600;
  color: #2F302A;
  opacity: 0;
  transform: translateY(6px) scale(0.95);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1), border-color 0.45s ease;
}
.chip.pop {
  opacity: 1;
  transform: none;
  border-color: rgba(229, 63, 63, 0.45);
}

/* ---------- 03 Grow: publishing week + sparkline ---------- */
.day {
  text-align: center;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 0.6rem;
  padding: 0.45rem 0;
  border-radius: 0.5rem;
  background: #FFFFFF;
  color: #75726D;
  border: 1px solid rgba(47, 48, 42, 0.12);
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.day.on {
  background: rgba(229, 63, 63, 0.1);
  color: #E53F3F;
  border-color: rgba(229, 63, 63, 0.45);
}
#spark {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
}
#spark.draw {
  animation: draw 2.4s ease forwards;
}
@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* ---------- Results stat rows ---------- */
.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(47, 48, 42, 0.1);
  padding-bottom: 0.85rem;
}
.stat-row dt {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #75726D;
}
.stat-row dd {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.25rem;
  color: #2F302A;
}

/* ---------- Filter marks ---------- */
.filter-x {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 9999px;
  border: 1px solid rgba(229, 63, 63, 0.55);
  color: #E53F3F;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  line-height: 1;
  margin-top: 0.1rem;
  background: rgba(229, 63, 63, 0.1);
}

/* ---------- FAQ accordion ---------- */
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  padding: 1.35rem 1.6rem;
  font-weight: 600;
  color: #2F302A;
  cursor: pointer;
  background: transparent;
  border: 0;
  font-size: 1rem;
}
.faq-q:focus-visible {
  outline: 2px solid #E53F3F;
  outline-offset: -2px;
  border-radius: 1.5rem;
}
.faq-icon {
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(47, 48, 42, 0.2);
  display: grid;
  place-items: center;
  color: #2F302A;
  font-size: 1.1rem;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.35s ease, background 0.35s ease;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  border-color: rgba(47, 48, 42, 0.5);
  background: rgba(199, 194, 184, 0.4);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.faq-a p {
  padding: 0 1.6rem 1.5rem;
  color: #75726D;
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ---------- Booking shell ---------- */
.booking-shell iframe {
  min-height: 760px;
  display: block;
}


/* ---------- Results media cards ---------- */
.media-frame {
  height: 15rem;
  overflow: hidden;
  background: #2F302A;
}
@media (min-width: 768px) {
  .media-frame { height: 17rem; }
}
.media-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.6s ease;
  will-change: transform;
}
.media-card:hover .media-el,
.media-card:active .media-el,
.media-card.bloom .media-el {
  transform: scale(1.05);
  filter: grayscale(0);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-magnetic, .btn-slide, .card, .lift, .shuffle-card, .faq-icon { transition: none; }
  .pulse-dot { animation: none; }
  .chip { opacity: 1; transform: none; transition: none; }
  #spark { stroke-dashoffset: 0; animation: none; }
  .media-el { transition: none; filter: none; }
}
