:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --success: #16a34a;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 14px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Lock body scroll when mobile menu is open */
body.menu-open { overflow: hidden; }

a, button, .btn, input, select, textarea, .lang-toggle button, .menu-toggle, .service-card {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-soft);
}
.lang-toggle button {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s ease;
}
.lang-toggle button.active {
  background: var(--accent);
  color: #fff;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}

/* ---------- Scroll to top button ---------- */
.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
  z-index: 45;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* Hide scroll-top while the mobile menu is open */
body.menu-open .scroll-top {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.scroll-top:hover {
  background: linear-gradient(135deg, var(--accent-hover), #0ea5e9);
}
.scroll-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.scroll-top svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 72px;
  background:
    radial-gradient(1200px 500px at 20% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(800px 400px at 90% 0%, #ecfeff, transparent 60%);
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--accent); }

.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all .15s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--text-muted); }
.btn-whatsapp {
  background: #25D366;
  color: #fff;
}
.btn-whatsapp:hover { background: #1ebe57; color: #fff; }

/* tap feedback */
.btn:active { transform: scale(0.97); }
.lang-toggle button:active { opacity: 0.85; }

.hero-meta {
  margin-top: 28px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 14px;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.section-head p {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.05rem;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all .2s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 {
  font-size: 1.25rem;
  margin: 0 0 10px;
}
.service-card p {
  color: var(--text-muted);
  margin: 0 0 16px;
  font-size: 0.97rem;
}
.service-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.service-card ul li { margin-bottom: 4px; }

/* ---------- About ---------- */
.about { background: var(--bg-soft); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.about-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.about-text p {
  color: var(--text-muted);
  margin: 0 0 14px;
  font-size: 1.02rem;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-card .num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.about-why-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all .2s ease;
}
.about-why-card ul {
  padding-left: 18px;
  color: var(--text-muted);
  line-height: 1.9;
  margin: 0;
}

/* ---------- Contact ---------- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-info li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.contact-info li:last-child { border-bottom: 0; }
.contact-info .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.contact-info .icon svg { width: 18px; height: 18px; }
.contact-info .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.contact-info .value {
  font-size: 0.98rem;
  color: var(--text);
  font-weight: 500;
}
.contact-info .value a { color: var(--text); }
.contact-info .value a:hover { color: var(--accent); }

.lang-pill {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-right: 6px;
  margin-top: 2px;
}

.response-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}
.response-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* ---------- Service area map ---------- */
.map-wrapper {
  margin-top: 48px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.map-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
}
.map-header h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}
.map-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.map-wrapper iframe {
  display: block;
  filter: grayscale(20%) contrast(1.05);
}

/* ---------- Brand tags (services) ---------- */
.brand-row {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.brand-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 4px;
  width: 100%;
  margin-bottom: 4px;
}
.brand-tag {
  display: inline-block;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.contact-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-form h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.contact-form p {
  color: var(--text-muted);
  margin: 0 0 20px;
  font-size: 0.95rem;
}
.form-row {
  margin-bottom: 14px;
}
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px; /* 16px prevents iOS auto-zoom on focus */
  background: #fff;
  color: var(--text);
  transition: border-color .15s ease;
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px; /* WCAG touch-target minimum */
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-row textarea { min-height: 110px; resize: vertical; }
.form-submit {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

/* ---------- 404 page ---------- */
.notfound {
  padding: 96px 0 96px;
  text-align: center;
  background:
    radial-gradient(1200px 500px at 50% -10%, var(--accent-soft), transparent 60%);
}
.notfound .code {
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 8px;
}
.notfound h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.notfound p.lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 32px;
}
.notfound .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
footer {
  margin-top: auto; /* sticky footer — pushes down when content is short */
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: var(--bg-soft);
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-signature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-signature .heart {
  color: #e11d48;
  font-size: 1rem;
  line-height: 1;
}
.signature {
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
  line-height: 1;
}
.signature a {
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}
.signature a:hover,
.signature a:focus-visible {
  color: var(--accent);
}
.signature a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Responsive — Tablet / Small laptops ---------- */
@media (max-width: 820px) {
  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    padding: 4px 24px 32px;
    gap: 0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 51;
    /* Animation: fade + slight slide down */
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity .22s ease,
      transform .22s ease,
      visibility 0s linear .22s;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition:
      opacity .22s ease,
      transform .22s ease,
      visibility 0s linear 0s;
  }
  .nav-links a {
    position: relative;
    padding: 18px 0 18px 14px;
    font-size: 17px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.005em;
    border-bottom: 1px solid var(--border);
    transition: color .15s ease, background-color .15s ease;
  }
  .nav-links a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent);
    border-radius: 2px;
    transition: height .2s ease;
  }
  .nav-links a:hover,
  .nav-links a:active {
    color: var(--accent);
  }
  .nav-links a:hover::before,
  .nav-links a:active::before {
    height: 22px;
  }
  .nav-links a:last-of-type { border-bottom: 0; }
  .nav-links .lang-toggle {
    align-self: stretch;
    margin-top: auto;
    border-radius: 999px;
    height: 52px;
  }
  .nav-links .lang-toggle button {
    flex: 1;
    padding: 0;
    font-size: 15px;
    min-height: 52px;
  }
  .menu-toggle {
    display: block;
    transition: border-color .15s ease, background-color .15s ease;
  }
  .menu-toggle[aria-expanded="true"] {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2px 10px;
    font-size: 22px;
    line-height: 1;
  }
  .about-grid,
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero { padding: 64px 0 48px; }
  section { padding: 56px 0; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn {
    flex: 1 1 220px;
    justify-content: center;
  }
  .map-wrapper iframe { height: 300px; }
}

/* ---------- Responsive — Phones ---------- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .nav { height: 60px; }
  .nav-links.open { top: 60px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 28px; height: 28px; font-size: 12px; }

  section { padding: 48px 0; }
  .section-head { margin-bottom: 40px; }

  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 1.85rem; line-height: 1.15; }
  .hero p.lead { font-size: 1rem; }
  .hero-meta { gap: 10px 18px; font-size: 13px; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn {
    width: 100%;
    flex: 1 1 auto;
    padding: 14px 18px;
    font-size: 16px;
  }

  .service-card { padding: 24px 20px; }
  .service-card h3 { font-size: 1.15rem; }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-card { padding: 16px 10px; }
  .stat-card .num { font-size: 1.5rem; }
  .stat-card .label { font-size: 0.78rem; }

  .about-why-card { padding: 24px 20px; }

  .contact-form { padding: 24px 20px; }
  .contact-info li { padding: 14px 0; gap: 12px; }
  .contact-info .icon { width: 36px; height: 36px; }

  .map-wrapper iframe { height: 240px; }
  .map-header { padding: 18px 20px 12px; }
  .map-header h3 { font-size: 1.05rem; }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
  }
  .signature { font-size: 0.9rem; }

  /* Brand row wraps more compactly on tiny screens */
  .brand-row { gap: 5px; }
  .brand-tag { font-size: 0.72rem; padding: 3px 8px; }

  /* Ensure tap targets are at least 44px for buttons / icons */
  .menu-toggle { min-width: 44px; min-height: 44px; }
  .lang-toggle button { min-height: 36px; padding: 8px 14px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- No-JavaScript banner ---------- */
.noscript-banner {
  background: #fef3c7;
  color: #78350f;
  border-bottom: 1px solid #f59e0b;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.5;
}
.noscript-banner strong { color: #7c2d12; }
.noscript-banner .sep { margin: 0 8px; opacity: 0.4; }
