/* ========================================================================== 
   Premium German Law Firm — Cryptocurrency Fraud Specialist
   Custom Styles complementing Tailwind CSS
   ========================================================================== */

/* ========================================================================== 
   Local Fonts
   ========================================================================== */
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-300.woff2') format('woff2');
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-400.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-500.woff2') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-600.woff2') format('woff2');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-700.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('../assets/fonts/playfair-display-400.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('../assets/fonts/playfair-display-500.woff2') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('../assets/fonts/playfair-display-600.woff2') format('woff2');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('../assets/fonts/playfair-display-700.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('../assets/fonts/playfair-display-800.woff2') format('woff2');
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

/* ==========================================================================
   Base & Typography
   ========================================================================== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #111827;
  background-color: #F8FAFC;
}

.font-display {
  font-family: 'Playfair Display', serif;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Scroll Progress Indicator
   ========================================================================== */
#scroll-progress {
  transition: width 0.1s ease-out;
  background: linear-gradient(90deg, #C89B3C, #D9B066);
  box-shadow: 0 0 10px rgba(200, 155, 60, 0.4);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
#navbar {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px -10px rgba(11, 31, 58, 0.1);
}

/* Mobile Hamburger Animation */
.hamburger-line {
  transition: all 0.3s ease;
  transform-origin: center;
}

#mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

#mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

#mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Active Nav Link */
.nav-link.active {
  color: #C89B3C;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background-color: #C89B3C;
  border-radius: 50%;
}

.nav-link {
  position: relative;
  padding-bottom: 4px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
#attorney-video {
  object-fit: cover;
  transition: transform 0.8s ease;
}

#attorney-video:hover {
  transform: scale(1.02);
}

/* Video Overlay Text Rotation */
#video-overlay-text {
  transition: opacity 0.6s ease-in-out;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.video-dot {
  transition: all 0.4s ease;
}

.video-dot.active {
  background-color: #C89B3C;
  width: 24px;
  border-radius: 9999px;
}

/* ==========================================================================
   Service Cards
   ========================================================================== */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #C89B3C, #D9B066);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* ==========================================================================
   Scam Type Cards
   ========================================================================== */
.scam-card {
  transition: all 0.3s ease;
}

.scam-card:hover {
  transform: translateY(-4px);
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-item.active .faq-content {
  display: block;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Form Inputs
   ========================================================================== */
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

.form-error {
  display: none;
}

.form-error.visible {
  display: block;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Invalid Input State */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast {
  animation: slideInRight 0.4s ease-out forwards;
  min-width: 300px;
  max-width: 420px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toast.toast-success {
  background-color: rgba(255, 255, 255, 0.95);
  border-left: 4px solid #10b981;
}

.toast.toast-error {
  background-color: rgba(255, 255, 255, 0.95);
  border-left: 4px solid #ef4444;
}

.toast.toast-info {
  background-color: rgba(255, 255, 255, 0.95);
  border-left: 4px solid #C89B3C;
}

.toast.fade-out {
  animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ==========================================================================
   Contact Layout & Mobile Shortcut
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
}

.contact-form {
  min-width: 0;
  align-self: start;
  scroll-margin-top: 6rem;
}

.mobile-contact-bar {
  display: none;
}

@media (min-width: 1024px) {
  .contact-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto 1fr;
    grid-template-areas: 'intro form' 'details form';
    gap: 0 4rem;
  }

  .contact-intro { grid-area: intro; }
  .contact-form { grid-area: form; }
  .contact-details { grid-area: details; }
}

@media (max-width: 1023px) {
  .has-mobile-contact {
    --mobile-contact-bar-height: calc(4.5rem + 1px + env(safe-area-inset-bottom, 0px));
    /* Keep this space reserved even when the bar hides to avoid scroll jumps. */
    padding-bottom: var(--mobile-contact-bar-height);
  }

  .contact-intro > p {
    margin-bottom: 0;
  }

  .mobile-contact-bar:not([hidden]) {
    display: block;
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    padding: 0.75rem max(1rem, env(safe-area-inset-right, 0px))
      calc(0.75rem + env(safe-area-inset-bottom, 0px))
      max(1rem, env(safe-area-inset-left, 0px));
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -8px 24px rgba(11, 31, 58, 0.08);
  }

  .mobile-contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    background: #0B1F3A;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
  }

  .mobile-contact-link:hover {
    background: #071427;
  }

  .mobile-contact-link svg {
    flex-shrink: 0;
  }

  .has-mobile-contact #back-to-top {
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .has-mobile-contact.mobile-contact-visible #back-to-top {
    bottom: calc(var(--mobile-contact-bar-height) + 1rem);
  }
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */
#back-to-top {
  transition: all 0.3s ease;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Scroll Reveal Animations
   ========================================================================== */
.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal {
  transform: translateY(40px);
}

.reveal-left {
  transform: translateX(-40px);
}

.reveal-right {
  transform: translateX(40px);
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Stagger children */
.reveal-parent .reveal-child {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: translateY(20px);
}

.reveal-parent.visible .reveal-child {
  opacity: 1;
  transform: translateY(0);
}

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

  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }

  #attorney-video {
    display: none;
  }
}

/* ==========================================================================
   Focus States (Accessibility)
   ========================================================================== */
*:focus-visible {
  outline: 2px solid #C89B3C;
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ==========================================================================
   Selection Color
   ========================================================================== */
::selection {
  background-color: #C89B3C;
  color: white;
}

::-moz-selection {
  background-color: #C89B3C;
  color: white;
}

/* ==========================================================================
   Scrollbar (Webkit)
   ========================================================================== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #F8FAFC;
}

::-webkit-scrollbar-thumb {
  background: #0B1F3A;
  border-radius: 5px;
  border: 2px solid #F8FAFC;
}

::-webkit-scrollbar-thumb:hover {
  background: #C89B3C;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 640px) {
  #back-to-top {
    bottom: 6rem;
    right: 1.5rem;
  }

  #toast-container {
    right: 1rem;
    left: 1rem;
  }

  .toast {
    min-width: auto;
    width: 100%;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  #navbar,
  #mobile-contact-bar,
  #back-to-top,
  #toast-container,
  #scroll-progress {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  body.has-mobile-contact {
    padding-bottom: 0;
  }
}
