/* =========================
   0) RESET / BASE
   ========================= */
* { box-sizing: border-box; }
html, body { margin: 0; }

body{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(120deg, var(--bg1), var(--bg3), var(--bg1)) fixed;
  min-height: 100dvh;
}

/* =========================
   1) TOKENS
   ========================= */
:root{
  /* Gradiente */
  --bg1: #042b35;
  --bg3: #0891b2;

  /* Superficies */
  --card:   rgba(255,255,255,.10);
  --border: rgba(255,255,255,.25);
  --chip:   rgba(255,255,255,.15);

  /* Tipografía */
  --text:   #fff;
  --muted:  rgba(255,255,255,.85);

  /* Acentos */
  --accent1: #fbbf24;
  --accent2: #fb7185;

  /* Dimensiones */
  --radius: 18px;
  --gap: 18px;
}

/* =========================
   2) UTILIDADES / LAYOUT
   ========================= */
.container{
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

.grid2{
  display: grid;
  gap: 28px;
  grid-template-columns: 1.1fr .9fr;
}

.center { text-align: center; }

/* Tipos rápidos */
.logo_tittle{ font-size: 2rem; font-family: 'Inter', sans-serif; }
.logo_subtitle{ opacity:.85; font-size: 1.1rem; }
.proyectos_title{ font-size: 2rem; font-family: 'Manrope', sans-serif; }

/* =========================
   3) HEADER
   ========================= */
.header{
  min-height: 68px; /* alto fijo del header */
  display: flex;
  align-items: center;          /* centra todos verticalmente */
  justify-content: center;      /* centra el contenido del contenedor interior */
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, .38);
  border-bottom: 1px solid var(--border);
}

.header-in{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;          /* <-- alinea logo, texto y botón verticalmente */
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Marca / logo */
.logo{
  width: 3rem; height: 3rem; flex-shrink: 0;
  border-radius: 12px;
  background: url("../img/logoheader.png") center/contain no-repeat;
  transform: scale(5) translateX(-30px);
  transform-origin: left center;
}

.logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60%;
  width: 90%;
}

/* apilar título y subtítulo */
.brand{
  margin-left: 0;                 /* anula el 110px heredado */
  display: flex;
  flex-direction: column;         /* <-- columna */
  align-items: center;            /* centrados */
  gap: 2px;
  flex: 1;
  text-align: center;
}

/* Título centrado en header */
.logo_tittle{
  position: static;
  transform: none;
  width: auto;
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  line-height: 1.1;
}

.logo_subtitle{
  position: static;
  transform: none;
  margin: 0;
  font-size: .95rem;
  opacity: .9;
  line-height: 1.1;
}

/* Botón */
.btn{
  display: inline-flex; gap:8px; align-items: center;
  padding:12px 16px;
  border-radius: 14px;
  border:1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.btn.primary{ background:#fff; color:#111; border-color:#fff; }
.btn.ghost{ background: rgba(255,255,255,.10); }

/* Chips / badges */
.badge{
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--chip);
  font-size: .75rem;
  margin-right: 8px;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1; /* ocupa todo el espacio vertical disponible */
}

/* ===== Hero de contacto ===== */
.contact-hero{ text-align:center; margin:38px 0 10px }
.contact-title{
  font-family:"Manrope", Inter, sans-serif;
  font-size: clamp(28px, 5vw, 46px);
  line-height:1.05; letter-spacing:-.02em; margin:0 0 8px;
}
.contact-sub{ margin:0 auto 10px; max-width:720px; color:var(--muted) }

/* ===== Card formulario (glassmorphism) ===== */
.contact-card{
  display:grid; grid-template-columns: 1.1fr .9fr; gap:28px;
  background:rgba(255,255,255,.08); border:1px solid var(--border);
  border-radius: calc(var(--radius) + 4px); padding:22px;
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 60px rgba(12,22,58,.35);
}
@media (max-width: 920px){ .contact-card{ grid-template-columns: 1fr } }

.grid{ display:grid; grid-template-columns:1fr 1fr; gap:var(--gap) }
@media (max-width: 680px){ .grid{ grid-template-columns:1fr } }

.f-control{ display:flex; flex-direction:column; gap:8px }
.f-control > span{ font-weight:600 }
.f-control input,
.f-control textarea{
  background: rgba(255,255,255,.10);
  color:var(--text);
  border:1px solid rgba(255,255,255,.22);
  border-radius:14px; padding:14px 14px;
  outline:none; font: inherit;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.f-control input::placeholder,
.f-control textarea::placeholder{ color:rgba(255,255,255,.6) }
.f-control input:focus,
.f-control textarea:focus{
  border-color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.14);
  box-shadow: 0 0 0 4px rgba(255,255,255,.08);
}
.f-control small.error{ color:#ffd1d1; min-height:1.1em }

.actions{ display:flex; gap:10px; margin-top:10px; flex-wrap:wrap }
.actions .btn{ border-radius:14px }
.actions .btn.primary{ background:#fff; color:#111 }
.actions .btn.ghost{ background:rgba(255,255,255,.10) }

/* Lateral informativo */
.contact-aside{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.18);
  border-radius:16px; padding:16px;
}
.chip{
  display:inline-block; padding:6px 10px; border-radius:999px;
  background:var(--chip); font-size:.85rem; margin-bottom:10px;
}
.contact-list{ list-style:none; padding:0; margin:0; display:grid; gap:12px }
.contact-list li{ display:flex; align-items:flex-start; gap:10px; color:var(--muted) }
.contact-list svg{ width:20px; height:20px; flex:0 0 20px; fill:currentColor; opacity:.85 }

.contact-list a {
  color: var(--text);             /* mismo color blanco que el resto del texto */
  text-decoration: none;          /* sin subrayado */
  font-weight: 500;               /* ligera negrita para que resalte un poco */
  transition: color .2s ease;     /* animación suave al pasar el ratón */
}

.contact-list a:hover {
  color: var(--muted);            /* tono más suave al pasar el ratón */
}

.footer{
  opacity:.8;
  border-top:1px solid var(--border);
  padding:40px 0;
  background: rgba(0,0,0,.78);
  text-align: center;
}

/* Toast */
#toast{
  position: fixed; inset: auto 20px 20px auto;
  background: rgba(0,0,0,.75); color:#fff; padding:12px 14px;
  border-radius:12px; border:1px solid rgba(255,255,255,.2);
  transform: translateY(12px); opacity:0; pointer-events:none;
  transition: .3s ease; z-index: 30;
}
#toast.show{ opacity:1; transform: translateY(0) }

/* ===== Header móvil bonito ===== */
@media (max-width: 640px){
  .header-in{
    display:grid;
    grid-template-columns: 40px 1fr 40px;
    align-items:center; gap:10px;
    padding:12px 14px;
  }
  .logo{ width:32px;height:32px; transform:none; background-size:contain; justify-self:start }
  .brand{ margin-left:0; display:flex; flex-direction:column; align-items:center; gap:2px }
  .logo_tittle{ position:static; transform:none; margin:0; text-align:center; font-size:1.2rem }
  .logo_subtitle{ margin:0; text-align:center; font-size:.95rem }

  .header-in .btn{
    justify-self:end; width:40px; height:40px; padding:0; border-radius:999px;
    display:block; position:relative; background: rgba(255,255,255,.08);
    border:1px solid var(--border); backdrop-filter: blur(4px);
    font-size:0; white-space:nowrap;
  }
  .header-in .btn::before{
    content:""; position:absolute; top:50%; left:50%; width:20px; height:20px;
    transform: translate(-50%, -50%);
    background: center/contain no-repeat
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' ry='2'/%3E%3Cpolyline points='3,7 12,13 21,7'/%3E%3C/svg%3E");
  }
}
