/* ────────────────────────────────────────────────
   CLOULINE — Website CSS
   ──────────────────────────────────────────────── */

:root {
  --bg:       #080808;
  --bg-card:  #0e0e0e;
  --teal:     #bbc9c7;
  --teal-dim: rgba(187,201,199,0.25);
  --teal-lt:  rgba(187,201,199,0.75);
  --white:    #f4f4f0;
  --gray:     rgba(244,244,240,0.55);
  --gray-lt:  rgba(244,244,240,0.35);
  --border:   rgba(187,201,199,0.14);
  --border-h: rgba(187,201,199,0.28);
  --font-head: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --radius: 5px;
  --section-pad: 120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; max-width: 100vw; }
body { background: var(--bg); color: var(--white); font-family: var(--font-body); font-size: 16px; line-height: 1.6; overflow-x: clip; max-width: 100vw; width: 100%; }
a { color: inherit; text-decoration: none; }
img, svg, video { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; width: 100%; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; letter-spacing: -0.5px; }
h1 { font-size: clamp(38px, 6vw, 80px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 56px); font-weight: 700; }
h3 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
em { color: var(--teal); font-style: normal; }

.section-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 4px; text-transform: uppercase; color: var(--teal); margin-bottom: 28px; text-shadow: 0 0 12px rgba(187,201,199,0.4); }
.section-title { margin-bottom: 60px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; border-radius: var(--radius); transition: all 0.2s ease; cursor: pointer; border: none; white-space: nowrap; }
.btn-primary { background: var(--teal); color: var(--bg); font-weight: 700; }
.btn-primary:hover { background: var(--white); box-shadow: 0 0 24px rgba(187,201,199,0.35); }
.btn-ghost { background: transparent; color: var(--white); border: 1px solid var(--border-h); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-lg { padding: 18px 36px; font-size: 12px; }


/* ══ NAV ══ */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 20px 32px; transition: all 0.3s ease; }
.nav.scrolled { background: rgba(8,8,8,0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 14px 32px; }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.logo-text { font-family: var(--font-head); font-size: 18px; font-weight: 800; color: var(--white); }
.logo-sep { color: rgba(255,255,255,0.25); font-weight: 300; }
.logo-sub { font-family: var(--font-mono); font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: var(--teal); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--gray); transition: color 0.2s; }
.nav-links a:hover { color: var(--white); }
.nav-cta { padding: 10px 20px !important; background: var(--teal) !important; color: var(--bg) !important; font-weight: 700 !important; border-radius: var(--radius); }
.nav-cta:hover { background: var(--white) !important; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--white); transition: all 0.3s; }
.mobile-menu { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100%; background: rgba(8,8,8,0.97); z-index: 99; flex-direction: column; align-items: center; justify-content: center; gap: 32px; }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-family: var(--font-head); font-size: 32px; font-weight: 700; color: var(--gray); transition: color 0.2s; }
.mobile-menu a:hover { color: var(--teal); }


/* ══ HERO ══ */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 120px 32px 80px; overflow: hidden; width: 100%; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.grid-overlay { position: absolute; inset: 0; background-image: linear-gradient(rgba(187,201,199,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(187,201,199,0.04) 1px, transparent 1px); background-size: 60px 60px; }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.glow-1 { width: 500px; height: 500px; top: -100px; right: -100px; background: radial-gradient(circle, rgba(187,201,199,0.12), transparent 70%); }
.glow-2 { width: 400px; height: 400px; bottom: 0; left: 10%; background: radial-gradient(circle, rgba(187,201,199,0.06), transparent 70%); }
.hero-content { max-width: 1200px; margin: 0 auto; width: 100%; position: relative; z-index: 2; }
.hero-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border: 1px solid var(--border-h); border-radius: var(--radius); font-family: var(--font-mono); font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: var(--teal); }
.hero-badges { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }
.hero-title { margin-bottom: 28px; }
.hero-desc { max-width: 540px; font-size: 17px; font-weight: 300; color: var(--gray); margin-bottom: 40px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 64px; }
.hero-metrics { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; width: fit-content; max-width: 100%; background: rgba(14,14,14,0.6); backdrop-filter: blur(8px); }
.metric { display: flex; flex-direction: column; padding: 20px 32px; gap: 4px; }
.metric-value { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--teal); text-shadow: 0 0 16px rgba(187,201,199,0.4); }
.metric-label { font-family: var(--font-mono); font-size: 8px; letter-spacing: 2px; text-transform: uppercase; color: var(--gray-lt); }
.metric-sep { width: 1px; align-self: stretch; background: var(--border); }
.hero-scroll { position: absolute; bottom: 32px; right: 32px; display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 2; }
.hero-scroll span { font-family: var(--font-mono); font-size: 8px; letter-spacing: 3px; text-transform: uppercase; color: var(--gray-lt); writing-mode: vertical-rl; }
.scroll-line { width: 1px; height: 60px; background: linear-gradient(to bottom, var(--teal), transparent); animation: scrollDown 2s ease-in-out infinite; }
@keyframes scrollDown { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

.section { padding: var(--section-pad) 0; border-top: 1px solid var(--border); }


/* ══ PROPUESTA ══ */
.propuesta-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 80px; align-items: start; }
.cols-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 32px; margin-bottom: 32px; }
.col-divider { width: 1px; background: linear-gradient(to bottom, transparent, var(--border-h), transparent); align-self: stretch; }
.col-title { font-family: var(--font-mono); font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: var(--teal); margin-bottom: 20px; }
.item-list li { position: relative; padding-left: 20px; margin-bottom: 16px; font-size: 14px; color: var(--gray); line-height: 1.6; }
.item-list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.item-list.dim li::before { background: var(--border-h); }
.item-list li strong { color: var(--white); font-weight: 600; }
.promise-bar { display: flex; align-items: center; gap: 24px; border: 1px solid var(--teal); border-radius: var(--radius); padding: 20px 24px; background: linear-gradient(135deg, rgba(187,201,199,0.06), rgba(8,8,8,0.95)); box-shadow: 0 0 24px rgba(187,201,199,0.12), inset 0 0 30px rgba(187,201,199,0.04); width: 100%; }
.promise-icon { font-size: 20px; flex-shrink: 0; }
.promise-items { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; }
.promise-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.promise-kpi { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--teal); text-shadow: 0 0 12px rgba(187,201,199,0.5); }
.promise-desc { font-size: 11px; color: var(--gray); line-height: 1.4; }
.promise-sep { width: 1px; height: 40px; background: linear-gradient(to bottom, transparent, var(--border-h), transparent); flex-shrink: 0; }


/* ══ PROCESO ══ */
.proceso { background: var(--bg-card); }
.areas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.area-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 32px; background: var(--bg); position: relative; overflow: hidden; transition: border-color 0.3s, box-shadow 0.3s; width: 100%; }
.area-card:hover { border-color: var(--teal); box-shadow: 0 0 32px rgba(187,201,199,0.1); }
.area-number { font-family: var(--font-mono); font-size: 10px; letter-spacing: 3px; color: var(--border-h); margin-bottom: 20px; }
.area-icon { font-size: 28px; margin-bottom: 16px; }
.area-card h3 { color: var(--white); }
.area-card p { font-size: 14px; color: var(--gray); margin-bottom: 24px; line-height: 1.6; }
.area-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.area-tags li { padding: 4px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; color: var(--teal); text-transform: uppercase; }


/* ══ SERVICIOS ══ */
.servicios-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start; }
.servicios-left h2 { margin-bottom: 20px; }
.servicios-left p { color: var(--gray); font-size: 15px; margin-bottom: 36px; line-height: 1.7; }
.service-list { display: flex; flex-direction: column; }
.service-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); width: 100%; }
.service-item:last-child { border-bottom: none; }
.service-check { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: rgba(187,201,199,0.1); color: var(--teal); font-size: 12px; flex-shrink: 0; margin-top: 2px; border-radius: var(--radius); }
.service-item div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.service-item strong { color: var(--white); font-size: 14px; }
.service-item span { color: var(--gray); font-size: 13px; }


/* ══════════════════════════════════════════
   BLOG SECTION — CARRUSEL
   El carrusel vive dentro de .container (max 1200px)
   para que el calc tenga un ancho de referencia real.
══════════════════════════════════════════ */
.blog-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 20px;
  flex-wrap: wrap;
}
.blog-section-header h2 { margin-bottom: 0; }

/* Wrapper relativo → los botones se posicionan aquí */
.blog-carousel-wrap {
  position: relative;
  width: 100%;
}

/* Track horizontal */
.blog-carousel {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 24px;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
}
.blog-carousel::-webkit-scrollbar { display: none; }

/*
  3 cards exactas:
  width del .blog-carousel = 100% del .container (1200px - 64px padding = ~1136px)
  cada card = (100% - 2 gaps) / 3 = (100% - 48px) / 3
*/
.blog-carousel-card {
  flex: 0 0 calc((100% - 48px) / 3);
  width: calc((100% - 48px) / 3);
  min-width: 0;
  scroll-snap-align: start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.blog-carousel-card:hover { border-color: var(--border-h); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.blog-carousel-card a { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }

/* Imagen */
.bcc-img { width: 100%; height: 190px; overflow: hidden; background: #111; flex-shrink: 0; }
.bcc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.blog-carousel-card:hover .bcc-img img { transform: scale(1.04); }
.bcc-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #111, #0e0e0e); font-size: 28px; opacity: 0.3; }

/* Body */
.bcc-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.bcc-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.bcc-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid var(--border-h); border-radius: 20px; font-family: var(--font-mono); font-size: 8px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--teal); }
.bcc-tag::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--teal); }
.bcc-time { font-family: var(--font-mono); font-size: 8px; letter-spacing: 1px; text-transform: uppercase; color: var(--gray-lt); }
.bcc-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--white); margin-bottom: 10px; letter-spacing: -0.2px; transition: color 0.2s; }
.blog-carousel-card:hover .bcc-title { color: var(--teal); }
.bcc-desc { font-size: 12px; color: var(--gray); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.bcc-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); }
.bcc-date { font-family: var(--font-mono); font-size: 8px; letter-spacing: 1px; color: var(--gray-lt); }
.bcc-arrow { font-family: var(--font-mono); font-size: 10px; color: var(--teal); transition: transform 0.2s; }
.blog-carousel-card:hover .bcc-arrow { transform: translateX(4px); }

/* Botones prev/next */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-h);
  background: rgba(8,8,8,0.92);
  color: var(--teal);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}
.carousel-btn:hover { background: var(--teal); color: var(--bg); border-color: var(--teal); }
.carousel-prev { left: -20px; }
.carousel-next { right: -20px; }

/* Dots */
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.carousel-dot { width: 6px; height: 6px; border-radius: 50%; border: none; background: var(--border-h); cursor: pointer; transition: all 0.2s; padding: 0; }
.carousel-dot.active { background: var(--teal); width: 20px; border-radius: 3px; }


/* ══ CIERRE ══ */
.cierre { position: relative; min-height: 80vh; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0; width: 100%; }
.cierre-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cierre-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 100px 32px; width: 100%; }
.cierre-logo-wrap { width: 80px; height: 80px; border: 1px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 32px; background: rgba(14,14,14,0.8); box-shadow: 0 0 40px rgba(187,201,199,0.1); }
.cierre-brand { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--white); }
.cierre-title-row { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; justify-content: center; }
.cierre-name { font-family: var(--font-head); font-size: clamp(32px, 5vw, 64px); font-weight: 800; color: var(--white); }
.cierre-pipe { font-size: clamp(24px, 4vw, 52px); font-weight: 200; color: rgba(255,255,255,0.2); }
.cierre-role { font-family: var(--font-head); font-size: clamp(32px, 5vw, 64px); font-weight: 800; color: var(--teal); text-shadow: 0 0 30px rgba(187,201,199,0.35); }
.cierre-tagline { font-family: var(--font-mono); font-size: 10px; letter-spacing: 5px; text-transform: uppercase; color: var(--gray); margin-bottom: 36px; }
.cierre-line { width: 280px; max-width: 100%; height: 1px; background: linear-gradient(90deg, transparent, var(--teal), transparent); margin-bottom: 28px; }
.cierre-contact { display: flex; align-items: center; gap: 14px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--gray-lt); margin-bottom: 40px; flex-wrap: wrap; justify-content: center; width: 100%; }
.cierre-dot { color: var(--border-h); }
.cierre-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }


/* ══ FOOTER ══ */
.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-links { display: flex; gap: 28px; }
.footer-links a { font-family: var(--font-mono); font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--gray-lt); transition: color 0.2s; }
.footer-links a:hover { color: var(--teal); }
.footer-copy { font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px; color: var(--gray-lt); }

.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }


/* ══════════════════════════════════════════
   RESPONSIVE — TABLET 900px
══════════════════════════════════════════ */
@media (max-width: 900px) {
  :root { --section-pad: 80px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav { padding: 16px 20px; }
  .nav.scrolled { padding: 12px 20px; }
  .hero { padding: 100px 20px 60px; }
  .hero-content { padding: 0; width: 100%; }
  .hero-desc { max-width: 100%; font-size: 15px; }
  .hero-scroll { display: none; }
  .hero-metrics { flex-direction: column; width: 100%; max-width: 100%; }
  .metric { padding: 16px 20px; width: 100%; }
  .metric-sep { width: 100%; height: 1px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .propuesta-grid, .servicios-grid { grid-template-columns: 1fr; gap: 48px; }
  .cols-grid { grid-template-columns: 1fr; gap: 24px; }
  .col-divider { display: none; }
  .promise-bar { flex-direction: column; align-items: flex-start; padding: 20px; }
  .promise-items { flex-direction: column; width: 100%; gap: 16px; }
  .promise-sep { display: none; }
  .areas-grid { grid-template-columns: 1fr; }

  /* Carrusel tablet: 2 cards */
  .blog-carousel-card { flex: 0 0 calc((100% - 24px) / 2); width: calc((100% - 24px) / 2); }
  .carousel-btn { display: none; }
  .blog-section-header { flex-direction: column; align-items: flex-start; }

  .cierre-inner { padding: 80px 20px; width: 100%; }
  .cierre-dot { display: none; }
  .cierre-contact { flex-direction: column; gap: 8px; width: 100%; }
  .cierre-actions { flex-direction: column; width: 100%; }
  .cierre-actions .btn { width: 100%; justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-brand { justify-content: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
  .container { padding: 0 20px; }
}


/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE 600px
══════════════════════════════════════════ */
@media (max-width: 600px) {
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  h3 { font-size: 18px; }
  .hero { padding: 90px 16px 50px; }
  .hero-badges { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero-desc { font-size: 14px; }
  .hero-actions { gap: 10px; }
  .btn { font-size: 10px; padding: 12px 20px; }
  .btn-lg { padding: 14px 24px; width: 100%; justify-content: center; }
  .container { padding: 0 16px; }
  .area-card { padding: 24px 16px; }
  .area-tags li { font-size: 8px; padding: 3px 10px; }
  .service-item { padding: 14px 0; }

  /* Carrusel mobile: 1 card */
  .blog-carousel-card { flex: 0 0 88%; width: 88%; }
  .bcc-img { height: 160px; }

  .cierre-inner { padding: 60px 16px; }
  .footer-links { gap: 16px; }
  .footer-copy { text-align: center; }
  .footer-brand { justify-content: center; }
  .logo-sub { display: none; }
  .logo-sep { display: none; }
}