/* styles.css */
:root {
  --header-height: 80px;
  --white: rgba(255,255,255,0.9);
  --accent: #A3D5FF;
  --accent-dark: #4A90E2;
  --text: #333;
  --radius: 16px;
  --transition: all 0.3s ease;
  --max-width: 1100px;
  --footer-bg-start: #4A90E2;
  --footer-bg-end: #A3D5FF;
}

/* Reset & base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: #F4F7FA;
  line-height: 1.6;
}
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 0;
}

/* Offset sections (except hero) below sticky header */
section:not(#hero) {
  scroll-margin-top: var(--header-height);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .6s ease-out, transform .6s ease-out;
}

/* Glass cards */
.glass {
  background: var(--white);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transition: var(--transition);
}
.glass:hover {
  box-shadow: 0 12px 48px rgba(0,0,0,0.12);
}

/* Header & nav */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(255,255,255,0.3);
  border-bottom: 1px solid rgba(200,200,200,0.4);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.logo a {
  font-size: clamp(1rem,3vw,1.5rem);
  font-weight: 700;
  color: var(--accent-dark);
  text-decoration: none;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--text);
  padding: .5rem 0;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent-dark);
  transition: width .3s ease;
}
.nav-links a:hover::after {
  width: 100%;
}

/* Hero */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position:100% 50%; }
  100% { background-position: 0% 50%; }
}
#hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
  background: linear-gradient(-45deg, #A3D5FF, #D5FFDE) center/200% 200%;
  animation: gradientShift 12s ease infinite;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  padding: 8rem 1rem;
  max-width: 800px;
}
/* Increased line spacing in hero title */
.hero-title {
  font-size: clamp(3.5rem, 10vw, 6rem);
  line-height: 1.18;
}
.highlight {
  color: var(--accent-dark);
  position: relative;
  display: inline-block;
  white-space: nowrap;
  margin-top: 0.5rem;
}
.highlight::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  height: 10px;
  width: 0;
  background: black;
  border-radius: 5px;
  transition: width 1s ease-in-out .5s;
}
#hero.visible .highlight::after {
  width: 100%;
}
.tagline {
  font-size: clamp(1.5rem,4vw,2rem);
  max-width: 600px;
  letter-spacing: .5px;
}
.btn-primary {
  background: var(--accent-dark);
  color: #fff;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* Services */
#services {
  padding: 3rem 0 6rem; /* reduced top spacing */
  background: rgba(163,213,255,0.1);
}
#services h2 {
  text-align: center;
  font-size: clamp(2rem,5vw,2.4rem);
  margin-top: .25rem;
  margin-bottom: 3rem;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 98vw;
  }
}
.services-grid .card {
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.services-grid .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.services-grid .card .icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: var(--accent-dark);
}
.services-grid .card h3 {
  font-size: 1.5rem;
  margin-bottom: .75rem;
}
.services-grid .card p {
  color: #555;
  line-height: 1.5;
}
.services-grid .card.ai-support {
  /* Remove min-width and max-width so it matches all other cards */
}
/* Center last two cards in a 3-column grid when there are 5 cards */
@media (min-width: 900px) {
  /* force row 2 positions: ops consulting, AI support, And More */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .services-grid > .card:nth-child(4) {
    grid-column: 1 / 2;
  }
  .services-grid > .card:nth-child(5) {
    grid-column: 2 / 3;
  }
  .services-grid > .card:nth-child(6) {
    grid-column: 3 / 4;
  }
}

/* Testimonials */
#testimonials {
  padding: 3rem 0 6rem;
  background: #f9f9f9;
}
#testimonials h2 {
  text-align: center;
  font-size: clamp(2.2rem, 5vw, 2.6rem);
  margin-top: .25rem;
  margin-bottom: 3rem;
  color: var(--accent-dark);
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
  gap: 3rem;
}
.testimonial {
  background: #fff;
  border-radius: var(--radius);
  border-top: 4px solid var(--accent);
  padding: 2.5rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transition: transform .3s ease, box-shadow .3s ease;
  position: relative;
}
.testimonial:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
blockquote {
  font-size: 1.2rem;
  font-style: italic;
  color: #555;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 1.5rem;
}
blockquote::before {
  content: "“";
  font-size: 3.5rem;
  color: var(--accent);
  position: absolute;
  left: 0;
  top: -10px;
}
.author-info,
.author {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(200,200,200,0.3);
}
.author-name {
  font-weight: 600;
  color: var(--accent-dark);
}

/* Contact */
#contact {
  padding: 3rem 0 6rem;
  background: linear-gradient(135deg, #A3D5FF, #D5FFDE);
}
#contact h2 {
  text-align: center;
  font-size: clamp(2rem,5vw,3rem);
  margin-top: .25rem;
  margin-bottom: 2rem;
  color: var(--accent-dark);
}
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  display: grid;
  gap: 1.25rem;
}
.contact-form button {
  margin-top: 1.5rem;
  align-self: center;
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  background: var(--accent-dark);
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
}
.contact-form label {
  font-weight: 500;
  color: var(--accent-dark);
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  background: #f9f9f9;
  transition: var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--accent-dark);
  background: #fff;
}

/* Footer */
footer.footer {
  background: linear-gradient(135deg, var(--footer-bg-start), var(--footer-bg-end));
  color: #fff;
  padding: 3rem 0;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.footer-logo a {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
.footer-links {
  display: flex;
  gap: 2rem;
}
.footer-links a {
  position: relative;
  text-decoration: none;
  color: #fff;
  transition: color var(--transition);
}
.footer-links a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #fff;
  transition: width .3s ease;
}
.footer-links a:hover::after {
  width: 100%;
}
.footer-copy {
  font-size: .9rem;
  opacity: .8;
}

/* Thank-you popup */
.popup {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center; align-items: center;
  z-index: 200;
}
.popup.show {
  display: flex;
}
.popup .popup-content {
  position: relative;
  background: #fff;
  padding: 3rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: scale(0.8);
  opacity: 0;
  animation: popIn 0.4s ease-out forwards;
}
@keyframes popIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.popup .close-btn {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .header-inner {
    padding: 0.5rem 0.5rem;
  }
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 2rem;
    background: var(--white);
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(80,120,180,0.10);
    transition: background 0.2s;
    z-index: 120;
  }
  .nav-toggle:active, .nav-toggle:focus {
    background: #eaf2fb;
    outline: none;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: auto;
    width: auto;
    min-width: 0;
    max-width: fit-content;
    height: auto;
    background: var(--white);
    box-shadow: -4px 0 24px rgba(80,120,180,0.10);
    border-radius: 0;
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
    margin: 0;
    z-index: 110;
    overflow-y: visible;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links li {
    margin: 0;
    width: 100%;
    padding: 0;
    cursor: pointer;
    list-style: none;
    text-align: left;
  }
  .nav-links a {
    display: block;
    width: 100%;
    font-size: 1rem;
    padding: 0.7rem 0.5rem;
    border-radius: 7px;
    text-align: left;
    transition: background 0.2s, color 0.2s;
    pointer-events: auto;
  }
  .nav-links a:hover, .nav-links a:active, .nav-links a:focus {
    background: #eaf2fb;
    color: var(--accent-dark);
  }
  .logo a {
    font-size: 1.1rem;
  }
  .services-grid {
    gap: 1.5rem;
  }
}
@media (max-width: 480px) {
  .hero-content {
    padding: 1.2rem 0.5rem 2rem 0.5rem;
    gap: 1rem;
    min-height: 65vh;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }
  #hero {
    min-height: 5vh;
    padding: 0 0.2rem;
    align-items: center;
    justify-content: center;
    display: flex;
    width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .hero-title {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
    line-height: 1.12;
    word-break: break-word;
    max-width: 100vw;
    overflow-wrap: break-word;
    white-space: normal;
  }
  .highlight {
    display: inline;
    word-break: break-word;
    max-width: 100vw;
    overflow-wrap: break-word;
    white-space: normal;
    position: relative;
  }
  .highlight::after {
    height: 4px !important;
    bottom: -5px !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    max-width: 100%;
  }
  .tagline {
    font-size: clamp(1.1rem, 4vw, 1.2rem);
    word-break: break-word;
    max-width: 95vw;
    margin-left: auto;
    margin-right: auto;
  }
  .btn-primary {
    font-size: 0.95rem;
    padding: 0.7rem 1.1rem;
    max-width: 80vw;
    white-space: normal;
    word-break: break-word;
  }
  /* Live Site Previews modal tweaks */
  .modal-content {
    padding: 1.2rem 0.5rem 1.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .modal-content h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
  }
  .iframe-container {
    gap: 1.2rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 0.5rem;
    box-sizing: border-box;
  }
  .iframe-wrapper {
    align-items: center;
    width: 100%;
    padding: 0 0.2rem;
    box-sizing: border-box;
  }
  .iframe-wrapper img {
    width: 80vw !important;
    max-width: 85vw !important;
    height: auto;
    margin-bottom: 0.5rem;
    border-radius: 24px !important;
    box-shadow: 0 4px 24px rgba(80,120,180,0.10);
  }
  .iframe-wrapper h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    text-align: center;
  }
  .modal-content > div[style*="text-align: center"] {
    font-size: 1rem !important;
    margin-top: 0.7rem !important;
  }
}

.nav-toggle {
  display: none;
}

/* Mobile menu behavior */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--white);
    position: absolute;
    top: var(--header-height);
    right: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }
  .nav-links.active {
    display: flex;
  }
}

/* Live-Preview Modal */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 200;
}
.modal.show {
  display: flex;
}
.modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.modal-content h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--accent-dark);
}
.close-modal {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}
.iframe-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 768px) {
  .iframe-container {
    flex-direction: row;
  }
}
.iframe-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.iframe-wrapper h4 {
  margin-bottom: 0.5rem;
  text-align: center;
  color: var(--accent-dark);
}
.iframe-wrapper iframe {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: var(--radius);
}

/* Secondary button (preview) */
.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent-dark);
  color: var(--accent-dark);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 1.25rem;
}
.btn-secondary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* Service Modals */
.service-modal-content {
  border-top: 8px solid #4A90E2;
  box-shadow: 0 12px 48px rgba(80,120,180,0.13);
  padding: 2.5rem 2rem 2rem 2rem;
  border-radius: 28px;
  max-width: 700px;
  width: 95vw;
  margin: 0 auto;
  background: var(--white);
  position: relative;
}
#website-modal .service-title { color: #4A90E2; }
#website-modal .service-modal-content { border-top-color: #4A90E2; }
#marketing-modal .service-title { color: #27ae60; }
#marketing-modal .service-modal-content { border-top-color: #27ae60; }
#strategy-modal .service-title { color: #e67e22; }
#strategy-modal .service-modal-content { border-top-color: #e67e22; }
.service-section h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.18rem;
  color: var(--accent-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.service-section ul {
  margin-bottom: 1rem;
  margin-left: 1.2rem;
  color: #444;
  font-size: 1rem;
  line-height: 1.7;
}
.service-price {
  font-size: 1rem;
  color: #888;
  font-weight: 500;
  margin-left: 1rem;
}
@media (max-width: 600px) {
  .service-modal-content {
    padding: 1.2rem 0.5rem 1.2rem 0.5rem;
    border-radius: 18px;
  }
  .service-section h4 {
    font-size: 1rem;
  }
  .service-section ul {
    font-size: 0.95rem;
  }
}