/* Entérate — custom styles layered over the Tailwind CDN utilities. */

:root {
  color-scheme: dark;
  --page-bg: #131313;
  --surface: #2B2B2B;
  --surface-2: #1A1A1A;
  --text-primary: #ffffff;
  --text-muted: #A3A3A3;
  --border-color: rgba(255, 255, 255, 0.12);
  --input-bg: #1A1A1A;
  --hero-bg: rgba(43, 43, 43, 0.8);
}

html.theme-light {
  color-scheme: light;
  --page-bg: #f7f3ee;
  --surface: #ffffff;
  --surface-2: #f4f1ee;
  --text-primary: #1A1A1A;
  --text-muted: #6B6B6B;
  --border-color: rgba(0, 0, 0, 0.08);
  --input-bg: #fdfbf9;
  --hero-bg: rgba(255, 255, 255, 0.8);
}

body {
  background-color: var(--page-bg);
  color: var(--text-primary);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Countdown digits keep a fixed width so the numbers don't jitter every second */
.font-tabular {
  font-variant-numeric: tabular-nums;
}

/* Hero entrance: direct children rise in staggered on page load */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hero-stagger > * {
  opacity: 0;
  animation: rise-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-stagger > *:nth-child(2) { animation-delay: 0.15s; }
.hero-stagger > *:nth-child(3) { animation-delay: 0.3s; }

/* Countdown digits slide down softly each time the value changes */
@keyframes tick {
  from { opacity: 0.2; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

.tick {
  animation: tick 0.35s ease-out;
}

/* Gentle float for the chat bubble in the product preview */
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.animate-float {
  animation: float-y 3.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero-stagger > * {
    animation: none;
    opacity: 1;
  }

  .tick,
  .animate-float {
    animation: none;
  }

  body {
    transition: none;
  }
}

/* Scroll reveal — the .reveal class is only ever added by JS, so the page
   stays fully visible when JS is unavailable */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #E85D04;
  outline-offset: 2px;
}

/* The country <select> is an invisible overlay; show its focus on the wrapper */
.country-picker:focus-within {
  outline: 2px solid #E85D04;
  outline-offset: 2px;
}

.theme-light .country-picker span {
  color: var(--text-primary);
}

.form-message {
  min-height: 1.25rem;
}

.form-message.is-error {
  color: #E85D04;
}

.form-message.is-success {
  color: #2A9D8F;
}

/* Light theme overrides for the Tailwind utility classes used in the markup */
.theme-light #bg-canvas {
  opacity: 0.18;
  filter: saturate(0.6);
}

.theme-light .bg-charcoal {
  background-color: var(--surface) !important;
}

.theme-light .bg-darkercharcoal {
  background-color: var(--surface-2) !important;
}

.theme-light .bg-charcoal\/50 {
  background-color: rgba(255, 255, 255, 0.75) !important;
}

.theme-light .bg-charcoal\/80 {
  background-color: var(--hero-bg) !important;
}

.theme-light .text-white,
.theme-light .text-white\/80,
.theme-light .hover\:text-white:hover {
  color: var(--text-primary) !important;
}

.theme-light .text-warmgray\/50 {
  color: var(--text-muted) !important;
}

.theme-light .text-warmgray {
  color: var(--text-muted) !important;
}

.theme-light .border-white\/10,
.theme-light .border-white\/5,
.theme-light .border-warmgray\/30 {
  border-color: var(--border-color) !important;
}

.theme-light .border-\[\#131313\] {
  border-color: var(--page-bg) !important;
}

/* Keep the orange hover stroke on cards despite the light-theme border override */
.theme-light .hover\:border-burntorange\/50:hover {
  border-color: rgba(232, 93, 4, 0.5) !important;
}

.theme-light input {
  background-color: var(--input-bg) !important;
  color: var(--text-primary) !important;
}

.theme-light input::placeholder {
  color: var(--text-muted) !important;
}

.theme-light .bg-\[\#131313\] {
  background-color: var(--page-bg) !important;
}
