/* ==========================================================================
   Movify — custom styles that complement the Tailwind Play CDN utilities.
   ========================================================================== */

:root {
  --ink: #0b0b0f;
  --card: #16161a;
  --line: #26262d;
  --muted: #a1a1aa;
  --blue: #2f80ed;
  --teal: #00c2a8;
  --gradient: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--ink);
  color: #fff;
  font-family: Poppins, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Anchor targets should not hide under the sticky header */
[id] {
  scroll-margin-top: 5.5rem;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}
.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Brand helpers ---------- */
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-gradient-brand {
  background-image: var(--gradient);
}

.btn-primary {
  background-image: var(--gradient);
  box-shadow: 0 10px 30px -10px rgba(0, 194, 168, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 14px 36px -10px rgba(0, 194, 168, 0.7);
}

/* Card with a gradient hairline border */
.card-glow {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
}
.card-glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.6), rgba(0, 194, 168, 0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Hero background blobs ---------- */
.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  animation: blob-float 18s ease-in-out infinite alternate;
}
.blob--blue { background: var(--blue); }
.blob--teal { background: var(--teal); animation-delay: -6s; }
.blob--violet { background: #6d4aff; opacity: 0.25; animation-delay: -12s; }

@keyframes blob-float {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(30px, -20px, 0) scale(1.08); }
  100% { transform: translate3d(-20px, 25px, 0) scale(0.95); }
}

.grid-fade {
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}

/* ---------- Store buttons ---------- */
.store-btn {
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.store-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
}
.store-btn[aria-disabled="true"] {
  cursor: default;
}

/* ---------- Template showcase (horizontal scroll) ---------- */
.scroll-row {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #3a3a44 transparent;
}
.scroll-row > * {
  scroll-snap-align: start;
}
.scroll-row::-webkit-scrollbar { height: 6px; }
.scroll-row::-webkit-scrollbar-thumb { background: #3a3a44; border-radius: 9999px; }

/* ---------- FAQ accordion ---------- */
.faq-icon {
  transition: transform 0.25s ease;
}
[aria-expanded="true"] > .faq-icon {
  transform: rotate(45deg);
}
/* Without JavaScript, show every answer and the full mobile menu */
html:not(.js) .faq-panel[hidden],
html:not(.js) #mobile-menu[hidden] {
  display: block;
}
html:not(.js) #menu-toggle {
  display: none;
}

/* ---------- Legal pages (privacy, terms) ---------- */
.legal h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-size: 1.375rem;
  line-height: 1.35;
  font-weight: 700;
  color: #fff;
}
.legal > section:first-child h2 {
  margin-top: 0;
}
.legal h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #fff;
}
.legal p,
.legal li {
  color: #c9c9d1;
  line-height: 1.75;
}
.legal p + p {
  margin-top: 1rem;
}
.legal ul,
.legal ol {
  margin: 1rem 0;
  padding-left: 1.25rem;
}
.legal ul { list-style: disc; }
.legal ol { list-style: decimal; }
.legal li + li { margin-top: 0.5rem; }
.legal li::marker { color: var(--teal); }
.legal strong { color: #fff; font-weight: 600; }
.legal a {
  color: #5fd4c4;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}
.legal a:hover { color: #fff; }
.legal .callout {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
}

/* Visible placeholder — content the site owner must confirm before publishing */
.placeholder {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  border: 2px dashed #f5b83d;
  background: rgba(245, 184, 61, 0.08);
  color: #fde3a7 !important;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 60;
  max-width: calc(100% - 2rem);
  transform: translate(-50%, 1rem);
  opacity: 0;
  pointer-events: none;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.6);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .blob { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
}
