/* ====== Fuente (Inter: Regular/SemiBold/Bold/Black) ====== */
@font-face{
  font-family: "InterVar";
  src: url("https://proyectos-ismaelgonzalez.b-cdn.net/web/font-inter/Inter_24pt-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face{
  font-family: "InterVar";
  src: url("https://proyectos-ismaelgonzalez.b-cdn.net/web/font-inter/Inter_24pt-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face{
  font-family: "InterVar";
  src: url("https://proyectos-ismaelgonzalez.b-cdn.net/web/font-inter/Inter_24pt-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face{
  font-family: "InterVar";
  src: url("https://proyectos-ismaelgonzalez.b-cdn.net/web/font-inter/Inter_24pt-Black.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
}

:root{
  --bg:#fff; --ink:#111; --muted:#f5f5f5; --ring:rgba(0,0,0,.14);
  --gap: clamp(14px, 2vw, 22px);
  --maxw: 1280px;
  --r: 16px;
}
*{ box-sizing:border-box; }
html,body{ margin:0; }
body{ 
  font-family: InterVar, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
  color:var(--ink); 
  background:var(--bg);
}

/* ===== Header ===== */
.wrap{ max-width: var(--maxw); margin: 0 auto; padding: clamp(20px,4vw,36px); }
header{ text-align:center; margin-bottom: clamp(18px,4vw,28px); }
.logo{ height: 36px; display:block; margin: 0 auto clamp(18px,3.5vw,24px); }
@media (max-width:680px){ .logo{ height: 30px; } }
.kicker{ margin:6px 0 4px; font-weight:600; opacity:.9; font-size: clamp(16px,2vw,18px); }
.headline{ margin:0; font-weight:700; letter-spacing:-.01em; font-size: clamp(22px,3.2vw,28px); }

/* ===== Grid: 1 col móvil, 2 col tablet, 3 col desktop ===== */
.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 640px){
  .grid{ grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px){
  .grid{ grid-template-columns: 1fr 1fr 1fr; }
}

.card{
  display:block; text-decoration:none; color:inherit;
  border-radius: 8px; overflow:hidden; background: var(--muted);
  position: relative;
  box-shadow: 0 12px 28px rgba(0,0,0,.06);
  transition: all .3s ease;
}
.card:hover{
  box-shadow: 0 16px 38px rgba(0,0,0,.1);
}

/* Featured ocupa ancho completo */
.card.featured{
  grid-column: 1 / -1;
  box-shadow: 0 16px 48px rgba(0,0,0,.12);
}

.card .thumb{ aspect-ratio: 16/9; width:100%; position:relative; overflow:hidden; }
.card img{ width:100%; height:100%; object-fit:cover; display:block; transform:scale(1); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.card:hover img{ transform: scale(1.04); }

/* Título con degradado (proyectos normales) */
.card .label{
  position:absolute; left:12px; bottom:12px;
  padding:6px 12px; border-radius:6px; 
  background: linear-gradient(135deg, rgba(255,255,255,.92) 0%, rgba(245,245,245,.88) 100%);
  backdrop-filter: blur(8px);
  color:#111; 
  font-weight:500; 
  font-size: 13px;
  letter-spacing:-.005em; 
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: all .3s ease;
}
.card:hover .label{
  background: linear-gradient(135deg, rgba(255,255,255,.95) 0%, rgba(248,248,248,.90) 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

/* Featured - texto blanco sobre negro con degradado */
.card.featured .label{
  font-size: 16px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(0,0,0,.88) 0%, rgba(30,30,30,.75) 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}

/* ===== Modal (vídeo) ===== */
.overlay{
  position: fixed; inset:0; background: rgba(0,0,0,.85); backdrop-filter: blur(4px);
  display:none; z-index: 9998;
}
.overlay.open{ display:block; }

.modal{
  position: fixed; left:50%; top:50%; transform: translate(-50%,-50%);
  width: min(900px, 94vw); 
  display:none; z-index: 9999;
}
.modal.open{ display:block; }
.modal.vertical-video{ width: min(500px, 94vw); }
.modal.square-video{ width: min(600px, 94vw); }

.modal video{ 
  width:100%; height:auto; display:block; 
  max-height: 85vh; object-fit: contain;
  background: #000;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
}
.modal.vertical-video video,
.modal.square-video video{ max-height: 80vh; }

.modal-close{
  position: absolute; top: -60px; right: 0;
  appearance: none; border: 0; cursor: pointer;
  background: #111; color: #fff;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  transition: all .3s ease;
  z-index: 10000;
}
.modal-close:hover{
  background: #ff0000; transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
}

@media (max-height: 700px){
  .modal-close{ top: 8px; right: 8px; width: 44px; height: 44px; background: rgba(17,17,17,.95); }
}
@media (max-width: 640px){
  .modal-close{ top: 12px; right: 12px; width: 44px; height: 44px; background: rgba(17,17,17,.95); }
}

/* Helpers */
.sr{ position:absolute; clip:rect(1px,1px,1px,1px); clip-path: inset(50%); width:1px; height:1px; overflow:hidden; padding:0; border:0; white-space:nowrap; }

/* ===== Botones Flotantes ===== */
.floating-btn{
  position: fixed; z-index: 9990;
  appearance: none; border: 0; cursor: pointer;
  background: #111; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  transition: all .3s ease;
  font-family: inherit;
}

.floating-contact{
  bottom: 24px; left: 24px;
  padding: 14px 20px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  display: flex; align-items: center; gap: 8px;
}
.floating-contact:hover{
  background: #222; transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
}

.floating-scroll{
  bottom: 24px; right: 24px;
  width: 48px; height: 48px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
}
.floating-scroll.show{ display: flex; }
.floating-scroll:hover{
  background: #222; transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
}

@media (max-width: 640px){
  .floating-contact{
    bottom: 16px; left: 16px;
    padding: 12px 16px; font-size: 14px;
  }
  .floating-contact span{ display: none; }
  .floating-scroll{
    bottom: 16px; right: 16px;
    width: 44px; height: 44px;
  }
}

/* ===== Modal Contacto ===== */
.overlay-contact{
  position: fixed; inset:0; background: rgba(0,0,0,.5); backdrop-filter: blur(2px);
  display:none; z-index: 10000;
}
.overlay-contact.open{ display:block; }

.modal-contact{
  position: fixed; left:50%; top:50%; transform: translate(-50%,-50%);
  width: min(540px, 92vw); max-height: 90vh; overflow-y: auto;
  background:#fff; border-radius: 18px;
  display:none; z-index: 10001; box-shadow: 0 28px 80px rgba(0,0,0,.35);
}
.modal-contact.open{ display:block; }

.modal-contact-header{
  text-align:left; padding:20px 20px 16px; border-bottom:1px solid #eee;
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
}
.modal-contact-header h3{ 
  margin:0; font-size:clamp(18px, 2vw, 20px); font-weight:700; 
  letter-spacing:-.01em; line-height: 1.3; flex: 1;
}
.close-contact{
  appearance:none; border:0; background:#111; color:#fff; 
  width:32px; height:32px; border-radius:999px; cursor:pointer; 
  font-weight:600; font-size: 20px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.close-contact:hover{ background:#333; }

.modal-contact-body{ padding:20px 20px 24px; }
.modal-contact-intro{ margin:0 0 20px; font-size:15px; line-height:1.6; opacity:.9; }
.form-modal{ display:grid; gap:14px; }
.group-modal{ display:grid; gap:6px; }
.group-modal label{ font-weight:600; font-size:14px; }
.field-modal{
  width:100%; padding:11px 14px; font:inherit; 
  border:1px solid #ddd; border-radius:10px; 
  background:var(--muted); font-size: 15px;
}
.field-modal:focus{ 
  outline:none; border-color:var(--brand); 
  box-shadow:0 0 0 2px var(--ring); 
}

.btn-send-modal{
  padding:12px 24px; border-radius:999px;
  background:#111; color:#fff;
  font-weight:600; border:0; cursor:pointer; 
  width:100%; text-align:center; font-size: 15px;
  margin-top: 6px;
}
.btn-send-modal:hover{ background:#222; }
.btn-send-modal:disabled{ opacity:0.6; cursor:not-allowed; }

.form-message {
  padding: 12px 16px; border-radius: 8px;
  margin-top: 14px; font-weight: 500; text-align: center;
  font-size: 14px;
}
.form-message.success {
  background-color: #e6f7ec; color: #0f5132;
  border: 1px solid #badbcc;
}
.form-message.error {
  background-color: #f8d7da; color: #842029;
  border: 1px solid #f5c2c7;
}

.note-modal{ 
  margin-top:12px; font-size:13px; opacity:.75; 
  text-align: center; line-height: 1.5;
}
