/* ============================================================================
   KSM Servicios — macOS Aesthetic Layer
   Inspirado en macOS Ventura / Sonoma: Aqua glass, SF Pro typography,
   traffic-light accents y window chrome.
   ============================================================================ */

/* ── macOS system font stack ─────────────────────────────────────────────── */
:root {
  --mac-font: -apple-system, 'SF Pro Display', 'SF Pro Text', BlinkMacSystemFont,
              'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Aqua accent colours (usados como overrides sutiles) */
  --mac-blue:    #0a84ff;
  --mac-teal:    #30d158;
  --mac-red:     #ff453a;
  --mac-yellow:  #ffd60a;
  --mac-glass-bg:       rgba(28, 28, 30, 0.72);
  --mac-glass-border:   rgba(255, 255, 255, 0.12);
  --mac-glass-shadow:   0 8px 32px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0,0,0,0.3);
  --mac-radius:  14px;
  --mac-radius-sm: 8px;
  --mac-radius-pill: 980px;
}

/* ── Override body font ──────────────────────────────────────────────────── */
body {
  font-family: var(--mac-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── macOS Window chrome en el Header ───────────────────────────────────── */
.ksm-header {
  background: var(--mac-glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--mac-glass-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 12px rgba(0,0,0,0.4);
}

/* Traffic-light dots – decorativos, solo en desktop */
.ksm-header .container::before {
  content: '';
  display: inline-flex;
  width: 52px;
  height: 12px;
  border-radius: var(--mac-radius-pill);
  background:
    radial-gradient(circle 6px at 6px 6px, var(--mac-red)    0%, var(--mac-red)    100%) no-repeat 0   0 / 12px 12px,
    radial-gradient(circle 6px at 6px 6px, var(--mac-yellow) 0%, var(--mac-yellow) 100%) no-repeat 20px 0 / 12px 12px,
    radial-gradient(circle 6px at 6px 6px, var(--mac-teal)   0%, var(--mac-teal)   100%) no-repeat 40px 0 / 12px 12px;
  flex-shrink: 0;
  align-self: center;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.5));
  margin-right: 0.75rem;
}

/* ── Botón "Catálogo" en el header ──────────────────────────────────────── */
.btn-catalog-header {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--mac-radius-pill);
  font-family: var(--mac-font);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
  color: #fff;
  background: linear-gradient(
    160deg,
    rgba(10, 132, 255, 0.9) 0%,
    rgba(48, 209, 88, 0.85) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 1px 3px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  white-space: nowrap;
}

.btn-catalog-header::before {
  content: '📋';
  font-size: 0.9em;
}

.btn-catalog-header:hover {
  transform: translateY(-1px);
  box-shadow:
    0 4px 14px rgba(10, 132, 255, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.25);
  opacity: 0.95;
}

.btn-catalog-header:active {
  transform: translateY(0);
  opacity: 0.85;
}

/* ── Enlace del catálogo en el nav (mobile) ─────────────────────────────── */
.nav-link--catalog {
  color: var(--mac-teal) !important;
  font-weight: 600;
}

.nav-link--catalog::after {
  background: var(--mac-teal) !important;
}

/* ── Botón "Catálogo de Muestras" en Hero ───────────────────────────────── */
.btn-catalog {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.2rem;
  border-radius: var(--mac-radius-pill);
  font-family: var(--mac-font);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.015em;
  color: #fff;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(
    145deg,
    rgba(10, 132, 255, 0.88) 0%,
    rgba(48, 209, 88, 0.82) 100%
  );
  box-shadow:
    0 2px 8px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 -1px 0 rgba(0,0,0,0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Specular sheen */
.btn-catalog::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.18), rgba(255,255,255,0));
  pointer-events: none;
  border-radius: var(--mac-radius-pill) var(--mac-radius-pill) 0 0;
}

.btn-catalog:hover {
  transform: translateY(-3px);
  box-shadow:
    0 10px 30px rgba(10, 132, 255, 0.45),
    0 4px 12px rgba(48, 209, 88, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-catalog:active {
  transform: translateY(-1px);
}

.btn-catalog__icon {
  font-size: 1.1em;
  line-height: 1;
}

/* ── macOS-style service cards ──────────────────────────────────────────── */
.service-card {
  background: rgba(28, 28, 40, 0.6);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--mac-radius);
  box-shadow: var(--mac-glass-shadow);
}

.service-card:hover {
  border-color: rgba(10, 132, 255, 0.55);
  box-shadow: 0 24px 48px rgba(10, 132, 255, 0.22), 0 4px 16px rgba(0,0,0,0.4);
}

/* ── macOS-style portfolio cards ────────────────────────────────────────── */
.portfolio-card {
  background: rgba(28, 28, 40, 0.55);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--mac-radius);
  box-shadow: var(--mac-glass-shadow);
}

.portfolio-card:hover {
  border-color: rgba(10, 132, 255, 0.5);
}

/* ── macOS-style CTA button (header) ───────────────────────────────────── */
.cta-button {
  font-family: var(--mac-font);
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  border-radius: var(--mac-radius-pill);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 2px 6px rgba(0,0,0,0.3);
}

/* ── macOS Visor "window frame" para la sección Hero ───────────────────── */
.hero-content {
  background: rgba(18, 18, 30, 0.45);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.6),
    0 2px 0 rgba(255,255,255,0.07) inset;
  padding: 3rem 2.5rem;
  max-width: 860px;
  margin: 0 auto;
}

/* ── Scrollbar macOS style ──────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.03);
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.28);
}

/* ── Responsive: ocultar btn-catalog-header en mobile ──────────────────── */
@media (max-width: 768px) {
  .btn-catalog-header {
    display: none;
  }

  /* Mostrar el nav-link del catálogo en mobile nav */
  .nav-link--catalog {
    display: block;
  }

  /* Hero content sin el panel glass en mobile */
  .hero-content {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 1.5rem;
  }

  /* Traffic lights solo desktop */
  .ksm-header .container::before {
    display: none;
  }
}
