/**
 * Jaunt Studio - Shared Components
 * Header, footer, buttons, cards, FAQ accordion, dark sections
 */

/* ===========================
   HEADER
   =========================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 40px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.header.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.header.visible .hamburger-line {
  background: #000;
}

.logo {
  font-family: var(--font-primary);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: #000;
  transition: color var(--transition-fast);
}

.logo:hover {
  color: var(--color-orange);
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.nav a {
  text-decoration: none;
  color: #000;
  transition: opacity var(--transition-fast);
}

.nav a:hover {
  opacity: 0.6;
}

.nav a[aria-current="page"] {
  color: var(--color-orange);
}

.nav-separator {
  color: #000;
  opacity: 0.3;
}

/* Nav CTA button (Free Audit) */
.nav-cta {
  background: var(--color-orange);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 13px;
  opacity: 1 !important;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.nav-cta:hover {
  background: #d94d1a;
  transform: scale(1.03);
  opacity: 1 !important;
}

/* Services Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #000;
  transition: opacity var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-primary);
  font-size: 14px;
  padding: 0;
}

.nav-dropdown-toggle:hover {
  opacity: 0.6;
}

.nav-dropdown-toggle svg {
  width: 10px;
  height: 10px;
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle svg,
.nav-dropdown.active .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 8px;
  padding: 8px 0;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: #000;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-menu a:hover {
  background: var(--color-offwhite);
  color: var(--color-orange);
  opacity: 1;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background: #000;
  transition: all 0.3s var(--ease-smooth);
  border-radius: 2px;
}

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

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

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

/* ===========================
   FOOTER
   =========================== */

.footer {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 40px 40px;
  z-index: 2;
  animation: footer-gradient-shift 3s linear infinite alternate;
  background: linear-gradient(
    135deg in oklch,
    var(--gradient-color-1),
    var(--gradient-color-2)
  );
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.5' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: overlay;
}

@keyframes footer-gradient-shift {
  to {
    --gradient-color-1: hsl(226, 59%, 30%);
    --gradient-color-2: hsl(14, 92%, 64%);
  }
}

.footer-header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  z-index: 1;
}

.footer-hero-text {
  font-family: var(--font-primary);
  font-size: clamp(24px, 4.5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: #fff;
  margin: 0 0 24px 0;
}

.footer-tech-label {
  font-family: var(--font-primary);
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 400;
  line-height: 1.4;
  color: #fff;
  opacity: 0.85;
  margin: 0;
  max-width: 500px;
}

/* Footer Navigation Columns */
.footer-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1200px;
  width: 100%;
  margin-bottom: 60px;
  position: relative;
  z-index: 1;
}

.footer-nav-column h4 {
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 16px 0;
}

.footer-nav-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav-column li {
  margin-bottom: 8px;
}

.footer-nav-column a {
  font-size: 14px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition-fast);
}

.footer-nav-column a:hover {
  color: #fff;
}

/* Footer Bottom */
.footer-content {
  max-width: 1200px;
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  position: relative;
  z-index: 1;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-contact {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
}

.footer-contact a {
  font-size: 14px;
  text-decoration: none;
  color: #fff;
  transition: color var(--transition-fast);
  position: relative;
}

.footer-contact a:hover {
  color: var(--color-orange);
}

.footer-credits {
  font-size: 14px;
  color: #fff;
  opacity: 0.6;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
  justify-content: flex-end;
}

/* ===========================
   CTA BUTTONS
   =========================== */

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  min-height: 48px;
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: #000;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.cta-button:hover {
  background: var(--color-orange);
  transform: scale(1.02);
}

.cta-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  min-height: 48px;
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: #000;
  background: transparent;
  border: 2px solid #000;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cta-button-secondary:hover {
  background: #000;
  color: #fff;
  transform: scale(1.02);
}

/* White variant for dark sections — standalone (no .cta-button base required) */
.cta-button-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  min-height: 48px;
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  background: #fff;
  color: #000;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.cta-button-white:hover {
  background: var(--color-orange);
  color: #fff;
  transform: scale(1.02);
}

.cta-button-secondary-white {
  color: #fff;
  border-color: #fff;
}

.cta-button-secondary-white:hover {
  background: #fff;
  color: #000;
}

/* ===========================
   DARK SECTIONS
   =========================== */

.section-dark {
  background: var(--color-dark);
  color: #fff;
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: #fff;
}

.section-dark p {
  color: rgba(255, 255, 255, 0.8);
}

/* ===========================
   CTA SECTION (shared)
   =========================== */

.cta-section {
  padding: 120px 40px;
  text-align: center;
}

.cta-section.section-dark {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a2e 100%);
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.cta-title {
  font-family: var(--font-primary);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 24px 0;
}

.cta-text {
  font-family: var(--font-primary);
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 400;
  line-height: 1.6;
  margin: 0 0 40px 0;
}

/* ===========================
   FAQ ACCORDION
   =========================== */

.faq-section {
  padding: 120px 40px;
}

.faq-title {
  font-family: var(--font-primary);
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 64px 0;
  text-align: center;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 700;
  color: inherit;
  text-align: left;
  gap: 24px;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--color-orange);
}

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  position: relative;
  transition: transform 0.3s ease;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 2px;
}

.faq-icon::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
}

.faq-icon::after {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.faq-item.active .faq-icon::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 24px;
}

.faq-answer p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-light);
}

/* Dark section FAQ */
.section-dark .faq-item {
  border-color: rgba(255, 255, 255, 0.15);
}

.section-dark .faq-question {
  color: #fff;
}

.section-dark .faq-answer p {
  color: rgba(255, 255, 255, 0.7);
}

/* ===========================
   BREADCRUMBS
   =========================== */

.breadcrumb {
  padding: 16px 40px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--color-orange);
}

.breadcrumb-separator {
  margin: 0 8px;
  opacity: 0.5;
}

/* ===========================
   ENHANCED FOCUS STATES
   =========================== */

.cta-button:focus-visible,
.form-submit:focus-visible {
  outline: 4px solid var(--color-orange);
  outline-offset: 4px;
  box-shadow: 0 0 0 8px rgba(240, 90, 34, 0.2);
}

.nav a:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 4px;
  border-radius: 4px;
  background: rgba(240, 90, 34, 0.1);
}

.scroll-button:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 6px;
  border-radius: 50%;
}

.mobile-menu-toggle:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 4px;
  border-radius: 4px;
}

.form-input:focus-visible,
.form-textarea:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
  border-bottom-color: var(--color-orange);
}

/* ===========================
   RESPONSIVE - COMPONENTS
   =========================== */

@media (max-width: 1024px) {
  .header {
    padding: 24px 32px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 20px 24px;
  }

  .logo {
    font-size: 18px;
    z-index: 102;
    position: relative;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  /* Nav dropdown hidden on mobile - shows in mobile menu */
  .nav-dropdown-menu {
    display: none;
  }

  .nav-dropdown-toggle svg {
    display: none;
  }

  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-smooth);
    z-index: 100;
  }

  .nav.active {
    transform: translateX(0);
  }

  .nav a,
  .nav-dropdown-toggle {
    font-size: 32px;
    font-weight: 700;
    padding: 16px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .nav-cta {
    font-size: 18px;
    padding: 14px 32px;
    margin-top: 8px;
  }

  .nav-separator {
    display: none;
  }

  /* Footer */
  .footer {
    padding: 60px 24px 40px;
  }

  .footer-hero-text {
    font-size: clamp(32px, 8vw, 56px);
    margin-bottom: 60px;
  }

  .footer-header {
    margin-bottom: 40px;
  }

  .footer-nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .footer-credits {
    text-align: left;
    font-size: 12px;
  }

  .footer-contact {
    gap: 10px;
  }

  .footer-contact a {
    font-size: 16px;
    padding: 12px 0;
    min-height: 44px;
    display: inline-block;
  }

  /* CTA section */
  .cta-section {
    padding: 100px 24px;
  }

  /* Buttons */
  .cta-button,
  .cta-button-secondary {
    width: 100%;
    max-width: 320px;
  }

  /* FAQ */
  .faq-section {
    padding: 80px 24px;
  }

  .faq-title {
    margin-bottom: 48px;
  }

  .faq-question {
    font-size: 16px;
    padding: 20px 0;
  }

  /* Breadcrumb */
  .breadcrumb {
    padding: 12px 24px;
  }
}

@media (max-width: 480px) {
  .nav a,
  .nav-dropdown-toggle {
    font-size: 28px;
  }

  .footer {
    padding: 50px 20px 30px;
  }

  .footer-hero-text {
    font-size: clamp(28px, 9vw, 48px);
    margin-bottom: 50px;
  }

  .footer-nav {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
