/*============================================================
  AlchemyLogic Consulting - styles.css (index page + shared)
============================================================*/

/*===============================
  Root + Global Reset Overrides
================================*/
/* Design Tokens - Dark Mode Default */
:root {
  /* Colors (Dark Theme Only) */
  --color-primary: #0F172A; /* Slate 900 */
  --color-secondary: #1E293B; /* Slate 800 */
  --color-accent: #3B82F6; /* Blue 500 */
  --color-success: #10B981; /* Emerald 500 */
  --color-bg: #0B1220; /* Slate 950 */
  --color-surface: #0F172A; /* Slate 900 */
  --color-text: #FFFFFF; /* Updated for stronger contrast */
  --color-text-light: #E5E7EB; /* Updated for readability */
  --color-border: #1F2937; /* Slate 800 */
  --color-hover-bg: #111827; /* Slate 900 */
  --color-white: #FFFFFF;
  --color-black: #0B1220;
  --color-dark: #0F172A;
  --color-light: #E2E8F0;
  --color-medium: #E5E7EB; /* Lightened for readability */
  /* Updated secondary accent (replaces old gold) */
  --color-gold: #22D3EE; /* Cyan 400 */
  --color-gold-hover: #06B6D4; /* Cyan 500 */
  --color-accent-hover: #2563EB; /* Blue 600 */
  --gradient-accent: linear-gradient(90deg, #3B82F6 0%, #10B981 100%);

  /* Typography */
  --font-heading: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-subheading: 'Inter', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgba(2, 6, 23, 0.3);
  --shadow: 0 4px 10px rgba(2, 6, 23, 0.4);
  --shadow-md: 0 10px 25px rgba(2, 6, 23, 0.5);
  --shadow-lg: 0 20px 40px rgba(2, 6, 23, 0.55);

  /* Motion */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --max-width: 1200px;
  --header-height: 72px;
  --container-padding: 1.25rem;
}

/* Modern CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

/* Lock scroll when mobile nav is open */
.nav-open {
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1.5rem;
  color: var(--color-text-light);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: var(--transition-fast);
}

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

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section-spacer {
  height: 2rem;
}

@media (max-width: 768px) {
  .section-spacer {
    height: 1.5rem;
  }
}

.section-padding {
  padding: 3rem 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 2rem 0;
  }
}

/* Section Title */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient-accent);
  margin: 1rem auto 0;
}

/* Subsection headers (Services page subsections) */
.service-subsection-header {
  color: var(--color-white);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  position: relative;
  padding-bottom: 0.4rem;
  margin-top: 1.25rem;
}
.service-subsection-header::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 56px;
  height: 2px;
  background-color: #3B82F6;
  border-radius: 1px;
}

.text-center {
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.25);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-hover-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--color-hover-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--color-bg);
  transition: var(--transition);
  background-color: var(--color-white);
  transition: all var(--transition-normal);
  padding: 1rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background-color: var(--color-bg);
  box-shadow: var(--shadow-sm);
  height: var(--header-height);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--color-accent);
}

.main-nav {
  display: flex;
  align-items: center;
}

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

.nav-link {
  font-weight: 500;
  color: var(--color-text);
  padding: 0.5rem 0;
  position: relative;
  text-decoration: none;
  transition: var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-gold);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  margin: 5px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: white;
  padding: 2rem 0;
  margin: 0;
  overflow: hidden;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
}

.hero-text {
  max-width: 800px;
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.6);
  padding: 2.5rem;
  border-radius: 8px;
  margin: 1rem auto;
  width: 100%;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  color: #ffffff;
  padding: 0 1rem;
}

.hero p,
.hero .subtitle {
  color: #ffffff !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  margin-bottom: 2rem;
}

.hero .subtitle {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .hero {
    min-height: 60vh;
    padding: 1rem 0;
  }
  
  .hero h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }
  
  .hero-text {
    padding: 1.5rem;
    margin: 0.5rem 0;
  }
  
  .hero-content {
    min-height: 50vh;
    padding: 1rem;
  }
  
  .hero p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }
}

.hero .highlight {
  color: var(--color-accent);
}

.hero p {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  max-width: 600px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.95);
}

.subtitle {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero .btn {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-shadow: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero .btn-primary {
  background-color: var(--color-accent);
  color: white;
  border: 2px solid var(--color-accent);
}

.hero .btn-outline {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.hero .btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.hero .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 2.8rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .hero {
    text-align: center;
    min-height: 80vh;
    padding: 6rem 0;
  }
  
  .hero-text {
    margin: 0 auto;
    text-align: center;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .section-spacer {
    height: 4rem;
  }
  
  .section-padding {
    padding: 4rem 0;
  }
}

/* Fade-in Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
  opacity: 0;
}

/* Services Section */
.services {
  background-color: var(--color-bg);
  padding: 6rem 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--color-border);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.service-icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.service-content {
  padding: 2rem;
}

.service-content h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--color-text);
}

.service-content p {
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

/* CTA Section */
.cta {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  color: white;
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjA1KSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3QgZmlsbD0idXJsKCNwYXR0ZXJuKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==');
  opacity: 0.3;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.cta h2 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.cta p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
}

.cta .btn {
  background-color: white;
  color: var(--color-accent);
  font-weight: 700;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  border: none;
}

.cta .btn:hover {
  background-color: var(--color-gold);
  color: white;
}

/* Footer */
.site-footer {
  background-color: #111827;
  color: var(--color-text-light);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.footer-logo span {
  color: var(--color-gold);
}

.footer-about p {
  margin-bottom: 1.5rem;
  color: var(--color-text-light);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-text-light);
  transition: var(--transition);
}

.social-link:hover {
  background-color: var(--color-accent);
  color: white;
}

.footer-heading {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--color-gold);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--color-text-light);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--color-gold);
  transform: translateX(5px);
}

.contact-info {
  list-style: none;
}

.contact-info li {
  display: flex;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.contact-info i {
  color: var(--color-gold);
  margin-right: 1rem;
  margin-top: 0.25rem;
}

.contact-info a {
  color: var(--color-text-light);
  text-decoration: none;
  transition: var(--transition);
}

.contact-info a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 99;
  border: none;
  box-shadow: var(--shadow);
}

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

.back-to-top:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-3px);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  overflow-y: auto;
  padding: 2rem;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: white;
  border-radius: 0.5rem;
  max-width: 600px;
  width: 100%;
  margin: 2rem auto;
  position: relative;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  margin: 0;
  font-size: 1.5rem;
  color: var(--color-text);
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-light);
  transition: var(--transition);
  padding: 0.5rem;
  line-height: 1;
}

.close-modal:hover {
  color: var(--color-text);
}

.modal-body {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-text);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 3rem;
  }
  
  .section {
    padding: 5rem 0;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .menu-toggle {
    display: block;
  }
  
  /* Ensure nav container stays in viewport; dropdown menu handled below */
  .main-nav {
    position: relative;
    right: auto;
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
  
  .nav-list {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .nav-link {
    padding: 0.5rem 0;
    font-size: 1.1rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.125rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-about {
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .footer-heading {
    text-align: center;
  }
  
  .footer-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-links {
    text-align: center;
  }
  
  .footer-links a:hover {
    transform: none;
  }
  
  .contact-info {
    text-align: center;
  }
  
  .contact-info li {
    justify-content: center;
  }
  
  .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: 1rem;
    right: 1rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
  }
  
  .modal-content {
    margin: 1rem;
  }
  
  .modal-header {
    padding: 1rem 1.25rem;
  }
  
  .modal-body {
    padding: 1.5rem 1.25rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions .btn {
    width: 100%;
  }
  /* Further reduce brand text size on very small screens */
  .logo-text {
    font-size: 1.05rem;
    max-width: 65vw;
  }
}

/* Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  margin: 0 auto 0.75em;
  line-height: 1.3;
  color: var(--color-text);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 800px;
  text-align: center;
}

h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

h2:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 2px;
}

h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

h4 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--color-text);
}

h5 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

h6 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-text-light);
}

p, li, td, th, label, input, textarea, select, button {
  text-align: center;
}

p {
  margin: 0 auto 1.5em;
  color: var(--color-text-light);
  max-width: 700px;
  font-size: 1.1rem;
  line-height: 1.8;
  font-weight: 400;
}

.lead {
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: 2rem;
  max-width: 800px;
  font-weight: 400;
}

.text-muted {
  color: var(--color-text-light) !important;
  font-size: 0.95rem;
}

.text-small {
  font-size: 0.9rem;
}

.text-large {
  font-size: 1.25rem;
}

/* Section specific text styles */
.section-header {
  margin-bottom: 3.5rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.section-description {
  font-size: 1.2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* Text utilities */
.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right !important;
}

/* Responsive typography */
@media (max-width: 992px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.6rem; }
  h4 { font-size: 1.35rem; }
  .section-title { font-size: 2.2rem; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.5rem; }
  .section-title { font-size: 2rem; }
  .lead { font-size: 1.2rem; }
}

@media (max-width: 576px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.65rem; }
  h3 { font-size: 1.4rem; }
  .section-title { font-size: 1.75rem; }
  body { font-size: 1rem; }
  p { font-size: 1rem; }
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(90%, 1200px);
  margin-inline: auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header.left-aligned {
  text-align: left;
}

/*===============================
  Buttons & Links
================================*/
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-primary {
  background-color: var(--color-secondary); /* changed bc it's brihgter than the primary button color */
  color: var(--color-white); 
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-secondary);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-white);
}
.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--color-primary);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-black);
}
.btn-accent:hover,
.btn-accent:focus {
  background-color: #d28f03;
  color: var(--color-white);
}

/*===============================
  Header / Navbar
================================*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-white);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: box-shadow var(--transition-fast);
}

.site-header.scrolled {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.75rem;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-light);
  letter-spacing: 0.2px;
}

.main-nav {
  position: relative;
}

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

.main-nav a {
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav .active a {
  color: var(--color-primary);
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle span {
  height: 3px;
  width: 24px;
  background-color: var(--color-dark);
  transition: transform var(--transition-fast);
}

@media (max-width: 768px) {
  .main-nav .nav-list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    flex-direction: column;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .main-nav.open .nav-list {
    display: flex;
  }
  .menu-toggle {
    display: flex;
  }
  /* Prevent long brand text from wrapping and reduce size on mobile */
  .logo-text {
    font-size: 1.2rem;
    white-space: nowrap;
    line-height: 1.1;
    max-width: 70vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/*===============================
  Hero Section
================================*/
.hero {
  padding-block: 4rem 6rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-white);
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-content {
  flex: 1 1 300px;
}

.hero-content h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  color: var(--color-white);
}

.hero-content p {
  font-size: 1.125rem;
  color: var(--color-light);
  margin-bottom: 2rem;
}

.hero-image {
  flex: 1 1 300px;
  text-align: center;
}

.hero-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/*===============================
  Services Overview
================================*/
.services-overview {
  padding-block: 4rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Services CTA Button */
#services-cta {
  display: block;
  margin: 4rem auto 1rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  max-width: max-content;
}

#services-cta:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.service-icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.service-card h3 {
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.read-more {
  font-weight: 600;
  color: var(--color-secondary);
  text-decoration: none;
}
.read-more:hover {
  color: var(--color-primary);
}

/*===============================
  Why Choose Us
================================*/
.why-choose-us {
  background-color: var(--color-light);
  padding-block: 4rem;
}

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

.feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: var(--color-white);
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.feature-icon {
  font-size: 1.75rem;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 4px;
}

.feature-content h3 {
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

/*===============================
  Testimonials (basic static slider)
================================*/
.testimonials {
  padding-block: 4rem;
}

.testimonial-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 2rem;
  padding-bottom: 1rem;
}

.testimonial-slide {
  flex: 0 0 320px;
  background-color: var(--color-white);
  border: 1px solid var(--color-light);
  border-radius: 8px;
  padding: 2rem;
  scroll-snap-align: start;
  position: relative;
}

.testimonial-content {
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--color-medium);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-author h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--color-primary);
}

.testimonial-controls {
  display: none; /* advanced slider JS not yet implemented */
}

/*===============================
  CTA Section
================================*/
.cta-section {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding-block: 3.5rem;
  text-align: center;
}

.cta-content h2 {
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

/*===============================
  Blog Preview
================================*/
.blog-preview {
  padding-block: 4rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.blog-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-light);
  border-radius: 8px;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.blog-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.blog-content {
  padding: 1.25rem 1.5rem 1.75rem;
}

.blog-meta {
  font-size: 0.875rem;
  color: var(--color-medium);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.75rem;
}

.blog-content h3 {
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

/*===============================
  Footer
================================*/
.site-footer {
  background-color: var(--color-dark);
  color: var(--color-light);
  padding-top: 3rem;
  position: relative;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo .logo-text {
  color: var(--color-white);
  font-size: 1.5rem;
}

.footer-col h3 {
  color: var(--color-white);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--color-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-links a:hover {
  color: var(--color-accent);
}

.social-links, .social-icons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-links a, .social-icons a {
  color: var(--color-light);
  font-size: 1.125rem;
  transition: color var(--transition-fast);
}
.social-links a:hover, .social-icons a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-block: 1rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.875rem;
}

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

.legal-links a {
  color: var(--color-light);
  text-decoration: none;
}

/* Back to Top */
#back-to-top {
  position: absolute;
  right: 1rem;
  bottom: 1.5rem;
  background-color: var(--color-accent);
  color: var(--color-black);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  transition: background-color var(--transition-fast);
}
#back-to-top:hover {
  background-color: #d28f03;
}

/*===============================
  Animations (Intersection Observer)
================================*/
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade-in animation is handled by animate-on-scroll class */

.slide-in-left {
  transform: translateX(-40px);
}
.slide-in-right {
  transform: translateX(40px);
}
.animate-on-scroll.visible.slide-in-left,
.animate-on-scroll.visible.slide-in-right {
  transform: translateX(0);
}

/*===============================
  Utilities
================================*/
.alt-bg {
  background-color: var(--color-light);
}

.text-center { text-align: center; }

/* Media Queries Adjustments */
@media (max-width: 992px) {
  .hero {
    padding-block: 3rem 4rem;
  }
  .hero .container {
    flex-direction: column-reverse;
  }
}
