/*
 * Coastal Consulting Website Styles
 *
 * The following stylesheet governs the look and feel of the Coastal
 * Consulting website. Inspired by current trends in AI/tech design
 * noted in industry articles, it blends a modern dark theme with
 * calming teal accents and clean typography. Sections are modular
 * and responsive, scaling elegantly from large desktop screens to
 * mobile devices. Variables defined on :root enable quick theme
 * adjustments while maintaining consistency across the site.
 */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #0a192f;
  color: #e3e8ef;
  line-height: 1.6;
}

/* Theme variables */
:root {
  --primary-color: #004d64;       /* dark teal from logo */
  --secondary-color: #00a8b5;     /* bright turquoise accent */
  --light-bg: #112e42;            /* slightly lighter section background */
  --highlight-color: #21b6ff;     /* highlight for interactive elements */
  --max-width: 1200px;
  --header-height: 72px;
  --transition-speed: 0.3s;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--highlight-color);
}

/* Header / Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(10, 25, 47, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
}

.nav-container {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

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

.brand img {
  width: 42px;
  height: 42px;
  /* Invert logo colors for dark header backgrounds to improve contrast */
  filter: brightness(0) invert(1);
}

.brand span {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

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

.nav-links li a {
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 0.25rem 0;
  position: relative;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width var(--transition-speed);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform var(--transition-speed);
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--header-height);
    right: -260px;
    width: 240px;
    height: calc(100% - var(--header-height));
    flex-direction: column;
    background: #0a192f;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    box-shadow: -3px 0 8px rgba(0,0,0,0.5);
    transition: right var(--transition-speed);
  }
  .nav-links.open {
    right: 0;
  }
  .nav-toggle {
    display: flex;
  }
}

/* Utility classes */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

.section-title span {
  color: var(--secondary-color);
}

/* Hero Section */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0,77,100,0.8), rgba(0,20,40,0.8)),
              url('../images/ai_hero.png') center/cover no-repeat;
}

.hero-content {
  max-width: 700px;
  padding: 0 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #d1d8e0;
}

.btn-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-speed), color var(--transition-speed);
}

.btn-primary {
  background: var(--secondary-color);
  color: #0a192f;
}

.btn-primary:hover {
  background: var(--highlight-color);
  color: #0a192f;
}

.btn-outline {
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
}

.btn-outline:hover {
  background: var(--secondary-color);
  color: #0a192f;
}

/* About Preview (on home) */
.about-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.about-preview .text {
  flex: 1 1 400px;
}

.about-preview .text h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.about-preview .text p {
  margin-bottom: 1rem;
  color: #cbd5e0;
  font-size: 1rem;
}

.about-preview .image {
  flex: 1 1 380px;
  text-align: center;
}

.about-preview img {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

/* Services section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--light-bg);
  padding: 2rem 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.5);
}

.service-card .icon {
  font-size: 2.8rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.service-card p {
  font-size: 0.95rem;
  color: #b5c3d6;
}

/* Trust & Metrics */
.trust {
  background: #0d2339;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.trust-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 3rem;
}

.trust-logos img {
  max-width: 120px;
  opacity: 0.7;
  filter: grayscale(100%);
  transition: opacity var(--transition-speed), filter var(--transition-speed);
}

.trust-logos img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* Logo boxes for trust section when using text instead of images */
.trust-logos .logo-box {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 1rem;
  min-width: 140px;
  text-align: center;
  transition: background var(--transition-speed), color var(--transition-speed);
}

.trust-logos .logo-box:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--highlight-color);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
}

.metric span {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.metric p {
  font-size: 1rem;
  color: #b5c3d6;
}

/* Insights / Blog */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.insight-card {
  background: var(--light-bg);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.insight-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.insight-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.insight-card p {
  font-size: 0.9rem;
  color: #a8b9cf;
  margin-bottom: 1rem;
}

.insight-card .read-more {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--secondary-color);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--transition-speed);
}

.insight-card .read-more i {
  font-size: 0.9rem;
}

.insight-card .read-more:hover {
  color: var(--highlight-color);
}

/* Newsletter */
.newsletter {
  background: #0d2339;
  padding: 3rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.newsletter form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.newsletter input[type="email"] {
  flex: 1 1 250px;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  border: none;
  outline: none;
  background: var(--light-bg);
  color: #ffffff;
}

.newsletter button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  background: var(--secondary-color);
  color: #0a192f;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-speed);
}

.newsletter button:hover {
  background: var(--highlight-color);
}

/* About page specific */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.team-member {
  background: var(--light-bg);
  padding: 2rem 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.team-member:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.team-member img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid var(--secondary-color);
}

.team-member h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: #ffffff;
}

.team-member p {
  font-size: 0.9rem;
  color: #b5c3d6;
}

/* Contact page */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: flex-start;
}

.contact-info {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: 8px;
}

.contact-info h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: #ffffff;
}

.contact-info p {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: #a8b9cf;
}

.contact-info .info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.contact-info .info-item i {
  font-size: 1.2rem;
  color: var(--secondary-color);
}

.contact-form {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: 8px;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 4px;
  background: #0f2941;
  color: #ffffff;
  resize: none;
}

.contact-form button {
  align-self: flex-start;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  background: var(--secondary-color);
  color: #0a192f;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-speed);
}

.contact-form button:hover {
  background: var(--highlight-color);
}

/* Footer */
footer {
  background: #091929;
  color: #a8b9cf;
  padding: 3rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo img {
  width: 36px;
  height: 36px;
  /* Invert colors for the dark footer */
  filter: brightness(0) invert(1);
}

.footer-logo span {
  font-size: 1.4rem;
  font-weight: 600;
  color: #ffffff;
}

.footer-links ul {
  list-style: none;
  line-height: 1.8;
}

.footer-links a {
  color: #a8b9cf;
  transition: color var(--transition-speed);
}

.footer-links a:hover {
  color: var(--secondary-color);
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icons a {
  color: var(--secondary-color);
  font-size: 1.4rem;
  transition: color var(--transition-speed);
}

.social-icons a:hover {
  color: var(--highlight-color);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .about-preview {
    flex-direction: column;
  }
}