/* ============================================================
   FLOWFORGE — Main Stylesheet
   Colour palette: Deep navy + electric blue accent
   ============================================================ */

:root {
  /* Colours */
  --navy:       #0B1120;
  --navy-light: #131C31;
  --navy-mid:   #1A2744;
  --accent:     #3B82F6;
  --accent-hover:#2563EB;
  --accent-soft: rgba(59, 130, 246, 0.1);
  --white:      #FFFFFF;
  --gray-50:    #F8FAFC;
  --gray-100:   #F1F5F9;
  --gray-200:   #E2E8F0;
  --gray-300:   #CBD5E1;
  --gray-400:   #94A3B8;
  --gray-500:   #64748B;
  --gray-600:   #475569;
  --gray-700:   #334155;
  --gray-800:   #1E293B;
  --gray-900:   #0F172A;
  --green-wa:   #25D366;
  --green-hover:#1DA851;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --container: 1120px;
  --gutter: 16px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ---- Container ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.938rem;
  border-radius: 8px;
  padding: 12px 24px;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-outline {
  border: 1.5px solid var(--gray-200);
  color: var(--gray-700);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-text {
  color: var(--accent);
  padding: 0;
  font-weight: 600;
  font-size: 0.875rem;
}
.btn-text:hover { color: var(--accent-hover); }
.btn-sm { padding: 8px 18px; font-size: 0.875rem; border-radius: 6px; }
.btn-full { width: 100%; }

/* ---- Section labels ---- */
.section-label {
  font-size: 0.813rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.15;
  margin-bottom: 16px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
  transition: box-shadow 0.3s var(--ease);
}
.nav.scrolled { box-shadow: 0 1px 12px rgba(0,0,0,0.06); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-900);
}
.logo-icon { color: var(--accent); font-size: 1.5rem; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gray-900); }

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}
.mobile-toggle span {
  display: block;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}
.mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 140px 0 100px;
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}
.hero-inner { max-width: 720px; }
.hero-label {
  font-size: 0.813rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--gray-900);
  margin-bottom: 20px;
}
.hero-desc {
  font-size: 1.125rem;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 560px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   SERVICES
   ============================================================ */
.services { padding: 100px 0; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.service-card {
  padding: 32px 28px;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  transition: all 0.25s var(--ease);
}
.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.08);
  transform: translateY(-2px);
}
.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: 10px;
  color: var(--accent);
  margin-bottom: 20px;
}
.service-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.service-card p {
  font-size: 0.938rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio {
  padding: 100px 0;
  background: var(--gray-50);
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.project-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-100);
  transition: all 0.25s var(--ease);
}
.project-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  transform: translateY(-3px);
}
.project-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  font-weight: 500;
}
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-700);
}
.project-info {
  padding: 24px;
}
.project-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.project-info p {
  font-size: 0.938rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 32, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--white);
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s var(--ease);
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: 16px 16px 0 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--gray-400);
  background: var(--gray-50);
  border-radius: 50%;
  z-index: 1;
}
.modal-close:hover { color: var(--gray-700); background: var(--gray-100); }
.modal-body { padding: 32px 32px 40px; }
.modal-body .modal-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 8px;
}
.modal-body h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 24px;
}
.modal-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-top: 24px;
  margin-bottom: 8px;
}
.modal-body p, .modal-body li {
  font-size: 0.938rem;
  color: var(--gray-600);
  line-height: 1.7;
}
.modal-body ul {
  list-style: none;
  padding: 0;
}
.modal-body ul li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 6px;
}
.modal-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.modal-tech span {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.813rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 6px;
}
.modal-outcome {
  margin-top: 24px;
  padding: 20px;
  background: var(--gray-50);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}
.modal-outcome p {
  font-weight: 500;
  color: var(--gray-700);
}

/* ============================================================
   PROCESS
   ============================================================ */
.process { padding: 100px 0; }
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 32px;
  margin-top: 48px;
}
.process-step { position: relative; }
.step-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-soft);
  line-height: 1;
  margin-bottom: 12px;
  color: var(--accent);
  opacity: 0.2;
}
.process-step h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.process-step p {
  font-size: 0.938rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding: 100px 0; background: var(--gray-50); }
.about-content { max-width: 640px; }
.about-content p {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 16px;
}
.testimonial {
  margin-top: 32px;
  padding: 24px;
  background: var(--white);
  border-radius: 12px;
  border: 1px dashed var(--gray-200);
}
.testimonial-text {
  font-size: 1rem;
  font-style: italic;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.testimonial cite {
  font-size: 0.875rem;
  font-style: normal;
  color: var(--gray-400);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding: 100px 0; }
.contact-desc {
  font-size: 1.063rem;
  color: var(--gray-500);
  max-width: 520px;
  margin-bottom: 48px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  align-items: start;
}
.contact-channels { display: flex; flex-direction: column; gap: 16px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--gray-100);
  transition: all 0.2s var(--ease);
}
.contact-card:hover { border-color: var(--gray-200); transform: translateY(-1px); }
.contact-card strong {
  display: block;
  font-size: 0.938rem;
  color: var(--gray-900);
  margin-bottom: 2px;
}
.contact-card span {
  font-size: 0.813rem;
  color: var(--gray-400);
}
.whatsapp-card svg { color: var(--green-wa); }
.whatsapp-card:hover { border-color: var(--green-wa); background: rgba(37, 211, 102, 0.04); }
.email-card svg { color: var(--accent); }
.email-card:hover { border-color: var(--accent); background: var(--accent-soft); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--gray-700);
}
.form-group input, .form-group textarea {
  font-family: var(--font);
  font-size: 0.938rem;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--gray-300); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 60px 0 24px;
  background: var(--navy);
  color: var(--gray-400);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}
.footer .logo { color: var(--white); margin-bottom: 12px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.6; max-width: 280px; }
.footer-col h4 {
  font-size: 0.813rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-300);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-400);
  margin-bottom: 10px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid var(--navy-mid);
  font-size: 0.813rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root { --gutter: 20px; }

  /* Nav mobile */
  .mobile-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    z-index: 99;
    background: #FFFFFF;
    flex-direction: column;
    align-items: stretch;
    padding: 32px var(--gutter);
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1.063rem;
    border-bottom: 1px solid var(--gray-100);
  }
  .nav-links .btn {
    margin-top: 16px;
    width: 100%;
    text-align: center;
    border-bottom: none;
  }

  /* Hero */
  .hero { padding: 110px 0 60px; }

  /* Portfolio */
  .portfolio-grid { grid-template-columns: 1fr; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

  /* Modal */
  .modal { max-height: 90vh; border-radius: 12px; }
  .modal-body { padding: 24px 20px 32px; }
  .modal-body h2 { font-size: 1.375rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.875rem; }
  .hero-desc { font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
}
