/* =========================================================
   KIHEM Holy Throne — Custom Styles
   Pairs with Tailwind CDN. Keep this lean.
   ========================================================= */

:root {
  --ink: #0b192c;
  --royal: #6e3471;
  --royal-dark: #521856;
  --royal-light: #8a4488;
  --gold: #d4af37;
  --gold-light: #e9c46a;
  --parchment: #efd4e5;
  --parchment-soft: #f9eef6;
  --blush: #fdf4fb;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", sans-serif;
  background: #ffffff;
  color: var(--ink);
}

::selection {
  background: var(--parchment);
  color: var(--royal);
}

/* ---------- Header scroll state ---------- */
#site-nav {
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0px);
}
#site-nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(110, 52, 113, 0.1);
  box-shadow: 0 1px 24px rgba(110, 52, 113, 0.06);
}

/* ---------- Hero subtle grain ---------- */
.hero-bg-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(
      circle at 20% 10%,
      rgba(212, 175, 55, 0.07),
      transparent 40%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(110, 52, 113, 0.07),
      transparent 50%
    );
}

.hero-img {
  filter: saturate(0.95) contrast(1.05);
  transition: transform 1.2s ease;
}
.hero-img:hover {
  transform: scale(1.02);
}

/* ---------- Marquee ---------- */
.marquee {
  animation: marquee-scroll 38s linear infinite;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Reveal animation ---------- */
.reveal,
.reveal-delay {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in,
.reveal-delay.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay {
  transition-delay: 0.2s;
}

/* ---------- Inputs ---------- */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  outline: none;
  box-shadow: none;
  transition: border-color 0.25s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  outline: none;
  box-shadow: none;
  border-color: var(--royal) !important;
}

/* ---------- Form feedback states ---------- */
#form-feedback {
  display: none;
  padding: 1rem 1.25rem;
  border-radius: 2px;
  font-size: 0.875rem;
  line-height: 1.6;
}
#form-feedback.success {
  display: block;
  background: var(--parchment);
  border-left: 3px solid var(--royal);
  color: var(--royal);
}
#form-feedback.error {
  display: block;
  background: #fdf2f2;
  border-left: 3px solid #c0392b;
  color: #c0392b;
}

/* ---------- Submit button loading state ---------- */
#newsletter-submit[data-loading="true"] {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}
#newsletter-submit[data-loading="true"] .btn-label {
  display: none;
}
#newsletter-submit .btn-spinner {
  display: none;
}
#newsletter-submit[data-loading="true"] .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner-ring {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

/* ---------- Join section decorative bg ---------- */
.join-bg {
  background:
    radial-gradient(ellipse at 0% 100%, rgba(239, 212, 229, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 0%, rgba(110, 52, 113, 0.05) 0%, transparent 50%),
    #ffffff;
}

/* ---------- Contact card ---------- */
.contact-card {
  background: var(--blush);
  border: 1px solid rgba(110, 52, 113, 0.12);
  padding: 2rem 2.5rem;
  position: relative;
}
.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--royal), var(--gold));
}

/* ---------- Typography polish ---------- */
.font-serif {
  font-feature-settings: "liga", "dlig", "kern";
}

/* ---------- Headings: anchor offsets for sticky header ---------- */
section[id] {
  scroll-margin-top: 80px;
}

/* ---------- Parchment section tint ---------- */
.bg-parchment-section {
  background: linear-gradient(160deg, var(--parchment-soft) 0%, #fff9fd 100%);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
  .reveal, .reveal-delay {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Small screens polish ---------- */
@media (max-width: 640px) {
  .hero-img { height: 380px !important; }
  .contact-card { padding: 1.5rem; }
}

/* ---------- Mobile: show support button ---------- */
@media (max-width: 1024px) {
  [data-testid="nav-cta-support"] {
    display: inline-block !important;
    font-size: 10px;
    padding: 0.6rem 1.1rem;
  }
}

/* ---------- Mobile: hide hero GIF and tenets image ---------- */
@media (max-width: 1024px) {
  .hide-mobile {
    display: none !important;
  }
}
