/* Dautomation AI - Shared Stylesheet */

/* ----------------------------------------------------------------------------
   1. Base
---------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #111111;
  animation: pageFadeIn 0.4s ease-in;
}

body.page-exit {
  animation: pageFadeOut 0.3s ease-out forwards;
}

/* ----------------------------------------------------------------------------
   2. Accessibility helpers
---------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #1E3A8A;
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1001;
  border-radius: 0 0 6px 0;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Adaptive focus ring — uses currentColor so it stays visible on both the dark
   header (white text) and light page backgrounds (dark/blue text). */
:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ----------------------------------------------------------------------------
   3. Header / navigation
---------------------------------------------------------------------------- */
header {
  background: #1E3A8A;
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo span {
  font-size: 1.4rem;
  font-weight: bold;
  color: white;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
}

.nav-links a:hover {
  border-bottom: 2px solid rgba(255,255,255,0.5);
  padding-bottom: 2px;
}

.nav-links a.active {
  border-bottom: 2px solid rgba(255,255,255,0.8);
  padding-bottom: 2px;
}

/* Hamburger — now a real <button>, so reset native button styling */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

.menu-toggle span {
  background: white;
  height: 3px;
  width: 25px;
  margin: 4px 0;
  display: block;
}

/* ----------------------------------------------------------------------------
   4. Hero
---------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  overflow: hidden;
  height: 50vh;
}

.hero--home {
  height: 100vh;
}

/* Background image layer — JS moves top for parallax, CSS animates scale for Ken Burns */
.hero-bg {
  position: absolute;
  top: 0;
  left: -5%;
  width: 110%;
  height: 110%;
  background: url('hero-bg.jpg') center center/cover no-repeat;
  z-index: 0;
  animation: heroBgZoom 20s ease-in-out infinite alternate;
}

/* Dark overlay */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero h1,
.hero p,
.hero .btn {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 2.5rem;
  margin: 0;
}

.hero--home h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ----------------------------------------------------------------------------
   5. Buttons
---------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  background: #2563EB;          /* darkened from #3B82F6 for WCAG AA contrast */
  color: #ffffff;
  padding: 0.9rem 2.5rem;
  text-decoration: none;
  border: 0;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #1D4ED8;
}

.btn--lg {
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.95rem;
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
}

.btn--ghost:hover {
  background: rgba(255,255,255,0.12);
}

/* ----------------------------------------------------------------------------
   6. Home page layout
---------------------------------------------------------------------------- */
.main--home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.main--home > section {
  margin-bottom: 6rem;
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #1E3A8A;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  width: 60px;
  height: 3px;
  background: #3B82F6;
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
}

.section-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.intro-copy {
  max-width: 760px;
  margin: 2.5rem auto 0;
  text-align: left;
  font-size: 1.125rem;
  line-height: 1.8;
  color: #333;
}

.intro-copy p {
  margin: 0 0 1.25rem;
}

.intro-copy p:last-child {
  margin-bottom: 0;
}

.card {
  background: #f8f8f8;
  padding: 2rem;
  border-radius: 8px;
  flex: 1 1 300px;
  max-width: 350px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  background: #ffffff;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1E3A8A;
}

.card h3 a {
  color: #1E3A8A;
  text-decoration: none;
}

.card p {
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
}

/* Contact form: mask the HubSpot free-tier branding below the embedded form */
.hs-form-wrap {
  position: relative;
}

.hs-form-wrap__mask {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: #ffffff;
  z-index: 10;
  pointer-events: none;
}

/* ----------------------------------------------------------------------------
   7. Inner page layout
---------------------------------------------------------------------------- */
.main--page {
  max-width: 960px;
  margin: 4rem auto;
  padding: 0 2rem;
  line-height: 1.8;
  font-size: 1.125rem;
}

.info-card {
  margin-top: 4rem;
  padding: 2rem;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-card h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #1E3A8A;
}

.info-card h3 {
  color: #1E3A8A;
  margin-top: 2.5rem;
}

.media-section {
  text-align: center;
  margin-top: 4rem;
}

.media-section img,
.media-section figure {
  max-width: 100%;
  height: auto;
  margin: 0;
}

.media-section figcaption {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: #555;
}

/* Call-to-action band */
.cta-band {
  text-align: center;
  padding: 3rem 2rem;
  background: #EFF6FF;
}

.cta-band h2 {
  color: #1E3A8A;
  margin-bottom: 1rem;
}

.cta-band p {
  color: #333;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* ----------------------------------------------------------------------------
   8. 404 page
---------------------------------------------------------------------------- */
.main--error {
  max-width: 960px;
  margin: 4rem auto;
  padding: 0 2rem;
  text-align: center;
}

.error-code {
  font-size: 6rem;
  font-weight: 700;
  color: #1E3A8A;
  line-height: 1;
  margin-bottom: 1rem;
}

.error-message {
  font-size: 1.25rem;
  color: #333;
  margin-bottom: 2rem;
}

/* ----------------------------------------------------------------------------
   9. Footer
---------------------------------------------------------------------------- */
.site-footer {
  background: #222222;
  color: white;
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.9rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-nav a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
}

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

/* "Cookie Preferences" control (injected into the footer by scripts.js) */
.footer-cookie-btn {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
}

.footer-cookie-btn:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ----------------------------------------------------------------------------
   10. Back-to-top button
---------------------------------------------------------------------------- */
.back-to-top {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1E3A8A;
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.back-to-top.show {
  display: flex;
}

/* ----------------------------------------------------------------------------
   11. Cookie consent banner
---------------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1E3A8A;
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.25);
}

.cookie-banner__text {
  margin: 0;
  font-size: 0.95rem;
  max-width: 720px;
}

.cookie-banner__text a {
  color: #BFDBFE;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
}

/* ----------------------------------------------------------------------------
   12. Animations
---------------------------------------------------------------------------- */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pageFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroBgZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.12); }
}

.hero h1 { animation: heroFadeUp 0.7s ease-out 0.2s both; }
.hero p  { animation: heroFadeUp 0.7s ease-out 0.4s both; }
.hero .btn { animation: heroFadeUp 0.7s ease-out 0.6s both; }

/* Scroll fade-in sections — only hidden when JS is available (progressive
   enhancement), so no-JS visitors still see all content. */
.js .fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ----------------------------------------------------------------------------
   13. Reduced motion — respect the user's OS setting
---------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto !important; }
  .hero-bg { animation: none !important; }
  .js .fade-in-section { opacity: 1 !important; transform: none !important; }
}

/* ----------------------------------------------------------------------------
   14. Mobile
---------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .hero--home h1 { font-size: 2.2rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .btn--lg { padding: 0.8rem 2rem; font-size: 1rem; }
  .section-content { flex-direction: column; align-items: center; }
  .error-code { font-size: 4rem; }

  .nav-links {
    display: none;
    flex-direction: column;
    background: #1E3A8A;
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    transform: none;
    width: 200px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    z-index: 99;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.15);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    display: block;
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
    border-radius: 0;
    transition: background 0.2s ease;
  }

  .nav-links li a:hover {
    background: rgba(255,255,255,0.12);
    border-bottom: none;
    padding-bottom: 0;
  }

  .nav-links li a.active {
    background: rgba(255,255,255,0.2);
    border-bottom: none;
    padding-bottom: 0;
    font-weight: 700;
  }

  .nav-links.show {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 0.75rem;
  }

  .cookie-banner__actions {
    justify-content: center;
  }
}
