/* ==========================================================================
   KASA Real Estate — Custom Styles (Tailwind companion)
   Only: @font-face, animations, nav scroll states, modal states, form errors
   ========================================================================== */

/* ==========================================================================
   1. FONT FACES
   ========================================================================== */

@font-face {
  font-family: 'Chloe';
  src: url('../fonts/Chloe-Regular.woff2') format('woff2'),
       url('../fonts/Chloe-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Chloe';
  src: url('../fonts/Chloe-Bold.woff2') format('woff2'),
       url('../fonts/Chloe-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Chloe';
  src: url('../fonts/Chloe-Italic.woff2') format('woff2'),
       url('../fonts/Chloe-Italic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ==========================================================================
   2. SMOOTH SCROLL
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

/* ==========================================================================
   3. NAV SCROLL STATE
   ========================================================================== */

/* Default: transparent nav, light logo visible, dark logo hidden */
#main-nav.nav-scrolled {
  background-color: #FFFFFF;
  box-shadow: 0 2px 20px rgba(11, 29, 53, 0.08);
}

#main-nav.nav-scrolled #nav-inner {
  height: 4rem;
}

/* Logo size on scroll (dark logo stays visible) */
#main-nav.nav-scrolled .nav-logo-dark {
  height: 4rem;
}

#main-nav.nav-scrolled .nav-logo-light {
  display: none;
}

/* Nav link color change on scroll */
#main-nav.nav-scrolled .nav-link {
  color: #001C37;
}

#main-nav.nav-scrolled .nav-link:hover {
  color: #90ADC6;
}

/* Active nav link */
.nav-link.active {
  color: #001C37 !important;
}

#main-nav.nav-scrolled .nav-link.active {
  color: #FA9939 !important;
}

/* Hamburger color change on scroll */
#main-nav.nav-scrolled .hamburger-line {
  background-color: #001C37;
}

/* ==========================================================================
   4. HAMBURGER ANIMATION
   ========================================================================== */

#hamburger.open .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

#hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

#hamburger.open .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   5. MOBILE MENU STATE
   ========================================================================== */

#mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   6. CONTACT MODAL STATE
   ========================================================================== */

#contact-modal.open {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   7. FADE-IN ANIMATION
   ========================================================================== */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   8. FORM VALIDATION STYLES
   ========================================================================== */

.input--error {
  border-color: #e53e3e !important;
}

.field-error {
  display: block;
  color: #e53e3e;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.form-success {
  text-align: center;
  padding: 2rem 0;
}

.form-success h3 {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 1.5rem;
  color: #001C37;
  margin-bottom: 0.5rem;
}

.form-success p {
  color: #001C37;
  opacity: 0.7;
}

/* For modal form success */
#contact-modal .form-success h3 {
  color: #001C37;
}

/* For contact section form success (dark bg) */
#kontakt .form-success h3 {
  color: white;
}

#kontakt .form-success p {
  color: rgba(255, 255, 255, 0.7);
}
