/* ========================================
   Confiable Tech — Stylesheet
   ======================================== */

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

:root {
  /* Blues */
  --blue-900: #0a1628;
  --blue-800: #0f2240;
  --blue-700: #163060;
  --blue-600: #1a4080;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-300: #60a5fa;
  --blue-200: #93c5fd;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;

  /* Neutrals */
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;

  /* Functional */
  --gradient-primary: linear-gradient(135deg, var(--blue-500), var(--blue-300));
  --gradient-dark: linear-gradient(180deg, var(--blue-900), var(--blue-800));
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section--dark {
  background: var(--blue-900);
  color: var(--white);
}

/* --- Header & Nav --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: var(--transition);
}

.header--scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-text {
  color: var(--gray-900);
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--blue-500);
  background: var(--blue-50);
}

.nav-link--cta {
  background: var(--blue-500);
  color: var(--white) !important;
  margin-left: 8px;
}

.nav-link--cta:hover {
  background: var(--blue-600) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-800);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}

.btn-primary {
  background: var(--blue-500);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--blue-600);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-full {
  width: 100%;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient-dark);
  color: var(--white);
  overflow: hidden;
  padding-top: 72px;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 0;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--blue-300);
  margin-bottom: 28px;
}

.hero-brand {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--blue-200);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
}

.stat-plus {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue-400);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--blue-300);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hero Background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}

.hero-orb--1 {
  width: 500px;
  height: 500px;
  background: var(--blue-500);
  top: -150px;
  right: -100px;
  animation: float 8s ease-in-out infinite;
}

.hero-orb--2 {
  width: 400px;
  height: 400px;
  background: var(--blue-400);
  bottom: -100px;
  left: -100px;
  animation: float 10s ease-in-out infinite reverse;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--blue-50);
  color: var(--blue-500);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.section--dark .section-tag {
  background: rgba(37, 99, 235, 0.15);
  color: var(--blue-300);
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray-500);
  max-width: 500px;
  margin: 0 auto;
}

.section--dark .section-subtitle {
  color: var(--blue-200);
}

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

.service-card {
  padding: 36px 28px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.service-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-4px);
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--blue-50);
  color: var(--blue-500);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--gray-900);
}

.service-desc {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* --- Projects --- */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 40px;
  transition: var(--transition);
}

.project-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.project-card--reverse {
  direction: rtl;
}

.project-card--reverse > * {
  direction: ltr;
}

.project-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  border-radius: var(--radius-lg);
}

.project-visual--aaq {
  background: linear-gradient(135deg, #ec4899, #f97316);
}

.project-visual--sovereign {
  background: linear-gradient(135deg, #10b981, #0ea5e9);
}

.project-screenshot {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  object-fit: cover;
}

.project-mockup {
  width: 100%;
  max-width: 280px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.mockup-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--gray-100);
}

.mockup-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
}

.mockup-content {
  padding: 20px;
}

.mockup-line {
  height: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.mockup-line--title {
  width: 70%;
  background: var(--gray-300);
}

.mockup-line--short {
  width: 45%;
  background: var(--gray-200);
}

.mockup-dots {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.mockup-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-100);
}

.mockup-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 80px;
  padding-top: 10px;
}

.chart-bar {
  flex: 1;
  background: var(--gradient-primary);
  border-radius: 4px 4px 0 0;
  min-height: 10px;
}

.project-category {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.project-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--blue-200);
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  padding: 6px 14px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue-300);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* --- Team --- */
.team-grid {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.team-card {
  text-align: center;
  max-width: 340px;
  padding: 48px 36px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  transition: var(--transition);
}

.team-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.team-avatar {
  margin-bottom: 20px;
}

.avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  color: var(--white);
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 700;
}

.team-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.team-role {
  font-size: 0.9rem;
  color: var(--blue-500);
  font-weight: 600;
  margin-bottom: 12px;
}

.team-bio {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* --- Contact --- */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-200);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-input::placeholder {
  color: var(--blue-300);
  opacity: 0.5;
}

.form-input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 8px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(37, 99, 235, 0.15);
  color: var(--blue-400);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.contact-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-200);
  margin-bottom: 2px;
}

.contact-item-value {
  font-size: 1rem;
  color: var(--white);
}

/* --- Footer --- */
.footer {
  background: var(--blue-900);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--white);
  padding: 48px 0 32px;
}

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

.footer-brand {
  margin-bottom: 24px;
}

.footer-brand .logo {
  justify-content: center;
  margin-bottom: 10px;
}

.footer-brand .logo-text {
  color: var(--white);
}

.footer-tagline {
  color: var(--blue-300);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--gray-400);
  transition: var(--transition);
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* --- Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.services-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.services-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.services-grid .animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.team-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.15s; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .project-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 28px;
  }

  .project-card--reverse {
    direction: ltr;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-list {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: var(--white);
    padding: 80px 32px 32px;
    gap: 4px;
    box-shadow: var(--shadow-xl);
    transition: right 0.3s ease;
  }

  .nav-list.active {
    right: 0;
  }

  .nav-link {
    font-size: 1rem;
    padding: 12px 16px;
    width: 100%;
    color: var(--gray-700);
  }

  .nav-link--cta {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .section {
    padding: 72px 0;
  }

  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Form success state --- */
.form-success {
  text-align: center;
  padding: 40px 20px;
}

.form-success-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.form-success h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.form-success p {
  color: var(--blue-200);
  font-size: 0.95rem;
}

/* --- Nav overlay for mobile --- */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
}

.nav-overlay.active {
  display: block;
}
