/*
  Global styles for the Underwater Marketing landing page.
  This stylesheet uses CSS variables to define a simple colour palette
  inspired by aquatic hues. Layouts are built with flexbox and grid to
  provide responsive design without relying on external frameworks.
*/

:root {
  --primary-color: #023e8a; /* dark navy for headers and footer */
  --accent-color: #00b4d8; /* bright aqua used for highlights */
  --background-color: #f0f8ff; /* very light blue page background */
  --section-background: #ffffff; /* white cards and panels */
  --text-color: #0a2540; /* dark blue-grey for primary text */
  --muted-color: #6b8ba4; /* muted text for subtitles */
  --header-height: 60px;
  --border-radius: 0.5rem;
  --container-width: 1100px;
  --transition-duration: 0.3s;
  --easing: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  scroll-behavior: smooth;
  /* Increase base font size and line height for better readability */
  font-size: 1.05rem;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

ul {
  list-style: none;
}

.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--section-background);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  color: var(--primary-color);
}
.logo-image {
  /* Make the logo more prominent by increasing its size */
  width: 48px;
  height: auto;
}
.logo-text {
  /* Increase logo text size for better balance with the larger icon */
  font-size: 1.3rem;
  font-weight: 600;
}
.nav ul {
  display: flex;
  gap: 2rem;
}
.nav a {
  color: var(--text-color);
  font-weight: 500;
  transition: color var(--transition-duration) var(--easing);
}
.nav a:hover,
.nav a:focus {
  color: var(--accent-color);
}
/* Hamburger menu hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  border: none;
  background: none;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px;
  transition: transform var(--transition-duration) var(--easing);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  background-image: url('hero-bg.png');
  background-size: cover;
  background-position: center;
  /* Create a subtle parallax effect on desktop by fixing the background */
  background-attachment: fixed;
  display: flex;
  align-items: center;
  color: #ffffff;
  text-align: center;
}
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Slightly lighten the overlay to improve contrast with larger fonts */
  background: rgba(2, 62, 138, 0.45);
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.hero h1 {
  /* Enlarge the hero heading for greater impact */
  font-size: 3rem;
  margin-bottom: 1.2rem;
}
.hero .highlight {
  color: var(--accent-color);
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  background-color: var(--accent-color);
  color: #ffffff;
  font-weight: 600;
  transition: background-color var(--transition-duration) var(--easing);
}
.btn:hover,
.btn:focus {
  background-color: #009dd0;
}
.secondary-btn {
  background-color: var(--primary-color);
}
.secondary-btn:hover,
.secondary-btn:focus {
  background-color: #012a63;
}

/* Sections */
.section {
  padding: 4rem 0 3rem;
}
.section h2 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 0.6rem;
  text-align: center;
}
.section-subtitle {
  text-align: center;
  color: var(--muted-color);
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.feature-card {
  background-color: var(--section-background);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
  /* Add smooth scaling and shadow transitions to make cards pop on hover */
  transition: transform var(--transition-duration) var(--easing),
    box-shadow var(--transition-duration) var(--easing);
}
.feature-card:hover {
  /* On hover, raise and slightly scale the card and deepen the shadow */
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}
.feature-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}
.feature-card p {
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.6;
}

/* Automation Demo */
.automation-demo {
  background-color: var(--section-background);
}
.automation-content {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}
.automation-image {
  max-width: 800px;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Resources Section */
.resources {
  background-color: var(--section-background);
}
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.resource-card {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  transition: transform var(--transition-duration) var(--easing),
    box-shadow var(--transition-duration) var(--easing);
  display: block;
}
.resource-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}
.resource-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}
.resource-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-color);
}

/* Steps for AI workflow */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.step {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  transition: transform var(--transition-duration) var(--easing),
    box-shadow var(--transition-duration) var(--easing);
}
.step:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}
.step-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}
.step h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}
.step p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
}

/* Done-For-You Service */
.done-for-you {
  background-color: var(--section-background);
}
.dfy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.dfy-item {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  text-align: center;
  transition: transform var(--transition-duration) var(--easing),
    box-shadow var(--transition-duration) var(--easing);
}
.dfy-item:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}
.dfy-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}
.dfy-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}
.dfy-item p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
}

/* Case Study */
.case-study {
  background-color: var(--section-background);
  position: relative;
  overflow: hidden;
}
.wave-divider {
  display: block;
  width: 100%;
  margin-bottom: -1px;
}
.case-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}
.case-text {
  max-width: 600px;
  text-align: left;
}
.case-text h2 {
  text-align: left;
}
.case-text p {
  margin: 1rem 0 2rem;
  font-size: 1rem;
  line-height: 1.5;
}
.stats-row {
  display: grid;
  /* Allow the stats row to adapt to the number of items. Each item will
     take a minimum width and wrap automatically on smaller screens. */
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.stat-item {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--muted-color);
}
.case-image {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 300px;
}
.pattern-box {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('hero-bg.png');
  background-size: cover;
  background-position: center;
  border-radius: var(--border-radius);
  filter: brightness(1.1) saturate(1.2);
}
.case-logo {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--primary-color);
  font-weight: 600;
}
.dorado-logo {
  /* Scale down the Dorado logo to fit nicely within the case study card */
  width: 72px;
  height: auto;
}
.case-logo span {
  font-size: 1rem;
  color: var(--primary-color);
}

/* When displaying the Dorado logo as a full image in the case study */
.case-logo-full {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Testimonials */
.testimonials {
  background-color: var(--section-background);
}
.testimonial-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.testimonial-item {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
.testimonial-item .quote {
  font-style: italic;
  margin-bottom: 1rem;
}
.testimonial-item .author {
  font-weight: 600;
  color: var(--primary-color);
}

/* FAQ */
.faq {
  background-color: var(--section-background);
}
.accordion details {
  border-bottom: 1px solid #e1ecf4;
  padding: 1rem 0;
}
.accordion summary {
  font-weight: 600;
  cursor: pointer;
  position: relative;
}
.accordion summary::-webkit-details-marker {
  display: none;
}
.accordion summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.25rem;
  color: var(--accent-color);
  transition: transform var(--transition-duration) var(--easing);
}
.accordion details[open] summary::after {
  transform: rotate(45deg);
}
.accordion p {
  margin-top: 0.75rem;
  color: var(--text-color);
  line-height: 1.5;
}

/* Contact */
.contact {
  background-color: var(--section-background);
}
.contact-form {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-row {
  display: flex;
  gap: 1rem;
}
.form-row input {
  flex: 1;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #c9d6e8;
  border-radius: var(--border-radius);
  font-size: 1rem;
  color: var(--text-color);
  background-color: #fff;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.3);
}
.contact-form button {
  align-self: flex-start;
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 1.5rem 0;
}
/* Footer grid layout */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}
.footer-brand p {
  margin: 0;
}
.footer-column h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}
.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-column ul li {
  margin-bottom: 0.3rem;
  color: #ffffff;
  font-size: 0.9rem;
}
.footer-column ul li a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity var(--transition-duration) var(--easing);
}
.footer-column ul li a:hover {
  opacity: 0.8;
}
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
.social-icons img {
  width: 24px;
  height: 24px;
  display: inline-block;
}

/* Fade up animation */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (min-width: 768px) {
  .nav ul {
    gap: 1.5rem;
  }
  .case-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .case-text {
    flex: 1 1 50%;
  }
  .case-image {
    flex: 1 1 40%;
  }
  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }
  /* On larger screens, arrange footer columns horizontally */
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
    text-align: left;
    align-items: flex-start;
  }
  .footer-brand {
    grid-column: span 1;
  }
}

@media (max-width: 767px) {
  .nav {
    position: absolute;
    top: var(--header-height);
    right: 0;
    background-color: var(--section-background);
    width: 200px;
    max-height: 0;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: max-height var(--transition-duration) var(--easing);
  }
  .nav.open {
    max-height: 300px;
  }
  .nav ul {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  .hamburger {
    display: flex;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .testimonials .testimonial-list {
    grid-template-columns: 1fr;
  }
  .case-text {
    text-align: center;
  }
  .case-text h2 {
    text-align: center;
  }
}