/* Blue Stack Technologies — Modern static site */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-muted: #64748b;
  --ink-soft: #475569;
  --accent: #0d9488;
  --accent-light: #14b8a6;
  --accent-dark: #0f766e;
  --accent-glow: rgba(13, 148, 136, 0.15);
  --border: #e2e8f0;
  --hero-dark: #0b1220;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 4px 6px rgba(15, 23, 42, 0.04), 0 24px 48px rgba(15, 23, 42, 0.1);
  --font: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-soft);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-accent {
  color: var(--accent);
  font-weight: 700;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow.light { color: rgba(255, 255, 255, 0.75); }

/* Scroll target for "back to top" */
.page-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.site-header.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--ink);
}

.brand.compact .brand-text { font-size: 1rem; }

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}

.brand.compact .brand-logo {
  width: 32px;
  height: 32px;
}

.brand-text {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s;
}

.nav a:hover { color: var(--accent); }

.nav .btn-outline {
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  color: var(--accent-dark);
  transition: all 0.2s;
}

.nav .btn-outline:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Buttons */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.375rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn-primary {
  border: none;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-ghost {
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* Hero */
.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(13, 148, 136, 0.12), transparent),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(15, 23, 42, 0.04), transparent),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy { animation: fadeUp 0.7s ease both; }

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
}

.lead {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink-muted);
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.trust {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
}

.trust li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.4375rem 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.trust li::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  background: var(--accent-glow);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 9l3 3 7-7' fill='none' stroke='%230d9488' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Hero visual — Legacy → Cloud-native illustration */
.hero-visual {
  margin: 0;
  animation: fadeUp 0.7s 0.15s ease both;
}

.hero-illustration {
  width: 100%;
  min-height: 280px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-illustration svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 280px;
}

/* Stats bar */
.stats-bar {
  padding: 0 0 1rem;
  margin-top: -0.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
  color: var(--ink);
}

.stat span {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* Sections */
.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
}

.section-subtitle {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

/* Services */
.services {
  padding: 4.5rem 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  position: relative;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(13, 148, 136, 0.2);
}

.card.featured {
  border-color: rgba(13, 148, 136, 0.35);
  background: linear-gradient(165deg, #fff 0%, rgba(13, 148, 136, 0.05) 100%);
}

.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-dark);
  background: var(--accent-glow);
  border-radius: 999px;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1.125rem;
  border-radius: 12px;
  background: var(--accent-glow);
  color: var(--accent-dark);
}

.card h3 {
  margin: 0 0 0.625rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
}

.card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

/* Approach */
.approach {
  padding: 4.5rem 0;
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.approach-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}

.approach-copy > p {
  margin: 0 0 2rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-muted);
}

.approach-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.approach-steps li {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}

.approach-steps li:last-child { padding-bottom: 0; }

.step-num {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.approach-steps strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink);
  font-size: 1rem;
}

.approach-steps p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.approach-panel {
  padding: 2rem;
  background: var(--hero-dark);
  color: #e2e8f0;
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-lg);
}

.approach-panel h3 {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  color: #fff;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.tech-tags li {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.approach-panel blockquote {
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.approach-panel blockquote p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #94a3b8;
  font-style: italic;
}

/* Contact */
.contact {
  padding: 4.5rem 0;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(255, 255, 255, 0.08), transparent),
    linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 50%, var(--accent-light) 100%);
  color: #fff;
}

.contact h2 { color: #fff; }

.contact-copy > p {
  margin: 0 0 2rem;
  max-width: 28rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 1rem 1.125rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.contact-link:hover { background: rgba(255, 255, 255, 0.16); }

.contact-link-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.65);
}

.contact-link-value {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.97);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow-lg);
}

.form-status {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
}

.form-status.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-status.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.field span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8125rem 0.9375rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field input.invalid,
.field select.invalid,
.field textarea.invalid {
  border-color: #ef4444;
}

.field textarea { resize: vertical; min-height: 110px; }

.btn-submit {
  width: 100%;
  margin-top: 0.25rem;
  position: relative;
}

.btn-submit.loading .btn-label { opacity: 0; }

.btn-spinner {
  display: none;
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-submit.loading .btn-spinner { display: block; }

/* Footer */
.site-footer {
  padding: 2rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand p {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  gap: 1.75rem;
}

.footer-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .approach-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-width: 420px;
    margin: 2rem auto 0;
  }

  .stats-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav.open { display: flex; }

  .nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav a:last-child {
    margin-top: 0.5rem;
    text-align: center;
    border-bottom: none;
  }
}

@media (max-width: 600px) {
  .hero { padding-top: 3rem; }
  .ctas { flex-direction: column; }
  .btn-primary, .btn-ghost { width: 100%; }
  .footer-grid { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .whatsapp-float { bottom: 1.25rem; right: 1.25rem; width: 52px; height: 52px; }
}

/* WhatsApp chat button */
.whatsapp-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.55);
  color: #fff;
}

/* Focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
