/* ============================================================
   Climax Prime — custom styles (used alongside Tailwind CDN)
   ============================================================ */

:root {
  --gold: hsl(41.76deg 99.21% 49.41%);
  --gold-dark: hsl(41.76deg 99.21% 40%);
  --navy: hsl(213.7deg 85.88% 16.67%);
  --navy-light: hsl(213.7deg 60% 24%);
  --paper: #FBFAF7;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif;
  background-color: #ffffff;
  color: var(--navy);
}

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

/* Respect 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;
    scroll-behavior: auto !important;
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* Header shadow on scroll */
#site-header.is-scrolled {
  box-shadow: 0 1px 0 rgba(10, 30, 65, 0.08), 0 12px 24px -18px rgba(10, 30, 65, 0.25);
}

/* Focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Mobile nav */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
#mobile-menu.open {
  max-height: 640px;
}

/* Card hover lift */
.card-lift {
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -24px rgba(10, 30, 65, 0.35);
  border-color: var(--gold);
}

/* Paper stack (hero illustration) */
.paper {
  transition: transform 0.5s ease;
}
.paper-illustration:hover .paper {
  transform: translateY(-4px);
}

/* Seal spin-in */
@keyframes seal-in {
  from { opacity: 0; transform: scale(0.85) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(-8deg); }
}
.seal-animate {
  animation: seal-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Counter */
.counter-num {
  font-variant-numeric: tabular-nums;
}

/* Process connector line */
.process-line {
  background: repeating-linear-gradient(to bottom, var(--gold) 0, var(--gold) 8px, transparent 8px, transparent 16px);
}
@media (min-width: 1024px) {
  .process-line-h {
    background: repeating-linear-gradient(to right, var(--gold) 0, var(--gold) 8px, transparent 8px, transparent 16px);
  }
}

/* Toast */
#toast-region {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(92vw, 420px);
}
.toast {
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Back to top */
#back-to-top {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(8px);
}
#back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* WhatsApp float pulse */
@keyframes wa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
#whatsapp-float {
  animation: wa-pulse 2.6s infinite;
}

/* Form field states */
.field-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field-input.field-error {
  border-color: #DC2626 !important;
}
.field-error-msg {
  display: none;
}
.field-error .field-error-msg {
  display: block;
}

/* Line clamp fallback */
.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}
