/* =================
   IMPORTS & VARIABLES
   ================= */
:root {
  --bg-dark: #0D0D0D;
  --text-light: #F5F5F5;
  --accent-blue: #00A3FF;
  --accent-blue-darker: #0082cc;
  --bg-card: #1A1A1A;
  --border-color: #2a2a2a;
  --font-main: 'Inter', sans-serif;
  --header-height: 70px;
}

/* =================
   RESET & BASE STYLES
   ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height); /* Offset for sticky header */
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
}

h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem); /* Responsive font size */
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: 3rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  max-width: 65ch; /* Optimal reading width */
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--text-light);
}

img, svg {
  max-width: 100%;
  display: block;
}

/* =================
   UTILITY & LAYOUT
   ================= */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.accent {
  color: var(--accent-blue);
  font-weight: 700;
}

.accent-italic {
  font-style: italic;
  font-weight: 800; /* Slightly bolder for emphasis */
  color: var(--accent-blue);
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5); /* Subtle shadow for contrast */
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 50px; /* Pill shape */
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--accent-blue);
  color: var(--bg-dark);
  border-color: var(--accent-blue);
}

.btn-primary:hover {
  background-color: var(--accent-blue-darker);
  border-color: var(--accent-blue-darker);
  color: var(--bg-dark);
  box-shadow: 0 10px 20px rgba(0, 163, 255, 0.3); /* Enhanced shadow for hover effect */
}

.btn-ghost {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.btn-ghost:hover {
  background-color: var(--accent-blue);
  color: var(--bg-dark);
}

/* =================
   HEADER
   ================= */
#main-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background-color: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#main-header.scrolled {
  background-color: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  gap: 1rem; /* Ensure spacing between logo and button */
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
}

.logo:hover {
  color: var(--accent-blue);
}

/* =================
   SECTIONS
   ================= */
section {
  padding: 6rem 0;
}

/* HERO */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(45deg, #0D0D0D, #1A1A1A, #003366, #0D0D0D);
  background-size: 400%;
  animation: gradientShift 15s ease-in-out infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #hero {
    animation: none;
    background: var(--bg-dark); /* Fallback to solid color */
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

#hero h1 {
  margin-bottom: 1rem;
}

#hero p {
  font-size: 1.25rem;
  margin: 0 auto 2rem auto;
  color: rgba(245, 245, 245, 0.8);
}

/* PROBLEM/SOLUTION */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}

.problem-grid p {
  margin: 0 auto;
}

/* OFFERINGS */
.offerings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.offering-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.offering-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.offering-icon {
  color: var(--accent-blue);
  margin-bottom: 1rem;
}

.offering-icon svg {
  width: 40px;
  height: 40px;
}

/* PROCESS */
.process-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

.process-step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  position: relative;
  padding-left: 50px; /* Space for number and line */
}

.step-number {
  background-color: var(--accent-blue);
  color: var(--bg-dark);
  font-weight: 700;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: absolute;
  left: 0;
  top: 0;
}

.process-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px; /* Center with number */
  top: 40px;
  width: 2px;
  height: calc(100% + 2rem); /* 100% of height + gap */
  background-color: var(--border-color);
}

.step-content p {
  margin-bottom: 0;
  color: rgba(245, 245, 245, 0.8);
}

/* CONTACT */
#contact {
  background-color: var(--bg-card);
  border-radius: 20px;
  margin: 0 5%;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 0.8rem;
  color: var(--text-light);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 163, 255, 0.3);
}

.contact-form button {
  align-self: flex-start;
}

#form-status {
  text-align: center;
  margin-top: 2rem;
  color: var(--accent-blue);
  font-weight: bold;
  display: none;
}

/* =================
   FOOTER
   ================= */
#main-footer {
  padding: 2rem 0;
  margin-top: 6rem;
  border-top: 1px solid var(--border-color);
}

#main-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links a {
  color: rgba(245, 245, 245, 0.7);
}

.footer-links a:hover {
  color: var(--accent-blue);
}

.footer-links svg {
  fill: rgba(245, 245, 245, 0.7);
  transition: fill 0.3s ease;
}

.footer-links a:hover svg {
  fill: var(--accent-blue);
}

/* =================
   ANIMATIONS
   ================= */
.fade-in {
  animation: fadeIn 1s ease-in-out forwards;
}

.fade-in-delay-1 {
  animation: fadeIn 1s 0.3s ease-in-out forwards;
}

.fade-in-delay-2 {
  animation: fadeIn 1s 0.6s ease-in-out forwards;
}

.scroll-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =================
   COOKIE CONSENT BANNER
   ================= */
#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 0;
  z-index: 2000;
  transform: translateY(100%);
  transition: transform 0.5s ease-in-out;
}

#cookie-consent-banner.visible {
  transform: translateY(0);
}

#cookie-consent-banner .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

#cookie-consent-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(245, 245, 245, 0.8);
}

#cookie-consent-banner a {
  text-decoration: underline;
}

#cookie-consent-banner button {
  padding: 0.6rem 1.5rem;
}

/* =================
   RESPONSIVENESS
   ================= */

/* Mobile (max-width: 576px) */
@media (max-width: 576px) {
  #main-header .container {
    gap: 0.5rem; /* Tighter gap on smaller screens */
  }
  #main-header .btn-ghost {
    padding: 0.5rem 1rem; /* Reduced padding for smaller button */
    font-size: 0.9rem; /* Smaller font size to match logo */
    border-width: 1px; /* Thinner border to reduce visual bleed */
  }
}

/* Tablet */
@media (min-width: 768px) {
  .problem-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    text-align: left;
  }
  .problem-grid p {
    margin: 0;
  }
  .offerings-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .process-wrapper {
    flex-direction: row;
    align-items: flex-start;
  }
  .process-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-left: 0;
  }
  .step-number {
    position: static;
  }
  .process-step:not(:last-child)::before {
    top: 19px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
  }
  #main-footer .container {
    flex-direction: row;
    justify-content: space-between;
  }
  #cookie-consent-banner .container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  h2 {
    margin-bottom: 4rem;
  }
  section {
    padding: 8rem 0;
  }
  #contact {
    margin: 0 10%;
  }
}