/* ========== Le Padel Coach — custom styles ==========
   Tailwind handles the bulk of styling via CDN.
   This file holds the few things Tailwind can't do cleanly:
   form control aesthetics, nav transitions, and motion.
*/

html {
  scroll-behavior: smooth;
}

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

/* ----- Nav ----- */
#nav.scrolled {
  background: rgba(251, 248, 243, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(31, 44, 30, 0.06);
}

#nav .nav-link {
  position: relative;
  color: #1f2c1e;
  font-weight: 500;
  transition: color 0.2s ease;
}
#nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 1px;
  background: currentColor;
  transition: right 0.25s ease;
}
#nav .nav-link:hover::after {
  right: 0;
}

/* hero overlap fix — nav text starts dark on hero (light bg overlay) */
#nav:not(.scrolled) .nav-link {
  color: #f5efe6;
}
#nav:not(.scrolled) .nav-link:hover {
  color: #ffffff;
}
#nav:not(.scrolled) #lang-toggle {
  color: #f5efe6;
  border-color: rgba(245, 239, 230, 0.4);
}
#nav:not(.scrolled) #lang-toggle:hover {
  border-color: rgba(245, 239, 230, 0.8);
}
#nav:not(.scrolled) a[href="#top"] span:last-child {
  color: #f5efe6;
}
#nav:not(.scrolled) #menu-toggle {
  color: #f5efe6;
}

/* ----- Form controls ----- */
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #425e3c;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #fbf8f3;
  border: 1px solid rgba(31, 44, 30, 0.12);
  border-radius: 0.625rem;
  font-size: 0.95rem;
  color: #1f2c1e;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: inherit;
}
.form-input:focus {
  outline: none;
  background: #ffffff;
  border-color: #56764d;
  box-shadow: 0 0 0 4px rgba(86, 118, 77, 0.15);
}

/* Radio card */
.radio-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1rem;
  background: #fbf8f3;
  border: 1px solid rgba(31, 44, 30, 0.12);
  border-radius: 0.625rem;
  font-size: 0.9rem;
  color: #2d3e2a;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.radio-card:hover {
  border-color: #56764d;
}
.radio-card input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.radio-card:has(input:checked) {
  background: #364c32;
  border-color: #364c32;
  color: #f5efe6;
}

/* ----- Social links ----- */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  width: 38px;
  border-radius: 9999px;
  border: 1px solid rgba(245, 239, 230, 0.25);
  color: #f5efe6;
  transition: all 0.2s ease;
}
.social-link:hover {
  background: #f5efe6;
  color: #1f2c1e;
}

/* ----- Subtle reveal animation ----- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
